Examples and Use Cases

The following examples demonstrate common workflows you can build in Sana Commerce Cloud. They illustrate how triggers, actions, conditions, and variables work together to automate real business processes.

Example 1: Abandoned Cart Reminder

Send a personalized reminder e-mail to customers who added items to their cart but did not check out within 14 days.

Workflow Structure

  1. Trigger - Scheduled time: Every 14 days.
  2. Get baskets: Retrieve baskets created more than 14 days ago with Load shop accounts enabled.
  3. For each (repeat for each batch): Iterate over each batch of baskets.
  4. For each item (repeat for each item): Iterate over each basket in the batch.
  5. Check if: Check the shop account for each basket.
  6. Send email: Send a reminder e-mail to each customer.

Example 2: Pending Order Approvals

Notify account managers about orders that have been awaiting their approval.

Workflow Structure

  1. Trigger - Scheduled time: Every 3 days.
  2. Get pending order authorizers: Retrieve authorizers with pending orders.
  3. For each (repeat for each batch): Iterate over each batch of authorizers.
  4. For each item (repeat for each item): Iterate over each authorizer.
  5. Send email: Send a notification to each authorizer.

Example 3: Export Accounts with No Purchase Last 60 Days to Google Sheets

Export a list of shop accounts that have no purchases for more than 60 days to a Google Sheet for review.

Workflow Structure

  1. Trigger - Scheduled time: Every 60 days.
  2. Google Sheets - Clear rows: Clear the existing data in the report sheet (preserve header row).
  3. Get shop accounts: Retrieve shop accounts with the last login date and orders made more than 60 days ago.
  4. For each (repeat for each batch): Iterate over batches of accounts.
  5. For each item (repeat for each item): Iterate over each account in the batch.
  6. Google Sheets - Append row: Write account details to the sheet.
    Column A: {{shopAccountsForEachItem.id}}
    Column B: {{shopAccountsForEachItem.name}}
    Column C: {{shopAccountsForEachItem.email}}
    Column D: {{shopAccountsForEachItem.lastLoginDate}}
    Column E: {{shopAccountsForEachItem.lastOrderDate}}

Example 4: Send Personalized E-Mails Based on Basket Total

Send a premium message to high-value customers with a discount offer, for example.

Workflow Structure

  1. Trigger - Scheduled time: Every 30 days.
  2. Get baskets: Retrieve baskets created more than 30 days ago.
  3. For each (repeat for each batch): Iterate over each batch.
  4. For each item (repeat for each item): Iterate over each basket.
  5. Check if: Condition - basket total is greater than $500.
    • True: Send a personalized e-mail (e.g., offer a personal discount).
    • Otherwise: Send a standard promotional e-mail with current offers.