Modèle de courriel pour les paniers abandonnés

Nous utilisons ce modèle pour les rappels de panier abandonné, qui sont envoyés via les détails d'un panier abandonné dans votre tableau de bord. Le message écrit que vous avez saisi dans les détails du panier abandonné sera automatiquement inséré dans ce modèle de courriel.

Personnaliser le modèle par défaut

Lorsque vous entrez dans l'éditeur de courriel pour la première fois, vous disposez d'un modèle par défaut pour commencer. Le courriel relatif à ce modèle est envoyé via le tableau de bord, sous les détails d'un panier abandonné. À partir de là, le message que vous saisissez remplacera la variable de message dans votre modèle. Vous aurez également accès à un objet nommé settings exposant certaines informations utiles, telles qu'une URL pour récupérer le panier abandonné, disponible via settings.cartUrl.

Si vous utilisez Snipcart sur plusieurs sites avec différents domaines et que vous devez rediriger le client vers l'URL où il a créé le panier, vous pouvez utiliser la propriété settings.cartCreatedAtUrl au lieu de settings.cartUrl.

L'exemple d'éditeur de modèle ci-dessous inclut la variable de message que vous pouvez modifier sous les détails d'un panier abandonné.

---
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>

Données du modèle de paniers abandonnés

Dans le courriel envoyé à vos clients, votre modèle affichera les données de la commande abandonnée que vous avez utilisées et le contenu que vous avez saisi dans le formulaire de détails du panier abandonné ( {{{ message }}} ). Voici les données auxquelles vous aurez accès lors de la création de votre modèle :

{
  "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin pulvinar faucibus ex id pharetra.",
  "settings": {
    "logoUrl": "https://snipcart.com/images/snipcart_logo.svg",
    "businessAddress": {
      "fullName": null,
      "firstName": null,
      "name": null,
      "company": "snipcart.com",
      "address1": "226 rue St-Joseph Est",
      "address2": null,
      "city": "Quebec",
      "country": "CA",
      "postalCode": "G1K3A9",
      "province": "QC",
      "phone": null
    },
    "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
  }
}