Skip to main content
How-to

Attentive Integration

Attentive is an SMS and mobile marketing platform. Connecting it to UltraCart lets you collect SMS subscribers during checkout and feed shopper activity into Attentive so your journeys can trigger on real cart and order behavior.

The integration has two halves that you turn on separately.

  • Server side, from UltraCart to the Attentive API. This carries subscribe, checkout, purchase, and order shipped activity, and uploads your product catalog. It runs off the Attentive API key saved on each StoreFront.
  • The Attentive tag, a small piece of JavaScript UltraCart adds to your StoreFront pages for you. It reports product views and add to cart activity as it happens in the shopper's browser, and it displays the sign-up units you have built in Attentive. It runs off your Attentive Company ID.

You can run either half on its own. Entering only the API key gives you the server events with no tag on your pages, and therefore no add to cart or product view events. Entering only the Company ID gives you the tag with no server events. Most merchants want both.

No theme edits are required either way. UltraCart adds the tag to your pages automatically once the Company ID is saved.

What UltraCart sends to Attentive​

Each event is sent by exactly one half of the integration. Attentive has no way to recognize the same event arriving twice, so UltraCart never sends one from both.

EventSent bySent whenSent to Attentive as
SubscribeServerWhen an abandoned cart is processed or an order is placed, only when the shopper opted in to SMS with a mobile number/v1/subscriptions
Add to CartTagAn item is added to any cart. The event carries the shopper's email address when known, and their mobile number only when they consented to SMS marketingaddToCart
Checkout StartedServerThe shopper enters checkoutCustom event, type Checkout Started
Checkout AbandonedServerThe shopper leaves checkout without orderingCustom event, type Checkout Abandoned
PurchaseServerAn order is placed/v1/events/ecommerce/purchase
Order ShippedServerAn order shipsCustom event, type Order Shipped
Product ViewTagA shopper opens a product pageproductView
IdentifyTagThe shopper's email address becomes known, at checkout and on the receiptidentify
Product catalog syncServerThe catalog sync job runs/v1/product-catalog/uploads

Product view is the reason to run the tag. UltraCart's servers never see a product page load, so there is no server-side equivalent and no other way to feed browse behavior into Attentive.

The Identify event matters more than its name suggests. It ties Attentive's own visitor cookie to a shopper you can contact, which is what lets Attentive connect anonymous browsing earlier in the session to the person who eventually checked out. Without it, product views from a shopper who had not yet entered an email address stay unattached to any subscriber.

Before you begin​

Confirm the following:

  • You have an active Attentive account with SMS marketing enabled.
  • You have administrator or developer access in Attentive, enough to create an app and view sign-up units.
  • Transactional messaging is enabled in Attentive if you plan to send order-related texts.
  • You can access UltraCart with Marketing permissions.

Some sign-up units may need to be created for you by your Attentive Customer Success Manager. If you cannot find the units described below, contact them before continuing.

Step 1: Create an Attentive API key​

UltraCart authenticates to Attentive with a private API key, sent as a bearer token on every request.

  1. Sign in to your Attentive admin account.
  2. Open the integrations or app marketplace area and choose to create an app.
  3. Give the app a recognizable name, such as UltraCart Integration, and enter a contact email address.
  4. Grant the app write permission to eCommerce, Subscribers, Custom Events, and Product Catalog. eCommerce covers add-to-cart and purchase, Subscribers covers SMS opt-ins, Custom Events covers the checkout and order shipped events, and Product Catalog covers the catalog sync. Without Product Catalog, events still work but every catalog upload is rejected.
  5. Create the app and copy the generated key.
warning

Attentive may display the API key only once. Copy it somewhere safe before leaving the page. If you lose it, generate a new key and update UltraCart, because the old key stops working.

Step 2: Collect your sign-up source IDs​

Sign-up source IDs are the numeric identifiers of your Attentive sign-up units. In Attentive, open Sign-Up Units and stay on the Sign-up units tab, then note the value in the ID column for each unit you plan to use.

warning

Take the IDs from the Sign-up units tab, not the A/B tests tab alongside it. The A/B tests tab also has an ID column, but those are test identifiers. Entering one in UltraCart produces no error and no events reach the intended sign-up source.

Two of these IDs are in use today. Both are optional:

  • Checkout Source ID, the unit UltraCart subscribes shoppers to when they tick the SMS opt-in at checkout and place an order. Ask Attentive for a dedicated checkout sign-up unit if you do not have one. Leave it blank and no checkout subscribe is sent; purchase events are still sent.
  • Add to Cart Source ID, the unit UltraCart subscribes SMS-consented shoppers to when their abandoned cart is processed. Leave it blank and no subscribe is sent for abandoned carts. Add to cart events are sent by the Attentive tag either way.

