Skip to content

CRM calls

A CRM connection sends one web request to your CRM each time a chosen event happens. You write the request. VoDialer fills in the details of the person.

  1. Open Setup, then Integrations, then Connections. Under “Connect something”, find CRM and press Connect.
  2. Fill in Events to send, for example vd.journey.closed.
  3. Choose Request method. The default is POST.
  4. Fill in Address to call. You may use placeholders in the path and the query, not in the scheme or host.
  5. Under Request body (JSON), write the body. Leave it empty to send everything we know (see below).
  6. Under Secrets, fill in Headers, one per line, written as Name: value. Put your CRM’s credential here, for example Authorization: Bearer abc.
  7. Press Connect. Press Test to send one sample request, then check your CRM got it.

Events: vd.journey.closed. Method: POST.

Address to call:

https://crm.example.com/api/leads/{{journey.lead.external_id}}/status

Request body (JSON):

{
"status": "{{event.data.final_disposition}}",
"name": "{{journey.lead.first_name}} {{journey.lead.last_name}}",
"summary": "{{journey.summary}}",
"first_fact": "{{journey.facts.0.value}}"
}

A placeholder is a dotted path inside double braces. There are two roots.

  • event is the message, as in webhooks: event.subject, event.data.code, and so on.
  • journey is the person’s record: journey.lead.first_name, journey.lead.state, journey.lead.external_id, journey.summary, journey.facts.0.value, journey.transfers.0.summary. A number picks an item from a list, starting at 0.

Rules:

  • A missing value becomes an empty string, or null if the placeholder is the whole value. Turn on Fail when a value is missing to fail the delivery instead.
  • A body value that is only a placeholder keeps its type: a number stays a number.
  • In the address, every value is percent-encoded. In a body, a value can never break out of its string.
  • With no body, a POST, PUT or PATCH sends { "event": …, "journey": … }. GET and DELETE send no body.
  • Include the person’s whole journey is on by default. It fetches the record when the event names a journey.
  • Phone numbers are masked to their last four digits unless Send full phone numbers is on.

Your request, plus X-VoDialer-Event, X-VoDialer-Delivery and an Idempotency-Key equal to the delivery id. Retries use the same values, so your CRM can ignore repeats. A 2xx answer in 10 seconds is success. Anything else is retried like a webhook. A broken template, or a journey that cannot be found, gives up at once.

Addresses are checked as for webhooks: public only, no redirects.

Test sends a real request with sample data and the header X-VoDialer-Test: true. It does not wait for an event.

For a dry run, call POST /api/integrations/v1/connectors/{id}/test with {"dry_run": true}. It returns the request that would be sent, with no secret headers, and sends nothing. This needs a signed-in admin session, not an API key.