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:

  1. Providers
  2. Routing (optional)
  3. 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.

  1. Provide a name for your notification event
  2. 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"
  3. 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
  4. 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:

  1. Notification Event Analytics button on the top right corner of the card
  2. cURL or Code Button, which will open up the Notification Event Trigger Window
  3. The last updated day or time of the notification event
  4. The latest version of the Notification Event, including live or test version details.
  5. a "More" menu at the bottom right corner, that gives you the option to
    1. "Rename" the Notification Event
    2. "Duplicate" the Notification Event
    3. "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"
        }
    }
}'
  1. Navigate to the notification event page and click on "Add Conditions" under Templates section.
  1. To add conditions, follow these steps:
    1. Select the template you wish to use.
    2. Establish conditions based on variables.
      For instance, to trigger the Order Confirmed communication, select the 'Order_Confirmed' template and set the condition as "order.status equals Confirmed," and repeat this process for other statuses accordingly.
    3. Ensure, 'Else use' condition is added. This is to make sure at least 1 template is attached to this Notification event, if none of the other conditions are not satisfied.
  1. To delete any of the conditions added, click the delete icon on the right hand side of each condition added.
  2. 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.
  3. Once you've added the conditions, you can review them by clicking on 'View Conditions' below the template name.
  1. 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:

  1. Manual Select - Individually select each channel and select a Provider or Route for each
  2. Omni-channel Route - Select an Omni-Channel Route that has been created.
  3. Use Fyno Smart (Coming soon)

For now, please select "Manual Select".

This will automatically lead you to the next and final step!

3. Configuration

  1. 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.

  2. 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. 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.

  1. Make the final changes on the notification event and test it to make sure you are getting the desirable results.
  2. On the top of the page, next to the name of the Notification Event, you will see the Test Version mentioned.
  3. To keep this as a Test, click on Save and the draft will be saved.
  4. To make this version of the Test live, expand the Save menu to find Save and Promote.
  5. 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.


What’s Next

Understand how to check the status of sent notifications.