Two more fields have no effect, and you can leave them blank:

  • Transactional Source ID. Earlier versions of the integration subscribed checkout opt-ins to this unit. Because the checkout checkbox collects marketing consent, those sign-ups now use the Checkout Source ID instead. If you entered your transactional unit here, enter your checkout unit in Checkout Source ID so checkout opt-ins keep reaching Attentive.
  • Product View Source ID. It was added in anticipation of product view tracking, but product views turned out to be reported by the Attentive tag rather than the API, and the tag identifies visitors by its own cookie instead of a sign-up source.

UltraCart stores whatever you enter in these two fields and never sends it.

Source IDs must be numeric. A value containing anything other than digits is discarded when you save.

Some Attentive accounts use one marketing unit for several purposes, and reusing the same ID across fields is valid if that matches how your account is set up. Confirm with Attentive if you are unsure. Attentive documents where these IDs live in its Subscribe user reference.

Step 3: Enter your credentials in UltraCart​

Attentive is configured per StoreFront. Enter the settings on every StoreFront that should send to Attentive.

StoreFront settings​

  1. Go to StoreFronts and select the StoreFront you want to configure.
  2. Choose Privacy & Tracking.
  3. Open the Other tab.
  4. Scroll to the Attentive SMS block.

The Attentive SMS block on the StoreFront Privacy and Tracking screen, Other tab, with fields for Private API Key, Company ID, Add to Cart Source ID, Product View Source ID, and Transactional Source ID.

FieldMaximum length
Private API Key250 characters
Company ID40 characters
Add to Cart Source ID20 characters
Product View Source ID20 characters
Transactional Source ID20 characters
Checkout Source ID20 characters
Single Opt-InCheckbox, unticked by default

Company ID is the field that turns on the Attentive tag, and it exists only here, not at the account level. See Turning on the Attentive tag.

Single Opt-In controls whether Attentive asks a new subscriber to confirm. See Single opt-in and confirmation texts.

Because non-numeric source IDs are discarded when you save, entering one leaves that field blank, and the matching subscribe is skipped.

One StoreFront, one Attentive account​

Each StoreFront uses only its own settings. There is no account-level fallback.

  • A StoreFront with no Private API Key sends nothing to Attentive: no subscribes, no events, and no catalog upload. Leave the key blank on any StoreFront you want kept out, such as an affiliate or wholesale StoreFront.
  • StoreFronts can point at different Attentive accounts. Enter a different key and source IDs on each. StoreFronts that share the same key report into the same account.
  • Every event is sent with the settings of the StoreFront the cart or order belongs to, whatever items it contains. Routing events to an account by item is not supported.

The Marketing Attentive screen​

The older Home -> Marketing -> Attentive screen holds an account-level API key and source IDs. Those values are no longer used for StoreFront events or catalog sync. Use the StoreFront settings above instead. The Log button on that screen still opens the integration log described in Verifying the integration.

Turning on the Attentive tag​

Enter your Attentive Company ID in the StoreFront settings and click Save. UltraCart starts adding the tag to that StoreFront's pages immediately. There is nothing to paste into a theme and nothing to deploy.

Your Company ID is the identifier in your Attentive tag snippet. If Attentive gave you a line that looks like https://cdn.attn.tv/YOURBRAND/dtag.js, then YOURBRAND is the value to enter. It is a short text code rather than a number, and it is not a secret, unlike your API key.

Clearing the field removes the tag from your pages. Your server-side events keep running, because those depend on the API key instead.

The tag also displays your sign-up units​

Attentive's tag does two jobs. It reports the browser events listed above, and it displays the sign-up units you have configured in Attentive: the popups, full-screen takeovers, footers, and spin-to-win offers that collect phone numbers and email addresses.

If you have no active sign-up units in Attentive, nothing appears and the tag is invisible to shoppers. If you do have active units, they will start appearing on your UltraCart StoreFront the same way they appear on the rest of your site.

warning

Sign-up units display automatically and UltraCart cannot suppress them. Before saving your Company ID, check which units are active in Attentive and where they are set to appear. A popup over your checkout form will cost you orders.

Control this in Attentive rather than in UltraCart, using the Hide sign-up unit if section of each unit's display rules. Add your checkout path to URL contains there to keep units off the pages where they do damage.

If you already collect SMS opt-ins with UltraCart's own SMS opt-in checkout widgets, decide which one you want. Running an Attentive sign-up unit alongside the UltraCart widget asks the same shopper for the same consent twice.

