Data Store

Sample data to generate data structure

{
  "checkout_gid": "gid://shopify/AbandonedCheckout/50979408118106",
  "email": "[email protected]",
  "customer_id": "gid://shopify/Customer/10593453703514",
  "created_at": "2026-06-10T10:00:00.000Z",
  "status": 0,
  "next_email_at": "2026-06-10T11:00:00.000Z",
  "recovered_at": null,
  "stop_reason": "",
  "total_value": 93.3,
  "currency_code": "PLN"
}

Scenario 00 - optOut

Webhook response

Paste this code as webhook response body

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Opt-out confirmed</title>
  <style>
    body {
      margin: 0;
      min-height: 100vh;
      display: grid;
      place-items: center;
      font-family: Inter, Arial, sans-serif;
      background: #f6f4ef;
      color: #141414;
    }

    main {
      width: min(92vw, 520px);
      padding: 40px 28px;
      text-align: center;
      border: 1px solid #ddd7cc;
      border-radius: 8px;
      background: #ffffff;
    }

    h1 {
      margin: 0 0 12px;
      font-size: 28px;
      font-weight: 650;
      letter-spacing: 0;
    }

    p {
      margin: 0;
      font-size: 16px;
      line-height: 1.5;
      color: #4a4a4a;
    }
  </style>
</head>
<body>
  <main>
    <h1>We deleted your address.</h1>
    <p>You have been opted out successfully.</p>
  </main>
</body>
</html>

Email content

Subject

<aside>

Checkout Recovery

</aside>

Content

<aside>

User {{1.email}} opted-out

</aside>

Scenario 01 – checkoutRecovery_Collector

Shopify get abandonedCheckouts

paste this as Query into Shopify Make a GraphQL API call module

{
  abandonedCheckouts(
    first: 100
    query: "created_at:>='{{formatDate(addHours(ifempty(1.created_at; addHours(now; -96)); -2); "YYYY-MM-DDTHH:mm:ss[Z]"; "UTC")}}'"
    sortKey: CREATED_AT
  ) {
    edges {
      node {
        id
        name
        createdAt
        updatedAt
        completedAt
        abandonedCheckoutUrl

        customer {
          id
          email
          phone
          firstName
          lastName

          emailMarketingConsent {
            marketingState
            consentUpdatedAt
          }
        }

        totalPriceSet {
          shopMoney {
            amount
            currencyCode
          }
        }

        subtotalPriceSet {
          shopMoney {
            amount
            currencyCode
          }
        }

        discountCodes

        shippingAddress {
          firstName
          lastName
          city
          country
        }

        lineItems(first: 20) {
          edges {
            node {
              id
              title
              quantity

              variant {
                id
                title
                price

                image {
                  url
                }
              }
            }
          }
        }
      }
    }

    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

Parse date function

We use UTC time- to make it easier, you can find function here

{{parseDate(3.createdAt; "YYYY-MM-DDTHH:mm:ss.SSS[Z]"; "UTC")}}