Registering webhooks in Truto for Customer.io
-
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:createdrecord:updatedrecord:deleted

-
Please make a note of the integrated account ID of the Customer.io account you'd like to register the webhook for. Next, head on over to the Customer.io interface to create a webhook. You can find it under
Journeys > Data & Integrations > Reporting webhooks. Click theAdd reporting webhookbutton.
-
Enter a name for the webhook and paste the following URL into the
Webhook URLfield. Replace{{INTEGRATED_ACCOUNT_ID}}with the integrated account ID you noted in step 2.https://api.truto.one/integrated-account-webhook/{{INTEGRATED_ACCOUNT_ID}} -
Select the events you'd like to receive notifications for.

-
Save the webhook.
-
In the webhook list screen, click the 3-dots icon for the webhook you just registered and click
Copy signing key.
-
Head on over to the integrated account details page in Truto and click
Edit varaiblesbutton in the Variables section of the Details tab. ClickAdd variableand enterwebhook_secretunder theNamefield and paste the signing key you copied in step 6 under theValuefield. ClickSave.

-
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"
}