Sailthru (Marigold)

Datafly Signal delivers events to Marigold Engage by Sailthru server-to-server using the Event API. Each event is submitted against a user profile and can trigger Lifecycle Optimizer flows, Smart Strategies, and other behaviour-based messaging inside Sailthru — without a client-side Sailthru tag on your site.

Prerequisites

Before configuring Sailthru in Signal you need a Marigold Engage by Sailthru account and your API credentials.

Get your API Key and Shared Secret

  1. Sign in to the Sailthru platform.
  2. Go to Settings > Setup > API & Postbacks.
  3. Copy your API Key and Shared Secret. You will need both.
⚠️

The Shared Secret is used to sign every request. Treat it like a password. Signal stores it as an encrypted secret and never transmits it to Sailthru — it is only used locally to compute each request signature.

Decide which events drive your flows

Sailthru event names are free-form. An event does nothing on its own — it only has an effect when a Lifecycle Optimizer flow, Smart Strategy, or trigger is configured to listen for that exact event name. Plan which event names you want Signal to emit so they match the listeners you build in Sailthru.

Configuration

FieldRequiredDescription
api_keyYesYour Sailthru API key, from Settings > Setup > API & Postbacks.
secretYesYour Sailthru shared secret, from the same page. Used to sign each request; never sent to Sailthru directly.

Configure in Signal

  1. Go to Integrations > Add Integration > Sailthru (Marigold).
  2. Choose the Default preset (page, search, e-commerce funnel, and signup events).
  3. Enter your api_key and secret.
  4. Select the consent categories that apply (typically marketing).
  5. Click Save.

To customise which Signal events map to which Sailthru event names, edit the integration’s Field Mappings in the Management UI. Make sure each Sailthru event name matches a listener (Lifecycle Optimizer flow, Smart Strategy, or trigger) you have set up in the Sailthru platform.

API Endpoint

POST https://api.sailthru.com/event

Every request is sent as application/x-www-form-urlencoded with four parameters:

ParameterDescription
api_keyYour account API key.
formatAlways json.
jsonThe JSON request object: { "id", "key", "event", "vars" }.
sigA per-request signature (see below).

Request signature

Sailthru does not use a static token. For every request, Signal computes a signature by sorting the values of the other parameters alphabetically, concatenating them, prepending your shared secret, and taking the MD5 hash. Signal handles this for you — you only need to supply the API Key and Shared Secret.

Identity Signals

Sailthru identifies a user profile by the id value, with key telling Sailthru what kind of identifier it is.

Identifier (key)SourceNotes
email (default)The user’s email from datafly.identify()Sent as the raw email address — Sailthru matches on the real value.
sidSailthru profile idUse when you already hold the Sailthru id for the user.
cookiesailthru_hid cookieSailthru’s Horizon browser cookie, for known-but-not-yet-emailed profiles.

Unlike advertising-platform integrations, Sailthru needs the plaintext email as the profile key — it does not accept a SHA-256-hashed email for matching. Signal therefore sends the raw email to Sailthru and does not hash it for this integration.

How to send user data

Call datafly.identify() when a user logs in, registers, or submits a form so Signal has an email to key events against:

datafly.identify("user-123", {
  email: "jane.doe@example.com"
});

Event Mapping

Default preset

Signal eventSailthru event
pagepage_view
Products Searchedsearch
Product Viewedproduct_view
Product Added to Wishlistwishlist_add
Product Addedcart_add
Cart Viewedcart_view
Checkout Startedcheckout_started
Order Completedpurchase
Order Refundedrefund
Signed Upsignup

Event properties are delivered as Sailthru vars, which are available in your messaging templates and Lifecycle Optimizer flows. Event vars take priority over same-named profile custom fields.

Example: Purchase event

Datafly.js call:

datafly.track("Order Completed", {
  order_id: "ORD-001",
  revenue: 129.99,
  currency: "USD",
  products: [
    { product_id: "SKU-A", name: "Widget", price: 49.99, quantity: 2 },
    { product_id: "SKU-B", name: "Gadget", price: 30.01, quantity: 1 }
  ]
});

Sailthru Event API request sent by Signal (the json form parameter, decoded):

{
  "id": "jane.doe@example.com",
  "key": "email",
  "event": "purchase",
  "vars": {
    "order_id": "ORD-001",
    "revenue": 129.99,
    "currency": "USD",
    "items": [
      { "product_id": "SKU-A", "name": "Widget", "price": 49.99, "quantity": 2 },
      { "product_id": "SKU-B", "name": "Gadget", "price": 30.01, "quantity": 1 }
    ],
    "marketing_consent": "1"
  }
}

The full request body also carries api_key, format=json, and the computed sig.

Testing

  1. In the Management UI, open your Sailthru integration and use the Event Debugger to inspect the request Signal builds for a sample event.
  2. Trigger an event on your site (e.g. complete a test purchase with a known email).
  3. In the Sailthru platform, open the user’s profile and confirm the event appears under their activity, with the expected vars.
  4. If you have wired a Lifecycle Optimizer flow to the event name, confirm the profile enters the flow.

Sailthru returns {"ok": true} on success. A response containing an error code indicates a problem with the request — check it in the Event Debugger.

Troubleshooting

ProblemSolution
Invalid signature errorThe Shared Secret is wrong or mismatched with the API Key. Re-copy both from Settings > Setup > API & Postbacks.
Events not appearing on the profileConfirm datafly.identify() is supplying an email so events have a profile key. Check the Event Debugger for the id value.
Event fires but no flow is triggeredThe Sailthru event name must exactly match the name your Lifecycle Optimizer flow / Smart Strategy listens for. Names are case- and spelling-sensitive.
Invalid email / profile not matchedEnsure the raw (unhashed) email is being sent as id. Do not apply hashing to the Sailthru profile key.
Vars missing in templateConfirm the property is mapped under vars. in the integration’s Field Mappings.