How to: enable order confirmation flow

Intro

Order Confirmation automations ensure that customers receive immediate and detailed notifications about their purchases.
These emails serve to confirm that an order has been successfully placed, providing customers with essential order details, which reassures them that their transaction has been processed and sets the stage for a positive post-purchase experience.With a straightforward setup, these automated emails help build trust, enhance customer satisfaction, and reduce the likelihood of order-related inquiries.

Here is a typical shopping journey:

shopping journey

  1. A visitor adds items to the cart
  2. The visitor starts the checkout process
  3. The visitor places an order
  4. The visitor pays for the order
  5. The visitor receives the order

We will cover paid for order workflow in this guide.

Order confirmation

To enable order confirmation, you need to send paid for order event to initiate the flow.

To send events, Omnisend offers the /events endpoint. This endpoint expects a specific request body format, as follows:

{
    "eventName" : "paid for order",
    "origin" : "api",
    "eventVersion": "v2",
    "contact":{
        "email": "[email protected]",
        "firstName": "Vanessa",
        "lastName": "Kensington"
    },
    "properties": {
        "billingAddress": {
            "address1": "123 Main Street",
            "address2": "123 A Main Street",
            "city": "AnyTown",
            "company": "SuperCompany",
            "country": "USA",
            "firstName": "John",
            "lastName": "Smith",
            "phone": "+443031237300",
            "state": "California",
            "stateCode": "CA",
            "zip": "90210"
        },
        "createdAt": "2023-11-10T07:00:00",
        "currency": "EUR",
        "discounts": [
            {
            "amount": "-",
            "code": "SUMMER20",
            "type": "-"
            }
        ],
        "fulfillmentStatus": "unfulfilled",
        "lineItems": [
            {
            "productCategories": [
                {
                "id": "123",
                "title": "Shoes"
                }
            ],
            "productDescription": "The best product with many various features",
            "productDiscount": 10,
            "productID": "1",
            "productImageURL": "https://example.com/product/232423-image.jpg",
            "productPrice": 19.99,
            "productQuantity": 2,
            "productSKU": 200,
            "productTitle": "The best product",
            "productURL": "https://example.com/product/232423",
            "productVariantID": "123",
            "productVariantImageURL": "https://example.com/product/232423-variant-image.jpg",
            "productVariantTitle": "Full product title - Green",
            "productVendor": "BestCompany",
            "productWeight": 20.4
            }
        ],
        "note": "Please send it ASAP",
        "orderID": "4122111",
        "orderNumber": "4122111",
        "orderStatusURL": "https://example.com/orders",
        "paymentMethod": "card",
        "paymentStatus": "awaitingPayment",
        "shippingAddress": {
            "address1": "123 Main Street",
            "address2": "123 A Main Street",
            "city": "AnyTown",
            "company": "SuperCompany",
            "country": "USA",
            "firstName": "John",
            "lastName": "Smith",
            "phone": "+443031237300",
            "state": "California",
            "stateCode": "CA",
            "zip": "90210"
        }
    }
}

For a detailed explanation of the event, see the paid for product event reference.

To learn more: