I'm new to this part of the platform, but I thought I had this nailed down. My goal is to trigger a workflow whenever a caller abandons a call in queue. To do this, my approach was to configure a trigger on v2.detail.events.conversation.{id}.customer.end
So I have trigger as noted below, and the JSONPath validator does take this down to a list of the event names, which I then use to see if tAbandon
exists.
In the workflow, I'm really only using Conversation ID as an Input Variable, and then I do the following:
- Get a participant data attribute contains SF_URLPop (Salesforce Case)
- Using that, query the Salesforce API to get additional data for that Case ID
- Using that response, update the Status of the Case to "Closed - In-Queue ABN"
In my Workflow, I have added a debug Reusable Task that appends a Participant Data attribute as the workflow progresses through the 3 steps above.
My issue is, the Salesforce Case isn't updated, and the participant data for debugging isn't populated either. This leads me to believe the trigger isn't firing at all, since I set participant data at all stages of the Workflow in all paths to properly log debugging info. Either that, or my JSONPath is not including the content expected, which is possible since the Genesys documentation has only a single example of this parameter in real-world use. Both Data Actions have tested successful when run manually via the Data Actions test screens.
Trigger
{
"entities": [
{
"id": "80e339c4-5fd1-4a78-883a-512f32f57208",
"name": "Update Salesforce Case When Call Abandons",
"topicName": "v2.detail.events.conversation.{id}.customer.end",
"target": {
"type": "Workflow",
"id": "277a824f-2581-48d1-a740-1f84268f6efe",
"workflowTargetSettings": {
"dataFormat": "TopLevelPrimitives"
}
},
"version": 1,
"enabled": true,
"matchCriteria": [
{
"jsonPath": "mediaType",
"operator": "equals",
"value": "VOICE"
},
{
"jsonPath": "$..participants..metrics..name",
"operator": "Contains",
"value": "tAbandon"
}
],
"description": "When a call abandons, change the Case Status in Salesforce to \"Closed - In-Queue ABN\"",
"selfUri": "/api/v2/processautomation/triggers/80e339c4-5fd1-4a78-883a-512f32f57208"
}
]
}
I've checked to ensure the trigger is set to enabled via the API (did that on creation) and that the input variable on the Workflow (which is published) is actually set as a Flow Input for conversationId
to pick that up from the trigger.
JSONPath $..participants..metrics..name
returns this when run on a conversation JSON returns this array
[
"tContacting",
"tDialing",
"tHandle",
"tTalk",
"tTalkComplete",
"nFlow",
"tIvr",
"tFlow",
"tFlowExit",
"nOffered",
"tAbandon",
"tAcd"
]