Tagging a user with a custom event in automations

Jaroslav Bouška Jaroslav Bouška
5. September 2025

In this procedure we’ll show you how to mark users who have already completed a process so you don’t send them messages or notices that aren’t relevant to them.

Such processes may include, for example, dispatch of a personalized offer based on the user’s past behavior, completion of registration for a loyalty program, participation in a webinar, or contacting the user via a call center.

Below we’ll show how to tag such a user using a custom event within an automation in Boldem. In the example, we’ll work with a flow where the user enters the automation from an outer application that fetches order data, sends that data via a webhook, and then creates a custom event with information about the completed process.

Create a custom event schema

The first step is to create a custom event that lets you track whether a given user has already gone through a particular process.

If the custom event doesn’t exist yet, you can create its schema either manually or with code as part of automation. For manual setup, follow these steps:

  1. Go to Settings -> Custom events -> Create schema.
  1. Name the event and add properties as needed, depending on what user data you want to store.
  2. You will then find the event you created in the automation after expanding the Add custom event block, where you select its schema and properties from the drop-down menu.

You can also create a custom event schema directly in the automation: In the automation, open the Add custom event block and click Code. The event schema is specified in JSON format. Example:

{
  "name": "custom_tag",
  "properties": {
    "action_type": "webhook_call",
    "event_id": "{{stateData.orderId}}",
    "event_type": "order"
  }
}

This JSON code automatically creates a new custom event schema if it doesn’t exist, and upon start will store for the specified user (recipient) the information that a webhook with their data was dispatched and that this event originated from a specific order. The order ID will be stored with the event. When creating custom events you can use variables the same way as in the template editor. Details about variables can be found in the chapter Working with variables in the template editor.

Adding a custom event to an automation

  1. Log in to your Boldem account and go to Automation.
  2. Select an existing automation to tag users in, or create a new one.
  3. Click Actions and drag the Add custom event block onto the canvas. This block lets you add an event to a given user (recipient) after they complete a specific task in the automation.
  4. In the custom event block, either select the parameters of an existing event or create one using code as described in the previous chapter.

Sample template automation:

A custom event is logged for each recipient who goes through the automation.

Using a custom event for segmentation

Once we run the automation created this way and users (recipients) start tagging themselves with a custom event, we can exclude them, for example, from other automations or from marketing campaigns using segmentation to check whether that event has occurred or not. Example: