douglara / chatwoot-botpress-bridge

Connect Chatwoot to Botpress
62 stars 30 forks source link

How to make bot to agent handoff? #7

Open WEBudoGT opened 1 year ago

WEBudoGT commented 1 year ago

I tried sending the same payload method used on Dialogflow for Chatwoot: { "action": "handoff" }

Which text or payload should I send from Botpress for the conversation to be handed to an agent? In case there's no option to do so, can you please tell me if this bridge sends Botpress any info that can be stored on a variable, and then used on a Botpress API call to Chatwoot's API? This way I could use conversation_id to mark the conversation as Open (instead of Pending).

Thanks!

douglara commented 1 year ago

Hi @WEBudoGT! Nice point about handoff, I not implemented this feature but Its great! Today I'm using code action in botpress to transfer to agent, you have access to full webhook send from chatwoot on botpress using this variable: event.payload.metadata.event

eduardosantanna commented 8 months ago

Hi @douglara!

I'm new to using botpress and I'm looking for some way to handoff to an agent. I tried to do it the way you said, but I couldn't quite understand where exactly "event.payload.metadata.event" would be accessible. I tried creating a custom script and accessing these properties, but they simply don't exist.

I also have another question, which would be about properties such as conversation_id, contact name/number and some other chat data in question, are they accessible in some way within the botpress flow?

douglara commented 8 months ago

Hi @douglara!

I'm new to using botpress and I'm looking for some way to handoff to an agent. I tried to do it the way you said, but I couldn't quite understand where exactly "event.payload.metadata.event" would be accessible. I tried creating a custom script and accessing these properties, but they simply don't exist.

I also have another question, which would be about properties such as conversation_id, contact name/number and some other chat data in question, are they accessible in some way within the botpress flow?

Hello @eduardosantanna, you can check this example to see how to call Chatwoot api using botpress scripts

https://www.linkedin.com/pulse/chatbot-simples-de-integrar-com-qualquer-api-douglas-lara/