Think Pickle
  • Pickle Help
  • Flows
    • Triggers
      • Incoming SMS
      • Incoming Call
      • Contact Subscribed
      • Contact Tagged
    • Conditions
      • AB Split
      • Time is
      • Date-time is
      • Day is
      • Caller's number is
      • Caller's postcode is
      • Caller's state is
    • Actions
      • Say/Play
      • Pause
      • Forward Call
      • Record Voicemail
      • Gather input
      • Reject Call
      • Send Analytics Event
      • Send Email
      • Send SMS Message
    • Examples
      • Redirect calls to voicemail
      • IVR Menus
      • Forward calls to the closest store
      • A/B test 2 paths
      • Block a number
      • Track performance of TV ads
      • Forward and whisper
    • Variables
  • Flow Logs
  • Numbers
  • Contacts
    • Adding Contacts
  • API
    • Auth
    • Contacts
Powered by GitBook
On this page
  • Supported Variables
  • All Flows:
  • Incoming Call Flows:
  • Incoming SMS Flows:
  • Inspecting real variables using Flow Logs
  1. Flows

Variables

PreviousForward and whisperNextFlow Logs

Last updated 6 years ago

Many inputs such as the message and accept variables which will be substituted when possible. Variables are always wrapped in --. For example, you could set the Say/Play message to be:

You have received a call from --call.From-- with state --call.FromState--

These variables will be substituted and the become something like:

You have received a call from +61499998888 with state NSW

Missing variables

Not all variables are always present. For example, if the caller calls from a mobile phone we won't know the --call.FromCity--, in this case, the variable will be replaced will be ignored.

Supported Variables

The available variables change depending on your flow type and trigger.

All Flows:

All flows will have contact variables available for use. These are particularly useful for sending personalised greetings, SMS and emails. Note that these variables will not always be present. We recommend you into our contact system so you'll always have access to this data.

Name

Always Present?

Description

contact.id

Yes

Pickle Contact ID

contact.userId

No

User ID in your CRM or database

contact.firstName

No

First Name

contact.lastName

No

Last Name

contact.company

No

Company Name

contact.email

No

Email address

contact.phoneNumber

No

Primary phone number

contact.phoneNumbers

No

Array of other phone numbers. contact.phoneNumbers[0] will be the primary number

contact.customFields

No

Custom fields, eg) contact.customFields.example

contact.tags

No

Array of tags, eg) contact.tags[0] for the first tag

Incoming Call Flows:

Name

Always present?

Description

call.CallSid

All incoming calls

Unique id for the call.

call.From

All incoming calls

From phone number. eg: +61499998888

call.To

All incoming calls

To phone number

call.CallStatus

All incoming calls

queued | ringing | in-progress | completed | busy | failed | no-answer

call.ForwardedFrom

No

Phone number that forwarded this call

call.FromCity

No

The city of the caller

call.FromState

No

The state or province of the caller

call.FromZip

No

The postal code of the caller

call.FromCountry

No

The country of the caller

call.ToCity

No

The city of the called party

call.ToState

No

The state or province of the called party

call.ToZip

No

The postal code of the caller

call.ToCountry

No

The country of the called party

Incoming SMS Flows:

Name

Always present?

Description

message.MessageSid

All incoming SMS

Unique id for the message.

message.From

All incoming SMS

From phone number. eg: +61499998888

message.To

All incoming SMS

To phone number

message.Body

All incoming SMS

The text body of the message. Up to 1600 characters long.

message.NumMedia

All incoming SMS

Number of MMS attachments

message.FromCity

No

The city of the sender

message.FromState

No

The state or province of the sender

message.FromZip

No

The postal code of the sender

message.FromCountry

No

The country of the sender

Inspecting real variables using Flow Logs

The variable name shown in Flow Logs have been transformed to make them more readable. For example, numMedia becomes Num Media. You'll need to use the camel-case version - numMedia.

If you have a Call flow triggered with an '' trigger:

If you have an SMS flow triggered with an '' trigger:

After your flow has run once, you'll be able to view the flow log from the flow . This will show exactly what the values were for the variables described above. For example:

Incoming Call
lncoming SMS
Say/Play
Send Analytics Event
sync your users/CRM data
log section