Custom actions
Custom actions bring complex logic and decisioning into the campaigns you build with Marketing agent. They represent the kind of logic you'd use a webhook or a Jinja snippet for today, with no code required.
Describe the logic you want in plain language. Marketing agent turns it into working logic that runs at send time, for each recipient, inside your scenario. It can pull live data from inside Bloomreach or from an external system you've connected, then use that data to:
- Branch or condition a scenario, so each customer goes down the right path.
- Filter, rank, or sort data, such as product recommendations.
- Fetch and transform data, then insert it directly into message content.
- Send data to an external system you've connected, such as your own database, if the integration is set up to accept those requests.
You don't need a developer to write the logic, but you need one to connect any external system you want to use. For more information, see Prerequisites in Build a campaign with a custom action.
Is a custom action right for me? You don't need to choose: Marketing agent decides how to build your logic. For context on how custom actions relate to Jinja and integrations, see the FAQ.
NoteCustom actions are available at no extra cost to all customers who have Marketing agent enabled. If a custom action calls an external API that charges per request, those charges come from the API provider. There's nothing to turn on or look for: Marketing agent uses a custom action automatically when your logic needs one. If Marketing agent replies that it can't build the logic you described, contact your Customer success manager.
How custom actions work
A custom action isn't a separate step in your scenario. It's listed as context inside a node, and it runs your logic once for each recipient when the scenario reaches that node. You describe the logic; Marketing agent builds and places it.
- You describe the logic. In your conversation with Marketing agent, explain what the campaign should do. For example, "in the reminder email for an upcoming stay, include the weather forecast for the customer's destination."
- Marketing agent decides whether it needs a custom action. If standard features can do the job, such as conditions, aggregates, recommendation filters, or simple Jinja personalization, the agent uses those instead. It uses a custom action when the logic is too complex for those features or needs data from an external system.
- Marketing agent builds the logic and adds it to your scenario. The logic is saved with your campaign and listed as context inside the node where it's needed.
- At send time, the custom action runs for each recipient. It reads the data it needs from the customer's profile, events, catalogs, or a connected external system, and applies your logic.
- The results flow into the rest of the scenario. Later steps use the results to choose a branch, fill in message content, or update the customer profile.
Key terms
| Term | What it means |
|---|---|
| Custom action | Logic Marketing agent builds into your campaign. It runs for each recipient at send time and is listed under Additional context in the brief and on the canvas. You can ask Marketing agent to show you the logic behind it at any time. |
| Integration | A connection to an external system, set up in Marketing. Custom actions use integrations to fetch data from, or send data to, external systems securely. |
| Output | A value the custom action returns, such as a filtered product list or a weather forecast. Later nodes in the scenario use outputs. |
What custom actions can do
| Capability | Example |
|---|---|
| Fetch and summarize data from Bloomreach | Read a customer's booking history, remove cancelled and amended bookings, and find the confirmed trip that starts in exactly 7 days. |
| Fetch data from an external system | Get the weather forecast for each customer's destination from a connected weather service, on the day the email sends. |
| Send data to an external system | Push a consent event to your own database whenever a customer updates their consent preferences. This works only if your integration is set up to accept those requests. |
| Branch on live or calculated data | Send customers down an indoor-activities path if rain is forecast at their destination, and an outdoor path if it isn't. |
| Filter, rank, or sort data | Work out the two colors each customer bought most in the last 2 months, then filter recommendations to accessories in those colors. |
| Transform data for content | Combine a customer's next booking with their purchased add-ons into a trip summary (dates, hotel, and extras) to show in the email. |
Where to go next
- Build a campaign with a custom action: check the prerequisites, build the campaign step by step, and start from example prompts.
- Test and troubleshoot custom actions: check the logic and the output before you launch, and fix common issues.
- Custom action limitations: what custom actions can't do.
FAQ
Do I need to write code? No. You describe the logic in plain language, and Marketing agent writes it. You only need a developer to set up integrations with external systems.
How do I know whether my campaign uses a custom action? Marketing agent lists each custom action under Additional context in the campaign brief, and on the canvas card of each message it affects.
When should I use a custom action instead of Jinja or a webhook? You don't need to choose. Describe what you want, and Marketing agent picks the right approach. It uses a custom action only when standard features, including Jinja, can't do the job.
Do my existing webhooks and Jinja snippets still work? Yes. Custom actions don't replace or change scenarios you've already built in the scenario editor.
Can I reuse a custom action in other campaigns? Not yet. Each custom action belongs to one campaign. Reusable logic is planned as part of Custom skills.
Related articles
Updated about 1 hour ago

