Creating a Notification Event
A notification event is the single most important part of Fyno's application design.
This stitches all the pieces that have been created by you and put them into a configuration flow or "Notification Event" that becomes executable in a single API
For a notification event to be successfully created, you will need to have preconfigured:
- Providers
- Routing (optional)
- Templates
The basic concept of a notification event is:
Providers + Routing (optional) + Templates = Notification Event
Let's have a quick look around the landing page of Notification Events.
You will find an easy toggle to change your view between a card grid and a list view, for your convenience.
Your option to filter out only the Live routes is at the top of the page.
On this page, you can quickly search for any of the notification events by the name given to them at the time of creation.
Create "Notification Events" with significant titles or names to help search for them easily.
A detailed description can also be added at the time of creation.
To create a new Notification Event, click on the "Create+" on the right side of the page.
- Provide a name for your notification event
- Provide a description of your notification event. This helps in the future when you want to review and change things up in your "Notification Event"
- Select Subscription topic from the list of subscriptions created in User Preferences. This is an optional field. Please refer this documentation on how to create subscription
- Click on "Submit" once done.
Make sure to choose the correct Subscription Topic. If a channel is disabled within the Subscription Topic, notifications will not be sent even if the corresponding channel template is configured.
The most anticipated logic that Fyno has cracked is in the next few steps, leading to making your life easy breezy.
On creating a notification event, on each Notification Event card you will see:
- Notification Event Analytics button on the top right corner of the card
- cURL or Code Button, which will open up the Notification Event Trigger Window
- The last updated day or time of the notification event
- The latest version of the Notification Event, including live or test version details.
- a "More" menu at the bottom right corner, that gives you the option to
- "Rename" the Notification Event
- "Duplicate" the Notification Event
- "Delete" the Notification Event
1. Template
The first step to building a great "Notification Event" with Fyno is to select a template that you have already created in the "Templates" section.
On clicking on the drop-down, you will see the entire list of templates created. Select one to proceed.
On selecting a template, at the bottom of the template selected, you will even be able to see the channels for which you have content configured! Makes life easy!
Conditional Templates
Conditional Templates empower you to choose templates based on specific conditions. This feature allows you to associate multiple templates with the same event, eliminating the need for redundant creation of multiple notification events.
How it works?
For instance, if you plan to send order status communications to users for statuses like Order Confirmed, Shipped, In-Transit, and Delivered. You can create four templates, each tailored to a specific order status. With Conditional Templates, you can efficiently manage these 4 templates under a single notification event, streamlining your communication workflow.
There is no cap on the number of templates you can include in a conditional template flow.
Sample cURL Request:
curl -X POST 'https://api.dev.fyno.io/v1/{Workspace_ID}/event' \
-H 'Authorization: Bearer <YOUR_FYNO_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"event": "Order_Status",
"to": {
"email": "<receivers_email>"
},
"data": {
"order": {
"mobile": "+91 9876543210",
"order_amount": "₹ 1,350.00",
"status": "Confirmed",
"payment_type": "COD",
"product_name": "abc",
"customer_name": "Vivek",
"delivery_date": "25-Dec-2023",
"order_id": "DEC165432"
}
}
}'
curl -X POST 'https://api.dev.fyno.io/v1/{Workspace_ID}/event' \
-H 'Authorization: Bearer <YOUR_FYNO_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"event": "Order_Status",
"to": {
"email": "<receivers_email>"
},
"data": {
"order": {
"mobile": "+91 9876543210",
"order_amount": "₹ 1,350.00",
"status": "Shipped",
"payment_type": "COD",
"product_name": "abc",
"customer_name": "Vivek",
"delivery_date": "25-Dec-2023",
"order_id": "DEC165432"
}
}
}'
curl -X POST 'https://api.dev.fyno.io/v1/{Workspace_ID}/event' \
-H 'Authorization: Bearer <YOUR_FYNO_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"event": "Order_Status",
"to": {
"email": "<receivers_email>"
},
"data": {
"order": {
"mobile": "+91 9876543210",
"order_amount": "₹ 1,350.00",
"status": "InTransit",
"payment_type": "COD",
"product_name": "abc",
"customer_name": "Vivek",
"delivery_date": "25-Dec-2023",
"order_id": "DEC165432"
}
}
}'
curl -X POST 'https://api.dev.fyno.io/v1/{Workspace_ID}/event' \
-H 'Authorization: Bearer <YOUR_FYNO_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"event": "Order_Status",
"to": {
"email": "<receivers_email>"
},
"data": {
"order": {
"mobile": "+91 9876543210",
"order_amount": "₹ 1,350.00",
"status": "Delivered",
"payment_type": "COD",
"product_name": "abc",
"customer_name": "Vivek",
"delivery_date": "25-Dec-2023",
"order_id": "DEC165432"
}
}
}'
- Navigate to the notification event page and click on "Add Conditions" under Templates section.
- To add conditions, follow these steps:
- Select the template you wish to use.
- Establish conditions based on variables.
For instance, to trigger the Order Confirmed communication, select the 'Order_Confirmation' template and set the condition as "order.status equals Confirmed," and repeat this process for other statuses accordingly. - Ensure, 'Else' condition is added. You can choose either 'Do Nothing' or select a fallback template attached if none of the other conditions are not satisfied.
- To delete any of the conditions added, click the delete icon on the right hand side of each condition added.
- To rearrange the conditions, you can drag them up or down by clicking the 'Drag Indicator' icon on the left-hand side of each condition.
- Once you've added the conditions, you can review them by clicking on 'View Conditions' below the template name.
- To modify any of the conditions, simply click on 'Edit Conditions.'
On to the next step!
2. Rules
Rules define the manner in which the notification will be sent across channels and providers.
On clicking the drop-down menu under Rules, you will see:
- Manual Select - Individually select each channel and select a Provider or Route for each
- Omni-channel Route - Select an Omni-Channel Route that has been created.
- Use Fyno Smart (Coming soon)
For now, please select "Manual Select".
This will automatically lead you to the next and final step!
3. Configuration
-
If you have selected 'Manual Select' in Step 2, then
You can configure any number of channels that you have under "Providers" in the Integration section.
All the "Providers" that you have created, are listed under each "Channel".
If you have configured "Routing", this too will be made available in the drop-down under the "Routing" Section.
-
If you have selected 'Omni-Channel Route' in Step 2, then
You can select any one of the omni-channel routes from the dropdown in this step.
All selected channels will send notifications simultaneously, so choose wisely.
4. Track Conversion (Optional)
This option will be visible only if you enable Conversion Tracking setting. You can read how to enable this setting here
- Enable Track conversion checkbox.
- Enter the duration till which you want to track the conversion. For example, if you fired the notification and want to track conversion for the next 1 hour, enter 1 hour.
- Currently conversion tracking is supported via API call. So API call option is selected by default.
- Click Copy Code. You need to pass only conversion id in the data payload to intimate Fyno to mark the notification as 'Converted' for a user/destination. Make sure, you pass the same conversion id while triggering the notification event also.
5. Save
Make sure you save every change by hitting the "Save" button at the top of the page. This will only save your changes as Test
In case you want to create different versions, make the necessary changes and then click on Save. This will create a new version every time.
Alternatively, you can discard the changes by clicking on "Discard"
Discarded changes cannot be retrieved
On clicking on the Save button's menu, you will be able to see Save and Promote. This allows your current changes to the notification event to be made live immediately.
Test and Live Versions
Every notification event that you create will be saved as Test versions, allowing you to test different variations and combinations of routes and templates, to suit your needs.
When a Test version is saved, this does not disturb the Live version that may be plugged in your application and may be active.
When you are confident and happy with the Notification Event that you have created and tested in Test version, this can then be moved into live version by following the below steps.
- Make the final changes on the notification event and test it to make sure you are getting the desirable results.
- On the top of the page, next to the name of the Notification Event, you will see the Test Version mentioned.
- To keep this as a Test, click on Save and the draft will be saved.
- To make this version of the Test live, expand the Save menu to find Save and Promote.
- This will make the current version the live version of the Notification Event.
You will not see the "Live" option in the drop-down menu of the Notification Event window in case the Notification Event is not promoted to live.
Approval flow
If you have enabled 'Approval' in Security Settings, when you click 'Go Live', you will need to raise an approval request for the changes you have done.
-
You will see the below popup once you click 'Go Live' . Select approvers from the 'From' dropdown. You can choose one or more approvers. You need to write a short message mentioning the reason for approval request. If you select 'Go Live on approval', the feature will go Live once the approver approves the request. Clicking 'Send for Approval' will send the request.
-
You will see the approval request in the Notification event page as shown . You can click 'Cancel' to cancel the request.
-
The approvers will receive an Email, an InApp notification for every approval request.
-
The approver will see the request in the Notification event page. The approver can approve or reject from the respective notification event.
-
Also if the approver wants to see all the pending requests, then can see them in the 'Requests' page as shown below.
- The approver can choose one or more requests and either Approve or Reject. While rejecting they need to provide a rejection reason.
- If the request is Approved, the feature will go Live if the requestor selected 'Go Live on approval' while raising the request. Otherwise, they have to click 'Go Live' to take the feature Live.
Updated 25 days ago