Test with a real subscriber
A real subscriber already exists in the same environment, with thesubscriberId your app uses and the channel fields the workflow needs, such as email.
- Create the subscriber on the Subscribers page, or pass their profile on the trigger.
- Open the workflow and click Test workflow.
- Select that subscriber, fill the payload, and send.
- Open the Activity Feed and filter by that subscriber ID.
<Inbox /> component initialized with the same application identifier and subscriberId.
Trigger Event API
Trigger a workflow from your backend by sending an event to the WorldVisa API. An event represents an action in your system, for example, an order created or a comment added, and is mapped to a workflow using the workflow’s trigger identifier. CallPOST ${WV_API_URL}/v1/events/trigger with the environment secret key. Never put that key in frontend code. The REST field for the workflow identifier is name. A workflow must be published before a Production trigger can run it. If the subscriber does not exist yet, passing to as an object creates them on that trigger.
When you trigger an event, you specify:
- The workflow to execute.
- The subscriber (or subscribers) the notification is intended for.
- The payload data used to personalize notification content.
For full request options and response details, see the Trigger Event API reference.
Trigger a workflow with context
You can attach context data when triggering a workflow using the Event API. Context can be referenced from existing contexts created in the WorldVisa dashboard by providing the context type and identifier or defined inline at trigger time. Any context passed with the event is available to all downstream steps and channel templates during workflow execution. When you pass a rich context object with adata field, WorldVisa upserts the stored context data if the context already exists - similar to subscriber fields on the to object. Passing only a string identifier references the context without changing stored data.
Context data is passed using the context object in the trigger request.
To learn how contexts work and how to manage them, see the Context documentation.
Send to several subscribers
Pass an array of subscriber IDs or subscriber objects into. Resolve group membership in your backend; Topics explains the current API boundary.