Chip_Sharp | 2021-04-08 13:25:37 UTC | #1
I'm trying to automate the dial action on a callback interaction. I know I need to use a data action but this isn't exactly my wheelhouse and my developer is unavailable.
I read the thread here: https://developer.usw2.pure.cloud/forum/t/how-to-automate-the-call-action-for-preview-dial-fromcrm/3640 but I'm struggling to get the data action configured properly. My thought is that I need to have a Genesys Cloud Data Action configured and then I need to call that data action as part of the script load for callback interactions.
I used the API explorer to try endpoint /api/v2/conversations/calls/{conversationId} and it successfully dialed, but translating that to a data action is eluding me at this point.
Here's what I have so far, if someone can help me out here, I'll send them a bottle of whatever they're drinking...
P.S. Be gentle, I'm not a great developer and I can admit that.
tim.smith | 2021-04-08 14:28:09 UTC | #2
Unfortunately, I don't believe you can do that with a data action. I believe that API requires a user context; you'll probably get a 400 response with the documented error code not.a.user if you make requests to this endpoint using a data action/client credentials.
To get a user context, the most straightforward way is to build a web page that implements an implicit grant and embed that in a script or make it a client app. You may consider using the JavaScript SDK as it has helpers for authorization and making the request. This will require more coding than a data action, but there's not a no-code way to do this.
I've seen this feature requested before though, so it's likely you'll find an idea to vote and comment on at https://genesyscloud.ideas.aha.io/.
Jerome.Saint-Marc | 2021-04-08 14:34:34 UTC | #3
Just to confirm what Tim said. At this time, the ability to initiate a call requires a user context (i.e. OAuth process with Implicit Grant or Authorization Code Grant). The OAuth Client that you are leveraging in your Data Action is using Client Credentials grant and does not allow to initiate a call.
Regards,
system | 2021-05-09 14:34:40 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 10547