How shoppers are identified​

Attentive needs at least one identifier to attach an event to a shopper. Which identifiers UltraCart is willing to send is a consent question as much as a technical one.

  • Add to Cart is sent by the Attentive tag for every cart, including carts with no email address or phone number yet. It applies the same consent rule: the email address is included when known, and the mobile number only when the shopper consented to SMS.
  • Checkout Started, Checkout Abandoned, Purchase, and Order Shipped are sent when the cart or order has a valid email address or a mobile number the shopper consented to receive SMS marketing on. If it has neither, the event is skipped and recorded in the integration log with a status of WARNING. Checkout Started is the exception: it is simply not queued, with no log entry, and is sent at a later checkout step once an email address or consented mobile number is present.
  • Events are sent whether or not the shopper is an Attentive subscriber.
  • Purchase and Order Shipped are not sent for channel partner orders set to skip marketing, and Purchase is not sent for auto orders when your account skips 3rd party marketing for auto orders.

Phone numbers require an SMS opt-in​

A phone number reaches Attentive only when the shopper has opted in to SMS marketing, and only the mobile number they opted in with. Shipping and billing phone numbers are fulfillment contact details rather than marketing consent, so they stay out of every event. Numbers are sent in E.164 format.

Shoppers give that consent through the SMS opt-in checkbox on your checkout, or through whichever StoreFront widget you have configured to capture it. If you are not seeing phone numbers in Attentive, make sure you are collecting a positive opt-in in your checkout.

A cart whose only identifier is an unconsented phone number has nothing Attentive can use, so its events are skipped and recorded in the integration log with a status of WARNING.

Subscriptions are SMS only​

Attentive creates an email subscription for any subscribe call that includes an email address. UltraCart therefore never sends an email address in a subscribe call.

  • A shopper is subscribed only when they opted in to SMS and have a mobile number, and only with that mobile number.
  • A shopper with no SMS opt-in is never subscribed. Their add-to-cart, purchase, and other events are still sent, carrying their email address.
  • A subscribe is also skipped when the matching source ID is blank.

Each skipped subscribe is recorded in the integration log with a status of WARNING, so WARNING entries for shoppers without an SMS opt-in are expected.

Opt-outs are handled in Attentive​

UltraCart does not send unsubscribes to Attentive. Attentive can only remove an SMS subscription by phone number, and the UltraCart features that unsubscribe a customer, such as an email flow step or a customer leaving a segment synced to Attentive, identify the customer by email address only. Shoppers opt out of SMS directly with Attentive, for example by replying STOP. Each unsubscribe UltraCart skips is recorded in the integration log with a status of WARNING.

Use UltraCart's checkout sms opt-in StoreFront Visual Builder element. It shows an unchecked consent checkbox, a mobile number field, and disclosure text you can edit, including links to your Terms and Privacy pages.

The lighter checkout sms opt-in checkbox element records consent but does not collect a mobile number. A shopper who checks it without a mobile number on the cart is not subscribed, so prefer the full checkout sms opt-in element for Attentive. If you use this element, leave its default-on setting at No, because a pre-checked box is not valid consent under TCPA rules.

Customer profile data​

Every event carries the shopper's name and address into Attentive as custom identifiers, so the data is available for segmentation. UltraCart sends firstName, lastName, address1, address2, city, state, zip, and country.

The shipping address is preferred. If the shipping address is incomplete, UltraCart falls back to the billing address as a whole rather than mixing fields from both, so a digital-only order with no shipping address still produces a complete profile.

Subscriptions are sent as marketing​

Every subscribe UltraCart sends is a MARKETING subscription. A shopper is only ever subscribed because they ticked the SMS opt-in, and that checkbox is consent to marketing texts, so classifying it as transactional would misfile the consent. An abandoned cart subscribe uses the Add to Cart Source ID, and a checkout subscribe uses the Checkout Source ID.

UltraCart never sends a TRANSACTIONAL subscription. Order-related texts, such as shipping notifications, are set up in Attentive. The Order Shipped event described below can trigger them.

Single opt-in and confirmation texts​

Attentive accepts a new SMS subscriber in one of two ways:

  • Confirmation text (double opt-in). Attentive texts the shopper and asks them to reply to confirm. They become a subscriber once they reply. Every Attentive account can use this, and it is what UltraCart requests when Single Opt-In is unticked.
  • Single opt-in. The shopper is subscribed immediately, with no confirmation text. Attentive has to approve your account for this first.

