Webhooks
Sesamy's integrates with Zapier and allows you to listen to certain events that you can use to synchronize data with hundreds of third-party services like MailChimp, Slack, or Gmail.
How to set up Zapier Events
1 - Go to https://zapier.com and create an account (or log into your existing account).
2 - Go to create a new Zap and search for the Sesamy App.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fb35c3957-b35a-4c28-adb7-dbfedbbd8c3f%2Fwebhooks-1-6553806bb1c5c2fed4862e05873e8eb1.png?table=block&id=c661a20a-e7c0-485d-8c9f-f7b297012123&cache=v2)
3 - Select the event you want to listen to.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Ff94d087d-cf52-46da-b997-d76d146cb95b%2FScreenshot_2024-01-15_at_11.22.11.png?table=block&id=5a995e56-c7e9-4363-97ce-fe1915c158c7&cache=v2)
4 - Connect your Zapier account to the App.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fd5f9ff07-c39e-4bcd-b974-31bc242582ee%2FScreenshot_2024-01-15_at_11.22.58.png?table=block&id=1e06e733-f0e2-4a77-b7bd-dbc1af1e72bd&cache=v2)
5 - On the Trigger tab, fill in the filtering fields (More details on each event later)
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fdbde320f-8791-4238-a43e-539995b2eb72%2FScreenshot_2024-01-15_at_11.23.29.png?table=block&id=d3d89c3a-58d9-48cd-a2d0-0a783814017c&cache=v2)
6 - Click on Test to test the trigger and get a sample response.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fb20e43cb-26d2-4f78-afd3-6c3275ae289e%2FScreenshot_2024-01-15_at_11.25.02.png?table=block&id=d56ad77c-7cd6-4ede-8218-abe67de1a42e&cache=v2)
7 - Select the tool you want to integrate with. Each tool will have its own setup steps.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fdd5c920b-e679-4943-a529-5211b13ce9c2%2Fwebhooks-7-6b73e0b1b2fc74c06fa1c2c226d0bcb4.png?table=block&id=caea6624-d714-4cd8-8df2-dc953a319c65&cache=v2)
8 - You are all set! Each time an event is triggered the data will be synchronized between Sesamy and the tool you selected.
We support the following events
You can find the full list of events when you create a Zap https://zapier.com/app/zaps
User Subscription Created
Subscribe to this event if you want to synchronize data each time a user purchases a subscription. Select your vendor ID from the triggers list.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fd99a668a-0453-477f-8f48-2d90e96efbfc%2FScreenshot_2024-01-15_at_11.26.11.png?table=block&id=68a9ecf1-5468-4465-ab02-285e36a174cd&cache=v2)
Sample hook payload:
{
"user": {
"userId": "123",
"firstName": "Bob",
"lastName": "James",
"email": "zapier@sesamy.com",
"contactEmail": "zapier@sesamy.com",
"signedUpAt": "2022-11-08T12:49:11.190Z",
"deliveryAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"billingAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"tags": ["tagOne", "tagTwo"]
},
"sku": "123-xyz",
"entitlementId": "abc-xyz",
"purchaseOptionId": "xyz-567",
"title": "Yearly subscription",
"description": "A yearly subscription...",
"productType": "bundle",
"status": "active",
"userInsights": {
"canceledSubscriptions": 0,
"activeSubscriptions": 1,
"expiredSubscriptions": 0
},
"expiresAt": "2022-11-08T12:49:11.190Z",
"canceledAt": "2022-11-07T12:49:11.190Z",
"willCancelAt": "2022-11-09T12:49:11.190Z"
}
User Subscription Created Or Updated
Subscribe to this event if you want to synchronise data each time a user subscription is created or updated.
Subscriptions have the following statuses :
- VALID / ACTIVE: The subscription is active. Notice that a subscription may be ACTIVE but if the willCancelAt field is set it means that the user has chosen not to renew it once the date is due so it will be marked as CANCELED at that point.
- CANCELED: The subscription was canceled by Sesamy or a provider.
- EXPIRED: The subscription has expired by Sesamy or a provider.
- DELETED: The subscription was manually deleted
When a user cancels a subscription but the user has paid until a certain date, we will set the willCancelAt field to the date the subscription will be canceled. The subscription will still be active until that point and only at the moment the subscription is canceled the “User Subscription Ended” event will be sent.
Select your vendor ID from the triggers list.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2F67f3e594-3f08-4b88-9770-6be1f2428db2%2FScreenshot_2024-01-15_at_11.26.33.png?table=block&id=a99eb3d3-5a93-4207-af28-9830edc1da00&cache=v2)
Sample hook payload:
{
"user": {
"userId": "123",
"firstName": "Bob",
"lastName": "James",
"email": "zapier@sesamy.com",
"contactEmail": "zapier@sesamy.com",
"signedUpAt": "2022-11-08T12:49:11.190Z",
"deliveryAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"billingAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"tags": ["tagOne", "tagTwo"]
},
"sku": "123-xyz",
"entitlementId": "abc-xyz",
"purchaseOptionId": "xyz-567",
"title": "Yearly subscription",
"description": "A yearly subscription...",
"productType": "bundle",
"status": "active",
"userInsights": {
"canceledSubscriptions": 0,
"activeSubscriptions": 1,
"expiredSubscriptions": 0
},
"expiresAt": "2022-11-08T12:49:11.190Z",
"canceledAt": "2022-11-07T12:49:11.190Z",
"willCancelAt": "2022-11-09T12:49:11.190Z"
}
User Subscription Ended
Subscribe to this event if you want to synchronise data each time a user subscription is ended. The reason for the ending can be obtained on the status field:
- CANCELED: The subscription has been canceled either by refunding the purchase or by user request.
- EXPIRED: The subscription has expired. This happens when the subscription payment fails so the subscription is not automatically renewed.
- DELETED: A subscription has been deleted by Sesamy due to technical reasons.
Select your vendor ID from the triggers list.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fd1b68092-7acf-4880-b239-e7d5777e85a1%2FScreenshot_2024-01-15_at_11.31.17.png?table=block&id=f1e27469-18f1-4c0c-b6a0-908f5aba73c3&cache=v2)
Sample hook payload:
{
"user": {
"userId": "123",
"firstName": "Bob",
"lastName": "James",
"email": "zapier@sesamy.com",
"contactEmail": "zapier@sesamy.com",
"signedUpAt": "2022-11-08T12:49:11.190Z",
"deliveryAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"billingAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"tags": ["tagOne", "tagTwo"]
},
"sku": "123-xyz",
"entitlementId": "abc-xyz",
"purchaseOptionId": "xyz-567",
"title": "Yearly subscription",
"description": "A yearly subscription...",
"productType": "bundle",
"status": "CANCELED", // CANCELED EXPIRED or DELETED
"userInsights": {
"canceledSubscriptions": 0,
"activeSubscriptions": 1,
"expiredSubscriptions": 0
},
"expiresAt": "2022-11-08T12:49:11.190Z",
"canceledAt": "2022-11-07T12:49:11.190Z",
"willCancelAt": "2022-11-09T12:49:11.190Z"
}
Contract Purchased
Subscribe to this event if you want to synchronize data each time a user coming from your vendor platform buys an item on the Sesamy Checkout.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2F374deb2c-4494-4c16-af4a-c0410426aaea%2FScreenshot_2024-01-15_at_11.34.02.png?table=block&id=b570adef-e46d-4637-a7b0-2a5c27b58b3e&cache=v2)
Filtering parameters:
- Vendor Id (Required): Select your vendor ID from the list.
Sample
{
"user": {
"userId": "123",
"firstName": "Bob",
"lastName": "James",
"email": "zapier@sesamy.com",
"contactEmail": "zapier@sesamy.com",
"signedUpAt": "2022-11-08T12:49:11.190Z",
"deliveryAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"billingAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"tags": ["tagOne", "tagTwo"]
},
"contractId": "123",
"totals": {
"total": 10,
"totalTaxes": 1,
"netPrice": 9,
"discount": 0,
"currency": "SEK"
},
"products": [
{
"sku": "123-xyz",
"quantity": 1,
"purchaseOptionId": "xyz-567",
"total": 10,
"totalTaxes": 1,
"netPrice": 9,
"discount": 0,
"currency": "SEK"
}
],
"utmTags": {
"utmCampaign": "a",
"utmContent": "b",
"utmMedium": "c",
"utmSource": "d",
"utmTerm": "e"
}
}
User Signed Up
Subscribe to this event if you want to synchronize data each time a user signs up to your platform. This trigger will only trigger once when a user signs up and may not contain all user-selected settings like address or the accepted terms and conditions date (those are shown to the user after he/she signs up). To get that data and keep it up to date please listen to the trigger "Vendor User Created Or Updated" below.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fca732d16-0f3e-40cc-856e-cda505d7e9aa%2FScreenshot_2024-01-15_at_11.32.08.png?table=block&id=b873e781-b5dd-4710-942c-d24a8e97c269&cache=v2)
Sample hook payload:
{
"acceptedTCVersion": "2022-11-08T12:49:11.190Z",
"newsletters": { "newsletterX": true },
"mobilePhone": "699000111222",
"user": {
"userId": "123",
"firstName": "Bob",
"lastName": "James",
"email": "zapier@sesamy.com",
"contactEmail": "zapier@sesamy.com",
"signedUpAt": "2022-11-08T12:49:11.190Z",
"deliveryAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"billingAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"tags": ["tagOne", "tagTwo"]
},
"businessDetails": {
"companyName": "X Company",
"vatNr": "1234"
}
}
User Signed Up Or Updated
Subscribe to this event if you want to synchronize data each time a user is created or updated. For example, when a user signs up, he/she may later set some extra settings like address or accept the terms and conditions during the checkout process. So if you want to have the full user's data in sync you need to use this endpoint and keep your user up to date.
![Notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2Fa27ee3c2-8d44-4f1d-a82f-2ba1e7515728%2Fbdd42beb-23f2-4857-9ebc-f22b7a084081%2FScreenshot_2024-01-15_at_11.32.43.png?table=block&id=da2e6d95-4e7b-443b-aa30-a704bc571be0&cache=v2)
Sample hook payload:
{
"acceptedTCVersion": "2022-11-08T12:49:11.190Z",
"newsletters": { "newsletterX": true },
"mobilePhone": "699000111222",
"user": {
"userId": "123",
"firstName": "Bob",
"lastName": "James",
"email": "zapier@sesamy.com",
"contactEmail": "zapier@sesamy.com",
"signedUpAt": "2022-11-08T12:49:11.190Z",
"deliveryAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"billingAddress": {
"firstName": "Lucas",
"lastName": "James",
"addressLineOne": "Bergsjösvängen 1",
"addressLineTwo": "",
"zip": "41560",
"city": "Göteborg",
"country": "SE"
},
"tags": ["tagOne", "tagTwo"]
},
"businessDetails": {
"companyName": "X Company",
"vatNr": "1234"
}
}