Navigation

Guide on the Webhook Events

When configuring a webhook, you must specify what data will be sent to your system. Before configuring anything, it is recommended to understand what you can send and determine your data needs. This guide will help you understand the code that is sent in response to the events.

***The info in this article can be different from your project depending on the structure you have.*** 


Webhook Format

All notifications are sent in JSON format. These notifications always start with an identifying parameter, as those in the table below, and the fields from the project's primary key as well.

ParameterDescription
Typecontains a chain of characters that represents the type of notification sent. This parameter can have such values as:
  • "sending_Bounce" for a delivery error
  • "sending_ProductionError" for a production error
  • "contact_modified" for a contact modification
  • "contact_optout" for a contact opt-out
  • "contact_complaint" for a spam complaint formulated by a contact

This list is not exhaustive.

EventUniqueIDcontains a chain of characters that uniquely identifies the notification.
dtExecutionfor the exact date and time the notification was sent.
idCompanycontains the company’s ID.
idProjectcontains the ID of the project where the notification is configured.
isTestis present and contains ”true” if this is a test notification sent from the webhook configuration interface, and is not present when a real notification is sent.
Note that the system must accept the isTest parameter as follows: if this parameter is “true”, you must not try to deactivate a real contact or edit a profile upon reception of a test message.
ContactIDcontains a dictionary of values that identifies the contact in Dialog Insight (“idContact”).

Contact Triggers

Creation
This type of notification informs you when a new contact is created in Dialog Insight, either manually or through a form. No notification can be sent for contacts added through import. Notifications related to the creation of a contact contain the same parameters as the system parameters, as well as all the project fields and their values (shown in the”ContactData” dictionary). This dictionary contains the values of all the project fields created by the client (where each field has a code prefixed with “f_”), as well as the administrative fields (source of contact creation, creation date, activation date, etc.).
Modification
This type of notification lets you be informed whenever a contact’s profile is updated in Dialog Insight, either manually or through a form. No notification can be sent for contacts modified through import. As for contact creation, notifications on contact edits contain the parameters included in the system parameters, as well as the project fields and their values, after the change (shown in the “ContactData” dictionary).
Opt-in
This type of notification informs you when a contact subscribes to one of your communications and when the contact’s status passes to Subscribed, or Active if the project does not have a consent center (C-28). Opt-in notifications contain parameters included in the system notifications, as well as the value of the field isActive, and the list of opt-in fields. The “OptinInfo” list has 2 objects:
  • "OptinField" contains the code of the opt-in field.
  • "OptinDate" contains the date the contact subscribed.
Opt-out
This type of notification is used to inform you when a contact has unsubscribed from a communication and his status has changed to Unsubscribed, or Inactive if the project does not have a consent center (C-28). Opt-out notifications contain parameters included in the system parameters, as well as the value of the field isActive, and the list of opt-in fields. The “OptinInfo” list has 2 objects:
  • "OptinField" contains the code of the opt-in field.
  • "OptinDate" contains the date the contact unsubscribed.
Quarantaine SMS/Courriels
This type of notification informs you when a contact’s email address is placed in quarantine after a message has been sent. Quarantine notifications contain the parameters included in all system parameters, as well as all available information about the quarantine (shown in the ”QuarantineInfo” dictionary):
  • "idSendLog" contains the ID of the mailing that conducted to the quarantine.
  • "idMessage" contains the ID of the message used for the mailing.
  • "dtProcessed" contains the date and time the mailing entered production.
  • "dtBounce" contains the date and time the message return the quarantine error.
  • "dtDelivered" contains the date and time the message was delivered.
  • "dsnMTA" contains the domain name of the MX server where the exchange occurred.
  • "dsnDiag" contains the error code sent by the server, which has cause the quarantine.
Spam complaint
This type of notification informs you when a contact reports a message as spam. Spam complaint notifications contain the parameters included in all system parameters, as well as all available information about the complaint – the feedbackLoop report shown in the “FBL_Report” parameter.

Emails/SMS/Push Triggers

Error notifications for messages contain the parameters included in all system notifications, as well as the information on the error (shown in the «SendLog” dictionary):

  • "EventType" contains one of the two possible mailing types in error:
    1. "Batch" for batch mailings or campaigns.
    2. "Event" for single message mailings (confirmations, Web Services, tests).
  • "idSendLog" contains the ID of the mailing in error.
  • "idMessage" contains the ID of the message used for the mailing.
  • "idMessageCategory” contains the ID of the communication type used for the message.
  • "dtProcessed" contains the date and time the mailing started to be sent.
Delivery errors

Notifications for delivery errors inform you when a delivery error occurs, including when a contact is quarantined. These notifications contain common parameters such as identifiers, as well as information on the mailing and on the error (shown in the ”DeliveryErrorInfo” dictionary):

  • "dsnMTA” contains the domain name of the MX server where the exchange occurred.
  • "dsnDiag" contains the error code sent from the server, and which caused the quarantine.
  • "BounceCode" contains the SMTP error code.
  • "isInvalidMailbox" indicates whether the email address is invalid or not.
  • "BounceType" contains the type of error.
Production errors

This type of notification allows you to be informed when an error occurs when the message is being prepared, before it is even sent. These notifications contain common parameters, as well as information on the mailing and on the production error (shown in the “ProductionErrorInfo” dictionary).

System Error Examples
ErrorCodeErrorErrorMessage
0NoErrorNo Error
1RecipientEmailSyntax
Recipient email syntax is invalid.
2Compilation
There was a compilation error in the message.
3ExecutionThere was an execution error in the message.
4SenderEmailSyntaxSender email syntax is invalid.
5SubmissionAn unknown internal error occurred. 
6RequiredDataMissingAn unknown internal error occurred. 
7EligibilityErrorThe contact was not eligible to receive the message.
99UndocumentedAn unknown internal error occurred


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.