Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.omneo.io/llms.txt

Use this file to discover all available pages before exploring further.

A Target is a configured endpoint that Omneo calls when a reaction fires a 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

  1. You create a Target with a URL and a Twig template
  2. A reaction fires a target.send action referencing the target’s handle
  3. Omneo renders the template using the event context data
  4. Omneo POSTs the rendered JSON to the target URL

Creating a target

curl -X POST https://api.[tenant].getomneo.com/api/v3/targets \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Profile Update Webhook",
    "handle": "profile-update-target",
    "url": "https://your-endpoint.example.com/omneo",
    "template": "{\"profile\":{\"id\":\"{{ id }}\",\"first_name\":\"{{ first_name }}\",\"last_name\":\"{{ last_name }}\",\"email\":\"{{ email }}\",\"email_promo\":\"{{ attributes.comms.email_promo }}\"}}",
    "description": "Sends profile update events to our comms platform"
  }'

Target templates

Templates are Twig-templated JSON strings. The template is rendered with the event context as its data source. Unescaped (for readability):
{
  "profile": {
    "id": "{{ id }}",
    "first_name": "{{ first_name }}",
    "last_name": "{{ last_name }}",
    "email": "{{ email }}",
    "tier": "{{ tier.handle }}",
    "spend_12m": "{{ aggregations.spend_12m }}",
    "email_promo": "{{ attributes.comms.email_promo }}"
  }
}
The variables available in the template depend on the event that fired the reaction. A 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:
{{ first_name | upper }}
{{ aggregations.spend_12m | number_format(2) }}
{% if tier_handle == 'gold' %}VIP{% else %}Standard{% endif %}
See the Twig documentation for the full reference.

Attaching a target to a reaction

In the reaction’s actions array, add a target.send action with the target handle:
{
  "name": "target.send",
  "sort_order": 2,
  "arguments": [
    {
      "name": "target",
      "value": "profile-update-target",
      "is_dynamic": false
    }
  ]
}

Browsing targets

GET /api/v3/targets

Troubleshooting

No request received at endpoint:
  1. Confirm the reaction is active in CX Manager under Settings → Reactions
  2. Check that the reaction is being triggered — add a target.send to a known-firing reaction to verify
  3. Verify the target URL is correct and accessible
  4. Confirm the target.send argument references the correct target handle
Blank or unexpected values in template:
  • Check which object is the root context for the triggering event
  • For a profile.updated event, first_name is 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