Using Webhooks in Lifecycle Optimizer

Leverage Lifecycle Optimizer as a decision engine for your entire marketing ecosystem using the Webhooks action.

Create custom callbacks to your internal CRM or other third-party tools when:

  • Users do not click a message
  • Customers fail to complete a post-purchase series
  • Readers complete a welcome series
  • And more…

What Makes a Webhook?

Creating a new webhook in Lifecycle Optimizer requires 4 parameters:

Parameter Description Notes Image
URL The unique URL which will receive your request
Method The HTTP request method that indicates your desired action The following methods are supported:

  • GET
  • POST
  • PUT
Content Type The format of the content in the payload All content types are supported.

See below for a list of the most commonly used content types.

Payload The data you’re sending

Supported Content Types

Sailthru supports the following content types.

Type application
application/json

Type text
text/css
text/csv
text/html
text/plain
text/xml

Creating a Webhook

Create webhooks as part of a Lifecycle Optimizer flow. For information on creating a new Lifecycle Optimizer Flow, see Build a New Flow

  1. Gather the information you need to create a new webhook: the URL, Method, Content Type, and Payload you’ll use.
  2. Add an Action step to your flow. Select Send Webhook from the Do this… dropdown.
  3. Add the URL you’re using:
  4. Set the HTTP Method. If using GET, you do not need to set the content type or add a formatted payload.
  5. Select the type of content you’re sending. The options are JSON and Other.
  6. Add your formatted payload.
  7. Click Headers under Additional parameters to add your Header Key/Value pairs:

    Note: When using POST or PUT, the Content-Type defaults to JSON and the Header is populated for you. For JSON content, it will resemble the following:
  8. Add any additional headers you want included in your webhook by clicking Add Header.

Note: Step counts will display the total number of customers who have proceeded through the step, but do not indicate a successfully received webhook.

Accessing Profile Data in the URL and Payload

Zephyr can be used in the URL and Payload fields, but not headers. Follow the same syntax used in email templates to access any information in the Profile Object.

Accessing Profile Data in the URL

Add a query parameter to the URL

In this example, the profile email address is appended to the URL:

http://www.example.com?email={profile.email}
Add a hashed md5 email to the URL

Add a query parameter to the URL to create an md5 hash of the email:

http://www.example.com?hashed={md5(profile.email)}

Accessing Profile Data in the Payload

Send a custom field value in the payload

Payload is JSON

You can include your custom field as a value in one of the key/value pairs. In the following example, birthday_month and loyalty_level are included:

{
"birthday_month": "{profile.vars.birthday_month}",
"loyalty_level": "{profile.vars.loyalty_level}"
}

Zephyr is only parsed in top-level values. It will not be parsed in keys or in nested values.

Payload is not JSON

You can include Zephyr in plain text with no quotation marks required. The following example includes birthday_month and loyalty_level as comma separated values:

{profile.var.birthday_month},{profile.vars.loyalty.level}

You can also use a comma separated sequence of key/value pairs in a plain text payload:

birthday_month,{profile.var.birthday_month},loyalty_level,{profile.vars.loyalty.level}

Examples

We’re excited to share examples from our partners – check back soon for updates.

Top