Mission 3: Preventing Callback Duplication
🚨 Important Lab Dependency
This mission requires configuration created in the following missions:
- Core Track: Mission 1 - Basic Call Routing (Flow Template, TTS, Language)
- Callback Track: Mission 1 - Adding Callback Functionality
- Callback Track: Mission 2 - Callback on Global Error
If these missions were not completed, some steps in current mission will not function correctly.
Note
This task relies on completing Mission 3 of the Callback Track. Ensure that mission is completed to have a fully functional callback feature in your flow.
Story
If a caller who already has a scheduled callback contacts the contact center again to request another callback, our system can recognize this. It will then notify the caller that a callback is already scheduled and will be completed as soon as the next agent becomes available.
Call Flow Overview
- A new call from a caller, who already has a scheduled callback, enters the flow.
- The flow executes the logic configured in previous missions.
- The call is routed to the appropriate queue, but no agents are available.
- Since no agents are available, a callback option is offered to the caller.
- Once the caller requests for a callback, IVR replies that callback has been scheduled already.
Mission Details
Your mission is to:
-
Enhance the functionality of the Main_Flow_Your_Attendee_ID by introducing an advanced feature to check if a callback already exists for a specific tested number.
-
Use Search API request to fetch the data from Analyzer database. For more details see Search API for details.
Build
-
Switch to the Flow Designer. Open your flow Main_Flow_Your_Attendee_ID and make sure Edit toggle is ON.
-
On the right-hand side, in the Global Flow Properties panel, scroll down to locate the Flow Variables section under Custom Variables. Click the Add Flow Variable button and add the following 3 flow variables:
- Callback Status variable:
Name: callbackStatus
Type: String
Default Value: leave it empty
- Callback Connect Time variable:
Name: callbackConnectTime
Type: String
Default Value: leave it empty
- Search Result variable:
Name: searchresult
Type: String
Default Value: leave it empty
-
Add an HTTP Request node for the Search API query by following this order of steps:
Remove the existing connection between VerifyNumber Option 1 ("Number OK") and Callback node
Add an HTTP Request node and connect VerifyNumber Option 1 ("Number OK") to that node
We will connect this HTTP Request node in next step
Activity Label: HTTPRequest_CallBackSearch
Select Use Authenticated Endpoint
Connector: WxCC_API
Path: /search
Method: POST
Content Type: GraphQL
Copy this GraphQL query into the Query field of the Request Body:
query callbackSearch($from: Long!, $to: Long!, $filter: TaskDetailsFilters) { taskDetails(from: $from, to: $to, filter: $filter) { tasks { callbackData { callbackRequestTime callbackConnectTime callbackNumber callbackStatus callbackOrigin callbackType } lastEntryPoint { id name } } } }Copy the following variables JSON into the GraphQL variables of the Request Body:
{ "from": "{{now() | epoch(inMillis=true) - 15000000}}", "to": "{{now() | epoch(inMillis=true)}}", "filter": { "and": [ { "callbackData": { "equals": { "callbackNumber": "{{NewNumber.DigitsEntered}}" } } }, { "lastEntryPoint": { "id": { "equals": "{{NewPhoneContact.EntryPointId}}" } } } ] } }Parse Settings:
- Content Type: JSON
- Output Variable:
callbackStatus - Path Expression:
$.data.taskDetails.tasks[0].callbackData.callbackStatus
Click + Add New
-
Output Variable:
callbackConnectTime -
Path Expression:
$.data.taskDetails.tasks[0].callbackData.callbackConnectTime

-
Add Set Veriable node
Connect HTTPRequest_CallBackSearch to this node
We will connct Set Variable node in next step
Variable: searchresult
Set To Variable: HTTPRequest_CallBackSearch.httpResponseBody
-
Add a Condition node
Connect Set Variable created in previous step to this node
Connect False exit path to existing CallBack node
We will connect True exit path in next step
Expression:
{{ callbackConnectTime == "-1" ? (callbackStatus == "Not Processed" ? (HTTPRequest_CallBackSearch.httpStatusCode == 200 ? "true" : "false") : "false") : "false" }}Note
Above expression uses nested ternary logic to combine the checks. This evaluates the first condition and then evaluates the second condition if the first is true and so on. In our case the expression returns True only when httpStatusCode equals 200, callbackStatus is Not Processed and callbackConnectTime is -1
-
Add Play Message nodes:
Enable Text-To-Speech
Select the Connector: Cisco Cloud Text-to-Speech
Click the Add Text-to-Speech Message button and paste text: The callback for provided number has been scheduled already. Please await for a callback once next agent becomes available. Thank you for your patience.
Delete the selection for Audio File
Connect True exit path of Condition node created in previous step to this Play Message node
-
Add Disconnect Contact and connect the exit path of the Play Message created in previous step to this node.
-
Validate and publish the flow:
Enable the Validation toggle in the bottom right corner of the flow designer window to check for any potential flow errors and recommendations.
If there are no Flow Errors after validation is complete, click on Publish Flow next to it.
In the pop-up window, ensure that the Latest label is selected in the Add Version Label(s) list, then click Publish Flow.
Testing
-
Make sure your Agent in Not Available state (select any Idle state). In this case call will not be assigned to an agent and callback will be proposed to a caller.
-
Make a call to your Support Number and if success you should hear configured messages and ask to press "1", "2" or "3". Press "1" to schedule a callback and provide a number for a callback. Because in current lab we are having number limitations we are going to provide a well known Cisco Worldwide Technical Support contact number 1 408 526 7209.
-
While keeping your agent Not Available, make another test call to your flow, press "1" and request for another callback to the same number 1 408 526 7209.
-
You should hear a message configured in Step 6 of the current mission.
-
Click on Analyze to visually observe the call flow. Make sure you're viewing latest Published Version.
-
Review the flow and click on HTTPRequest_CallBackSearch. You will see the list of interactions at the bottom of the Analyze window. Find the last interaction (the top in the list) and click on View interaction in debugger link at the right-hand side of the interaction line. This will cross-launch Debugger to that particular call. Flow Debugger will be opened in a new browser tab.
-
Navigate to HTTPRequest_CallBackSearch Activity Name to see Modified Variables at the bottom of right-hand side of the debugger.
-
Click on Set Variable, which is the next step after HTTPRequest_CallBackSearch, to see full Search API response which we wrote to searchresult flow variable on the Step 6 of the current mission configuration.
-
On Webex Desktop, make your agent Available. Webex Contact Center will reserve your agent right away and propose to answer a callback call.
-
Answer the call and wait until you are connected to a Cisco Technical Support IVR and hear a welcome prompt. Then disconnect the call in agent desktop to clean up pending callback requests.
Congratulations, you have succesfully completed Preventing Callback Duplication mission! 🎉🎉




