Validation

This document explains the process of cart validation in the context of a checkout workflow. Utilizing the Nacelle Storefront API, merchants can validate cart details at various stages of the checkout journey. Nacelle orchestrates the API calls in a defined sequence to ensure accurate and consistent validation.

How Nacelle Validates Data

When a checkout operation progresses, the merchant storefront passes the cart details to Nacelle via the Storefront API. Nacelle then coordinates with various integration points to validate the requisite data, such as inventory levels, shipping options, and promotions.

API Call Sequence

Nacelle is designed to make API calls in a specific sequence to facilitate proper validation. This is particularly important when one type of information relies on another, such as calculating taxes based on the shipping address.

The API calls are sequenced as follows:

  1. Inventory: To ensure the requested items are available.

  2. Shipping: Validate the shipping address and relevant shipping options.

  3. Promotions: Check any promo codes or discounts, if applicable.

  4. Taxes: Calculate the applicable taxes based on shipping and billing information.

  5. Payments: Verify payment details.

Best Practices

It's recommended to perform the validation steps before the actual order creation to prevent any discrepancies or errors that may arise later. This also helps in ensuring a smooth checkout experience for the customer.

Checkout validation is an essential step in the eCommerce process, providing a layer of assurance for both merchants and customers. By utilizing Nacelle's orchestration of API calls, merchants can ensure a streamlined checkout experience.