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.
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
- Log in to Sendlane and go to Account > API.
- 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
- Go to Integrations > Custom Integration in Sendlane.
- Create a new custom integration (or open an existing one).
- 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
| Field | Required | Description |
|---|---|---|
api_token | Yes | Your Sendlane API v2 access token, sent as Authorization: Bearer. Found under Account > API. |
custom_integration_token | Yes | The Custom Integration Token that links events to a specific Sendlane custom integration. |
Configure in Signal
- Go to Integrations > Add Integration > Sendlane.
- Choose a variant:
- Default — page/active-on-site, identify, and core ecommerce events.
- Retail — full ecommerce funnel with line items, value, and currency.
- Enter your
api_tokenandcustom_integration_token. - Select consent categories (typically
marketing). - Click Save.
API Endpoint
POST https://api.sendlane.com/v2/custom-integrations/events
Authorization: Bearer {api_token}
Content-Type: application/jsonThe Sendlane event name lands in the event field, the Custom Integration Token in token, and the contact is identified by email. All other mapped fields are sent at the body root.
Identity Signals
Sendlane is an email-first platform: the contact is resolved by email address, which Signal maps from datafly.identify() traits to the email field on every event. When a contact does not yet exist, Sendlane creates it from the email and any contact traits (first_name, last_name, phone) carried on identify-type events.
| Trait | Sendlane field | Notes |
|---|---|---|
email | email | Primary match key. Sent on every event. |
firstName | first_name | Sent on the identify event. |
lastName | last_name | Sent on the identify event. |
phone | phone | Sent on the identify event (used for SMS automations). |
Sendlane resolves contacts by raw email — no client-side hashing is applied for this integration. Email is transmitted server-to-server over TLS.
How to send user data
Call datafly.identify() when a user registers, logs in, or submits a form:
datafly.identify("user-123", {
email: "jane.doe@example.com",
firstName: "Jane",
lastName: "Doe",
phone: "+44 7700 900123"
});Event Mapping
Retail preset
| Signal event | Sendlane event |
|---|---|
page | active_on_site |
Signed Up | identify |
Product Viewed | product_viewed |
Product Added | added_to_cart |
Checkout Started | checkout_started |
Order Completed | order_placed |
Events not in the mapping are dropped. To customise, edit the integration’s Field Mappings in the Management UI.
Example: Order Completed event
Datafly.js call:
datafly.track("Order Completed", {
order_id: "1001",
revenue: 49.99,
currency: "USD",
products: [
{ product_id: "12345678", sku: "TS1", product_name: "tshirt #1", quantity: 1, item_price: 19.99, total: 19.99 }
]
});Sendlane payload sent by Signal:
{
"event": "order_placed",
"token": "ABCDEFGHIJKLM1234567890",
"email": "jane.doe@example.com",
"order_id": "1001",
"value": 49.99,
"currency": "USD",
"line_items": [
{ "product_id": "12345678", "sku": "TS1", "product_name": "tshirt #1", "quantity": 1, "item_price": 19.99, "total": 19.99 }
]
}Testing
Send a test event
Trigger an Order Completed event on your site (or replay one from Signal’s event debugger) for a contact whose email exists in Sendlane.
Confirm it arrived
- In Sendlane, open your Custom Integration and check the event feed for the incoming event.
- Confirm the contact was matched or created from the
emailfield.
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
| Problem | Solution |
|---|---|
401 Unauthorized | Check the API v2 access token under Account > API. It is sent as Authorization: Bearer. |
403 Forbidden | The Custom Integration Token (token) is missing or wrong. Re-copy it from the integration. |
| Events arrive but no contact is created | Ensure email is present — call datafly.identify() with an email before tracking events. |
422 validation error | Check required fields for the event (for example order_id and value on order_placed). Inspect the payload in Signal’s event debugger. |
| Automation does not trigger | Confirm the automation trigger uses the exact Sendlane event name (for example order_placed, not the display name). |