> ## Documentation Index
> Fetch the complete documentation index at: https://help.lobyco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Block reference

> What each block in the canvas Block library does, how to set it up, what it needs as input, and what it passes on.

A **block** is one step on the orchestration canvas. For each block in the **Block library**, this page says what it does and how to set it up. It also says what the block needs as input and what it passes on.

## At a glance

You add blocks from the **Block library** and connect them. Customers then move from one block to the next. To set up a block, double-click it on the canvas.

The library sorts its blocks into five groups, and this page follows the same order.

![The Block library open on the canvas, with its groups in order: Trigger, Activity, Segment, Operators and Controls](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/orch-03-block-library-groups.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=3a9d4d4d8ac467a7e36008092ab0a10f)

*The Block library, with its five groups in order*

| Block | Group | What it does |
| - | - | - |
| [Customer event](#customer-event) | Trigger | Starts a flow when a customer signs up. |
| [Activity event](#activity-event) | Trigger | Continues a flow when something happens on a Challenge, Game or Offer. |
| [Inbound API](#inbound-api) | Trigger | Starts a flow when an external system calls in. |
| [System event](#system-event) | Trigger | Starts a flow when an offer, challenge or game is created, updated, published or unpublished. |
| Feed, Prompt, Push, Banner, Email | Activity | Communicate with the customer. See [Communication](/business-documentation/communication). |
| [Outbound API](#outbound-api) | Activity | Calls an external system with a request you define. |
| Game, Challenge, Offer | Activity | Give the customer something to engage with. See [Activities](/business-documentation/activities). |
| [Channel](#channel) | Activity | Sends the result to a file, an audience, the app or an external destination. |
| [Member segment](#member-segment) | Segment | Selects customers by rules, or from a saved template. |
| [Seed](#seed) | Segment | Selects customers from a file, or from an earlier campaign's result. |
| [Enrich](#enrich) | Operators | Adds data columns to each customer. |
| [Split](#split) | Operators | Divides customers into groups. |
| [Combine](#combine) | Operators | Merges its inputs into one result. |
| [Exclude](#exclude) | Operators | Removes one set of customers from another. |
| [Intersect](#intersect) | Operators | Keeps only the customers present in every input. |
| [Collateral assign](#collateral-assign) | Operators | Hands out collateral, with per-customer caps. |
| [Personal offers](#personal-offers) | Operators | Hands out the offers in personal offer events. |
| [Delay](#delay) | Controls | Holds each customer for a set time, then releases them. |
| [Limit (new)](#limit-new) | Controls | Caps how many customers pass this step. |
| [Limit (soon deprecated)](#limit-soon-deprecated) | Controls | The older cap, being retired. |

The communication and activity blocks work the same on a canvas as in a campaign's list of activities, so their own sections cover them.

## Trigger blocks

A trigger reacts to an event. **Customer event**, **Inbound API** and **System event** take no input, so each one starts the flow it's connected to. **Activity event** never starts a flow. It sits after the activity it listens to.

A scheduled flow starts from a **Member segment** or **Seed** instead. To choose what starts each flow, see [Orchestration canvas](/business-documentation/campaigns/orchestration-canvas#decide-what-starts-each-flow).

### Customer event

Starts a flow when a customer signs up. It listens for as long as you schedule it to.

1. From **Trigger**, drag **Customer event** onto the canvas.
2. Double-click it. The **Customer Event** dialog opens on **Choose Event**.
3. Under **Select customer event**, keep **Customer Sign-Up**. It's the only event, and it's already selected.
4. On **Schedule real-time run**, set the **Start date**, when the system starts listening, and the **End date**, when it stops.
5. Select **Save**.

* **Passes on**. The customer, plus the attributes the event carries.

### Activity event

Continues a flow when something happens on an activity, rather than to the customer directly. There's no dialog.

1. From **Trigger**, drag **Activity event** onto the canvas.
2. Connect it after a **Game** or **Challenge** block, or after an **Offer** block whose offer type is a triggered one. You can also connect it after one coupon listed under a Game's or Challenge's **Rewards**. It takes one input.
3. On a Game, choose **Won** or **Lost** on the block itself. Where only one event exists, the block sets it for you.

* **Events**. A Challenge gives **Completed**. A Game gives **Won** or **Lost**. An Offer or a reward coupon gives **Assigned**.
* **Passes on**. The customer, plus the attributes the event carries.

> [!WARNING]
>
> A reward coupon's event fires outside this campaign too.

A flow triggered on **Assigned** can then run for customers who got that coupon in another campaign.

### Inbound API

Starts a flow when an external system calls in. Each call names one customer.

1. From **Trigger**, drag **Inbound API** onto the canvas.
2. Double-click it. The **Inbound API** dialog opens on **Add Inbound API details**.
3. Enter a **Name** and **Description**. Under **Schedule**, set the **Start date** and **End date**. Both are required.
4. Open **Integration details**. Copy the **Endpoint URL** and the **Payload** example, and hand them to whoever builds the integration.
5. Select **Save**.

* **Passes on**. The customer named in each call, plus attributes.

The integration side is documented in [Inbound API integration](/integration/external-integrations/inboundapi-integration).

### System event

Starts a flow when something happens to any activity of the type you pick. It isn't tied to one activity you connect it to.

1. From **Trigger**, drag **System event** onto the canvas.
2. Double-click it. The **System Event** dialog opens on **Configure Event**.
3. Under **Event Configuration**, pick the **Event**. It can be **Created**, **Updated**, **Published** or **Unpublished**.
4. Pick **Offer**, **Challenge** or **Game** as the **Activity Type**.
5. On an offer, **Created** and **Updated** add a **Type** field to narrow it down. On a challenge, they add a **Reward type** field. Left empty, either field reads **All**.
6. Set a **Start date** and an **End date** for when the trigger listens. They must fall inside the campaign's own dates.
7. Select **Save**.

* **Connects to**. [Outbound API](#outbound-api) and [Delay](#delay), or an **Action** block already on the canvas.

## Activity blocks

Activity blocks are what the flow *does* once it has an audience. Most of them are documented in the section they belong to.

* **Feed**, **Prompt**, **Push**, **Banner** and **Email** are in [Communication](/business-documentation/communication).
* **Game**, **Challenge** and **Offer** are in [Activities](/business-documentation/activities).

The two blocks below exist only on the canvas, so this page documents them.

### Outbound API

Calls an external system with a request you define, each time a trigger fires.

1. From **Activity**, drag **Outbound API** onto the canvas. Connect one [Customer event](#customer-event), [Activity event](#activity-event) or [System event](#system-event) before it. Nothing connects after it.
2. Double-click it. It opens on **Edit outbound API**.
3. Enter a **Name**, pick the **HTTP method** and enter the **URL**.
4. For **POST**, **PUT** or **PATCH**, write the request body in the JSON editor. Use `{{ variable }}` placeholders to fill in values from the event that triggered the call.
5. On **Settings**, add any **Headers**. Under **Authentication**, pick a saved **Auth integration**, or add one with **Create new auth integration**. Left empty, it's **No auth**.
6. Select **Test** to send the request once and see whether it worked.
7. Select **Save**.

If you change the trigger later, a placeholder can end up with nothing to fill it. The dialog and the block then warn that some tags aren't available anymore.

The integration side is documented in [Outbound API connection](/integration/external-integrations/outboundapi-connection).

### Channel

Sends the flow's result somewhere else.

1. From **Activity**, drag **Channel** onto the canvas, and connect one block before it.
2. Double-click it. **Configure channel** opens.
3. Enter a **Name**.
4. Pick a **Location**, which is where the result goes. For **Bloomreach**, also pick a **Bloomreach Channel Type**, the destination within it.
5. For **Audience**, pick an audience from the list or create a new one.
6. Select **Save**.

| Location | Where the result goes | What it takes |
| - | - | - |
| **Export to CSV** | A file | Customers-only blocks, a whole Split, [Enrich](#enrich), [Inbound API](#inbound-api), [Collateral assign](#collateral-assign) and [Personal offers](#personal-offers) |
| **Audience** | An audience in Lobyco | Customers-only blocks |
| **App** | The customer's app, as the collateral a Collateral assign or Personal offers block handed out | Collateral assign and Personal offers only |
| **Bloomreach** | Bloomreach | Any block |

**Location** only offers the destinations that take every block already connected. For example, with a **Member segment** connected, **App** is gone from the list.

> [!WARNING]
>
> Sending to an audience replaces the customers in it.

If the audience already holds customers, the portal warns you first. They're replaced as soon as you execute the campaign.

## Segment blocks

### Member segment

Selects the customers a flow acts on, by rules. *Member* is the product's older word for a customer.

1. From **Segment**, drag **Member segment** onto the canvas.
2. Double-click it. A new block asks **Create member segment**. Pick **From Scratch**, or **From Template** to start from a saved definition.
3. On **Add Segment details**, fill in **Member segment name**, **Description** and **Permissions**.
4. If this block starts the flow, set the flow's schedule on the same tab. Only the starting block can change it. See [Schedule and run a campaign](/business-documentation/campaigns/schedule-and-run-a-campaign).
5. On **Segment attributes**, build the rules in the **Segment builder**.
6. Select **Save**. To keep the rules for later, the arrow beside **Save** offers **Save as template**. It isn't offered while a template is linked.

* **A linked template**. While a template is linked, the rules are read-only. The **Template** panel offers **Unlink**, to change the rules here, and **Edit**, to change the template. When the template has changed since it was linked, the block shows **Sync available**, and the panel offers **Sync**.
* **Below the builder**. The **Segment attributes** tab has three more controls.
  * **Segment summary** (BETA) shows a short summary of the segment, written by AI.
  * **Show limitation config** caps how many customers the segment passes on. Use the slider, from 1k to 500k, or type any number. **Inf** means no cap. The cap doesn't choose which customers to keep, so don't use it to pick, say, your top spenders.
  * **Show SQL query** shows the database query your rules turn into.
* **Passes on**. Customers only.

![The Segment attributes tab of a Member segment, with an Age rule in the Segment builder, Segment summary, Show limitation config and Show SQL query below it, and Save with its arrow](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/orch-08-segment-attributes-tab.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=ee0cb8b14400dc313b0db6650c4eef72)

*The Segment attributes tab, with the three extra controls below the builder*

The rules a segment is built from are documented in [Segments and Audiences](/business-documentation/audiences-and-data).

### Seed

Selects customers from a list decided outside the segment builder, instead of from rules.

1. From **Segment**, drag **Seed** onto the canvas.
2. Double-click it. **Create Seed** opens on **Add Seed details**.
3. Fill in **Seed name** and **Description**. This tab also holds the flow's schedule, as on a **Member segment**.
4. On **Configure seed**, under **File upload**, choose where the customers come from.
   * **File** takes one `.csv` file. Once it's uploaded, the field shows how many of its records matched a customer.
   * **Campaign result** takes an earlier campaign's output. Pick the **Campaign**, then a **Run**. Once you pick a specific run instead of **Latest run**, **Steps** narrows it to the output of particular blocks.
5. Select **Save**.

* **Passes on**. Customers only.

## Operator blocks

Operators reshape the audience between the segment and whatever acts on it. Every operator takes customers-only input. Collateral assign and Personal offers also take a whole Split.

### Enrich

Adds data columns to every customer in the result, so later blocks can use them.

1. From **Operators**, drag **Enrich** onto the canvas, and connect one customers-only block before it. Enrich can't follow a trigger or a whole Split.
2. Double-click it. **Add data enrichment** opens.
3. Enter a **Name** and a **Description**.
4. Select **Add elements**. In **Select elements**, tick a **Table** and then its **Column** entries. Select **Add elements** to add them.
5. To keep customers who get no result, tick **Do not remove member without result**. They then continue with an empty value.
6. Select **Save**.

* **Each element's name is its attribute**. Later blocks know the value by its name in the **Name** column.
* **Passes on**. Customers, plus the attributes you added.

> [!WARNING]
>
> By default, Enrich drops every customer with no result, and shows no error.

![Select elements for an Enrich block, with the Membership table ticked, its Age, Date of birth and Days to birthday columns ticked, and Add elements at the bottom](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/orch-09-enrich-select-elements.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=7a789566d6ed205eafa6d9385d9c41ee)

*Pick a table first, then its columns*

### Split

Divides customers into groups, each with its own output. That way, the flow can treat each group differently.

1. From **Operators**, drag **Split** onto the canvas, and connect one customers-only block before it.
2. Double-click it. **Attribute Split** opens on a list of attribute groups.
3. Choose how to divide customers. **Build random split** divides them without looking at them. To split by an attribute instead, pick one from the sidebar. Tick the values it offers, or add your own with **Add more ranges**. Each range has a **Name** and a condition. Then select **Build attribute split**.
4. On the next step, enter the required **Name** for the Split.
5. Pick **Target number** or **Target percentage** in the size column's heading, which is itself a dropdown. On a random split, **Add split group** adds a group.
6. Set each group's **CLIPPING METHOD** to **None**, **Random**, **Top** or **Last**. It decides *which* customers fill the group once its size is reached. On a random split, changing one group's method changes them all.
7. Select **Add attribute split** to save the groups.

* **Other**. Every split gets an automatic last group called **Other**, which takes everyone left over.
* **At least two groups**. Otherwise the block stays a draft. **Other** counts, so one group of your own is enough.
* **Passes on**. Each group passes on customers only. The whole Split also carries which group each customer is in. Only Collateral assign, Personal offers and a Channel set to **Export to CSV** or **Bloomreach** take the whole Split.

![The Attribute Split groups step, with the SPLIT NAME column, Target number in the size column's heading, the CLIPPING METHOD column, the Other row and Add split group](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/orch-04-split-groups-step.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=4d7e645e26b91ca6a7e5728e050fee1f)

*The Split groups step. The size column's heading is a dropdown.*

### Combine

Merges its inputs into one result. A customer in any input is in the result.

1. From **Operators**, drag **Combine** onto the canvas, and connect as many customers-only blocks as you need.
2. Double-click it. In **Configure operation**, enter a **Name**.
3. Select **Save**.

* **Passes on**. Customers only.

### Exclude

Removes one set of customers from another.

1. From **Operators**, drag **Exclude** onto the canvas.
2. Connect the customers to keep to **Include input 1**, and the customers to remove to **Exclude input 2**. The result is everyone in input 1 who is *not* in input 2. Each port takes several inputs.
3. Double-click it. In **Configure operation**, **Include** and **Exclude** decide how each port combines its inputs. Pick **Combine** or **Intersect**. Both start as **Combine**.
4. Select **Save**.

* **The order matters**. The port labels are the only thing on screen that tells you which port is which.
* **Passes on**. Customers only.

### Intersect

Keeps only the customers who appear in **every** input.

1. From **Operators**, drag **Intersect** onto the canvas, and connect as many customers-only blocks as you need.
2. Double-click it. In **Configure operation**, enter a **Name**.
3. Select **Save**.

* **Passes on**. Customers only.

### Collateral assign

Hands out collateral to the customers who reach it, with caps so no one receives too much. Collateral is either the offers in an event you import, or items you add and name yourself.

1. From **Operators**, drag **Collateral assign** onto the canvas. Connect customers-only blocks, as many as you need, or a whole [Split](#split). A single Split group doesn't connect, so connect the Split and every group appears in the grid.
2. Double-click it. **Collateral assignment** opens.
3. Set **Max collaterals per member**. While no event is imported, there's also **Max collateral activations** and a **Single row per member** checkbox.
4. Bring in the offers of an event with **Import collateral**. Or, while no event is imported, add named collateral with **Add collateral**. Importing an event replaces any named collateral.
5. In the grid of **Segments** against **Collaterals**, tick what each segment gets.
6. Select **Save**.

* **Which events it lists**. Every event except personal offer events, which belong to [Personal offers](#personal-offers).
* **After the flow has run**. **Delivered counts** shows how many went out.
* **Connects to**. A [Channel](#channel) set to **App** or **Export to CSV**. That's how the collateral leaves the flow.

### Personal offers

Hands out the offers in personal offer events to the customers who reach it.

1. From **Operators**, drag **Personal offers** onto the canvas. Connect customers-only blocks, or a whole Split, the same as [Collateral assign](#collateral-assign).
2. Double-click it. The **Personal offers** dialog opens.
3. Enter a **Name** and **Deduplication days**. **Deduplication days** is required and at least 1. It's how many days pass before the same customer can receive the same offer again, and it's the only cap this block has.
4. Select **Import event**. It lists personal offer events only. Choose the events, then select **Import**.
5. In the grid of **Segments** against **Events**, tick which offers each segment gets.
6. Select **Save**.

* **After the flow has run**. **Delivered counts** shows how many went out.
* **Connects to**. A [Channel](#channel) set to **App** or **Export to CSV**.

**Simulate** on the canvas needs this block. See [Schedule and run a campaign](/business-documentation/campaigns/schedule-and-run-a-campaign#or-run-it-now).

## Control blocks

### Delay

Holds each customer at this step for a set time, then lets them continue. The clock starts when each customer arrives, not when the flow starts.

1. From **Controls**, drag **Delay** onto the canvas, and connect one block before it. It can be a customers-only or customers-plus-attributes block, a System event, or another Delay.
2. Double-click it. The **Delay** dialog opens.
3. Under **Add details**, enter a **Name** and **Description**.
4. Under **Add triggered details**, complete the sentence. *At this step, wait for* a number and a unit, *then continue*. The wait can be up to 90 days.
5. For a wait in **day(s)**, also set the time of day to continue **at**. It can be 0, which means the same day at that time. If you set it to 0, customers already waiting are released at once. The **Time zone** shown above is your own.
6. Select **Save**.

![The Delay dialog, set to wait 2 day(s) and then continue at 09:00, with the Time zone above and a one-line summary below](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/orch-10-delay-dialog.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=fa53755ee77f553fd6fe7c5c8310fd6e)

*The Delay dialog, which reads as one sentence*

> [!WARNING]
>
> Shortening a Delay releases every customer whose new wait has already run out.

If anyone is waiting, the portal asks you to confirm with **Confirm, send forward**. A longer wait saves straight away.

> [!WARNING]
>
> Deleting a Delay that holds customers settles what happens to them at once, before the canvas is saved.

The portal asks you to choose **Delete, send forward** or **Delete, remove from flow**. Sending them forward drops them if any action after the Delay is still in Draft, and the portal tells you so. If nothing comes after the Delay, only **Delete, remove from flow** is offered.

You can't delete a Delay fed by an Active block. When you delete a Delay, the canvas reconnects the block before it to each block after it, where that link is allowed.

### Limit (new)

Caps how many customers pass this step.

1. From **Controls**, drag **Limit (new)** onto the canvas, and connect one block before it. It can be a customers-only block, a Customer event or an Activity event.
2. Double-click it. The **Limit** dialog opens.
3. Under **Add details**, enter a **Name**.
4. Select **Add limit** to add a rule, then fill in its numbers. You can add each of the four rules once.
5. Select **Save**.

The block stops letting customers through as soon as **any** rule is reached.

| Rule | Reads | Resets |
| - | - | - |
| **Total number of customers** | *At most* a number *customer(s) in total may pass this step* | One shared counter, never resets |
| **Per customer, in total** | *Each customer may pass at most* a number *times in total* | Never resets |
| **Per customer, per week** | *Each customer may pass at most* a number *times per* a number of *calendar week(s)*, up to 12 | Resets each calendar week |
| **Per customer, per day** | *Each customer may pass at most* a number *times per* a number of *calendar day(s)*, up to 90 | Resets each calendar day |

* **The rules nest**. Each rule can allow at most as many passes as the one above it in the table.
* **Passes on**. Customers only.

![The Limit dialog with two rules, at most 5000 customers in total and at most once per customer per calendar week, the summary of both, and Add limit](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/orch-11-limit-rules.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=b0a72348e29071bc2f7a0e6bbd68dd00)

*Two rules in the Limit dialog, with the summary of how they combine*

### Limit (soon deprecated)

The older cap, still in the library. Build new flows on [Limit (new)](#limit-new). On the canvas, this one reads **Limit (soon deprecated)** above its name.

1. From **Controls**, drag **Limit (soon deprecated)** onto the canvas, and connect one customers-only block before it.
2. Double-click it. **Configure control group** opens.
3. Enter a **Name**, and fill in the sentence. *Get* **Random**, **Top** or **Last** *items limited by* a number, in **result(s)** or **percent**. The first choice decides *which* customers pass.
4. Select **Save**.

* **Passes on**. Customers only.

## What can connect to what

The block groups connect in this direction.

```mermaid theme={"system"}
flowchart LR
    S[Segment] --> O[Operators]
    S --> C[Controls]
    S --> A[Activity]
    O --> C
    O --> A
    T[Trigger] --> C
    T --> A
    C --> A
    C --> O
    A -. Activity event .-> T
```

The dotted link is the **Activity event** trigger, which follows a Game, Challenge or Offer. A trigger never feeds an operator, because operators take customers only.

A link only works if the next block accepts what the previous one passes on. The canvas won't make a link the next block doesn't accept.

| Passes on | Blocks |
| - | - |
| **Customers only** | Member segment, Seed, Combine, Intersect, Exclude, both Limit blocks, and each group inside a Split |
| **Customers plus attributes** | Customer event, Activity event, Inbound API, Enrich |
| **Customers plus tracking attributes** | A whole Split |

This is what each block accepts.

| Block | Accepts | Inputs |
| - | - | - |
| Enrich, Split, Limit (soon deprecated) | Customers-only blocks | One |
| Combine, Intersect, Exclude | Customers-only blocks | Several (several per port for Exclude) |
| Limit (new) | Customers-only blocks, Customer event, Activity event | One |
| Delay | Customers-only and customers-plus-attributes blocks, System event, another Delay | One |
| Collateral assign, Personal offers | Customers-only blocks except a single Split group, and a whole Split | Several |
| Outbound API | Customer event, Activity event, System event | One |
| Feed, Prompt, Push, Banner, Game, Challenge, Offer | Customers-only and customers-plus-attributes blocks, Delay | One |
| Email | Customers-only blocks, Enrich, Delay | One |
| Channel | Depends on its **Location**. See [Channel](#channel). | One |
| Activity event | Game, Challenge, a triggered Offer, a reward coupon | One |

An **Offer** takes an input only when its offer type is a triggered one. See [Offer types](/business-documentation/activities/offers/offer-types).

**Enrich can't come before a Split.** A Split takes customers only, so the attributes Enrich adds can't reach its groups. To use enriched attributes in one group, put the Enrich after that group.

```mermaid theme={"system"}
flowchart LR
    A[Member segment] --> B[Split]
    B --> C[Group A]
    C --> D[Enrich]
    D --> E[Push]
```

## Blocks that are not in the library

Some blocks can appear on a canvas without being in the **Block library**.

* **Action**, with a single **Action** list in its dialog.
* **Dynamic Feed** and **Dynamic prompt**. They're different blocks from the library's **Feed** and **Prompt**.
* **Bonus**. A Bonus activity in the campaign shows on the canvas, but nothing connects to it. If you delete a selection on the canvas, the Bonus stays in place.
* A block your roles don't allow. It's labelled with its type above its name, like **Bonus**.

## Related

* [Orchestration canvas](/business-documentation/campaigns/orchestration-canvas) — adding and connecting these blocks, and what starts each flow
* [Schedule and run a campaign](/business-documentation/campaigns/schedule-and-run-a-campaign) — the schedule a Member segment or Seed holds, and running a flow
* [Find and manage campaigns](/business-documentation/campaigns/find-and-manage-campaigns) — finding a campaign, reading its status, and editing or deleting it
* [Campaigns](/business-documentation/campaigns) — how a campaign fits together


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.