Abandoned carts email template

We use this template for abandoned cart email retrievals, which are sent via an abandoned cart's details in your dashboard. The written message you input in the abandoned cart's details will be automatically inserted into this email template.

Customizing the default template

When you enter the email editor for the first time, you'll have a default template to get started. The actual email related to this template is sent through the dashboard, under an abandoned cart's details. From there, the message you enter will replace the message variable in your template. You will also have access to an object named settings exposing some useful information, such as a URL to retrieve the abandoned cart, available through settings.cartUrl.

If you are using Snipcart on multiple sites with different domains and you need to redirect the customer to the URL where they created the cart, you can use the settings.cartCreatedAtUrl property instead of settings.cartUrl.

The template editor example below includes the message variable you can modify under an abandoned cart's details.

---
Subject: Some items are still in your cart on {{ settings.businessAddress.compnay }}!
---

<!DOCTYPE html>
<html>
<head>
</head>

<body style="font-family: Arial; font-size: 12px;">
    <div>
        <p>
            {{! You have access to the whole order information using the `order` object. Might be helpful to show some contextual information }}
            Hey {{ order.billingAddress.fullName }},
        </p>

        <p>
            We noticed you did not finish your checkout.
        </p>

        <div>
            {{! Use the variable `message` to display the message that you enter in the dashboard when consulting an abandoned cart details screen.}}
            {{{ message }}}
        </div>

        <p>
            {{! Using `settings.cartUrl` you can add a link for the customer to retrieve its cart. }}
            Follow this <a href="{{ settings.cartUrl }}">link</a> to get back to your cart instantly.
        </p>

        <p>
            If you have any questions, just hit reply.
        </p>

        <p>
            Thanks for shopping with us!
        </p>
    </div>
</body>
</html>

Abandoned carts template data

In the email sent to your customers, your template will render the abandoned order data you used and the content you entered in the abandoned cart details form ( {{{ message }}} ). Here is the data you'll have access to when building your template:

{
  "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin pulvinar faucibus ex id pharetra.",
  "settings": {
    "signature": "<p>SNIPCART <br /><br />\nsnipcart.com <br /><br />\n<br /><br />\nBureau de Québec (administration) <br /><br />\n4885 1ere Avenue <br /><br />\nQuébec (Québec) G1H 2T5 <br /><br />\ngeeks@snipcart.com <br /><br />\n1 418 800 8440 <br /><br />\n<br /><br />\nTPS #XXXXXXXXXX <br /><br />\nTVQ #XXXXXXXXXX <br /></p>\n",
    "businessAddress": {
      "company": "snipcart.com",
      "address1": "226 rue St-Joseph Est",
      "address2": null,
      "city": "Québec",
      "country": "CA",
      "postalCode": "G1K3A9",
      "province": "QC",
      "phone": null
    },
    "includeProductImagesInInvoice": false,
    "logoUrl": "https://snipcart.com/images/snipcart_logo.svg",
    "cartUrl": "https://snipcart.com?snipcart_token=ee3708a8-e704-41e8-90ab-545d23cd493b#!/cart",
    "cartCreatedAtUrl": "https://snipcart.com?snipcart_token=ee3708a8-e704-41e8-90ab-545d23cd493b#!/cart"
  },
  "order": {
    "token": "ee3708a8-e704-41e8-90ab-545d23cd493b",
    "email": "john.doe@example.com",
    "mode": "Live",
    "status": "Processed",
    "shipToBillingAddress": false,
    "billingAddress": {
      "fullName": "John Doe",
      "firstName": null,
      "name": "John Doe",
      "company": "Snipcart",
      "address1": "226 rue St-Joseph Est",
      "address2": null,
      "city": "Quebec",
      "country": "CA",
      "postalCode": "G1K 3A9",
      "province": "QC",
      "phone": null
    },
    "modificationDate": "2016-10-06T19:07:01.8830883Z",
    "shippingAddress": {
      "fullName": "John Doe",
      "firstName": null,
      "name": "John Doe",
      "company": "Snipcart",
      "address1": "226 rue St-Joseph Est",
      "address2": null,
      "city": "Qu�bec",
      "country": "CA",
      "postalCode": "G1K 3A9",
      "province": "QC",
      "phone": null
    },
    "completionDate": "2016-10-05T19:07:01.8830883Z",
    "invoiceNumber": "SNIP-1001",
    "shippingInformation": {
      "provider": null,
      "fees": 20,
      "method": "Standard shipping",
      "trackingNumber": "TR4CK1NG",
      "trackingUrl": "https://snipcart.com"
    },
    "paymentMethod": "CreditCard",
    "card": {
      "last4Digits": "4242",
      "ownerName": null,
      "type": "Visa"
    },
    "summary": {
      "subtotal": 100,
      "taxableTotal": 150,
      "total": 120,
      "payableNow": 120,
      "paymentMethod": "CreditCard",
      "taxes": [],
      "upcomingPayments": [
        {
          "name": "Monthly plan",
          "subtotal": 20,
          "taxableTotal": 0,
          "date": "2016-10-05T00:00:00Z",
          "total": 20,
          "paymentMethod": 0,
          "taxes": [],
          "adjustedTotal": null
        }
      ],
      "adjustedTotal": 100
    },
    "items": [
      {
        "uniqueId": "acee6a26-dd85-4e86-91e5-bb0dbab37213",
        "token": null,
        "id": "tshirt",
        "name": "Geek T-Shirt",
        "price": 50,
        "description": null,
        "url": "/",
        "image": "https://placeholdit.imgix.net/~text?txtsize=14&txt=150%C3%97150&w=150&h=150",
        "quantity": 2,
        "minQuantity": null,
        "maxQuantity": null,
        "stackable": false,
        "shippable": false,
        "taxable": true,
        "taxes": [],
        "customFields": [
          {
            "name": "Size",
            "operation": null,
            "type": null,
            "options": null,
            "required": false,
            "value": "Medium",
            "optionsArray": null
          },
          {
            "name": "Color",
            "operation": null,
            "type": null,
            "options": null,
            "required": false,
            "value": "Red",
            "optionsArray": null
          }
        ],
        "duplicatable": false,
        "alternatePrices": null,
        "unitPrice": 50,
        "totalPrice": 100,
        "addedOn": "2016-10-05T18:07:01.8830883Z"
      },
      {
        "uniqueId": "27648752-5acc-4314-9ae3-c3b9793b0684",
        "token": null,
        "id": "poster",
        "name": "Awesome poster",
        "price": 10,
        "description": null,
        "url": "/",
        "image": "https://placeholdit.imgix.net/~text?txtsize=14&txt=150%C3%97150&w=150&h=150",
        "quantity": 3,
        "minQuantity": null,
        "maxQuantity": null,
        "stackable": false,
        "shippable": false,
        "taxable": true,
        "taxes": [],
        "customFields": [],
        "duplicatable": false,
        "alternatePrices": null,
        "unitPrice": 10,
        "totalPrice": 30,
        "addedOn": "2016-10-05T18:07:01.8830883Z"
      }
    ],
    "discounts": [
      {
        "id": "04cc2d60-9def-4333-807d-fcfe83bef9b9",
        "amountSaved": 50,
        "name": "50$ off",
        "value": -50,
        "type": "FixedAmount",
        "trigger": "Code",
        "code": "50_OFF",
        "affectedItems": []
      }
    ],
    "customFields": [
      {
        "name": "Comment",
        "operation": null,
        "type": null,
        "options": null,
        "required": false,
        "value": "This is a comment on this order",
        "optionsArray": null
      },
      {
        "name": "Accept terms",
        "operation": null,
        "type": null,
        "options": null,
        "required": false,
        "value": "true",
        "optionsArray": null
      }
    ],
    "plans": [
      {
        "orderToken": null,
        "uniqueId": "2ddbb241-d8fd-471e-beb1-106ea9588e13",
        "id": "MTLY_PLAN",
        "url": "/",
        "name": "Monthly plan",
        "subscriptionId": null,
        "interval": "Month",
        "intervalCount": 0,
        "trialPeriodInDays": null,
        "amount": 20,
        "totalAmount": 20,
        "amountWithTaxes": 20,
        "totalAmountWithTaxes": 20,
        "quantity": 1,
        "metadata": null
      }
    ],
    "refunds": [
      {
        "amount": 20,
        "comment": "Refunded after speaking with customer.",
        "notifyCustomer": false,
        "refundedByPaymentGateway": false,
        "creationDate": "2016-10-06T19:07:01.8830883Z"
      }
    ],
    "currency": null,
    "totalWeight": 0,
    "total": 120
  }
}

Was this article helpful?