With SuprSend Node SDK, you can trigger Communication from your backend Node stack. Before moving into the intricacies of how to trigger a communication, we first need to understand how SuprSend sends communications to the end users. This is what a typical communication flow will look like
Communications are made up of multiple components - trigger, end users, vendors, templates and business logic, etc. All of these components are defined below:
Template contains the message content that needs to be sent. You can manage your templates on the SuprSend dashboard. This gives you the flexibility of making changes in the message content without changing anything in the code. Message content corresponding to multiple channels (like email, SMS etc.) are grouped under the single template name. You can create a template on SuprSend dashboard by following our Templates documentation
Users are your end recipients who need to be notified. Users are identified by a unique identifier distinct_id inside your workflows. Message will be sent to all the active channels in a user profile. For example - if your template contains message corresponding to email and SMS channel wherein your user profile has information related to only email channel, only email will be sent to that user. We'll learn more about how to add a user and their channel preferences in this document
Vendors are the channel providers through which your messages will be routed. You just have to add your vendor configurations on SuprSend platform and start sending the notification. Messages will always be routed through the default vendor configurations set on SuprSend dashboard. You can configure your vendors by following our vendor configurations guides
Workflow combines all the communication elements (like user, trigger, template, vendor, etc) and adds a business logic to it to determine how / when the notification should be triggered
Trigger initiates the workflow. There are two ways in which you can trigger a workflow:
- From API: Configure all the workflow components (users, template name, business logic etc) including the business logic in an API payload and trigger workflow through API.
- Event-based trigger: where you design the workflow on Suprsend platform and pass event from API as a trigger point.
For most usecases, event-based triggers are recommended as most of the workflow elements are not tied to the code, and can be easily modified through SuprSend dashboard without changing anything in the code.
In this documentation , we'll cover:
- How to integrate node SDK
- How to create User profile and add user channel preferences to it
- How to send and track events for triggering event based workflows
- How to Trigger a workflow from backend API
Updated about 1 year ago