Lob has a number of API integrations so you can add direct mail to your CRM, CDP, or marketing automation platform. Customer.io is a popular messaging automation platform that empowers its customers to create personalized message flows to engage their audience. Traditionally these have been channels like email and SMS. However, with Lob, you can bring direct mail into your omnichannel customer journey and manage it just as easily as your digital channels.
Getting Started
Log into your Lob account. To start you’ll need your API keys. It is highly recommended that you use your (secret) test API key first for testing.
We will be bringing Lob into Customer.io within the Workflow step of a Campaign. In order to set up a Workflow, you will need to first create the Campaign within Customer.io and configure your Trigger, Settings, and Goal & Exit steps. Complete instructions on this can be found in Customer.io’s documentation here.
Setting up your Workflow
Once you reach the workflow screen, you can begin crafting your customer journey by creating the event path your users will follow. Below is a standard example of an event trigger (User Purchase) followed by a standard Welcome Email.
We can incorporate Intelligent Mail into this Workflow in a similar manner to email by adding a Webhook node. We can do this by dragging in a Send And Receive Data tile from the left-side menu.
Configuring Your Webhook
Now you will have an empty webhook, which you can configure by clicking to open it. This will open an edit screen in the left panel. You can find Customer.io documentation on webhook setup here.
You can configure it as follows:
Webhook Name: The Description of your Mail Event
Add Request: This is where we will add the Lob Endpoint URL and the JSON code that will format the information being passed from Customer.io to Lob. More details on this below in ‘Configuring Your Webhook Request’
Sending Behavior: Send automatically
Configuring Your Webhook Request
Click on Add Request to begin the setup process.
Next to POST, you will construct the Lob endpoint URL for the type of resource you are trying to create. The format is as follows: https://+[YOUR LOB API KEY]+@api.lob.com/v1/[RESOURCE TYPE]
Your API key will be either your Test or Live API key, which you can find in your Lob dashboard under Settings. It is strongly recommended that you begin with your Test API Key to ensure it is working, before switching to your Live API Key.
The Resource Type will depend on the mail format you are trying to send. For example, postcards, letters, or self_mailers. You can find all of the available resource types in Lob’s API documentation.
In the black box, you will construct your JSON to pass the required information to Lob’s API to generate a mailpiece. For example, see Postcard > Create in Lob’s API documentation.
You will pass in the Customer attributes to populate this by using Liquid Statements. This will enable to you not only pass in the recipient’s name and address, but also personalize your mailpiece by using Liquid to populate dynamic merge variables. (More information on creating personalized HTML templates.)
Below is example JSON you can test within your Customer.io webhook. Before testing this, replace the front and back with template IDs from your own Lob account.
Once your webhook has been configured, you will want to test it. Remember that you should be using your Test API Key for this, as you will otherwise generate live mail.
You can send a test by opening up the Request and clicking on Send Test in the top right corner.
Once you confirm and send, you will want to see a 200 OK response in your Test Results. This will indicate that the request has successfully reached Lob.
You can also check the Test Results to ensure the request fields were correctly populated by the Liquid Statements.
You can then log into your Lob account to verify that the mailipiece was successfully generated. Preview it to make sure all of the details are correct. If so, then you have successfully set up your Customer.io to Lob integration, and are ready to send Live Intelligent Mail.
Ingesting Mail Tracking Events from Lob into Customer.io
Under Create A New Webhook, enter a webhook description and paste in the URL generated by Customer.io.
Finally, select the event you want to capture in Customer.io.
The integration between Customer.io and Lob is simple and easy to use. Businesses can create personalized direct mail campaigns using the same tools and workflows that they use for email and SMS; this makes it easy to manage their entire customer journey across all channels. The addition of direct mail to the omnichannel customer journey can be a powerful way to increase engagement and loyalty. By reaching customers in a more personal way, businesses can build stronger relationships and drive more sales.
This blog provides general information and discussion about direct mail marketing and related subjects. The content provided in this blog ("Content”), should not be construed as and is not intended to constitute financial, legal or tax advice. You should seek the advice of professionals prior to acting upon any information contained in the Content. All Content is provided strictly “as is” and we make no warranty or representation of any kind regarding the Content.