Schedule Callback using scripter.schedule callback feature

HI Team,

I am trying to create schedule callback using scripts where , The agent asks the client for a phone number and a time to receive a call during live chat with an agent.

My question is how to input their phone number and use it in scripter as its not part of the client data or participant data, neither included in chat registration form ?

I tried using scripts and schedule callback during the chat but its showing as "Failed to schedule callback"

Hello,

The "Scripter.Schedule Callback" action is only meant for voice based conversations.
When triggered, the "Scripter.Schedule Callback" tries to create a callback as part of the existing conversation (i.e. add a callback media channel to the conversation).
It is in fact leveraging POST /api/v2/conversations/{conversationId}/participants/{participantId}/callbacks.
This request to add callback in the existing conversation is only allowed when the initial conversation is voice based.
That's why you are getting this "Failed to schedule callback" error when you invoke it from a chat conversation.

In order to schedule a callback from a chat conversation, you would need to create a Genesys Cloud Data Actions integration and create a Data Action which invokes POST /api/v2/conversations/callbacks
This API endpoint creates a callback conversation on its own (i.e. new conversation/new conversationId).
Note that you can pass custom attributes (participant data) as part of this request ("data" attribute in the request body).
You can trigger it from your Script using a "Data Actions.Execute Data Action" action.

Regards,

Thanks for the solution.

Have one more doubt like how to set up callback in a HTML page and what are the roles needed in genesys cloud to submit a callback?

Hello,

The permissions required to invoke a Platform API endpoint are always documented (click on the selected endpoint in API Explorer on the Developer Center - links I gave in my previous post) under Operation Information section - Required Permissions.
For POST /api/v2/conversations/callbacks, this requires conversation:callback:create permission.

You can invoke the Data Action from a Script.
If you want to create your own HTML page to be displayed in Genesys Desktop, it would be an interaction widget integration. See Client Apps on the Developer Center.

Regards,

Thank you for responding , I have created a agent script and used "create callback" data action but when I try to schedule callback it is throwing error as "Create Schedule Callback : unknown error".

Could you please help me on this.

Hello I don't know what you have in your "create callback" data action.
This is not a predefined data action - so someone imported a sample or created it.
So I can't guess what you have defined in the Request/Response configuration and Input/output contracts of this Data Action.

Also, what happens when you test your Data Action. Does it work? Does it fail?
See here for testing data actions

And you are not saying what variable you are settings/using when invoking your data action from the Script.

The dev forum is meant for questions related to the Platform API and SDKs.
For questions related to feature use and configuration, I'd suggest to ask on the Genesys Cloud CX Community site.

Regards,

Thanks Jerome, One more question we are trying to set up a simple HTML page where its a UI outside of genesys and present the client a few simple fields for time, phone number, name, etc and show that we can get Genesis to then make that call

What is the question?

How to set up a HTML page outside of genesys and have fields like time, phone number, name, etc so that client can enter the details and schedule callback themselves , can you please help how can we achieve that?

You need to develop your web page (HTML and javascript) to manage the fields, ...

In order to submit the request to Genesys Cloud from that page, you'll need to leverage the Genesys Cloud Platform API - i.e. invoking the endpoint for callback (the one I had listed in my previous posts above).
In order to invoke the Platform API, you'll need to trigger an OAuth grant flow with Genesys Cloud to obtain a bearer/access token and be able to invoke the Platform API request - e.g. using an OAuth Implicit Grant client and flow: https://developer.genesys.cloud/authorization/platform-auth/guides/oauth/module-2-implicit-grant

There are several examples available in Blueprints on the Developer Center. You'll need to adapt the code for your UI and for what is called in Platform API.
An example of UI using React or Angular or Vue.js

Regards,

Thanks Jerome , Just troubling to understand what are the permissions or setup needed for an agent to receive callbacks?

Hello,

The Resource Center provides information about feature use and configuration.
About callbacks

Regards,

But we need a phone setup to receive callbacks as an agent , but the phone icon itself is missing from my genesys pure cloud home page . How do I get it enabled and get ready as an agent to receive the scheduled callback?

Hello,

The Developer Forum is meant for questions on Genesys Cloud API & SDKs.

For questions related to Genesys Cloud setup, please ask on the Genesys Cloud CX Community forum.

I would also suggest that you have a look at the different resources (videos, articles, trainings) available on the Genesys Resource center and Beyond site (training).
See New users home - Genesys Cloud Resource Center and Training and setup - Genesys Cloud Resource Center

Regards,

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