Question

embeddable widget change fromNumber dynamically when calling out

  • 1 November 2020
  • 1 reply
  • 179 views

hello, i'm using the embeddable widget, i have 3 numbers for each state i'm calling. From my CRM when selecting a state with many phone numbers, i would like to override the from number value without having to select from dropdown list each time before I make the call. I can populate the to number by using the postMessage as below

document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
    type: 'rc-adapter-new-call',
    phoneNumber: phone,
    fromNumber: <selectedPhoneForTheState>,
    toCall: true,
}, '*');

the fromNumber field doesn't seem to override the current selected number on the widget. is there a way to do this dynamically?

thanks


Reply