Attentive’s APIs allow you to send any type of customer data to Attentive to further personalize your SMS strategy to drive more revenue per message. The APIs can enable use cases such as transactional messages, email orchestration, loyalty messaging, and much more.
This guide walks through the steps required to get started with Attentive’s APIs. Note that you will need support from a developer to implement the APIs.
||Step 1: Create a custom app|
||Step 2: Implement Attentive's APIs|
||Step 3: Set up journeys|
||Step 4: Test the implementation for Attentive's APIs|
||(Optional) Step 5: Set up segments|
Step 1: Create a custom app
You can create a custom app directly in the Attentive platform on the Marketplace tab by clicking + Create App in the top-right corner. See Create and manage custom apps for details.
A custom app is required to generate an API key in order to use any of our APIs. You can use the /me endpoint to test that you are authenticating correctly. You should treat your API key as a password and keep it secure. If it is accidentally shared, other users may be able to send messages to customers on your behalf.
Step 2: Implement Attentive's APIs
The Attentive API documentation site provides comprehensive documentation on each of our APIs. Our APIs were built with ease of use in mind and should be a low development lift to implement.
In order to associate data from an Attentive API with an Attentive user, a phone number or email address is required. The phone number does not need to be an active SMS subscriber at the time the API call is made. If you send data associated with a phone number that becomes an SMS subscriber at a future date, Attentive will automatically associate all historical data with that user.
We are planning to add support for Shopify customer_id to associate data from an Attentive API with an Attentive user.
Attentive supports four different APIs for sending customer data to Attentive:
|Attentive's API||Description||Example Use Cases|
|eCommerce API||Trigger an event when a user views a product, adds a product to their shopping cart, or makes a purchase.||
|Custom Events API||Trigger a custom event when a user performs an action that you’d like to use for targeting within the Attentive Segment Builder and Journey Builder.||
|Subscribers API||Capture SMS transactional and marketing opt-ins through third-party sign-up sources (i.e. checkout). Our team will review all draft API opt-in units and provide recommendations, if any, prior to going live.||
|Custom Attribute API||Create and update custom user attributes for use in Attentive Segment Builder.||
Note: If you are using the Subscribers API, please contact White Glove (firstname.lastname@example.org) or your CSM to retrieve the signUpSourceID necessary to complete your API call, as outlined on the API documentation site, and confirm final implementation of your Subscribers API.
Step 3: Set up journeys
Any data sent from the eCommerce API or Custom Events API will immediately appear in Journeys as a trigger. A journey’s trigger is what starts the automated series.
From the Journeys tab, select Create Journey and then choose Custom Journey. From here you should see a list of all of your triggers, including any custom events:
After selecting your trigger, you will make your selection on the type of journey. You can view more information on the difference between transactional and promotional journeys:
For journeys using a Custom Event trigger, you can add any specific event properties as a dynamic macro to your message:
Step 4: Test the implementation for Attentive's APIs
In order to test that Attentive’s APIs are working as expected, we recommend making an API call with your own phone number that is an active SMS subscriber.
|Attentive's API||How to test|
|Custom Events API||
|Custom Attribute API||
(Optional) Step 5: Set up segments
Any data sent from the eCommerce API, Custom Events API, or Custom Attribute API will immediately appear as an option under Custom Attribute or Custom Event in the Attentive Segment Builder.
For Custom Events, you can filter on specific event properties by entering a user inputted value:
For Custom Attributes, you can filter on specific custom attribute values by selecting from a list of all possible values: