Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make bot to agent handoff? #7

Open
WEBudoGT opened this issue Aug 22, 2022 · 4 comments
Open

How to make bot to agent handoff? #7

WEBudoGT opened this issue Aug 22, 2022 · 4 comments

Comments

@WEBudoGT
Copy link

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
Copy link
Owner

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
Copy link

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
Copy link
Owner

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/

@coffeverton
Copy link

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?

In case anybody else need this, the attribute event.payload.metadata.event is available when the flow begins. In my case, I used the entry node to catch this attribute and save it to a variable, to use it later.

I'm using Botpress V12 self-hosted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants