Skip to main content

Zadarma

Zadarma is IP telephony with a virtual PBX. It sends notifications about PBX calls to one address: a call started, was answered, ended, was recorded. Sent to the Flows address, the end of an incoming call starts your flows: a customer called and nobody picked up — and a few minutes later the customer gets a message in Viber or SMS. If the customer calls again and gets through first, the message is not sent.

Written from Zadarma documentation

This page is written from the public documentation of Zadarma and has not been checked on a live account yet.

What you need​

  • Access to Settings → Integrations and API in my.zadarma.com. Which plans have call notifications is not confirmed by the documentation.
  • One address for all notifications about PBX calls. If a CRM integration already uses it, you will have to choose: a second field for another address is not confirmed by the documentation.
  • No API keys: do not give the Zadarma API keys to anyone, us included. The secret of the connection is already in the address.

Step 1. Create a connection​

  1. Open Flows → Connections, press Connect a system and choose Zadarma.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Set up Zadarma​

  1. In my.zadarma.com open Settings → Integrations and API, the Notifications block — notifications about PBX calls.
  2. Paste the address from the cabinet into the field for notifications about PBX calls.
  3. Press Enable. Zadarma checks the address with a request that carries zd_echo; AlphaFlow answers it by itself.
  4. If the block lets you choose the types of notifications, NOTIFY_END is enough. Whether there is such a choice is not confirmed by the documentation.

Step 3. Send a test​

After Enable call your company number and hang up before anyone answers — call_missed comes. Then make a call that is answered — call_finished comes. Both appear in Flows → Connections → Event journal, and the connection shows Recognised: Zadarma.

Events​

AlphaFlow takes the notification about the end of an incoming call, NOTIFY_END. Its result is in disposition:

Result in ZadarmaAlphaFlow eventProperties
answered — a conversationcall_finishedcall_id, duration, called_did, last_internal
busy, cancel, no answer, failed — busy, cancelled before the answer, no answer, failedcall_missedcall_id, disposition, called_did
no money, unallocated number, no limit, no day limit, line limit, no money, no limitcall_missedcall_id, disposition, called_did
  • The second group of results comes from the limits and the balance of the PBX: the customer did not get through, so the call counts as missed.
  • Every event carries all the properties: duration — the call in seconds; disposition — the result as Zadarma names it; called_did — the company number that was called; internal — the extension, if any; last_internal — the last participant after a transfer; status_code — the Q.931 code; is_recorded (1 or 0) and call_id_with_rec — about the recording of the call.
  • The other notifications — the start of a call, the answer, outgoing calls, recordings, the voice menu — start no flows.

The contact is found by the caller's number (caller_id). The notification holds no name. Call events are not among the events of the ready-made templates (see Recommended events): create the flow from scratch, as below.

A message after a missed call​

  1. Create a flow From scratch with call_missed as its start.
  2. Add the Wait for an event step: the event call_finished, for example 15 minutes since the start event.
  3. The event came — the customer called again and got through: end the branch with Leave the flow. The event did not come — add a Send step with the message in Viber or SMS.

Only incoming calls become events. A call back by your employee is outgoing, so the flow does not see it.

Good to know​

  • Repeats are not described in the Zadarma documentation. A repeated notification has the same call id and is not recorded twice.
  • Zadarma signs notifications only when API keys are issued in the account. Checking the signature is not needed: the secret in the address is enough.
  • Notifications about incoming SMS, number checks, call tracking and speech analytics go to a separate address and are not covered here.
  • The address always answers 200. Above the daily event limit the event is refused in AlphaFlow with quota_exceeded and shown in the journal; the notifications in Zadarma stay on.

Zadarma documentation​