Insider One Webhook

Prev Next

You cannot make any changes to External Platform Integrations without having either an Administrator or an Editor with PII access in InOne. Refer to User Roles for further information.

Webhook (Data Stream) is a feature that allows you to send real-time data to your endpoints. You can seamlessly integrate with Insider One to receive events and attributes through webhooks.

This feature enables you to transmit data to an endpoint as soon as Insider One collects it, ensuring the timely delivery of valuable insights.

Webhook offers two key functionalities:

  • Attribute Stream: This feature enables you to monitor specific user attributes and receive webhooks whenever a change occurs. You can customize your webhook to stay informed about relevant user data in real-time.

  • Event Stream: With Event Stream, you can track specific events and receive webhooks as they occur. You can receive real-time webhooks whenever a user interaction triggers an event.

In this article, you can find answers to the following questions:

Use Cases

  • Real-Time Data Updates: Integrate webhooks to ensure that all your tools and applications have real-time access to the latest data based on Insider One triggers. For instance, automatically update customer profiles across multiple platforms whenever there's a change in their information, such as a new address or contact number.

  • Cross-Platform Communication: Enable seamless communication between different systems and platforms using webhooks to send information in real-time to systems such as CRM tools or inventory management systems. For example, notify your CRM system whenever a new lead is generated on your website, ensuring that sales representatives can follow up promptly.

  • Automated Workflow Triggers: Utilize Insider One webhooks to trigger automated workflows in response to specific user actions or events in real-time.

Configure Insider One Webhooks

To start sending your events and attributes for your endpoint, you can follow these steps:

1. Navigate to InOne > Components > Integrations > External Integrations and select the Webhook integration. Provide a name for your integration to make it easy to identify and navigate later, then click Save to proceed.

2. You will land on the Rules step. In the tabs, you can select one or more Events or Attributes to trigger your integration.

3. After you select the first event type you want to trigger the data collection, you can see the events based on the type and select or deselect the ones you want to collect. You can also add other event types in the same section.

You can also add event parameters.

4. The Event Parameter section will be enabled after you select an event. You can select the parameters of your events through the dropdown that you want to send to your destination.

5. You can select the additional attributes to be included in the data sent to the endpoint. If you want to include additional attributes while sending the event data to your destination, you can add them here. For example, if you are sending an email open event, you can also select the email address to be sent to your destination. This way, you can understand which email address opened which email campaign.

6. In the Segmentation step, you can also select filter users in specific segments in Insider One to send. The data is sent only if the user performs the selected event and meets the optional segment filter criteria. For example, using this section, you can send user data to users who perform a cart page view event and have a high Likelihood to Purchase value.

7. You can continue with the Configure step, which enables you to add your endpoint URL to send your Insider One data.

In this step, you can add headers and payload to send to your endpoint.

  • If you want to send headers, check the “Enable Headers” checkbox and add a header name and a value. You can add as many headers as you want to send.

If you add sensitive data such as an API key in this field, make sure to check the Mark as Sensitive Information box to keep it protected.

  • Mark the “Enable Body” checkbox to configure the payload to be sent and transform the data into your payload structure. In this section, you can add dynamic values to your payload, including values for the events/event parameters/attributes. You can copy and paste your API payload here and replace values with dynamic content to send the payload as the destination API requires.

When configuring your payload body, ensure that you don’t include any sensitive information (e.g., API keys, tokens, or passwords) to keep your data secure.

HTTP/HTTPS domains used as webhook endpoint URLs, links inside the webhook body, and fallbacks for dynamic content must be added to the domain allowlist under Inone Settings > Security tab to save and activate the integration.

8. After configuring your endpoint, headers, and body for your webhook, you can continue with the Launch step, the last step to complete the integration. On this page, you can choose launch options as draft, active, or paused, and optionally add notes via the Notes field to enter additional information for your integration. The Draft option is selected by default.

  • Before you start sending webhooks, you should test your webhook using the Test Webhook button. After the test is successful, you can activate sending webhooks to your endpoint.

  • You can add random values automatically for the dynamic values and click the Test button to send your data. After sending the data, you can view the response status and your request details in the side modal to confirm that your request has been sent successfully.

  • If you see a successful HTTP response in the status, you can activate your integration and send data to your endpoint.

9. After completing the steps, you have successfully integrated Insider One webhooks to your endpoint. This integration enables you to channel data seamlessly from Insider One to your destination.

