Session AI

Session AI (formerly ZineOne) is an in-session marketing platform that models each visitor’s real-time context and intent to deliver personalised experiences and messaging within the live session. Datafly Signal forwards your first-party events server-to-server into a Session AI REST channel, so the behavioural signal Session AI needs is delivered from your own infrastructure without an additional browser SDK.

Prerequisites

  • A Session AI account with access to the server-side / console tools.
  • A REST (webhook) channel created in the Session AI console. Note its channel name — events are routed by channel and events sent to an unknown channel are dropped.
  • An API key generated for that channel. It is sent on every request in the apikey header.
  • Your Session AI cloud host. Most tenants are on cloud.zineone.com; some regional tenants are on a different host. Confirm yours in the console.
  • A Datafly Signal pipeline with the Datafly.js collector installed and emitting events.

Configuration

FieldRequiredDescription
API KeyYesSent in the apikey header. Generate it from the Session AI server-side tools for your channel.
Channel NameYesThe REST/webhook channel that receives these events (passed as the channel query parameter).
API HostNoYour tenant’s cloud host. Defaults to cloud.zineone.com. Override only for a regional tenant.

Configure in Signal

  1. In the management UI, open your pipeline and add a destination.
  2. Choose Session AI from the Personalisation category.
  3. Enter your API Key and Channel Name (and API Host if your tenant is not on cloud.zineone.com).
  4. Select the Default preset, review the event mappings, and save.
  5. Enable the destination. Signal begins delivering mapped events immediately.

API Endpoint

Signal delivers each event with an HTTP POST to:

POST https://{api_host}/c3/public/api/v1/event?channel={channel}

Authentication is the apikey request header. Session AI returns 202 Accepted when an event is queued for processing. A successful event then appears in the customer activity stream for the supplied customer id.

Identity Signals

Session AI stitches behaviour to a profile using the identifiers sent at the root of the request body:

Signal sourceSession AI fieldNotes
user_idcidThe known-customer identifier. Required by the default preset.
anonymous_iddevice_idStable Signal device/anonymous identifier for pre-login activity.
email (trait)emailLower-cased and trimmed. Sent in plaintext — Session AI uses it for profile stitching.
name (trait)nameOptional display name.

Session AI ingests email in plaintext for its own profile matching, so confirm your data-processing agreement permits sending plaintext email to this destination before enabling the email mapping.

Event Mapping

Signal’s GA4-style event names are mapped to Session AI event names. Event attributes are sent as flat key/value pairs inside each object in the events array. Session AI stamps the receive time server-side, so no timestamp is sent.

Signal eventSession AI event
pagePageView
Products SearchedSearch
Product ViewedProductPageView
Product AddedAddToCart
Product RemovedRemoveFromCart
Cart ViewedCartView
Checkout StartedCheckoutStart
Order CompletedPurchase
Signed UpSignUp
Logged InLogin

Example

A product view captured by Datafly.js:

datafly.track("Product Viewed", {
  product_id: "SKU-9001",
  product_name: "Leather Tote",
  category: "accessories",
  brand: "gucci",
  price: 320,
  currency: "GBP",
});

is delivered to Session AI as:

{
  "cid": "cust-12345",
  "device_id": "df-7b3c1e9a",
  "email": "jane@example.com",
  "name": "Jane Doe",
  "os": "web",
  "events": [
    {
      "event": "ProductPageView",
      "productId": "SKU-9001",
      "productName": "Leather Tote",
      "category": "accessories",
      "brand": "gucci",
      "price": 320,
      "currency": "GBP"
    }
  ]
}

Events not in the mapping are dropped by default, so only the events you have mapped reach Session AI.

Testing

  1. Trigger a mapped event on your site (e.g. view a product).
  2. In Signal’s Event Debugger, confirm the event was delivered to Session AI and the response was 202 Accepted.
  3. In the Session AI console, use Retrieve Customer Activity for the test customer id (cid) to confirm the event landed and carries the expected attributes.

Troubleshooting

SymptomLikely causeFix
401 / 403 responseInvalid or unscoped API keyRegenerate the API key for the channel and confirm it is authorised for inbound events.
404 responseUnknown channelCheck the Channel Name matches a REST/webhook channel that exists in the console.
400 responseMissing event name or malformed bodyConfirm the Signal event is mapped to a Session AI event name in the preset.
202 but nothing in the activity streamWrong customer id or wrong tenant hostVerify cid is being sent and that API Host matches your tenant’s region.
Events for the wrong regionDefault host used for a regional tenantSet API Host to your tenant’s cloud host.