Reference
Activity Sync (for Kinesis) events (v1.0)

Alex Pribula
Alex Pribula
  • Updated

Activity Sync (for Kinesis) streams real-time events from your flows and experiences into your own infrastructure.

v1.0 introduces a standardised structure across all event types, with versioning support, consistent data formatting, and clear separation of metadata, PII, and custom context.

This document details the v1.0 Activity Sync events, their structure, some sample payloads and key fields.

What's new in v1.0

  • Standardised schema with versioning (version: "1.0")
  • Tenant scoping via tenantId
  • Unified data block across all events
  • PII tagging for easier redaction and audit compliance
  • New event types including action, message-link-clicked, outbound-sms, and outbound-email
  • Deprecated v0.0 fields and kinds (e.g., queued, sent-to-gateway, outcome.success)

Event structure

Every Activity Sync event in v1.0 follows this structure:

{
  "version": "1.0",
  "timestamp": "ISO-8601 timestamp",
  "tenantId": "your-tenant-id",
  "workflowContext": {
    "experienceContext": { ... },
    "flowContext": { ... },
    "nodeContext": { ... }
  },
  "customContext": {},
  "kind": "event-type",
  "data": { ... },
  "pii": [ "fields" ]
}

Workflow context

All events include the same workflowContext block, which describes where in the flow the event occurred. It contains: experienceContext (the ID of the experience the event occurred for), flowContext (the ID, name, and version of the flow where the event occurred), and nodeContext (the identifying details of the node where the event occurred).

"workflowContext": {
  "experienceContext": {
    "experienceId": "501b95b3-06d3-4398-9ad4-b2563e158308"
  },
  "flowContext": {
    "flowId": "b07a5e44-04e3-4698-a799-04c558b77147",
    "flowName": "My first flow",
    "flowVersion": 2
  },
  "nodeContext": {
    "nodeId": "node-e72ur",
    "nodeName": "",
    "outputName": "conversation_2"
  }
}

nodeName is not populated yet.

This block is replaced with { ... } in examples below for brevity.

Key fields explained

  • version: Indicates the schema version for this event payload.
  • timestamp: Time the event occurred, formatted in ISO-8601.
  • tenantId: ID of the tenant generating the event.
  • workflowContext: Context from the triggering flow, including experience, flow, and node metadata.
  • customContext: Optional user-defined metadata (e.g. values passed in via merge fields).
  • kind: The type of event (e.g. experience-start, outbound-email).
  • data: The body of the event, with event-specific values (e.g. recipient, messageId).
  • pii: Array of keys from data or metadata that are considered personally identifiable information.
  • metadata (optional): Additional system context, used in some event types instead of workflowContext.

Workflow Studio events

  •  
    • Summary: An experience triggered.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "experience-start",
          "data": {},
          "pii": []
      }
              
  •  
    • Summary: An experience successfully finished.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "experience-complete",
          "data": {
              "endPoint": "The value of the flow End point reached."
          },
          "pii": []
      }
              
  •  
    • Summary: An experience failed.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "experience-failed",
          "data": {},
          "pii": []
      }
              
  •  
    • Summary: An action ran.
    • Sample payload (with usage):

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "action",
          "data": {
              "actionId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "name": "package/outputName",
              "outcome": "success",
              "outcomeReason": "Details of the successful outcome.",
              "usage": [
                  {
                      "uom": "measurable-quantity",
                      "qty": 3
                  },
                  {
                      "uom": "another-measurable-quantity",
                      "qty": 3
                  }
              ]
          },
          "pii": [
              "outcomeReason"
          ]
      }
              

Engagement Hub events

  •  
    • Summary: An SMS was queued for sending.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "outbound-sms",
          "data": {
              "usage": [
                  {
                      "uom": "sms-segments-au",
                      "qty": 3
                  }
              ],
              "recipient": "+61412345678",
              "body": "Thanks for signing up, John.",
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd"
          },
          "pii": [
              "body",
              "recipient"
          ]
      }
              
  •  
    • Summary: An email was queued for sending.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "outbound-email",
          "data": {
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "usage": [
                  {
                      "uom": "email-recipients",
                      "qty": 3
                  }
              ],
              "from": "company@appleseed.com",
              "replyTo": "company@appleseed.com",
              "to": "john.smith@appleseed.com",
              "cc": [],
              "bcc": [],
              "subject": "Thanks for registering with us.",
              "body": "\n\n Hello world!\n \n",
              "plainTextBody": "\\n \\n Hello world!\\n \\n",
              "attachments": [
                  {
                      "filename": "welcomepack.pdf"
                  },
                  {
                      "filename": "file2.png"
                  }
              ]
          }
      }
              
  •  
    • Summary: A message was sent.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "message-sent",
          "data": {
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "detail": "smtp: 225 Queued for delivery"
          },
          "pii": [
              "detail"
          ]
      }
              
  •  
    • Summary: A message was delivered.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "message-delivered",
          "data": {
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "detail": "Delivered message"
          },
          "pii": [
              "detail"
          ]
      }
              
  •  
    • Summary: A message failed to queue or send.
    • Sample payload:

      {
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "message-failed",
          "data": {
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "detail": "Failed message"
          },
          "pii": [
              "detail"
          ]
      }
              
  •  
    • Summary: A message was opened or read.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "message-opened",
          "data": {
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "detail": ""
          },
          "pii": [
              "detail"
          ]
      }
              
  •  
    • Summary: A link within a message was clicked.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "message-link-clicked",
          "data": {
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "detail": ""
          },
          "pii": [
              "detail"
          ]
      }
              
  •  
    • Summary: An inbound SMS started an experience.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "inbound-sms-matched",
          "metadata": {
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "matchedType": "Rule Match (Conversation)"
          },
          "data": {
              "sender": "+61487654321",
              "body": "I need some help",
              "matchedIntentKey": "upgrade",
              "matchedPart": "upgrade",
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd",
              "matchedType": "Rule Match (Conversation)"
          },
          "pii": [
              "sender",
              "body",
              "matchedIntentKey",
              "matchedPart"
          ]
      }
              
  •  
    • Summary: An unmatched SMS was received.
    • Sample payload:

      {
          "version": "1.0",
          "timestamp": "2024-08-27T13:25:04.913Z",
          "tenantId": "foo",
          "workflowContext": { ... },
          "customContext": {},
          "kind": "inbound-sms-unmatched",
          "data": {
              "sender": "+61487654321",
              "body": "I need some help",
              "messageId": "1d8e4e9c-69d8-4cd1-83fe-c13ef6870cfd"
          },
          "pii": [
              "sender",
              "body"
          ]
      }