Lob Help Center

Iterable

Integration overview

Iterable is a cross-channel marketing platform that powers unified customer experiences and empowers you to create, optimize and measure every interaction across the entire customer journey. Automated connections in Iterable, called Webhooks, can be set up in minutes with no coding.  Webhooks can automate your day-to-day tasks and enable journeys with Lob that otherwise wouldn't be possible.

Each Webhook you create will connect to an HTML template that you have stored in your Lob account. You will map your Iterable data fields to the dynamic Lob merge variables in the HTML template, and trigger mail sends via either an individual user action (such as email unsubscribe, for example) or to a group of users via a batch send.

Getting started with Iterable

To get started with Iterable, you will need to sign up directly with Iterable (see Request Demo), or have your Iterable account enabled by your company. 

Getting started with Lob

Sign up for a free Lob account. You can then begin sending requests right away using your secret test API key, for free and without entering any payment info. Instantly begin sending real mail by simply adding a payment method to your account and switching to your live API key.

How do I Connect Iterable to Lob?

  1. Login to your Iterable Account.
  2. Navigate to "Integrations" -> “Journey Webhooks”
  3. Then click on "New Webhook" at the top of the page
  4. Configure as follows:
    1. Endpoint: Make sure the URL matches the resource you want to create (ie, that you are sending postcard requests to the postcard endpoint). See URLs here.
    2. Use the Authorization Header and your Base64 Encoded API key to connect your Lob account 
      1. We recommend using your Test Lob API Key at first, in order to test and validate your integration. Then switch to your Live API key when you are ready to send mail.
      2. Use a Base64 Encoder tool to encode your API key
        1. For example, if your API key was test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc, you would enter test_0dc8d51e0acffcb1880e0f19c79b2f5b0cc: into a Base64 Encoder tool, the result of which would be something like dGVzdF8wZGM4ZDUxZTBhY2ZmY2IxODgwZTBmMTljNzliMmY1YjBjYzo=. Note that we added a : to the end of the API key before encoding it, please ensure you do the same.
      3. Once you’ve encoded your API key, use the encoded key as the value for the Authorization header. For example:
        1. Key: Authorization Value: Basic dGVzdF8wZGM4ZDUxcdrZTBhYwZmY2IxODgwZTBmMTljNzliMmY1YjBjYzo=
  5. For the Body, select ‘URL-encoded Form’, then add form fields below to map the required Lob parameters to the associated attributes within Iterable. See Image below for an example.
    1. The fields on the left are the required Lob request parameters, and your corresponding data fields are on the right. 
      1. The right column is where you can dynamically map to Iterable attributes, by using the corresponding Iterable variable for a given attribute
      2. Iterable variables will need to be enclosed like so: {{your_variable}}.
        1. For example, if you have a field that maps to “to{name}” in your data and you want the variable first_name to be used as that mapping, you would put {{first_name}} next to the “to{name}” field on this page.
    2. Be sure to map to all of the necessary merge variables. 
      1. For example if you have a merge variable “name” in your template you need to add a form field of “merge_variables[name]” and set the desired value on the right.
  6. Click ‘Create Webhook”.
  7. Ensure that you are mapping all of the required templates 
    1. For example, Postcards and Self Mailers will utilize 2 templates, one each for the front and back of the postcard.
    2. Letters have just one template, mapped to the parameter ‘file’ on the left side
  8. Click “Save” on the right when you are finished.
  9. Navigate to “Messaging”> “Journeys” (note that Iterable previously called these ‘Workflows’)
  10. Click on the Journey you want to incorporate this webhook into, or create a new Journey
  11. Find the event that will trigger your Lob webhook (for example, a customer is Added to a List, or opened an email), then drag in the “Call Webhook” tile and place it after that event in the Journey.  

    Open up that Webhook, and toggle on ‘Use Preset Journey Webhook’, then select the webhook you have created.
  12. After you have successfully set up your Journey, send a test trigger by clicking on ‘Test Journey’. Check to see whether Iterable notes any errors.
  13. Assuming no errors are caught in Iterable, head over to your Lob dashboard and verify the results of the test. You can see the new mailpieces that were generated from your Iterable journey.
    1. Please reach out to your CSM if you need assistance navigating the Lob dashboard.

Best practices

There are 3 common scenarios in which Iterable Journeys trigger Lob mail sends:

  1. Single triggered mailpieces from individual user actions. For example, someone unsubscribes to an email list, then a message is sent to Lob to trigger a single mailpiece.
  2. A regular job is run, resulting in mail being sent to all users who meet a specific criteria
  3. An audience list is exported from Iterable and uploaded to Lob, and mail is generated for each user in the list.

These scenarios all result in different volumes of mail requests being sent to Lob in a single batch, and there are some best practices for ensuring your integration is seamless for each batch size. 

For any send types that will trigger fewer than 500 mailpieces in a single batch, as is typically the case with the first scenario above, you won’t need to take any additional steps to those listed above in this doc.

For the second and third scenarios, however, you may want to take some additional steps to ensure that all requests reach Lob within the rate limit. For example, one possible workflow enhancement for batches typically between 500-3000 malipieces is to include audience splits in the customer journey, with delays included to stagger the sends to Lob, thus reducing rate limiting errors. For any batches above 3000 mailpieces, your best bet is to export the audience list from Iterable and send it via Lob’s Campaign Dashboard, as it is purpose-built to handle batch sizes into the millions, and will ensure that all expected mail is generated. 

There are also additional workflows to those noted above, so in general, if you expect to send batches above 500 mailpieces at a time, it’s beneficial to connect with your Lob representative so that we can walk through the best solution for sending at scale while preserving the automation benefits of connecting through Iterable.

We also strongly recommend testing any planned sends and webhooks by first using your Test Lob API Keys, and ensuring that the resulting records created in Lob match your expectations. Then proceed to using your Live Lob API Key to actually generate mail once you’ve confirmed that it is being handled as expected.

To leverage HTML creatives in Lob, you will want to save your HTML as a template within Lob, or host your HTML and generate a corresponding hosting URL. These can be passed to Lob from Iterable, but you are not able to pass a full HTML string directly to Lob from Iterable.

To protect yourself against duplication and errors, it is a great idea to add Idempotency keys to your requests. To do so, leverage a unique characteristic associated with every mailpiece you are sending (for example, user_id is a common choice), and embed that into the URL like the following:

Was this article helpful?