# Automation triggers

> Every event that can start a BCL automation, what makes it fire, and the filters each trigger offers.
>
> Source: https://docs.bcl.my/automation-triggers/

Every automation starts with one trigger: the event that makes it run. BCL has 15 triggers in four groups. You pick one when you click **Add Node** on an empty canvas, and double-click it afterwards to narrow it down.

*(Screenshot: The Select Trigger Event panel with the Leads, Payments, Events and Affiliate groups)*

## Payment triggers

These triggers fire on payment forms, event forms, booking forms and QR Terminal payments. The list page shows the name in the **Trigger type** column, which is sometimes worded differently from the canvas.

| Trigger (canvas) | Trigger type (list) | Fires when |
| --- | --- | --- |
| **Payment Initiated** | Transaction Created | A customer submits a form and BCL creates the transaction, before they pay. |
| **Payment Successful** | Transaction Success | A payment succeeds. Free orders and COD or manual transfer orders you mark as successful count too. |
| **Payment Failed** | Transaction Failed | The bank rejects the payment or the customer's payment fails. |
| **Payment Cancelled** | Transaction Cancelled | BCL cancels an unpaid transaction automatically, about 30 minutes after it started. COD and manual transfer orders are never auto-cancelled. |
| **Payment Completed** | Transaction Completed | You mark a successful order as **Completed**, for example with **Mark As Completed** on the transactions list. |
| **Status Changed** | Status Changed | A transaction's status changes in any way. |
| **Order Shipped** | Order Shipped | A tracking number is added to an order through a courier integration. |

Every payment trigger except **Order Shipped** has two filters:

| Filter | What it does |
| --- | --- |
| **Payment Source Type** | **All Sources**, **Payment Form**, **Event Form**, **Booking Form** or **QR Terminal**. |
| **Specific Form** | Appears for payment, event and booking forms. Pick one or more forms, or leave it empty for all forms of that type. |

**Status Changed** also has a **Status Filter** with **From Status** and **To Status**. Each can be **Any**, **Pending**, **Failed**, **Successful**, **Cancelled** or **Completed**. **Order Shipped** has no filters: it applies to every order that gets a tracking number.

> **Note**
> A failed payment fires both **Payment Failed** and **Status Changed**. If you build one automation on each, both run.

## Lead, event and affiliate triggers

These triggers come from lead forms, event registrations and the affiliate programme.

| Trigger (canvas) | Trigger type (list) | Fires when | Filter |
| --- | --- | --- | --- |
| **New Lead Received** | Form Submitted | A visitor submits a lead form. | **Lead Form** (empty means all lead forms) |
| **Participant Created** | Participant Created | An event participant is created after a successful payment, one per ticket. | **Specific Event Form** |
| **Participant Checked In** | Participant Checked In | A participant checks in to the event. | **Specific Event Form** |
| **Certificate Generated** | Certificate Generated | A certificate is generated for a participant. | **Specific Event Form** |
| **Referral Approved** | Referral Approved | You approve an affiliate referral. | None |
| **Referral Rejected** | Referral Rejected | You reject an affiliate referral. | None |
| **New Affiliate Registered** | Affiliate Joined | Someone joins your affiliate programme. | None |
| **Payout Requested** | Payout Request | An affiliate requests a payout. | None |

## What each trigger passes on

Each trigger hands its data to the rest of the workflow as variables, such as `{name}` and `{amount}` for payments or `{attendee_email}` for participants. [Automation variables](/automation-variables/) lists them per trigger.

The trigger also decides the default recipient that BCL puts in a new message step:

| Trigger | Default email | Default phone |
| --- | --- | --- |
| Payment triggers | `{email}` | `{phone}` |
| Event triggers | `{attendee_email}` | `{attendee_phone}` |
| Affiliate triggers | `{affiliate_email}` | `{affiliate_phone}` |
| **New Lead Received** | None: use a form field such as `{email_address:2}` | None |

## Change the trigger

To swap the trigger without rebuilding the workflow, double-click it and click the refresh icon next to **Trigger Event** (**Change Trigger**). Pick the new trigger from the list. Its filters reset, so open it again to set them.

## Run an automation on older records

A trigger only fires for new events. For records that already exist, open the automation, click **Overview**, then **Actions**:

- **Past Transactions** runs the automation for transactions created between two dates. It is offered for every payment trigger except **Status Changed** and **Order Shipped**, and only picks transactions whose status matches the trigger.
- **Past Participants** does the same for event triggers.

Each record is only processed once per automation. See [Check automation history](/automation-history/) for the results.

## Common issues

### What is the difference between Automations and a form's Notification Settings?

Notification Settings control the standard emails BCL sends for one form. An automation starts from a trigger, such as Payment Successful, and runs your own steps for every form that matches, so one automation can cover all your forms.

### I only want the automation for one form. Where do I choose it?

Double-click the trigger on the canvas. Payment triggers have Payment Source Type and Specific Form, event triggers have Specific Event Form, and New Lead Received has Lead Form. Leave the form empty to cover all forms of that type.

### Why did my Payment Cancelled automation run although the customer never pressed cancel?

Payment Cancelled fires when BCL cancels an unpaid payment automatically, about 30 minutes after it was started. It does not wait for the customer to press anything.
