[DestinationEmail] field

Status
Not open for further replies.

Mark Phillips

Customer
Advanced Certified
Joined
Jan 28, 2019
Messages
154
Reaction score
53
I want to integrate with a CRM (pipedrive) but only want the CRM to log calls which are handled by 2 or 3 extensions.

The [DestinationEmail] field could help because if it contains the email address of the extension that handled the call then I could use it to query the CRM to see if the email address belongs to one of the CRM users. If so, then proceed to logging the call, else abort.

However I have read in the CRM integration notes that the [DestinationEmail] field is for future use. It is however available and functional in the CRM Integration Editor tool.

So is this something I can consider using? If not now, when?

Thanks
 
Hello @Mark Phillips,

No, the [DestinationEmail] variable is not used by the CRM engine at the moment. You will always get an empty value from it.

If you want to log calls only for specific agents, then I would use 2 nested scenarios for Report Call. This is what we do in v16 to log calls only for the agents that belong to the call center using the CRM, and not for every extension in the company. You can check the implementations we have in v16 alpha.

Basically, this is what you need to do:
  1. The ReportCall scenario is invoked when the call ends. You have the variable [Agent] which contains the extension number of the agent that received the call. You can query your CRM for an agent having this extension. Then you only populate your CRM with the extensions you want to log calls for.
  2. When the ReportCall scenario gets a reponse back, you chain the call to a second scenario, which will use the agent ID, and register the call in the CRM for that agent ID. If you don't have an agent ID, the call will not be logged.

Kind regards.
 
Thank you - I was half way to doing something like this myself, but instead trying to hard-code [Agent] values in the SkipIf parameter. Is it possible to write logic such as the following for the SkipIf parameter?

SkipIf="[ReportCallEnabled!=True] || [Agent]==1001 || [Agent==2002"

The CRM / XML integration guide doesn't elaborate enough for me to know if the above (or something similar) is valid or not.
 
Yes, you can use that expression, but that would hardcode the values in the template. Using the proposed approach would allow you to set data in the CRM and change the behaviour...

But your proposal is fine if having that hardcoding is good enough for you...

Please note however that you have a typo in your expression, a missing ending bracket. It should be:
Code:
SkipIf="[ReportCallEnabled!=True]||[Agent]==1001||[Agent]==2002"
 
Thanks - I made a logic error - because I want to log calls handled by extensions 1001 and 1002, the statement should be:
Code:
SkipIf="[ReportCallEnabled!=True]||([Agent]!=1001&&[Agent]!=1002)"

Is && the valid operator for Boolean AND?
Is it permissible to use parentheses () in the way I have indicated?
I couldn't see it in the documentation.
 
Actually & is a special character for the XML so you need to escape it:
Code:
SkipIf="[ReportCallEnabled!=True]||([Agent]!=1001&&[Agent]!=1002)"
 
Actually, the evaluation doesn't seem to work. Whether the Agent is 1000, 1001, 1002 or 9999 the ReportCall scenario runs and adds the call to the CRM.

Here's the statement as written in the CRM Integration Editor:
Code:
[ReportCallEnabled]!="True"||([Agent]!="1001"&&[Agent]=="1002")
and here's how it appears in the XML file:
Code:
SkipIf="[ReportCallEnabled]!="True"||([Agent]!="1001"&&[Agent]=="1002")"

It doesn't really matter as I'll pursue the option of looking up the Agentt ID in the CRM, but if you can spot the problem it will be good to know.
 
You're using:
[Agent]=="1002"

instead of:
[Agent]!="1002"
 
Well spotted, but unfortunately it doesn't work, even with:
Code:
[ReportCallEnabled]!="True"||([Agent]!="1001"&&[Agent]!="1002")
 
Have you tried without the quotation marks?
Code:
[ReportCallEnabled]!=True||([Agent]!=1001&&[Agent]!=1002)
 
Yes it throws an exception:
Code:
System.Exception: Unable to parse expression: [ReportCallEnabled]!=True||([Agent]!=1001&&[Agent]!=1002). ---> System.InvalidOperationException: Stack empty.
It doesn't matter as I've implemented the solution you suggested using linked scenarios. Thanks for your help on that.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,323
Messages
591,896
Members
165,474
Latest member
costionofrei