Tick Single Opt-In on the StoreFront only after Attentive confirms the approval. Until then, Attentive rejects every subscribe that requests single opt-in, with the error Single opt in not approved for your account, please contact your CSM. Your Attentive Customer Success Manager (CSM) can tell you whether your account is approved.

Checkout event data​

Checkout Started and Checkout Abandoned are sent as Attentive custom events. Custom events carry a flat set of properties rather than a line item array, so UltraCart summarizes the cart into values you can trigger journeys on:

PropertyContents
itemCountNumber of distinct items in the cart
totalQuantityTotal quantity across all items
cartValueSum of item cost multiplied by quantity
currencyCart currency code
productIdsComma-separated list of item IDs
productNamesComma-separated list of item descriptions

Kit component items are excluded from all cart and order events, so a kit reports as the single item the shopper actually bought.

Order shipped event data​

Order Shipped is sent as an Attentive custom event, because Attentive has no shipment endpoint. Use it to trigger shipping notification journeys. Its properties are:

PropertyContents
orderIdUltraCart order ID
carrierShipping carrier code
shippingMethodShipping method name
trackingNumbersComma-separated list of tracking numbers
trackingUrlTracking link for the first tracking number that has one
shipDateShip date
productIdsComma-separated list of item IDs
productNamesComma-separated list of item descriptions

The event time is when UltraCart sends the event, not the ship date, because Attentive ignores events more than 12 hours old when triggering journeys. Each order uses the same external event ID, OrderShipped- followed by the order ID, so a re-sent shipment can be recognized as the same event.

Item IDs in events​

Add to Cart and Purchase line items carry the UltraCart item ID as both the product ID and the variant ID, along with the item name, unit price, and quantity. The catalog sync uses the same item IDs, so events for items without variations match the catalog UltraCart uploads.

For an item with variations, the event carries the purchased child item's ID in both fields, while the catalog lists that child as a variant under its parent. Product matching for variation items may therefore be incomplete in Attentive.

If your Attentive catalog came from another platform with different product IDs, events will not match it.

Product catalog sync​

UltraCart uploads your catalog to Attentive so journeys can reference real products.

Each product includes its ID, name, description, brand, link, images, tags, attributes, categories, and collections. Price is carried on variants. An item without variations is uploaded with a single variant whose ID is the item ID, carrying the item's name, price, link, and image. Items with variations are uploaded as a single parent product with a variants array, and each variant carries its own ID, name, SKU, price, image, link, and option values such as size and color. Child items are not uploaded as separate products. Inactive items and inactive child items are skipped.

The catalog is uploaded once per Attentive account. StoreFronts that share a Private API Key share one upload, with category and collection data merged from each of those StoreFronts. A StoreFront with a different key gets its own upload, and a StoreFront with no key is skipped. Every upload contains all of your items; it is not limited to the items a particular StoreFront sells.

If your account has linked child accounts, the parent account gathers and uploads the catalog for the whole family. Child accounts are skipped so items are not uploaded twice.

UltraCart waits for Attentive to validate each upload instead of sending and forgetting. It polls for up to 10 minutes, and the resulting counts or per-item errors are written to the integration log.

Verifying the integration​

Every Attentive event call is written to the UltraCart integration log, including the JSON payload that was sent and the HTTP status code that came back. Catalog syncs record their progress and result instead of the payload. The API key is masked. Use the Log button on the Marketing Attentive screen to open it.

Statuses you will see:

StatusMeaning
SUCCESSAttentive accepted the call: HTTP 200 for events, HTTP 202 for subscribes
WARNINGThe call was skipped: the cart or order had no usable identifier, its only phone number lacked an SMS opt-in, a subscribe had no SMS opt-in or no source ID, or an unsubscribe was not sent
ERRORAttentive rejected the call, or the request failed

Start troubleshooting here. The log tells you whether UltraCart sent the event at all, which separates a UltraCart configuration problem from an Attentive journey problem.

The integration log covers the server side only. Events sent by the Attentive tag go straight from the shopper's browser to Attentive and never pass through UltraCart, so they do not appear here. Check those in Attentive's own reporting, or in your browser's developer tools by watching for requests to events.attentive while you browse a product page.

Troubleshooting​

Authentication errors​

A 401 response means Attentive rejected the API key. Confirm the key was copied in full, confirm the app in Attentive still exists and has write permission to eCommerce, Subscribers, Custom Events, and Product Catalog, then regenerate the key and save it in UltraCart again.

A 403 response on a catalog sync entry means the key is valid but its app lacks the Product Catalog permission. Add write permission to Product Catalog on the app in Attentive. If Attentive issues a new key when you change permissions, save the new key on every StoreFront that uses it.

