Configuring Allowlist URL/SQS to receive Delivery Report

A Delivery Webhook is nothing but an Allowlist URL that can receive updates from Fyno regarding the delivery status of the notifications sent out and easily share the delivery details with you, to a location of your convenience, pre-decided by you.

An Allowlist URL can be converted anytime to a Delivery Webhook, once it is successfully verified by following the below steps while adding Allowlist URL/SQS.

  1. Select the checkbox - 'Use this endpoint to receive delivery reports' and click 'Add'.
  2. In the window that opens, you can add additional configurations, based on your requirements. You can also alternatively scroll to the bottom and save. This will send you the basic details that are pre-configured at Fyno's end.

The first Delivery Endpoint you create will be considered as 'Default' and you will start receiving your delivery reports in that URL. At any point of time, there will be only one default Allowlist URL. If you want to receive delivery reports in other URLs other than default URLs, you need to specify it in the payload as explained in the next section.

Once this is done, all the delivery statuses for every notification triggered will be automatically updated at this location.

🚧

Not all Providers and Channels give you delivery notifications and updates. Check here for a detailed list

Callback Objects in a Request

ParameterType and Value
enableDefault: true,
true: enable delivery status over callback.
false: disable delivery status over callback
custom_idstring; an alpha-numeric unique identifier of your notification.
Length: 200 characters
OR
number; numeric unique identifier of your notification.
Length: 20 digits
custom1string; (Optional) additional information that you want to tag your notification.
Example: order-id
Length: 50 characters
custom2string; (Optional) additional information that you want to tag your notification.
Example: Category
Length: 50 characters
allowlist_urlstring; (Optional) Allowlist url name where you want to receive delivery reports. Can be array of Allowlist url name too if you want the delivery reports in multiple URLs.
Example: ["DynamicWebhookSite", "Mixpanel"]
{
   "event": "YOUR_EVENT_NAME",
   "to": { // you channel destination },
   "data": {  // your template placeholders  },
   "callback": {
       "custom_id": "YOUR_CUSTOM_ID_VALUE",
       "custom1":"3d066514-c55d-48f8-b7ff-3981a43c20d4",
       "allowlist_url": ["DynamicWebhookSite", "Mixpanel"]
    }
}

Callback Response

Here's a list of default fields which will be sent if the delivery status callback is subscribed using Webhook URL" with "Callback Object" in the request:

The Delivery Webhook will be sent using:

Method: POST | GET
Content-Type : application/x-www-form-urlencoded | application/json
Data: Default Parameters + Additional Parameters

Default Parameters

Parameter NameType & Value
custom_idString or Number; an alpha-numeric or numeric unique identifier that is provided in the callback object during the submission request
msg_idString; Fyno message id that is generated during submission request.
example : 17f7e491-f51f-4e1e-881c-794f838c7c3c:s8a5
statusString; It holds the delivery status information of the triggered message id.
Example: DELIVERED, FAILED, READ, OPEN, etc

Additional Parameters

Additional Parameters can be sent in the response by configuring the same in your "Delivery Webhook" URL. All you will need to do is configure it as a Placeholder as shown in the sample payload below.

This configuration needs to be done in the payload section when converting an Allowlist URL to a Delivery Webhook

Here is a sample payload for reference.

{
     "param1": "{{destination}}",
     "param2": "{{provider}}",
     "param6": "{{integration_name}}",
      …………
}

Below is a list of all the parameters that Fyno can send you as data points. However, each one of these will need to be specified if you need them.

Parameter NameType & Value
request_idstring; request_id parameter in response which is generated during the submission request
example: 17f7e491-f51f-4e1e-881c-794f838c7c3c
custom_idString or Number; an alpha-numeric or numeric unique identifier that is provided in the callback object during the submission request.
msg_idString; Fyno message id that is generated during submission request.
example : 17f7e491-f51f-4e1e-881c-794f838c7c3c:s8a5
statusString; It holds the delivery status information of the triggered message id.
Example: DELIVERED, FAILED, READ, OPEN, etc
destinationString; destinations like email, mobile no sent during submission request.
example : [email protected], 919876543210
distinct_idString; It holds the distinct_id of the user, if specified in the request
messageString; This is an error message given by the provider if any delivery failure occurs.
Note: all provider does not give this information
senttimeString; Submission time of the request, YYYY-MM-DD HH:mm:ss UTC
senttime_epochString; Submission time of the request in epoch format (Unix time)
dlrtimeString; The time when the delivery report status was received, YYYY-MM-DD HH:mm:ss UTC
dlrtime_epochString; The time when the delivery report status was received in epoch format (Unix time)
integration_nameString; Integration account name through which the notification was sent
channelString; the name of the channel through which the notification was sent
providerString; the name of the provider via which the notification was sent
event_nameString; the name of the Notification Event that is being triggered
templateString; the name of the Template, whose content is sent out delivery and ideally it is being configured in the notification event
versionString: API version that is used to trigger a notification event
test or live
custom1String: custom1 value that is submitted callback object in submission request. If it does not pass in the request then it will be an empty string
custom2String: custom2 value that is submitted callback object in submission request. If it does not pass in the request then it will be an empty string

Sample Webhook Configuration and Response

Sample configuration for the additional parameters (JSON) in Webhooks Delivery status section

{
       "url": "https://webhook.site/847c54cc-c471-40f4-b793-36c18a",
       "method": "post",
       "headers": {
           "Content-Type": "application/json"
       },
       "data": {
           "recipent": "{{destination}}",
           "providername": "{{provider}}",
           "message": "{{message}}",
           "request_time": "{{senttime}}",
           "delivery_time": "{{dlrtime}}",
           "account_name": "{{integration_name}}",
           "reference_msg_id": "{{custom_id}}",
           "order_id": "{{custom1}}",
           "category": "{{custom2}}",
           "channel": "{{channel}}"
       }
}

Once this is successfully configured, here is a sample of the Callback Response you would receive.

{
       "msg_id": "FYNO_MSG_ID_UUID",
       "status": "DELIVERED",
       "custom_id": "YOUR_CUSTOM_ID_VALUE",
       "recipent": "[email protected]",
       "providername": "sendgrid",
       "message": "",
       "requesttime": "2023-03-24 10:23:39",
       "deliverytime": "2023-03-24 10:23:50",
       "account_name": "EmailProduction",
       "reference_msg_id": "YOUR_CUSTOM_ID_VALUE",
       "order_id": "YOUR_CUSTOM1_VALUE",
       "category": "YOUR_CUSTOM2_VALUE",
       "channel": "email"
}