Attentive's APIs

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.

Launch Checklist

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.
  • Mobile app tracking and purchase attribution
  • In-store purchase attribution
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.
  • Transactional order updates
  • Transactional subscription updates
  • Loyalty updates
  • Email orchestration
  • On-site events (i.e added to wishlist)
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.
  • Capture transactional opt-ins on checkout
  • Capture marketing opt-ins on checkout
  • Capture marketing opt-ins on site footer
Custom Attribute API Create and update custom user attributes for use in Attentive Segment Builder.
  • Loyalty Tier, Gender, Birthday, Estimated LTV, etc


Note:
If you are using the Subscribers API, please contact White Glove (whiteglove@attentivemobile.com) 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:

journeys_1.png

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:

journey_notify_sub.png

For journeys using a Custom Event trigger, you can add any specific event properties as a dynamic macro to your message:

journeys_3.png

 

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
eCommerce API
  1. Set up a Browse Abandon (product view), Abandon Cart (add to cart), or Post Purchase (purchase) journey. See Create a journey for details.
  2. Send a product view, add to cart, or purchase with your phone number using the eCommerce API.
  3. Confirm you receive the relevant messages for that journey.
Custom Events API
  1. Set up a journey with a chosen custom event type. See Create a custom journey for details.
  2. Send the custom event with your phone number using the Custom Events API.
  3. Confirm you receive the relevant messages for that journey.
Subscribers API
  1. Set up a new welcome journey, or connect your API to an existing welcome journey.
  2. Reach out to White Glove (whiteglove@attentivemobile.com) to have your number unsubscribed from the Attentive SMS program for testing purposes if you're already subscribed.
  3. Use the Subscribers API to subscribe your number.
  4. Confirm that you are now a subscriber.
Custom Attribute API
  1. Set attributes for your phone number using the Custom Attributes API.
  2. Create a segment using those custom attributes.
  3. Confirm that you are included in the segment.

 

(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.

segment_1.png

For Custom Events, you can filter on specific event properties by entering a user inputted value:

segment_2.png

For Custom Attributes, you can filter on specific custom attribute values by selecting from a list of all possible values:

segment_3.png

Articles in this section

Was this article helpful?
1 out of 1 found this helpful