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

# Welcome Flow: How to Greet a New Customer

**Goal:** Send a welcome email to every new customer. If the customer doesn't place an order within a week, follow up with a campaign that includes a promo code.

You'll solve this by building a flow in Maestra.

## Before you start

Set up the automated campaigns you want to send in your preferred channel before you build the flow:

* Email
* SMS
* Viber
* Mobile push
* Web push

<Tip>
  You can use more than one channel in the same flow. For example, send the welcome message by email and the reminder by mobile push.
</Tip>

## Build the flow

<Steps>
  <Step title="Trigger the flow on the New customer event">
    Set the flow to launch on the **New customer** event and limit it to one execution per customer.

    **How the New customer event works**

    The event fires whenever a new customer is added to the database — by any method: manually, via API, or by file import. Whenever a new Maestra ID is created, the event fires.

    <Warning>
      Even if a brand-new customer is immediately merged with an existing customer card, the new card was still created — so the flow will start. To prevent duplicate runs in cases like this, limit the flow to one execution per customer.
    </Warning>

    <Note>
      An import doesn't always create a new customer. If the customer already exists in the database, the import will just update the existing record. In that case the "added to the database" event doesn't fire.
    </Note>

    **Other triggers you can use, depending on your business case:**

    | Trigger                                                      | When to use it                                                                     |
    | ------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
    | An action with templates from specific operations was issued | When you want to start the flow from a particular operation that issued an action. |
    | Customer registered                                          | When you want to trigger on any registration operation.                            |
  </Step>

  <Step title="Check that the contact is valid and subscribed">
    Add a check that verifies the contact is valid and that the customer is subscribed in the channel you plan to use.

    To avoid triggering the flow for customers who were already in your database before you launched the flow, add an extra filter — for example, by **first registration date** — so only customers registered after the flow went live can enter it.
  </Step>

  <Step title="Send the welcome campaign">
    Send your welcome campaign.

    **What to include in the campaign**

    * To help new customers figure out where to start, recommend popular products — or, if you have the data, products they've already viewed.
    * Recommendation parameter: `Recipient.Recommendations.{algorithm name}`

    <Tip>
      Use A/B testing to measure performance and pick the variant that works best.
    </Tip>
  </Step>

  <Step title="Wait one week">
    Add a one-week wait step before the next action.
  </Step>

  <Step title="Check whether the customer has placed an order">
    Add a condition that checks whether the customer has placed any orders during the wait period.
  </Step>

  <Step title="Send a reminder campaign if there's still no order">
    If the customer hasn't ordered, send a reminder campaign.

    **What to include in the reminder**

    * Recommendations for popular products.
    * An extra incentive — a promo code or loyalty points.

    **Campaign parameters you can use:**

    | Purpose                         | Parameter                                                                                                          |
    | ------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
    | Show product recommendations    | `Recipient.Recommendations.{algorithm name}` (or build it in the new editor)                                       |
    | Show a promo code               | `Recipient.LastReceivedPromoCode.WithType{pool name}.Value` (or build it in the new editor)                        |
    | Show the points expiration date | Use the `AddDays` function to add the desired number of days to the campaign send date (`Message.SendingDateTime`) |
  </Step>
</Steps>

Your flow is ready to launch.

<Note>
  This flow complies with US email and privacy regulations (CAN-SPAM, CCPA) as long as your welcome and reminder campaigns include a clear sender identity, an unsubscribe link, and a valid postal address, and as long as you only send to customers who have actively opted in.
</Note>
