How-To: Webhooks

How-to /

A handful of our customers have recently asked questions regarding Webhooks and how they can be used beyond sending standard emails from Zapier.

A webhook is a way for an app to provide another application with real-time information.

Zapier, is a website which can take the data from a webhook and then act upon the reciept, this is known as a 'Zap'. The action is usually an output of the information via an email or message.

There are a number of sites which deal with web automation, Zapier is the one that we use as it allows us to do what we want to do easily.


TTNC Webhook Data

The webhook sent from TTNC will send information twice for each call.

The first information transfer occurs when a call initially connects, the second send occurs when a call completes, both webhooks have the same data fields, but some fields will have slightly different data.

Every piece of data can be used to enhance your Zap actions, the data sent from TTNC is:

The data fields sent when a call connects are:

  • call_date - Date of call
  • call_time - Time of call
  • anumber - Caller ID
  • anumber_contact_name - Contact name from address book (if any)
  • bnumber - TTNC number called
  • bnumber_alias - Alias of TTNC number
  • bnumber_tags - Tags of TTNC number
  • Option - the IVR option selected
  • ref - The CDR reference for the call
  • event_type - The type of webhook this would be 'incoming_call'

The data fields sent when the call completes are:

  • call_date - Date of call
  • call_time - Time of call
  • anumber - Caller ID
  • anumber_type - Location/Network of Caller
  • anumber_contact_name - Contact from address book (if any)
  • bnumber - TTNC number called
  • bnumber_type - Location/Type of TTNC number
  • bnumber_alias - Alias of TTNC number
  • bnumber_tags - Tags of TTNC number
  • reason - Clearing code (1 = completed call)
  • reason_q805 - Additional clearing code (1 = completed call)
  • dialled - Forwarding destination
  • dialled_type - Location
  • duration_system - Duration of connection with TTNC System (IVR, Call Greeting, etc.)
  • duration - Duration of call
  • cost - Amount of call credit deducted for call
  • ref - The CDR reference for the call
  • event_type - The type of webhook (this would be 'cdr')

In order to stop the first transfer occurring you can add a filter - you would need a paid Zapier subscription - and filter out results that have an event_type of 'cdr'.

Step-by-step guidance for the process can be found here in our Help Guide


Other Zap 'Action' Applications

While using the built-in Email application is useful, there a vast array of other apps that can be used. You can see a full list of 'Action' applications here.

For more information about how to setup the most popular applications, visit our Help Centre.


Zapier Subscription

If you're looking to create simple workflows that are a basic as "when a call comes in, an email is sent which includes the call information", and you're not expecting the workflow to run more than a hundred times a month, then a free Zapier account should be enough.

If you're expecting a high volume of calls, or want more Zap flexibility, i.e. to add a filter or to have two actions (an email and a SMS, etc.) you would need a paid subscription, which start at $20pm.

Zapier's pricing can be found here