REST example

This example shows how EngageOne Converse can use the EngageOne Communicate API endpoints to trigger email sending in Communicate.

In this Converse example, the EOCM Token and EOCM Send Email interactions invoke the Communicate API.

Example of action interactions in a Converse bot

Note: For details of interactions, including action interactions, in Converse, see the EngageOne Converse documentation.

Get Chat History

In Converse, this interaction configures the bot to make a transcript of the messages sent between the bot and the user available in the current session. It is this transcript that will be emailed to the user.

EOCM Token

In Converse, this interaction configures the bot to request a machine to machine authentication token from Communicate. The action interaction is configured like this:

Action type REST
Method POST
Body Passes the credentials for your Communicate account. You obtain these from the Company Management page in Communicate. For example:
  "client_id": "",
  "secret": "secret",
  "customer_id": "customerID"
Variable Name Name of the variable that stores the authorization token returned by Communicate in the session.

EOCM Send Email

In Converse, this action interaction configures the bot to trigger Communicate to send an email to the user set in the body of the request.

Action type REST
Endpoint mycampaign/transactional
Method POST
Authorization The authorization token acquired from Communicate. For example:
Bearer {my-variable}
Headers Your Communicate customer ID:
  • Header Name is always PB-Customer-Id
  • Value is your customer ID
Body The data required by the communication in Communicate. The data must conform to the schema of the data source selected for the communication. For example:
    "communication": "Thanks",
    "dataset": [{
        "name": "Henry",
        "email": "an-email-address",
        "chatHistory": "{{chatHistory}}"
    "email_json_path": "$[*].email",
    "sender": "",
    "subject": "Thanks for contacting us today",
    "ignore_missing_fields": true,
    "project": "my-project"