question

Himanshu Patel avatar image
Himanshu Patel asked Himanshu Patel answered

Need get customer details when receive Call

Hello,

I integrate https://github.com/ringcentral/ringcentral-embeddable in my website and also have live account for call in US

https://service.ringcentral.com/ from here create new contact with all details.

When i get call than i want to show other information like company name & customer nick name in embeddable popup

Please suggest

developer sandbox
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

If you need to display the customer details inside the embeddable widget, you'll need to clone the embeddable source code and customize it the way you want to and host it in your own server.

If you need to display the customer details in your website, you need to register for the incoming call events notification, then capture the caller phone number and do a lookup to get the customer detailed info then display it.

window.addEventListener('message', (e) => {
  const data = e.data;
  if (data.call && data.call.direction == 'Inbound'){
    switch (data.type) {
      case 'rc-call-ring-notify':
        console.log(`Incoming call from: ${data.call.from.phoneNumber}. Call status: ${data.call.telephonyStatus}`)
      getCustomerDetails(data.call.from.phoneNumber)
      break;
      ...
    }
  }
});

function getCustomerDetails(callerPhoneNumber){
  // do your own look up using the caller phone number
}
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Himanshu Patel avatar image
Himanshu Patel answered

Hello,

According to your suggestion i use below code for get customer data as `data.call.contactMatch.notes` which get details but when i change that details from ringcentral admin than can't get updated value.

Please suggest.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys