Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DND Status #307

Open
SampsonCrowley opened this issue Nov 22, 2019 · 7 comments
Open

DND Status #307

SampsonCrowley opened this issue Nov 22, 2019 · 7 comments

Comments

@SampsonCrowley
Copy link
Contributor

Would be nice to have a way to change DND Status both through a postMessage and in the call settings

I can't seem to figure out where in the embeddable I can get direct access to the SDK with config

want to post to /restapi/v1.0/account/${accountId}/extension/${extensionId}/presence

@embbnux
Copy link
Collaborator

embbnux commented Nov 25, 2019

Hi @SampsonCrowley , you can try this:

document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
  type: 'rc-adapter-presenceItemClicked',
  presenceType: 'DoNotAcceptAnyCalls', // Available, Busy, DoNotAcceptAnyCalls, Offline
}, '*');

Send message to widget iframe to update DnD.

@SampsonCrowley
Copy link
Contributor Author

doesn't change the actual presence, only cosmetic. API call is only triggered on click

@embbnux
Copy link
Collaborator

embbnux commented Nov 26, 2019

@SampsonCrowley Just tried this, and it works in my side:
image
Can you provide more information, such as screenshot, log and network log, so we can find why it didn't work. When user clicks dropdown on left-top presence setting, we send this message to update presence.

@SampsonCrowley
Copy link
Contributor Author

SampsonCrowley commented Dec 5, 2019

there was nothing in the network log last time i tried it. it changed the visible selected option, but my presence still stayed what it was before

@SampsonCrowley
Copy link
Contributor Author

there has apparently been an update to the base widget since I opened this issue, as there is now a "Accept call queue calls" toggle, where that vital checkbox used to be missing

@SampsonCrowley
Copy link
Contributor Author

document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
  type: 'rc-adapter-presenceItemClicked',
  presenceType: 'TakeAllCalls', // Available, Busy, DoNotAcceptAnyCalls, Offline
}, '*');

Does not toggle "Accept Queue Calls" back on if presence is set to "Available"

If I do

document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
  type: 'rc-adapter-presenceItemClicked',
  presenceType: 'DoNotAcceptAnyCalls', // Available, Busy, DoNotAcceptAnyCalls, Offline
}, '*');
document.querySelector("#rc-widget-adapter-frame").contentWindow.postMessage({
  type: 'rc-adapter-presenceItemClicked',
  presenceType: 'TakeAllCalls', // Available, Busy, DoNotAcceptAnyCalls, Offline
}, '*');

It is toggled back on

@embbnux
Copy link
Collaborator

embbnux commented Dec 9, 2019

@SampsonCrowley you are right. This is by design now. Will talk with PM about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants