Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  How to delete schedule callback that has been scheduled through campaign

    Posted 09-10-2023 05:36
    No replies, thread closed.
    Dear Community 
     
    I am writing to address a situation that has come up regarding our campaign calls to customers.
     
    In the case where a customer does not reply to our initial call, we have set up a system where a callback is scheduled through campaign rules. However, I recently encountered a scenario where we made a call through the campaign, but the customer did not answer. After some time, the customer realized our call and chose to contact us instead. This call reached one of our agents who assisted the customer with their needs.
     
    Now, the pending callback is still scheduled to call the customer again. My question is: how can we delete this pending scheduled callback in an automated way? I have been searching for a solution, but have yet to find one.
     
    I would greatly appreciate any guidance or assistance you can provide on this matter.

    #ArchitectureandDesign
    #Integrations
    #SystemAdministration

    ------------------------------
    Mohannad haddad
    Fourth Dimension Systems LLC
    ------------------------------


  • 2.  RE: How to delete schedule callback that has been scheduled through campaign

    Posted 09-13-2023 01:04
    No replies, thread closed.

    What I usually suggest is to use a DNIS on your campaigns so you can recognize the inbound call was related to a campaign.  Whe it enters the flow, see if there is a contact in the list and set the contact to not callable.  That should keep the callback from dialing as well.



    ------------------------------
    Robert Wakefield-Carl
    ttec Digital
    Sr. Director - Innovation Architects
    Robert.WC@ttecdigital.com
    https://www.ttecDigital.com
    https://RobertWC.Blogspot.com
    ------------------------------



  • 3.  RE: How to delete schedule callback that has been scheduled through campaign

    Posted 09-14-2023 10:59
    No replies, thread closed.

    Thanks for your response, can you elaborate more on this and whats APIs should I used to achieve this



    ------------------------------
    Mohannad haddad
    Fourth Dimension Systems LLC
    ------------------------------



  • 4.  RE: How to delete schedule callback that has been scheduled through campaign

    Posted 09-15-2023 10:00
    No replies, thread closed.

    Mohannad,

    You can do a simple disconnect but it won't post the wrap-up code, which you can updated later using a different URI. CONVERSATIONS > DISCONNECT > POST Performs a full conversation teardown.  Issues disconnect request for any connected media... Conversation - Disconnect

    Alternatively, you can you this PATCH endpoint/URI: CONVERSATIONS > CALLBACKS > PATCH Update conversation participant's communication by disconnecting it.  It disconnects the call, but also allows you to set the wrap-up code, interaction notes, disconnect-endTime, and interaction state. Callback - Patch disconnect

    Patch Callback Disconnect
    I hope this helps you. 


    ------------------------------
    Carlos Albor
    Senior Principal PS Consultant
    ------------------------------



  • 5.  RE: How to delete schedule callback that has been scheduled through campaign

    Posted 11-07-2023 06:07
    No replies, thread closed.

    Hi Carlos,

    I also have this same requirement, I wonder what API should use to get the conversation ID for the original callback scheduled for the campaign.  I'm trying to use /api/v2/analytics/conversations/details/query to get all the conversation details by using ANI but quite lost here with my limited development knowledge. If can provide details information to achieve this, really appreciate it.

    Thank you,

    Hasitha



    ------------------------------
    Hasitha Perera
    Ark Insights Co Ltd
    ------------------------------



  • 6.  RE: How to delete schedule callback that has been scheduled through campaign

    Posted 11-07-2023 15:21
    No replies, thread closed.

    I agree with Robert.  Create flow that evaluates the ANI to see if it matches an unsuccessful callback from a campaign related contact list.  If you're using a workflow to add the callback record to a contact list, you should be data mapping the following properties from the inbound call flow into the respective headers of the contact record.  

    • Contact List Headers (If can set these as participant data from the inbound call, then in the workflow you can get participant data before you add the record to the contact list.  Note: If/when you add new properties/headers to a contact list, you must first delete the contact list first, it will not append the new headers/columns)
      • InConversationId
        • From Inbound call > Set Participant Data > InboundConversationId = Call.ConversationId
        • From Workflow > Get Participant Data > InboundConversationId (The value will be set from the inbound flow to a var in the workflow)
      • ANI
        • From inbound call > Set Participant Data > CallerANI = Right(ToString(ToPhoneNumber(Call.Ani).e164),10)
        • From Workflow > Get Participant Data > CallerANI (The value will be set from the inbound flow to a var in the workflow) 
      • callbackNumber
        • From inbound call > Set Participant Data > CallbackNumber = [Flow|Task|Common].CallbackNumber (The variable you set the callback number to)
        • From Workflow > Get Participant Data > CallbackNumber (The value will be set from the inbound flow to a var in the workflow)

    If you're using a call data action to create a callback interaction, the response should have the callback-conversationId, which you should also include into a header of the contact list.  You could also send the Callback.ConversationId to Participant Data and to a Var in the workflow.  This would make parsing the inbound call much easier if the ANI is different than the callbackNumber.  If the campaign DID is the same as your inbound IVR flow, and the data action to check if the ANI matches a record from the contact list = true and the status of the callback = incomplete.  You may want a prompt to ask if they're calling about a callback or something new.  Their input will dictate the direction it goes.  

    To find the original inbound conversationId, here is what you'll need.

    • First query this URI:  [GET /api/v2/analytics/conversations/details] and use the callback conversationId.  
    • From the response data...
      • You'll want to get the first 10 characters of the conversationStart to determine your interval scope, in a 24 hour window.  (i.e., if the conversationStart is "2023-10-09T14:03:03.883Z" then you'll want to set your Internal as "2023-10-09T00:00:01/2023-10-09T23:59:59" or you can do "2023-10-08/2023-10-09") for the subsequent post query payload.
      • Next you'll want to use the following dimension value from one of the participant sessions in the subsequent post query payload.
        • externalContactId
          • Which is a UUID string.

    As an "or" alternative, if the externalContactId is not found in the POST query, you use the callbackNumbers a fail-safe filter.  

    Now you will need to query this URI [POST /api/v2/analytics/conversations/details/jobs]

    • Set the interval in the post payload (below) by using the scope set from the get/conversations/details/ $Response.ConversationStart
    • Under the segment filters in the post payload (below) insert the UUID for the externalContactId
      • As described above, you can include another layer of segment filtering for the callbackNumbers but as an "or", not an "and".  
    {
      "order": "asc",
      "orderBy": "conversationStart",
      "limit": 10,
      "startOfDayIntervalMatching": true,
      "interval": "2023-10-09T00:00:01/2023-10-09T23:59:59",
      "conversationFilters": [
        {
          "type": "and",
          "clauses": [
            {
              "predicates": [
                {
                  "type": "dimension",
                  "dimension": "originatingDirection",
                  "operator": "matches",
                  "value": "inbound"
                }
              ],
              "type": "and"
            }
          ]
        }
      ],
      "segmentFilters": [
        {
          "type": "and",
          "clauses": [
            {
              "type": "and",
              "predicates": [
                {
                  "type": "dimension",
                  "dimension": "externalContactId",
                  "operator": "matches",
                  "value": "[UUIDofExternalContactIdFromCallbackConversationId]"
                }
              ]
            }
          ]
        }
      ]
    }

    • Now execute the POST query and save the response JobId.

    Next you'll want to query the JobId Status to make sure it is FULFILLED and not QUEUED, PENDING, FAILED, CANCELLED, or EXPIRED. If state is QUEUED  or PENDING, try adding a 5-15 seconds sleep before checking it again.  I usually run a Do{This code loop}Until($Response.state = FULFILLED, or FAILED)   Then check to see IF($Response.State == FULFILLED) If true, then continue.  If False, exit and display the $Response.state and $Response.errorMessage to a report file.  

    • Here is the URI for jobId status: [GET /api/v2/analytics/conversations/details/jobs/{jobId}]
      • All you need for input is the JobId you got from the POST

    Now you would be able to get your response from the POST query.  

    • Here is the URI to get your conversation details from the POST query: [GET /api/v2/analytics/conversations/details/jobs/{jobId}/results]

    You should have at least one conversationId in the response.  If you search for externalContactId, from the callback conversation, you should see it a few times throughout the initial inbound conversation Id.  Now you have your initial conversationId.  

    Here is the same Post query payload with the segment or externalContactId or callbackNumbers.

    {
      "conversationFilters": [
        {
          "type": "and",
          "clauses": [
            {
              "type": "and",
              "predicates": [
                {
                  "type": "dimension",
                  "dimension": "originatingDirection",
                  "operator": "matches",
                  "value": "inbound"
                }
              ]
            }
          ]
        }
      ],
      "segmentFilters": [
        {
          "type": "or",
          "clauses": [
            {
              "type": "and",
              "predicates": [
                {
                  "type": "dimension",
                  "dimension": "externalContactId",
                  "operator": "matches",
                  "value": "[UUIDfromGetConversationQueryofCallback]"
                }
              ]
            },
            {
              "type": "and",
              "predicates": [
                {
                  "type": "dimension",
                  "dimension": "callbackNumber",
                  "operator": "matches",
                  "value": "[CallbackNumberFromGetConversationQueryofCallback]"
                }
              ]
            }
          ]
        }
      ],
      "limit": 10,
      "interval": "2023-10-09T00:00:01/2023-10-09T23:59:59"
    }

    I hope this all helps you.  



    ------------------------------
    Carlos Albor
    Senior Principal PS Consultant
    ------------------------------