External events

Companies redirect WhatsApp leads to their website for actions such as to:

  • Create an account

  • Book an appointment

  • Purchase an item

These actions take place outside of the WhatsApp conversation, but because of it.

360dialog is able to receive external event actions from companies, and attribute these to the conversation that ignited it – and hence to it's source.

Share external event actions

Companies only need to call the following endpoint and 360dialog will attribute the reported external event to the last conversation the lead engaged with.

External events carrying revenue will help companies in knowing the ROAS of their WhatsApp channel overall, as well as per individual source.

Share an external event

POST https://api.signals.360dialog.io/clients/{client_id}/external-events

Path Parameters

NameTypeDescription

client_id*

string

ID of the client/company in 360dialog

Request Body

NameTypeDescription

api_key*

string

Contact our support team and we can generate an API for you.

lead_phone*

string

Whatsapp number of the lead

action*

string

Action the lead performed

revenue.currency

string

Currency of the purchase Default: USD

revenue.amount

number

Amount paid for the items sold

app_id

string

Use it in case your need to force the event to be attributed to a conversation from a specific app (business number)

previous_external_event_id

string

ID of a previous external event that was attributed to the same conversation you want to target this new one external event to

Example request body

// A lead books an appointment to speak with an agent
{
  "external_event": {
    "action": "Booked an appointment",
    "lead_phone": lead_phone,
  },
  "api_key": "2089ec88-42d3-5df9-9fc1-747dbf2a6d08"
}

// A lead purchases an item from the ecommerce:
{
  "external_event": {
    "action": "Purchased an item",
    "lead_phone": lead_phone,
    "revenue": {
      "amount": 10,
      "currency": "EUR"
    }
  },
  "api_key": "2089ec88-42d3-5df9-9fc1-747dbf2a6d08"
}

Example response

On success, the share an external event endpoint will return the ID of the newly created external event (external_event_id).

// Status: 201
{
  "success": true,
  "external_event_id": "external_event_1234"
}

Companies can store these IDs and use them in to report future external events and attribute these to previous conversation.

Attribute external events to previous conversations

There are business use cases where a conversion event occurs due to an older WhatsApp conversation.

For example, companies use WhatsApp to book future appointments. Between the conversation where an appointment was booked and the appointment itself there could be difference in days, as well as other conversations in between.

For 360dialog to accurately attribute external events to previous conversations companies can share external events with the previous_external_event_id and 360dialog will attribute the external event to the same conversation as the previous one.

Example request body

// A lead showed up at an appointment, that was booked last week.
{
  "external_event": {
    "action": "Showed up at the appointment",
    "previous_external_event_id": "external_event_1234",
  },
  "api_key": "2089ec88-42d3-5df9-9fc1-747dbf2a6d08"
}

Last updated