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
- Sign in to the Sailthru platform.
- Go to Settings > Setup > API & Postbacks.
- 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
| Field | Required | Description |
|---|---|---|
api_key | Yes | Your Sailthru API key, from Settings > Setup > API & Postbacks. |
secret | Yes | Your Sailthru shared secret, from the same page. Used to sign each request; never sent to Sailthru directly. |
Configure in Signal
- Go to Integrations > Add Integration > Sailthru (Marigold).
- Choose the Default preset (page, search, e-commerce funnel, and signup events).
- Enter your
api_keyandsecret. - Select the consent categories that apply (typically
marketing). - 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/eventEvery request is sent as application/x-www-form-urlencoded with four parameters:
| Parameter | Description |
|---|---|
api_key | Your account API key. |
format | Always json. |
json | The JSON request object: { "id", "key", "event", "vars" }. |
sig | A 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) | Source | Notes |
|---|---|---|
email (default) | The user’s email from datafly.identify() | Sent as the raw email address — Sailthru matches on the real value. |
sid | Sailthru profile id | Use when you already hold the Sailthru id for the user. |
cookie | sailthru_hid cookie | Sailthru’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 event | Sailthru event |
|---|---|
page | page_view |
Products Searched | search |
Product Viewed | product_view |
Product Added to Wishlist | wishlist_add |
Product Added | cart_add |
Cart Viewed | cart_view |
Checkout Started | checkout_started |
Order Completed | purchase |
Order Refunded | refund |
Signed Up | signup |
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
- In the Management UI, open your Sailthru integration and use the Event Debugger to inspect the request Signal builds for a sample event.
- Trigger an event on your site (e.g. complete a test purchase with a known email).
- In the Sailthru platform, open the user’s profile and confirm the event appears under their activity, with the expected vars.
- 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
| Problem | Solution |
|---|---|
Invalid signature error | The Shared Secret is wrong or mismatched with the API Key. Re-copy both from Settings > Setup > API & Postbacks. |
| Events not appearing on the profile | Confirm 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 triggered | The 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 matched | Ensure the raw (unhashed) email is being sent as id. Do not apply hashing to the Sailthru profile key. |
| Vars missing in template | Confirm the property is mapped under vars. in the integration’s Field Mappings. |