Genesys Cloud - Main

 View Only

Sign Up

Expand all | Collapse all

Process automation trigger and workflows - >conversationId , ani , dnis from event payload failed to be fetched in the workflow

  Thread closed by the administrator, not accepting new replies.
  • 1.  Process automation trigger and workflows - >conversationId , ani , dnis from event payload failed to be fetched in the workflow

    Posted 01-02-2023 00:16
    No replies, thread closed.
    Hi All,
    My existing workflow+triggers combination have broken . Is anybody else also facing the same issue ?

    I am even trying to test using a simple trigger and workflow as below:-
    I am using a trigger that will be invoked when wrapup "completed" is selected by the agent for "voice" calls . It in turn calls a workflow ,that (at the moment) is just trying to print the conversationId,ani and dnis . I am simply using a random variable "reason" to store value "dnis++conversationId" , and printing the same in End Workflow component. However , only ++ gets printed as checked from flowsExecutionAPI ("completionReason": "++",), the ani and dnis values are null  .

    Trigger being used : 
    {

    "name": "TEST1_TRIGGER",
    "topicName": "v2.detail.events.conversation.{id}.acw",
    "target": {
    "type": "Workflow",
    "id": "0a0b38c9-1ba4-4f80-94dc-1276de2bfd53"
    },
    "version": 1,
    "enabled": true,
    "matchCriteria": [
    {
    "jsonPath": "mediaType",
    "operator": "Equal",
    "value": "VOICE"
    },
    {
    "jsonPath": "wrapupCode",
    "operator": "Equal",
    "value": "Completed"
    }
    ],
    "eventTTLSeconds": 20,
    "description": "triggered when wrapup code Completed is selected"

    }


    This is how my workflow looks like :-

    #ArchitectureandDesign
    #Implementation
    #Integrations

    ------------------------------
    Garima Balodi
    Tata Communications Limited
    ------------------------------


  • 2.  RE: Process automation trigger and workflows - >conversationId , ani , dnis from event payload failed to be fetched in the workflow

    Posted 01-03-2023 10:15
    No replies, thread closed.
    Looking at your flow, there are a couple of things that jump out.  First, variables that are used within the flow that are provided as part of the invocation data of the flow need to be declared as input variables for the flow.  The set of variable provided will be all of the top level simple primatives from the event schema (for your topic, those will be found here: https://developer.genesys.cloud/notificationsalerts/notifications/available-topics#v2-detail-events-conversation--id--acw, and include things like "conversationId" and "dnis").  Because you're referencing some of the attributes as variables within your flow, it is likely the flow is erroring out because they are not marked as input variables.  This is covered under the "target" section here: https://developer.genesys.cloud/platform/process-automation/

    Second, I'm not really sure the "update data" action is doing what you're expecting.  That operation is updating the internal data (specifically a variable named "reason" scoped to the initial state of your workflow), but is not "printing" that variable anywhere (at least that I can see from the workflow posted).  One alternative that I've used when testing triggers is to update the conversation data using "set conversation data".  This takes a conversation ID as an input argument, and allows you to update a participant data attribute on the conversation with information from the flow.  This then appears within the conversation view in the Genesys Cloud UI, as well as being returned within the response from the Conversation API.  Note that this is subject to the first point I made, meaning "conversationId" needs to be declared as an input variable before it can be used as an input to the "update conversation data" step in your flow.  

    If you're still having issues after you've looked into these things, I would recommend contacting support with a conversation ID you've attempted to use with a trigger (include the time frame of the conversation).  They should be able to look at some of the internal logging available to troubleshoot further.

    ------------------------------
    Richard Schott
    Genesys - Employees
    ------------------------------