When in a message conversation (Whatsapp) a customer is talking to an agent, is there any way to make a transfer to an Inbound Message Flow using the API? I have tried with POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/replace, but it fails.
We have an scenario where after talking to the agent, the customer must be sent to a Message Flow to talk with a Dialogflow bot.
I am not a message expert, but I think that the only way, right now, would be to have the agent end/terminate the message conversation (and possibly update a participant data/attribute just before ending the conversation), and have the customer send a new/next message so it triggers the Inbound Message flow again.
As this will be the same conversation (context/conversationId), the participant data will be available and could be leveraged in the Inbound Message flow to determine what to do next.
For the solution that you are suggesting, is there a way to make the agent to send a pre-defined message when he/she pushes a button within a script? In order to make the customer to answer it.
I don't think you can do this from a Script, using a Genesys Cloud Data Action.
Genesys Cloud Data Action leverages an OAuth client with Client Credentials Grant.
But in order to send a message in an active conversation, you must be authenticated as a user (user-context - OAuth client with Implicit Grant or Authorization Code Grant).
As I don't have access to a system with message in place, I don't know if Canned Responses are available/exposed (I would assume yes). But that would be the easiest way: having the agent select the Canned Response and send it over the conversation (before ending it).
Otherwise, you could do this with a client side integration (using Interaction Widget Integration) but that would require to code the page and to leverage the Platform API.
Note: in this case, the code can leverage an OAuth client with Implicit Grant (user-context).