API & webhooks

These instructions are exclusively for the Product Guide platform and do not apply to the chatbot or live chat platform.

Webhooks

Webhooks allow you to receive emails and/or HTTP requests when triggered by events on the Ebbot platform.

The triggers include:

  • VARIABLE_UPDATED is triggered when a user sets or updates a variable, you also need to specify which variable(s) you want to listen to.

  • PRODUCT_RECOMMENDATION is triggered whenever a user receives a product recommendation.1

You may select one or more of the following data as requirements for a webhook to be triggered.

  • EMAIL is the user’s email address.

  • TEL is the user’s phone number.

For example, you may create a webhook triggered by the VARIABLE_UPDATED trigger but you only want it to be triggered if Ebbot has the user’s email address. In order to achieve this, you can set EMAIL as a requirement.

Email

Enter the target email addresses that the email should be sent to. You can set the subject and content to anything you want including placeholders (see below) or leave them blank for an automatically generated email.

Request

Specify the URL, method and body you want to use, optionally along with authentication. Both the URL and body may include placeholders (see below).

You can test your request by clicking on Done. The request will be sent according to your specification with example placeholder values.

Example URL: https://app.dialogtrail.com/users/{{user_external_email}}/tags

Example Body:

{
  "tag_name": "{{variable.name}}",
  "tag_value": "{{variable.value}}"
}

Placeholders

Placeholders can be used for both emails (subject and body) and HTTP requests (URL and body).

Which placeholders that are available depend on the trigger type.

SUBSCRIBE, UNSUBSCRIBE and DATA_RECEIVED

  • {{user_external_email}} the user’s email

  • {{user_external_phone}} the user’s phone number

  • {{user_card_url}} link to the user’s card on Ebbot

  • {{variable_uuid}} (where variable_uuid is replaced with a tag UUID, for example {{c733b87e-8ad4-4a41-91f7-ac8d56e69515}}) - the string value of the tag for the user.

VARIABLE_UPDATED

  • All above and additionally:

  • {{variable.name}} the variable name

  • {{variable.name.no_spaces}} the variable name without spaces

  • {{variable.value}} the variable value

  • {{variable.value.no_spaces}} the variable value without spaces

  • {{variable.value.boolean}} the variable value as a boolean

  • {{variable.value.integer}} the variable value as an integer

PRODUCT_RECOMMENDATION

  • The four first and additionally:

  • {{product_ids}} a JSON array with the product ids (suitable for HTTP request JSON bodies)

  • {{product_ids_string}} a comma-separated list of the product ids

  • {{product_guide_id}} the product guide id

  • {{product_guide_name}} the product guide name


  1. Currently, product recommendation webhooks are sent on every recommendation in the last step for every guide. If your guides receive a lot of traffic, it may be unsuitable to use the email webhook type.

Last updated