Hey I wanted to know if it is possible to retrieve the country that calls us. I know there is such variable as RemoteName, but it retrieves "Mobile Number, {COUNTRY}, {ADDITIONAL_INFO}". Is it somehow possible to just get the country?
Hi,
You can use this expression to get the caller's country code - ToPhoneNumber(Call.Ani).dialingCode
Thanks and Regards,
Sriram L
And it will return just the country prefix number, correct? Is there an any way of returning just the country? Maybe you have some formula which retrieves that from remote name variable.
Hi,
If your are dealing only with the mentioned format (Mobile Number, {COUNTRY}, {ADDITIONAL_INFO}) in your org, then you can try Split(Call.RemoteName,",")[1] to get the country Name.
But please note that the remote names might be inconsistent and the above expression might fail if it's not in the expected format.
Alternatively, you can always use ToPhoneNumber(Call.Ani).dialingCode to get the country code and then do a lookup to a datatable, where you could store the exact country name. You can also define a static JSON object to refer against with the country code.
Thanks and Regards,
Sriram L
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.