Broadleaf Microservices
  • v1.0.0-latest-prod

Order Services Data Model

Overview

The Order Service stores orders, fulfillments and returns.

Data Diagrams

The following data shows the key tables and persisted JSON structures used by the Order Service.

Order Data Model

Order Data Model

Order

An order is usually created from a cart after checkout completes, and is used to manage the lifecycle of the purchased items post-checkout. It contains information on the customer who made the purchase, the originating cart, pricing, and applied promotions.

Order Item

Each order item is usually created within an order based on a cart item after checkout completes. It contains information on the product which was purchased, how much was purchased, and pricing.

Order Note

An order note is a tool for administrators to include extra information related to management of the order, for example for Customer Service purposes.

Order Fulfillment Data Model

Fulfillment Data Model

Order Fulfillment

The order fulfillment represents a subset of an order to be fulfilled together. A particular fulfillment will have items which come from the same vendor, will go to the same destination address, and are going through the same type of fulfillment. It contains a reference to the owning order, its status within the fulfillment process, information about how it should be fulfilled, and pricing. If this fulfillment is meant for shipping, it also contains the destination address, and any shipments already sent out.

Order Fulfillment Item

The order fulfillment item is a subset of an order item to be fulfilled within an order fulfillment. It contains a reference to the order item to fulfill, a quantity for how much to fulfill, and granular pricing information used for specific capturing and refunding of payment.

Order Fulfillment Item Tax Detail

The order fulfillment item tax detail enumerates each of the taxes calculated within a particular jurisdiction for a fulfillment item. An item would likely have multiple tax details associated, one for each relevant jurisdiction, for example City, County, and State. This is used only if exact tax logs are needed for auditing purposes.

Order Fulfillment Note

An order fulfillment note is a tool for administrators to include extra information related to management of the fulfillment, for example for Customer Service purposes.

Returns Data Model

Return Data Model

Return Authorization

A return authorization represents the intent of the customer to return some items in an order. It contains an overall status of the items being returned, an optional tracking number for the return shipment, estimated amounts that could be refunded, as well as the amounts that have actually been refunded.

Return Authorization Item

The return authorization item is a specific item being returned in a return authorization, and represents a subset of a particular order fulfillment item. It contains the quantity of that order fulfillment item to be returned, the reason for returning, the expected condition, whether a refund should be issued, estimated amounts that could be refunded, and how much the customer was charged for return shipping. Within a return authorization, there could be two separate items containing quantities of the same order fulfillment item, in case their condition differs (e.g. one could be destroyed and another could be fine).

Return Confirmation

The return confirmation represents a portion of a return authorization item which has been confirmed as returned. For example for physical goods, once the item is received by the seller, they would create a return confirmation. It has a status indicating whether it’s been refunded (if applicable), the quantity received, the actual condition of the item, whether to refund the return shipping, and the calculated amounts which should be refunded.

BLC Common Features

Order Common - Order services relies on Order Common to provide general shared domain such as Address and Adjustment. For more information see : Order Common

Order services uses the following Common Data Features which create additional tables within the Order Services data schema:

  • Application Trackable - Order service data is application trackable to support the service running in a multi-tenant environment.

  • Durable Messaging - The common Broadleaf implementation for durable messaging is used for persistence events and indexing request events. This includes an OrderServiceResourceLockEndpoint to allow other services such as Order Operation Services to obtain and release locks in this service.