Associate ExternalContact with WebMessaging Session in Architect Flow

Hello everyone,

I can set a custom attribute in the UI side which includes the customer external contact information.
And can get this data with Get Participant Data block in the Architect Inbound Message Flow.
I can search and find the ExternalContact Id with that custom attribute information in the flow.
However I can't associate the Webmessaging session with that ExternalContact in the flow, is there any block or way to do that?

I saw the following API to associate the external contact with the ConversationId and it worked when I try it from API Explorer in Developer tools.
PUT /api/v2/externalcontacts/conversations/{conversationId}

However, I prefer to do that simply in the flow in a block, is there any way to do that?

Regards,

Hi @ugur.bayramoglu,

To associate an external contact with a message interaction in a flow, you need to make a PUT request to the following endpoint:

/api/v2/externalcontacts/conversations/{conversationId}

In the request body, you need to include the following parameters:

{
"externalContactId": "",
"conversationId": "",
"communicationId": "",
"mediaType": ""
}

Below, what each parameter represents:

  • externalContactId: The ID of the external contact you want to associate the interaction with.

  • conversationId: The conversation ID. You can use the built-in variable of the message flow : Message.ConversationId.

  • communicationId: The communication ID.

  • mediaType: Message.

In summary, to achieve the association between an external contact and a message interaction in your message flow, you would execute two data actions.
The first data action would be used to retrieve the communicationId.
Once you have obtained the communicationId, you would proceed with the second data action to associate the external contact with the interaction.

I hope that helps.

Best Regards,

Charaf

Hi @Charaf, thanks for your reply.
Is there any ready block for the same purpose to just drag and drop and use it in the Inbound Message Flow.

Or the only way is calling that API to associate the external contact with the conversation?

Regards,

Hi @ugur.bayramoglu,

Unfortunately, there is no standard/built-in block available whithing your message flow to directly link an external contact with an inbound interaction.
This means that you will need to handle this process manually by calling the APIs.

Best regards,

Charaf

You'd want to build a series of data actions to leverage the APIs. Then you could drag those data actions into the flows and they would become reusable.
To accomplish this you would want a data action to get the external contact based on some attribute or identifier. Then a data action to merge the temporary ID that is created with every messaging session into the existing external contact. Then you get all the history and when the customer ends up with the agent it pops the correct external contact record.

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