- Send Group Notifications: Direct notifications to group channels like team emails, Slack channels, or a shared Inbox feed.
- Notify Object Subscribers: Send notifications to all users subscribed to an object without passing individual users in the trigger. For instance, if you need to send invoicing alerts to all finance team members, you can create a “Finance” object and add team members as subscribers. Triggering the notification for the finance object then automatically sends it to all subscribed finance team members.
Objects are advanced way of modelling user triggers in SuprSend. If you are new to SuprSend, we recommend you to try out basic workflow trigger with user first before jumping into object implementation.
How object trigger works?
When you trigger notification on an object, It fans out and send notifications to object and all its subscribers. The object acts as an independent recipient of the notification, so if it has two subscribers, the notification will be sent to:- The object as a recipient (channels, properties and preferences defined at object are used in this workflow).
- Its 2 subscribers.
Creating objects in SuprSend
Each object in SuprSend is organized by atype
, grouping similar objects together. Objects are uniquely identified by an {id, object_type}
pair in all API calls. Follow these conventions when defining object types and IDs:
- Object Type: Use plural names where possible to reflect a collection of similar objects, such as teams, projects, or customers.
- Object ID: Choose a stable, unique identifier, ideally the primary key from your system. This ensures easy reference, as object IDs are immutable once created.
Creating objects in a separate API call before trigger
Creating objects in a separate API call before trigger
This is an ideal approach for updating objects especially if you are using object to send notification to its subscribers.
Adding objects inline in workflow trigger
Adding objects inline in workflow trigger
Objects are generally defined inline if you are sending notification to object as a recipient and need to add its channels or properties in the trigger.
Object subscribers
You can add users or other objects as object subscribers. When a workflow is triggered on the object, SuprSend will automatically fan out and run a workflow for each subscriber associated with that object. Learn more about subscription here.Nested object hierarchies: Object subscriptions support hierarchical structures, allowing one object to subscribe to another. e.g., if you create a
customer
object with associated team
objects subscriber to customer
object and team members
are subscribed to their respective team
objects. Now, when you trigger workflow on the customer object as recipient, it will propagate through this hierarchy and all teams and their team members will be notified.recipient.subscription
namespace.
Trigger workflow
You can trigger workflow on the created object by passing object_type and id as recipient in API based trigger. Event trigger doesn’t support triggering on objects.Update object profile and preferences
You can update channels, properties, and preferences for an object in the same way as for a user. These updates apply when sending notifications to the object itself as the recipient. Object profiles can be modified in the SuprSend UI for testing purposes, or programmatically through the object upsert API or edit operations API. Updating object preferences follows the same approach as updating user preferences: in the API call, you pass the identifier as:object_type/:id
instead of :distinct_id
.
Refer all object APIs