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?
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.
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.
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.