Get ConversationID as a custom Substitution

Use Case:

Agent initiates an outbound SMS on behalf of the queue. As part of the canned responses we want to pass the conversationID. I'm not seeing away to grab that. I've tried id, I've tried adding a script that sets the conversationId as a customer participate data and then in the customer substitution I tried calling the that participate data. No Luck.

Any help or creative thoughts would be welcomed.

Hello,

I just did a quick test and I think I understand what your issue is.

When using a canned response with a custom substitution in your canned response, the Genesys Desktop tries to find participant data with the same name in the customer's participant structure (conversation - participant with purpose = external or customer).

When your agent initiates the outbound SMS on behalf of the queue, the Script seems to behave differently compared to inbound conversations.
If you define a Script's variable with Output enabled, the Script will add it to the agent's participant data (and not to the customer's participant data).

That's why your canned response is not picking the custom substitution (that leverages your participant data).

What you can do is to to define a Genesys Cloud Data Actions integration and to create a Data Action to update participant data. You can leverage this endpoint: PATCH /api/v2/conversations/{conversationId}/participants/{participantId}/attributes
I have not done my test using Script and Data Actions - I leveraged the API Explorer (Developer Tools) directly. But that should work the same way.

Then, in your Script, you can execute this Data Action using "Scripter.Interaction ID" as the conversationId and "Scripter.Customer Participant ID" as the participantId.
You will then be able to add your participant data into the customer's participant structure (e.g. "GenesysCloudConversationId" as keyname).
In your canned response, you'll define a custom substitution with name "GenesysCloudConversationId" and you will then insert your custom substitution in the canned response.

Regards,

Thanks Jerome that makes sense I will try that today.

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