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

3 - Select the event you want to listen to.

Notion image

4 - Connect your Zapier account to the App.

Notion image

5 - On the Trigger tab, fill in the filtering fields (More details on each event later)

Notion image

6 - Click on Test to test the trigger and get a sample response.

Notion image

7 - Select the tool you want to integrate with. Each tool will have its own setup steps.

Notion image

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
 

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
 

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
 

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

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
 

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
 

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"
  }
}
 
Did this answer your question?
😞
😐
🤩