Is it possible to get conversation ID from Architect Workflow?

Hello everyone,

I want to add participant data to the conversation from my workflow using the /api/v2/conversations/{conversationId}/participants/{participantId}/attributes API, but can't figure out how to retrieve ID of conversation the workflow belongs to (I can't pass ID as input parameter to the workflow).

Thanks,
Irina

Hi Irina

I'm certainly no expert with the Workflow types, but you might need to pass the ID to it when you call the workflow.

Eg you might have a DataAction or external process that runs the /api/v2/flows/executions API

For a DataAction you might have the body like
{
"flowId": "${input.flowId}",
"inputData": {
${input.attributes}
}
}

And then when you call the DataAction you might have this as the attributes input
""Flow.Callid": "" + Call.ConversationId + ""

Hi Anton,
thank you for your reply.

Unfortunately, I can't pass conversation ID as the input parameter to my workflow, because I am going to execute it from the Data Action action of the wrap-up call rule for outbound calls that were not answered by person.
And there is no parameter in the wrap-up call rule (at least, I have not found) that contains current conversation ID .

There isn't currently any way to get the conversation ID in this context. You can request new features and share your use case at https://genesyscloud.ideas.aha.io/.

Depending on what you're trying to do, you should be able to make a strongly educated guess about the conversation ID by:

  • Sending the contact ID via the data action, then use GET /api/v2/outbound/contactlists/{contactListId}/contacts/{contactId} to get the timestamp from callRecords.lastAttempt
  • Use an analytics conversation detail query with a filter on the contact ID and the interval set to +/- a reasonable time from the last attempt timestamp to find the conversation
  • Use that conversation ID with other API endpoints

Hi Tim,
Thanks for your suggestion, I will try to implement it.
I also voted for this idea Outbound Rule executing data action - | Genesys Cloud Ideas Portal (aha.io).

It's also worth pointing out that this sort of automation is exactly the sort of use case encompassed by Triggers, which are currently in beta (the APIs for managing Triggers can be found in the PreviewAPI section of the developer center, grouped under "process automation"). A trigger allows for the subscription to an event topic, applies filtering logic to the event message, and in the event of a match with the filter criteria, will execute a workflow. These workflows do accept "ID" as an input, which is taken directly from the event payload.

Please feel free to reach out to me at richard.schott@genesys.com if you'd like more info on this beta.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.