If then expression assistance

Hi,

I am trying to create an if statement in expression builder and having issues.

I am trying to create an expression that checks if Call.CalledAddressOriginal == ""+44 118 918 5544" then I want to set Call.ExternalTag == "Sales" for example.

Are you able to advise and assist me, please?

Thank you.

What problem are you having?

Hello,

I don't know for sure what the format is for Call.CalledAddressOriginal - if it includes the +, if it has spaces (I doubt).
You could verify this adding the Call.CalledAddressOriginal as a Participant Data (Set Participant Data block) and then get the context of your conversation (or it will be displayed in Performance - Workspace - Interactions).

You would need a Decision or a Switch block (Logical toolbox menu in Architect).
And use: Call.CalledAddressOriginal == "abcd"
You can also transform the number to make sure it is in E164 format (+, country code, ... - no space) with:
ToPhoneNumber(Call.CalledAddressOriginal).e164 == "+441189185544"

Then, to set your External Tag, you would use the Set External Tag block (Data toolbox menu in Architect).

Regards,

Odds are you are going to want a Switch block like Jerome suggested and go down that path.
However just for completeness, if you had to do it in the External Tag with the expression builder, it might look like this:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.