Simplici platform sends webhook data to your specified endpoint, enabling you to receive real-time updates about specific events. This document outlines the structure of the webhook data payload you will receive, including any metadata you provided during the session creation.

Webhook Payload Structure

The webhook data you receive will be structured as a JSON object containing the following fields:

  • payload
  • sessionId
  • pipelineId
  • stepId
  • date
  • metadata

Fields Description

payload

  • Type: Object
  • Description: Contains the information related to the specific event. The structure of this object depends upon the step in the pipeline that triggered the webhook.

sessionId

  • Type: String
  • Description: A unique identifier for the session within which the event occurred. This can be used to track the flow of events within a specific session.

pipelineId

  • Type: String
  • Description: The unique identifier of the pipeline that the event is associated with. This helps in identifying which pipeline's step triggered the webhook.

stepId

  • Type: String
  • Description: Identifies the specific step in the pipeline that triggered the webhook. This is useful for understanding what part of the process the event is related to.

date

  • Type: String
  • Format: ISO 8601 date and time format
  • Description: The date and time when the event occurred, provided in UTC. This timestamp can be used for logging purposes and to sequence events in chronological order.

metadata

  • Type: Object
  • Description: A JSON object containing any additional metadata that you provided when creating the session. This can include any custom information relevant to the session that you wish to receive back in the webhook payload.

Example Payload

Below is an example of a JSON payload you might receive from a webhook, including the metadata:

{
  "payload": {
    // Details specific to the event step
  },
  "sessionId": "65f30fb56f1cef0a7d8103fb",
  "pipelineId": "65f17595d5ac510490543f4c",
  "stepId": "signAgreement",
  "date": "2024-03-14T14:55:50.094+00:00",
  "metadata": {
    // User-provided metadata during session creation
  }
}

Receiving and Handling Webhooks

To effectively receive and process webhook data:

  1. Endpoint Configuration: Ensure your endpoint is configured to accept POST requests and can parse JSON-formatted request bodies.
  2. Security: Consider implementing security measures such as validating incoming requests to ensure they originate from our platform.
  3. Processing: Upon receiving a webhook, parse the payload, metadata, and other fields to take appropriate actions within your application.