Hi,
I am integrating the RingCentral Embeddable widget to our web app. We want to make & receive calls using the widget. Is there any way to include custom metadata when making a call?
According to docs, these are 2 ways how to make a call (working OK for us):
1)
document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
type: 'rc-adapter-new-call',
phoneNumber: `phoneNumber`,
toCall: true,
}, '*');
2)
RCAdapter.clickToCall('phoneNumber')
We are listening to call events this way:
window.addEventListener('message', (e) => {
// process e.data
});
When certain events are received from the widget, we do an AJAX call to our server an register the call (ID of the call, caller, callee, etc.) However, we would like to extend the event's data with some custom data (e.g. some internal IDs, referrer from where the call was made, etc.) so we are able to link the call with proper entities in our system.
Is this possible?
Thank you.