> Create a sequence, choose its trigger, add and test each step, then turn it on.

Source: https://plandalf.com/docs/automations/build-a-sequence

Automations

# Build a sequence

This page walks through building a sequence in the editor, from an empty sequence to one that runs on every sale. The example tags each buyer in Kit and posts the sale to Slack.

**Before you start**

Connect the apps you want to use from the **Marketplace** tab, or connect them from inside a step as you go. The Plandalf app needs no connection.

## Create the sequence

1.  ### Name it
    
    Open **Automations → My Sequences** and click **Create Sequence**. Give it a **Name** that says what it does, such as "Pro buyers to Kit", add a description if you like, and click **Create Sequence**. The editor opens.
    
2.  ### Choose the trigger
    
    Click **1\. Choose a trigger**. On **1\. Setup**, pick the **App** (**Plandalf** for purchase events) and the **Trigger event**, such as **Checkout Completed**. See [Triggers](https://plandalf.com/docs/automations/triggers) for every option.
    
3.  ### Configure it
    
    On **2\. Config**, fill in the trigger's options. Most Plandalf triggers have an **Offer** field: pick one or more checkouts, or leave it empty to run for all of them. Click **Save & Continue**.
    
4.  ### Pick a sample record
    
    On **3\. Test**, pick a recent checkout. Its values fill the variable menu for the steps below, and testing the trigger is required to finish it.
    
    [![The trigger's Test tab listing five recent checkouts to pick as the sample record](https://plandalf.com/docs/shots/automations/trigger-test.webp)](https://plandalf.com/docs/shots/automations/trigger-test.webp)
    
    Pick a real checkout so later steps can use its values.
    

## Add steps

1.  ### Choose the app and action
    
    Click **Add a step**. On **1\. Setup**, pick the **App** and the **Action**, for example **Kit** and **Tag Subscriber**. For a connected app, pick the **Account** too, or click **Connect a new Kit account**.
    
    [![A Kit step opened on its Setup tab, with Kit as the app, Tag Subscriber as the action and the connected Kit account chosen](https://plandalf.com/docs/shots/automations/step-setup.webp)](https://plandalf.com/docs/shots/automations/step-setup.webp)
    
    Each step has three tabs: Setup, Config and Test.
    
2.  ### Fill in the fields
    
    On **2\. Config**, fill in the step's fields. Any field can use data from the trigger or an earlier step: type it in double curly braces, such as `{{trigger.customer_email}}`, or pick it from the variable menu at the end of the field.
    
3.  ### Test it
    
    On **3\. Test**, click **Test Action**. The test is real: it sends the email, posts the Slack message or changes the record in the other app. Use your own email address or a test record.
    
4.  ### Add the next step
    
    Repeat for each step. Use the **+** between two steps to insert one there, and the arrows on a step to move it up or down.
    

## Turn it on

New sequences are off. Click the switch at the top of the editor, or **Turn on** in the yellow banner, and it runs on every new event from then on. On **My Sequences** the switch stays locked until the sequence has a trigger, at least one step and a test on every step.

**Settings** holds the name, description, **Active**, **Run on test purchases** and **Delete sequence**.

## Data you can use

The purchase triggers give later steps, among others:

Variable

Example

`customer_email`, `customer_name`, `customer_first_name`, `customer_last_name`

`jane@example.com`

`total_amount` and `currency`

`29.70` and `USD`

`total`

`2970`, in cents

`line_items_summary`

A short list of what they bought

`invoice_id`, `invoice_number`, `offer_id`

`RCP-000175`

`paid_at`

When the invoice was paid

A step's output is available to every step after it. If an earlier step hasn't been tested, the editor warns you: its variables resolve to empty values until you test it.

## Check it ran

Click **Events** at the top of the editor. Each row is one run, with the customer, its status, logs and errors. Open a run to see each step's input and output, or rerun it.

## Common problems

What you see

What to do

Nothing happens after a sale

Check the sequence is on and the trigger's **Offer** includes that checkout. For a test purchase, turn on **Run on test purchases**.

The variable menu is empty

Pick a sample record on the trigger's **3\. Test** tab.

A field is empty in the output

The variable didn't resolve. Pick it from the menu rather than typing it, and check the sample has that value.

A step shows **skipped**

The step found nothing to do, such as a refund step for someone who isn't in that app. The run shows the reason.

Something wrong or missing? Email [hello@plandalf.com](mailto:hello@plandalf.com).
