Disconnect conversation from script

Is there a way to disconnect conversation from scripts?

Under scripter there are actions like Blind Transfer, Consult Transfer etc but there isn't any action for disconnecting the conversation
Scripter

See the bottom example on this page: https://developer.mypurecloud.com/api/rest/v2/conversations/transfer.html

You can design a Scripter action that uses PureCloud Data Actions. First, retrieve the Agent's participant ID for the current conversation. Then PATCH its state to "disconnected". Then use the Scripter action as the onclick event for a Script button.

Edit: A colleague pointed out that this approach won't work, since Data Actions use client credentials OAuth grants which do not have a user context (this is required for manipulating conversation participants). Instead, you can embed a webpage component in the Agent Script that uses implicit grant OAuth. This webpage app has the context of the logged in user.

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.