I am using RC embeddable widget with the CRM, I need to do contact/match request to CRM for Inbound calls and outbound calls as well. There is telephone number parse request always dispatching before the actions triggered.
Is there any way to get the telephone-number/parse response to use for my APIs?
I can't directly get the bearer token from local storage for the manual request again for the telephone-parse API.
Is there any way to get the telephone-number/parse response to use for my APIs?
I can't directly get the bearer token from local storage for the manual request again for the telephone-parse API.
-
548 Points
Posted 3 months ago
Embbnux Ji, Employee
-
1,268 Points
Hi, Sharmilan I am not very clear about why you need to parse phone number. Can we show same details.
You can use this package to parse phone number in local https://www.npmjs.com/package/@ringcentral-integration/phone-number this is source code https://github.com/ringcentral/ringcentral-js-widgets/tree/master/packages/phone-number
You can use this package to parse phone number in local https://www.npmjs.com/package/@ringcentral-integration/phone-number this is source code https://github.com/ringcentral/ringcentral-js-widgets/tree/master/packages/phone-number
-
548 Points
Hi, Embbnux Ji,
FYI I am using fake numbers.
I have 2 issues. First,
For outbound calls in the calling screen shows as `Unknown` for contact name, even the same number exists in the CRM. I am attaching snap-shot here.


Second, if number might not match exactly for some reasons, such as not included country code in the CRM. For this scenario, I need to parse the number before send the search request, I will try with your NPM package.
FYI I am using fake numbers.
I have 2 issues. First,
For outbound calls in the calling screen shows as `Unknown` for contact name, even the same number exists in the CRM. I am attaching snap-shot here.


Second, if number might not match exactly for some reasons, such as not included country code in the CRM. For this scenario, I need to parse the number before send the search request, I will try with your NPM package.
(Edited)
Embbnux Ji, Employee
-
1,268 Points
I think two issues are same problem. Contact search and contact match use data from different path https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/third-party-service-in-widget... For match path, widget will send normalized phone numbers array to your event listener. You should reponse a object which use previous normalized phone numbers as object key.
For example:
When you get phone numbers from request: data.phoneNumbers = [+1234567890],
you should response object:
{
'+1234567890': [matchedContactData]
}
For example:
When you get phone numbers from request: data.phoneNumbers = [+1234567890],
you should response object:
{
'+1234567890': [matchedContactData]
}
(Edited)
-
548 Points
Thanks, I missed adding inside the array.
{
'+1234567890': matchedContactData
}
Now works fine.
{
'+1234567890': matchedContactData
}
Now works fine.