target.send action. Targets let you push Omneo event data to any service that accepts an HTTP POST, a comms platform, a cloud function, a CRM, or a middleware like Pipedream or Zapier.
How targets work
- You create a Target with a URL and a Twig template
- A reaction fires a
target.sendaction referencing the target’s handle - Omneo renders the template using the event context data
- Omneo POSTs the rendered JSON to the target URL
Creating a target
Target templates
Templates are Twig-templated JSON strings. The template is rendered with the event context as its data source. Unescaped (for readability):profile.updated trigger provides a profile context; a transaction.created trigger provides a transaction context including the linked profile.
See Event Contexts for the full context schema per event type.
Twig operations in templates
Omneo uses the Twig template engine. You can use filters, conditionals, and loops in your template:Attaching a target to a reaction
In the reaction’s actions array, add atarget.send action with the target handle:
Browsing targets
Testing templates with preview
Before attaching a template to a live reaction, use the preview endpoint to render it against a real resource record and see the exact payload Omneo would POST to the target URL.target_id instead of template to preview the template already saved on an existing target:
resource are: profile, transaction, transaction_item, order, order_item, reward.
Success response
result is the parsed JSON object Omneo would POST to the target. context is the full event context used as template variables, so you can see exactly which fields are available.
Error responses
If the template fails to render or produces invalid JSON, the endpoint returns422 with an error object that identifies where the failure occurred:
stage is either render (Twig error) or json (the rendered output was not valid JSON). line is the template line number for render errors, or null for JSON parse errors.
If the resource record cannot be found, the endpoint returns 404.
The preview endpoint requires the read-targets scope.
Troubleshooting
No request received at endpoint:- Confirm the reaction is active in CX Manager under Settings → Reactions
- Check that the reaction fires: add a
target.sendto a known-firing reaction to verify - Verify the target URL is correct and accessible
- Confirm the
target.sendargument references the correct target handle
- Check which object is the root context for the triggering event
- For a
profile.updatedevent,first_nameis at root, use{{ first_name }}not{{ profile.first_name }} - When in doubt, POST to a Pipedream or webhook.site endpoint to inspect the raw payload