If you need to make any updates to the webhook, you can come back and edit the configuration.  

Data structure and sample webhook

In any of the given cases above, Insider One sends a payload to the given webhook URL with the following details:

Attribute Stream

Parameter

Definition

attrs

The attributes object, which contains the wanted attributes along with the subscribed attributes.

hook_id

The ID of the subscribed webhook

insider_id

The Insider ID/Profile ID of the user that is shared in the payload

partner

This is your partner name. Navigate to Inone Settings > Account Preferences to copy your partner name. The partner name should be lowercase.

timestamp

The time when Insider One receives the respective data that triggers the webhook (epoch time)

triggers

The array that contains the case(s) that trigger the attribute stream

Webhook Sample

{
  "attrs": {
    "age": 20,
    "email_optin": false,
    "name": "John",
    "surname": "Doe"
  },
  "hook_id": 3,
  "insider_id": "a1b2c3d4e5f6",
  "name": "My attribute webhook",
  "partner": "poshstreet",
  "timestamp": 1623182670,
  "triggers": [
    {
      "current": {
        "value": "loyal"
      },
      "key": "membership",
      "next": {
        "value": "VIP"
      }
    }
  ]
}

Event Stream

Parameter

Definition

attrs

The attributes object, which contains the wanted attributes along with the subscribed attributes.

event_name

The name of the subscribed event

event_parameters

The event parameters of the subscribed event

hook_id

The ID of the subscribed webhook

insider_id

The Insider ID/Profile ID of the user that is shared in the payload

partner

This is your partner name. Navigate to Inone Settings > Account Preferences to copy your partner name. The partner name should be lowercase.

timestamp

The time when Insider receives the respective data that triggers the webhook (epoch time)

triggers

The array that contains the case(s) that trigger the attribute stream

Webhook Sample

{
  "attrs": {
    "age": 25,
    "email_optin": true,
    "name": "John",
    "sms_optin": false
  },
  "event_name": "purchase",
  "event_parameters": {
    "unit_price": 10,
    "url": "https://mybrand.com/blue-jeans"
  },
  "hook_id": 12,
  "insider_id": "1a2b3c4d5e6f",
  "name": "My event webhook",
  "partner": "mybrand",
  "timestamp": 1623187855,
  "triggers": [
    {
      "key": "url",
      "next": {
        "value": "https://mybrand.com/blue-jeans"
      }
    }
  ]
}

Throttle the webhook

Using Insider One's throttling function, you can limit the number of real-time webhook requests coming to your endpoint per minute.

Endpoints for some services cannot handle many requests and might be unable to receive and process them. You might also want to keep the number of requests coming to your endpoint from different services at a reasonable level for security reasons.

  1. Go to External Integration Settings > Settings > Webhook Throttling.

  2. Click the Add a Webhook Endpoint button to add your endpoint. You should enter the URL and request a size limit for every endpoint. You can add as many endpoints as you want.

    You should add each endpoint and limit separately.

  3. After entering the URL and the request size, click the Save button to save your changes.

The throttling settings will be automatically applied to the endpoint for all webhooks you launch.

Since throttling is endpoint-based, the request size limit you set is shared across all Insider One’s InOne features, including all webhooks and Architect's Call APIs that use the same endpoint.

Webhook transmission

Insider One has a retry mechanism designed to prevent webhooks from being transmitted in case of errors or instantaneous problems with the endpoint. If a request encounters a timeout (set at 15 seconds), Insider One triggers a retry process for the specific webhooks. However, if a response is received, no further retries are attempted.

Insider One's retry strategy includes a maximum of 10 attempts, following an exponential backoff duration pattern:

  • First Retry: 2 minutes after the initial attempt

  • Second Retry: 4 minutes after the first retry

  • Third Retry: 8 minutes after the second retry

  • Subsequent Retries: The waiting time between retries continues to double, adhering to the exponential backoff strategy.

After the 10th retry, the system ceases further attempts to resend the request.

It's important to note that Insider One applies this retry mechanism for error codes 429, 502, 503, and 520. This scope ensures a comprehensive and resilient approach to webhook transmission.

You can apply IP Restriction for webhook payloads arriving at your endpoint. Insider One sends webhooks from certain IP addresses. To view the IPs that Insider One sends webhooks, navigate to Settings on the External Integrations page.

This website doesn’t work with webhook functionality. We advise you to test your platform from your own endpoints or another website that has similar functionality.