Updating Participant Data on Call End

Trying to adapt the steps in this video Genesys Process Automation with Event Triggers - YouTube as well as follow the documentation here https://developer.genesys.cloud/platform/process-automation/ to create a trigger on acd.end, I set up a trigger like so:
{
"id": "58d18926-cbea-4245-93de-7cd59e2fd3c3",
"name": "Conversation.end Trigger",
"topicName": "v2.detail.events.conversation.{id}.acd.end",
"target": {
"type": "Workflow",
"id": "2b369842-bed0-445d-ac29-445f7a142b30"
},
"version": 2,
"enabled": true,
"matchCriteria": [
{
"jsonPath": "mediaType",
"operator": "Equal",
"value": "VOICE"
}
],
"description": "This trigger fires whenever a conversation ends, used by Davis for testing",
"selfUri": "/api/v2/processautomation/triggers/58d18926-cbea-4245-93de-7cd59e2fd3c3"
}

And for testing set up a simple workflow that updates the Conversation Data of "State" with "GA" (it previously was "OH") however I haven't been successful in doing so. With how simple the workflow is I'm assuming something is wrong with the trigger but am not sure. I'm making an inbound call from my cellphone into a IVR that sets a bunch of mock participant data, then sends it to a queue that I'm a member of, from there I end the call as the agent and would expect the workflow to be triggered. Having a hard time following the documentation on this but most of it seems pretty simple so not sure what I could be missing.

My only hunch is that Flow.conversationId just being a defined input variable seems like it's missing something, however that's all that was done in the video.

image

Edit: I thought maybe it had to do w/ the trigger not actually working the way I thought it did so I made another trigger that is on WRAP, still unable to get it to function:
{
"id": "9e71ed20-17a2-422b-a1b8-4f492115249d",
"name": "Conversation.end Trigger",
"topicName": "v2.detail.events.conversation.{id}.wrapup",
"target": {
"type": "Workflow",
"id": "2b369842-bed0-445d-ac29-445f7a142b30"
},
"version": 1,
"enabled": true,
"matchCriteria": [],
"description": "This trigger fires whenever a conversation is wrapped, used by Davis for testing",
"selfUri": "/api/v2/processautomation/triggers/9e71ed20-17a2-422b-a1b8-4f492115249d"
}

Hi @Davis_Walker,

I just noticed a small typo in the screenshot example you shared. It appears that you misspelled the variable name "conversationId" as "convesationId".

In the event schema related to the topic (v2.detail.events.conversation.{id}.acd.end), the correct variable name should be "conversationId", spelled exactly as it is documented (Available topics).
image

Using incorrect spelling might trigger the workflow, but it will prevent you from updating the participant data as intended.

I hope it is clear :slight_smile:

Best regards,

Charaf

Thanks, that for sure helps! Writing code with dyslexia is quite a fun journey. Even had 3 pairs of eyes looking at this and no one caught it! Got things working now :slight_smile:

Somewhat related, are you aware of a way to see if a interaction has gone through a workflow? I was trying to do so yesterday to figure out if there was an issue with the workflow, or with the trigger which would have likely pointed me to this typo. I would expect that it would show up in the "flows" section but it does not appear to do so.

Hi Davis,

A couple of things:

  1. Right now there is no "good" way to look at whether a flow is fired off. The Architect team is working on a debugger with replay capabilities but they have no ETA for release yet.

  2. I talked with the lead architect in the Architect team and he told me that you could do one of two things.

    • Use the set conversation data function. This should only be used for debugging purposes but you could
      set an attribute on the conversation and then query the specific conversation via the conversation id.
      He hesitated to use this for production code because you can slow down your overall processing
      with too many calls to the conversation API and with too much data make your analytics run slower.
    • Alternatively, if you are running with AWS event bridge, you could list all conversation-end events and
      then filter in a lambda by your flow-id to send a notification.

Neither of these is good for anything other than debugging in a lower environment.

Thanks,
John Carnell
Director, Developer Engagement