Lob is a direct mail API that lets you send physical mail — postcards and letters — programmatically. Connect Lob to Blueshift to trigger mailings from campaigns and track delivery events on customer profiles.
Prerequisites
Before you can set up integration with Blueshift, you must have your Lob account set up.
To integrate with Blueshift, you need the API key from your Lob account. You can find your account's API keys in your Dashboard Settings.
For more information about the Lob API, see https://lob.com/docs/node#postcards_create.
Set up integration
To add a Lob adapter in Blueshift, complete the following steps:
- Sign in to the Blueshift app, and click App Hub in the left navigation menu.
- Go to All Apps, search for, and select Lob.
- You can also go to Direct Mail Apps and select Lob.
- Click Configure to view all the configured adapters.
- Click +ADAPTER to add an adapter.
- Add a Name for the adapter. If you have multiple adapters, the adapter name helps you to identify the integration.
- Enter the Lob API key.
- Add information for any Additional Headers.
-
Click Save to add the adapter.
The adapter is now added, and you can use it in your Cloud App template.
Quick start templates
When you create an adapter in the App Hub, the following quick start template is added to the Cloud App templates.
- Send a direct mail
Consider the following points about quick start templates:
- You can find these in the following location: Templates > Cloud App
- Quick start templates are identified by the label "QUICK START".
- A quick start template is added only when you create the first adapter for the app in App Hub. If you have multiple adapters for an app, you can edit the Adapter details on the template Properties tab to select the required adapter.
- You can use this template as-is in your campaigns. You cannot make any changes to the schema for a quick start template.
- If you need to change the schema, you can clone the template and then edit the schema as required.
Track delivery events
Blueshift can receive real-time delivery status updates from Lob using webhooks. When Lob processes a mailing, it sends event notifications to Blueshift. Blueshift records these on the customer's profile — delivered mailings as conversion events and failures as bounces.
Webhook setup is done manually in the Lob dashboard. You cannot configure this through the Lob API.
Supported events
Blueshift processes the following Lob webhook events:
| Event | Mail type | Recorded in Blueshift as |
postcard.delivered |
Postcard | Delivered (conversion event) |
postcard.rejected |
Postcard | Bounce |
postcard.returned_to_sender |
Postcard | Bounce |
letter.delivered |
Letter | Delivered (conversion event) |
letter.rejected |
Letter | Bounce |
letter.returned_to_sender |
Letter | Bounce |
Set up a webhook in Lob
To send Lob delivery events to Blueshift, complete the following steps:
- Log in to your Lob account and go to Webhooks in the left navigation menu.
- Select your environment — Live or Test — and click Create.
- In the URL field, enter the Blueshift webhook endpoint for your region:
- US —
https://api.getblueshift.com/api/v1/messaging_events/0f00f139-48e7-41ad-8471-aa31587627e7 - EU —
https://api.eu.getblueshift.com/api/v1/messaging_events/0f00f139-48e7-41ad-8471-aa31587627e7
- US —
- Under Event Types, select the events to track. Refer to Supported events for the full list of events that Blueshift processes.
- Click Create to save the webhook.
For more information on Lob webhooks, see Using webhooks in the Lob Help Center.
Next steps
- Configure the Lob quick start template to send a payload from a campaign.
- You can clone the quick start template and edit the schema if required. You can also create a new template.
- In your campaign journey, add a Lob trigger. Select the template that you created.
Configure or create a Lob cloud app template
A Cloud App template is required to send a payload to Lob from a campaign. With the Lob template, you can send postcards to customers.
For more information, see Cloud Apps templates.
To use a quick start template or to add a Lob Cloud App template, complete the following steps:
- Go to Templates > Cloud App.
- Complete one of the following actions:
- Select the Send a direct mail quick start template for Lob from the list of templates.
- To create a clone of the quick-start template, open the template's action menu and click Clone.
-
To create a new template, click +TEMPLATES on the Cloud App Templates page. Select the Lob app.
Note: Only apps that support Cloud Apps templates and have at least one adapter configured are displayed on the Cloud App Templates page.
-
Go to the Properties tab and configure the template name, tags, and other relevant information.
Field Description Template Name Specify a name for the template to identify it on the index screen. API Endpoint Specify the API endpoint that receives the request that we make. Adapter Select the adapter to use to send the payload. Tags Specify tags to organize this template.
Since this template is a Blueshift resource that you use in campaigns, you can use tagging to organize it under folders.
For more information on this, see Tagging.
- Go to the Content tab.
- Go to the Content Form tab and fill out the form to specify the data to send to Lob. You can use personalizations in the content.
- If you are using a cloned quick-start template or a new template, go to the Schema tab and configure the form's schema.
- In the preview tab, you can also switch to JSON to view the content.
Comments
0 comments