Incoming webhooks
An incoming webhook lets you use the conversational AI and intent detection in a platform of your choice. You can start conversations and Ebbot will try to match the phrase with a scenario and respond with a proper answer.
Follow the instructions below to add an incoming webhook
Head to the webhook page in the integrations section in the left sided menu.
Click on add and then choose incoming as the type
Give the webhook a name
Click on save
Send a request
Once you have the webhook URL you only need to make a post request to that URL to start the conversation. You can run the conversation in sandbox mode which means that it will not be created in the conversations table. The bot will still respond as in a regular conversation.
On the first request that isn't in sandbox mode you will receive a chat id that should be use if you like to continue the conversation with the same id. It's required if you would like to use context and be able to answer on follow-up questions. If you don't pass the chat id a new conversation will be started for each request.
POST
https://v2.ebbot.app/api/webhooks/:webhookid
Request Body
Name | Type | Description |
---|---|---|
chatId | string | To continue on an existing conversation |
type | string | The type of the message |
value | string | The message to be sent |
Example request
Example response
Set a variable
If you have triggered a scenario that contains buttons with variables you set the type to variable and then pass the clicked variable button to the value property.
Make transition
If you have a triggered scenario that contains buttons with a transition to another scenario you have to send the request with type scenario. You either link to the top of the scenario by passing the scenario id or link to a state in that scenario by adding the state id.
Last updated