Skip to content

Customer.io sends reporting webhooks to one Truto URL per integrated account, and Truto checks each request's signature with the account's webhook_secret variable. To connect a Customer.io account first, see Customer.io.

Warning

Truto checks the signature of Customer.io reporting webhooks, but no Unified API maps them to record:* events yet, so subscribing to those events delivers nothing.

  1. If you have not already, register a webhook in Truto. Follow this guide to create a webhook in Truto. Please make sure it is subscribed to the following events

    • record:created
    • record:updated
    • record:deleted

    Truto webhook setup

  2. Please make a note of the integrated account ID of the Customer.io account you'd like to register the webhook for. Next, in Customer.io, open Integrations → Reporting Webhooks and click Add Reporting Webhook.

    New webhook

  3. Enter a name for the webhook and paste the following URL into the Webhook URL field. Replace {{INTEGRATED_ACCOUNT_ID}} with the integrated account ID you noted in step 2.

    https://api.truto.one/integrated-account-webhook/{{INTEGRATED_ACCOUNT_ID}}
  4. Select the events you'd like to receive notifications for.

    Enter webhook url

  5. Save the webhook.

  6. In the webhook list screen, click the 3-dots icon for the webhook you just registered and click Copy signing key.

    Copy signing key

  7. Open the integrated account's page in Truto and, in the Variables section, click Edit variables (Add variables if the account has none). Click Add variable, enter webhook_secret under Name, paste the signing key you copied in step 6 under Value, and click Save.

    Click edit variables

    Enter webhook secret

  8. You're all set! Truto will now send notifications to the webhook URL you registered in Customer.io whenever a record is created, updated, or deleted in the integrated account.

Example webhook event

{
  "id": "64fbf363-7ba3-4745-8c7b-730c0fdbf40d",
  "event": "record:created",
  "payload": {
    "resource": "customerio/events",
    "records": [
      {
        "data": {
          "action_id": 42,
          "campaign_id": 23,
          "content": "Welcome to the club, we are with you.",
          "customer_id": "user-123",
          "delivery_id": "RAECAAFwnUSneIa0ZXkmq8EdkAM==",
          "headers": {
            "Custom-Header": [
              "custom-value"
            ]
          },
          "identifiers": {
            "id": "user-123"
          },
          "recipient": "test@example.com",
          "subject": "Thanks for signing up"
        },
        "event_id": "01E2EMRMM6TZ12TF9WGZN0WJQT",
        "metric": "sent",
        "object_type": "email",
        "timestamp": "2024-02-16T14:27:36.000Z"
      }
    ],
    "integrated_account_id": "37440f42-0e20-442e-a98d-04b2766247cc",
    "raw_event_type": "email.sent",
    "raw_payload": {
      "data": {
        "action_id": 42,
        "campaign_id": 23,
        "content": "Welcome to the club, we are with you.",
        "customer_id": "user-123",
        "delivery_id": "RAECAAFwnUSneIa0ZXkmq8EdkAM==",
        "headers": {
          "Custom-Header": [
            "custom-value"
          ]
        },
        "identifiers": {
          "id": "user-123"
        },
        "recipient": "test@example.com",
        "subject": "Thanks for signing up"
      },
      "event_id": "01E2EMRMM6TZ12TF9WGZN0WJQT",
      "metric": "sent",
      "object_type": "email",
      "timestamp": 1708093656
    }
  },
  "environment_id": "ac15abdc-b38e-47d0-97a2-69194017c177",
  "created_at": "2024-02-16T14:27:36.805Z",
  "webhook_id": "15d12ab3-64a8-450e-a185-ead081cee0e4"
}