Sendlane

Datafly Signal delivers events to Sendlane server-to-server using the API v2 Custom Integration endpoint. Events are keyed on the contact email so Sendlane resolves or creates the contact and can trigger email and SMS automations, build segments, and track ecommerce behaviour — without a client-side Sendlane pixel.

Why route Sendlane through Datafly Signal

  • Profiles are updated from the server, not the browser. Events reach Sendlane even when a tracker blocker or a failed page unload would have dropped a client-side call, so the profile reflects what actually happened.
  • Presets for Default and Retail. The mapping starts from a working configuration for your vertical instead of a blank field map.
  • One consent decision governs every destination. Sendlane is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.

Prerequisites

Before configuring Sendlane in Signal you need a Sendlane account with API v2 access and a Custom Integration.

Step 1: Generate an API v2 access token

  1. Log in to Sendlane and go to Account > API.
  2. Create or copy your API v2 access token. This is sent as a Bearer credential on every request.

Step 2: Create a Custom Integration and copy its token

  1. Go to Integrations > Custom Integration in Sendlane.
  2. Create a new custom integration (or open an existing one).
  3. Copy the Custom Integration Token. This links incoming events to that integration and is required for event tracking.

Both tokens are required. The API token authenticates the request; the Custom Integration Token tells Sendlane which integration the events belong to.

Configuration

Configuration Fields

FieldRequiredDescription
api_tokenYesYour Sendlane API v2 access token, sent as Authorization: Bearer. Found under Account > API.
custom_integration_tokenYesThe Custom Integration Token that links events to a specific Sendlane custom integration.

Configure in Signal

  1. Go to Integrations > Add Integration > Sendlane.
  2. Choose a preset:
    • Default: product viewed, added to cart, checkout started, order placed and customer added.
    • Retail: the default events plus order shipped and refund as Sendlane custom events.
  3. Enter your api_token and custom_integration_token.
  4. Select consent categories.
  5. Click Save.

API Endpoints

Sendlane’s API v2 has one tracking path per event (API v2 reference, Custom Integration Webhooks):

Signal eventSendlane pathRequired by Sendlane
view_itemPOST https://api.sendlane.com/v2/tracking/product-viewedtoken, product_id
add_to_cartPOST https://api.sendlane.com/v2/tracking/added-to-carttoken, cart_id
begin_checkoutPOST https://api.sendlane.com/v2/tracking/checkout-startedtoken, checkout_id
purchasePOST https://api.sendlane.com/v2/tracking/order-placedtoken, order_id
sign_upPOST https://api.sendlane.com/v2/tracking/customer-addedtoken, customer_id
order_shipped, refund (Retail)POST https://api.sendlane.com/v2/tracking/eventtoken, custom_event

Every request carries Authorization: Bearer {api_token} and the Custom Integration Token in the body as token. Page views and the JavaScript identify event are not sent: active_on_site and identify exist only in Sendlane’s JavaScript pixel. Every other event is dropped.

Identity Signals

The contact is resolved by email, and by phone for SMS. Signal sends both on every event when known:

TraitSendlane fieldHandling
emailemailTrimmed and lower-cased.
phonephoneNormalised to E.164.
user IDcustomer_idOn sign_up (required there) and purchase.
email, first_name, last_namebilling_address.*On sign_up (Customer Added).

Events with neither an email nor a phone are dropped. The email and phone are sent in clear: Sendlane must reach the contact.

datafly.identify("user-123", {
  email: "jane.doe@example.com",
  first_name: "Jane",
  last_name: "Doe",
  phone: "+44 7700 900123"
});

Event Mapping

Signal eventSendlane fields
view_itemproduct_id (from items[].item_id)
add_to_cartcart_id (cart_id, else the anonymous ID), total (value), currency, line_items[]
begin_checkoutcheckout_id (checkout_id, else cart_id, else the anonymous ID), status pending, total, currency, line_items[]
purchaseorder_id (transaction_id), status processing, total (value), total_tax (tax), currency, discounts[].code (coupon), line_items[]
sign_upcustomer_id, billing_address

line_items[] is built from items[]: product_id and sku from item_id, product_name from item_name, item_price from price, and quantity. Currency is upper-cased.

Example: purchase

Datafly.js call:

datafly.track("purchase", {
  transaction_id: "1001",
  value: 49.99,
  tax: 0,
  currency: "usd",
  items: [
    { item_id: "12345678", item_name: "tshirt #1", price: 19.99, quantity: 1 }
  ]
});

Request sent by Signal (POST https://api.sendlane.com/v2/tracking/order-placed):

{
  "event": "order_placed",
  "token": "ABCDEFGHIJKLM1234567890",
  "email": "jane.doe@example.com",
  "phone": "+447700900123",
  "order_id": "1001",
  "status": "processing",
  "total": 49.99,
  "total_tax": 0,
  "currency": "USD",
  "customer_id": "user-123",
  "line_items": [
    { "product_id": "12345678", "quantity": 1 }
  ]
}

Testing

Send a test event

Trigger a purchase event on your site (or replay one from Signal’s event debugger) for a contact whose email exists in Sendlane.

Confirm it arrived

  1. In Sendlane, open your Custom Integration and check the event feed for the incoming event.
  2. Confirm the contact was matched or created from the email field.

Confirm it triggers automation

Build a Sendlane automation triggered on the custom event (for example order_placed) and verify a test event moves the contact into the automation.

Troubleshooting

ProblemSolution
401 UnauthorizedCheck the API v2 access token under Account > API. It is sent as Authorization: Bearer.
403 ForbiddenThe Custom Integration Token (token) is missing or wrong. Re-copy it from the integration.
Nothing arrivesEvents without an email or phone trait are dropped. Call datafly.identify() first.
422 validation errorA required field is missing (see the table above). Inspect the payload in Signal’s event debugger.
Automation does not triggerConfirm the automation trigger uses the exact Sendlane event name (for example order_placed, not the display name).