Events are not reaching Attentive​

Check the integration log first.

  • No log entry at all means UltraCart never attempted the call. Verify the Private API Key is saved on the StoreFront the cart or order belongs to. The Marketing Attentive screen does not count.
  • A WARNING entry means UltraCart skipped the call. Read the message: it says whether the cart had no email address and no phone number, whether its only phone number had no SMS opt-in, or whether a subscribe was skipped for lack of an SMS opt-in or a source ID.
  • An ERROR entry includes the status code Attentive returned.

Subscribes fail with "Single opt in not approved"​

Single Opt-In is ticked on the StoreFront, but Attentive has not approved single opt-in for your account. Untick it and save, and Attentive sends new subscribers a confirmation text instead. Tick it again once your Customer Success Manager confirms the approval.

Shoppers whose subscribe was rejected are not subscribed automatically when you change the setting. Contact UltraCart support if you need them sent again.

Checkout opt-ins are not reaching Attentive​

If the integration log shows a WARNING for the subscribe on an order whose shopper ticked the SMS opt-in, check that Checkout Source ID is filled in on the StoreFront the order was placed on. With it blank, UltraCart skips the checkout subscribe.

Product views are not appearing in Attentive​

Product views come from the Attentive tag, not the server, so the integration log will not show them either way. Check the Company ID is saved on the StoreFront the shopper is browsing, because it is a per-StoreFront setting with no account-level fallback.

Then open a product page with your browser's developer tools on the Network tab and look for a request to cdn.attn.tv. If it is missing, the tag is not loading: confirm the Company ID is correct, and check whether a privacy or consent banner on your StoreFront is holding it back, since UltraCart withholds the tag until a shopper grants marketing consent.

A sign-up unit is appearing where you do not want it​

Sign-up units are controlled entirely in Attentive. Open the unit, find the Hide sign-up unit if section of its display rules, and add the path you want it kept off in URL contains. Clearing your UltraCart Company ID also removes every unit at once, along with product view tracking.

Journeys are not triggering​

If the log shows SUCCESS but nothing happens in Attentive, the problem is on the Attentive side. Confirm the journey is active, confirm the shopper is subscribed, and confirm the journey is listening on the same sign-up source ID you configured in UltraCart.

Products are missing from the catalog​

Inactive items are skipped by design, as are child items of a variation parent, which appear inside the parent's variants instead. If a whole catalog is missing, check the integration log for the CatalogSync entry. A failed sync records the reason, such as a 403 when the API key lacks the Product Catalog permission, and a completed upload reports validation errors per item.

Frequently asked questions​

Can I use the same source ID in more than one field? Yes, if your Attentive account uses a shared marketing unit. Every subscribe is sent as marketing whichever source ID it uses, so sharing an ID does not change how subscriptions are classified.

Why do new subscribers get a text asking them to confirm? Single Opt-In is unticked on the StoreFront, so Attentive confirms each new subscriber by text first. If Attentive has approved single opt-in for your account, tick the box. See Single opt-in and confirmation texts.

What happens if I regenerate my Attentive API key? UltraCart calls start failing with a 401 until you save the new key. Update it in UltraCart immediately after regenerating.

Do I need to add anything to my storefront theme? No. UltraCart adds the Attentive tag to your pages for you once you save a Company ID, and removes it when you clear the field.

Can I run the Attentive tag for tracking without the sign-up popups? Not from UltraCart. The tag is one file and it carries both. Your options are to keep every sign-up unit paused or archived in Attentive, to scope them with display rules so they never match your StoreFront pages, or to ask Attentive support to disable auto-load on your account.

Why does UltraCart subscribe shoppers when a cart is abandoned? When a shopper who opted in to SMS abandons a cart, UltraCart sends a subscribe call using your Add to Cart Source ID, so the shopper exists in Attentive and can be targeted by cart recovery journeys. Shoppers without an SMS opt-in are not subscribed.

Will UltraCart create email subscriptions in Attentive? No. Subscribe calls carry only the consented mobile number. See Subscriptions are SMS only.

Can I keep one StoreFront out of Attentive? Yes. Leave the Private API Key blank on that StoreFront and it sends nothing. See One StoreFront, one Attentive account.

Can UltraCart send my past orders to Attentive? No. Only orders placed after the integration is connected are sent.

I am not seeing phone numbers in Attentive. Why? Make sure you are collecting a positive SMS opt-in in your checkout. A phone number is sent only when the shopper has opted in, and only the mobile number they opted in with. See Phone numbers require an SMS opt-in.

Was this page helpful?