Add a scheduled callback option to a script
Contacts commonly request a return call when they are less busy. This is how to add a schedule callback option to a script using date input and button components together.
-
In script editor, click Date/Time on the component toolbar.
-
To configure the date input component to prompt for a date, time of day, and time zone for the callback, perform these steps:
-
Expand the Common group.
-
Set Includes Time to Yes.
-
-
To store the agent’s date and time selection, perform these steps:
-
On the right expand the Common group.
-
Select a string variable from the Value list. If necessary, create a new variable.
-
Click Apply.
-
-
To add a submit button for the agent to click after entering the date and time, from the Add Components list, click Button.
-
With the button selected, expand the Common group. Change the text value from Submit to Schedule Callback.
-
With your new Schedule Callback button selected, expand the Advanced group.
-
Click No Action Selected. Then click Scripter and then Schedule Callback.
- Create variables for any fields for which you do not want to use a default variable. For example:
- Call Recipient’s Name. Create a variable for the call recipient’s name:
- From the Select variable list, click Create New Variable.
- Name the variable, enable Input, and give it a default value.
- Click Apply. The Scripter.Schedule callback window closes.
- Call Recipient’s Name. Create a variable for the call recipient’s name:
- To complete the action, reopen Scripter.Schedule callback and select the appropriate variable for each of the required fields:
- Call Recipient’s Name: from the Select variable list, click the variable you created above.
- Date/Time to Callback: from the Select variable list, click the variable you created in step 3.
- Phone Number: from the Select variable list, click Scripter.Customer Formatted Number.
- Callback Queue ID: in the Select queue list, start to type the name of the queue. Click its name when the queue appears.
- Preferred Agent ID: from the Select variable list, click Scripter.Agent ID.
-
Click Select.
- Click Update.
How it works
At run time, agents can set a date, time, and the contact’s time zone before they click Schedule Callback to submit the callback request.
Use a button to call the Schedule Callback action
You might think that a Schedule Callback button is unnecessary because you can assign a Scripter.Schedule Callback action to a date input component. Genesys recommends against that practice because the date input control calls its action each time you update the bound variable. You update the bound variable whenever the agent changes a date, time, or time zone setting. To prevent multiple schedule requests and to allow your agents time to review schedule settings before committing callback requests, use a button action instead.