Overview

Top

The Logical Data Model of the ORDER Subject Area ensures support for the following functionalities:

1. Order can be created through many Sales Channels:

ONLINE The REGISTERED_ONLINE Customer login on Store website and places an Order.
PHONE The GUEST Customer makes a phone call to the Store and asks to place an Order. Store Employee answers the call, fills in the mandatory information about Customer and places the Order on Customer behalf.
IN_STORE The ANONYMOUS Customer steps into Store and asks to place an Order. A Store Employee places the Order on Customer behalf.
DRIVE_IN The ANONYMOUS Customer drives to Store ordering window / microphone station and asks to place an Order. A Store Employee places the Order on Customer behalf.
See Entity: SALES_CHANNEL and Entity: CUSTOMER for more information.

2. Order can be handed-off to Customer through many Delivery Types:

SHIPMENT Order is delivered to Customer at SHIPMENT.Shipment_Address. See Entity: SHIPMENT, Attribute: Shipment_Address for more information.
PICK_UP Order is picked-up by Customer from Store.
DINE_IN Order is served by Customer in Store.
See Entity: DELIVERY_TYPE for more information.

3. Order can be paid through many Payment Methods:

CASH
CARD
DIGITAL (Stripe, PayPal, digital wallets etc)
See Entity: PAYMENT_METHOD for more information.

4. Order can be paid:

IN_ADVANCE
AT_HANDOFF
See Entity: PAYMENT_TIME for more information.

5. The PAYMENT_TERM entity implements the allowed combinations of SALES_CHANNEL, DELIVERY_TYPE, PAYMENT_METHOD, PAYMENT_TIME for an Order:

Example

Entity: PAYMENT_TERM

SALES CHANNEL DELIVERY TYPE PAYMENT METHOD PAYMENT TIME Is Allowed
ONLINE SHIPMENT CASH IN_ADVANCE FALSE
ONLINE SHIPMENT CASH AT_HANDOFF TRUE
ONLINE SHIPMENT CARD IN_ADVANCE TRUE
ONLINE SHIPMENT CARD AT_HANDOFF TRUE
etc
See Entity: PAYMENT_TERM for more information.

Note

The Store Employee with the 'Administrator' Role should maintain the PAYMENT_TERM entity records.

Example setup for the 'Administrator' Role:

  • In the ROLE_TYPE table, record the role type 'Administrator'.
  • In the FUNCTION_TYPE table, record the function type 'Maintain Payment Term'.
  • In the ROLE_FUNCTION table, assign the function type 'Maintain Payment Term' to the role type 'Administrator'.

See Subject Area: EMPLOYEE AND ROLE for more information.

Note

The data model is flexible enough to accommodate new Sales Channels, Delivery Types etc.

The Store Employee with the 'Administrator' Role can add new Sales Channels, Delivery Types, Payment Methods (for example can add a new Payment Method: BANK_WIRED_TRANSFER).

Application developers should take into consideration the data model flexibility and implement the same level of flexibility at application level.

Order Process and Status

Top

The Logical Data Model supports the Order processing for all the allowed combinations of SALES_CHANNEL, DELIVERY_TYPE, PAYMENT_METHOD, PAYMENT_TIME.

The Order Process and Status Diagram details the process steps and the Order statuses from the moment the Customer initiates a NEW Order till the moment the Customer acknowledges the Order COMPLETE:

Process Steps and Use Cases

Case 1: Customer Places Order through ONLINE Sales Channel

A REGISTERED_ONLINE Customer can login on Store website and place an Order.

See Subject Area: CUSTOMER, Entity: CUSTOMER, Attribute: Is_Registered_Online for more information.

Step: Customer Places Order

Actions:

⦁ Customer login on Store website.

⦁ Customer chooses the Order type: NOT_SCHEDULED or SCHEDULED

⦁ If Customer chooses NOT_SCHEDULED Order then the Order must be delivered as soon as possible. In this case:

Order status is initialized to NEW.

Order Status: NEW

⦁ If Customer chooses SCHEDULED Order then the Order can be delivered later, at a time specified by Customer. For example Customer can place the Order in the morning and schedule the delivery for the evening. In this case:

ORDER_HEADER.Is_Scheduled attribute is set TRUE

ORDER_HEADER.Scheduled_Time attribute is set to the estimated time for delivery. See Entity: ORDER_HEADER.

Order status is initialized to NEW_SCHEDULED.

Order Status: NEW_SCHEDULED

⦁ Customer chooses the Delivery Type for Order

⦁ Customer chooses the Payment Method for Order

⦁ Customer chooses the Payment Time for Order

⦁ Customer chooses the Payment Time for Order: IN_ADVANCE or AT_HANDOFF.

⦁ If Customer chooses Payment Time IN_ADVANCE then next step is:

Step: Customer Makes PAYMENT IN_ADVANCE

Example

Every time when Customer selects the Delivery Type, Payment Time and Payment Method for an Order, the application should automatically check if that combination plus the Order Sales Channel is an allowed combination in the PAYMENT_TERM entity.

For example the below combination does not make sense and is outlined as Not allowed in the PAYMENT_TERM entity:

SALES CHANNEL DELIVERY TYPE PAYMENT METHOD PAYMENT TIME Is Allowed
ONLINE SHIPMENT CASH IN_ADVANCE N

The above combination is NOT allowed because for an Order placed ONLINE and delivered through SHIPMENT, it's impossible to make a CASH payment IN_ADVANCE.

But the below combination makes sense and is allowed:

SALES CHANNEL DELIVERY TYPE PAYMENT METHOD PAYMENT TIME Is Allowed
ONLINE SHIPMENT CASH AT_HANDOFF Y

Note

The application development best practice is to implement the Payment Term validation as early as possible, at User Interface (UI) level if possible. For example if a Customer places an Order through ONLINE Sales Channel and select the Delivery Type SHIPMENT, then based on the PAYMENT_TERM allowed combinations the application must populate the Payment Time and Payment Method UI controls (list of values) only with the allowed values.


Case 2: Customer Asks to Place Order. A Store Employee places an Order on Customer behalf

Step: Customer Asks to Place Order

Customer can make this request through one of the following Sales Channels:

PHONE The GUEST Customer makes a phone call to the Store to place an Order. Store Employee answers the call, fills in the mandatory attributes of Customer entity and receives the Order details.
IN_STORE The ANONYMOUS Customer steps into Store and asks to place an Order. A Store Employee receives the Order details.
DRIVE_IN The ANONYMOUS Customer drives to Store ordering window / microphone station and asks to place an Order. A Store Employee receives the Order details.

Step: Store Employee Places Order

Store Employee Places Order based on Order details received from Customer.

Actions:

⦁ Select the Order type: NOT SCHEDULED or SCHEDULED

⦁ Select the Delivery Type

⦁ Select the Payment Method

⦁ Select the Payment Time: IN_ADVANCE or AT_HANDOFF

⦁ If chooses Payment Time: IN_ADVANCE than next step is:

Step: Store Employee Receives PAYMENT IN_ADVANCE

In this case:

ORDER_HEADER.Is_Paid attribute is set TRUE. See Entity: ORDER_HEADER for more information.

All the PAYMENT attributes are recorded in the PAYMENT entity.
See Subject Area: PAYMENT AND INVOICE for more information.

Example

Customer steps into Store (Sales Channel: IN_STORE), asks Store Employee to place an Order, makes the payment cash (Payment Method: CASH) and in advance (Payment Time: IN_ADVANCE).

Step: Store Employee Reviews Order

In this step Store Employee reviews the Orders queue.

Note:

The Orders queue lists all Orders that have been placed through all the Sales Channels: ONLINE, PHONE, IN_STORE, DRIVE_IN.

Store Employee can filter the Orders in NEW and NEW_SCHEDULED status.

It is a decision of application implementation how this Order queue is displayed, sorted, filtered for a better review etc.

The Review Order step outcome can be:

Case 1: Store Employee does not confirm the Order

For example Store Employee does not confirm the Order when the Store does not have enough ingredients to prepare the Order (an Item is not in stock).

In this case Order can be Canceled.

Step: Store Employee Cancels Order

Actions:

⦁ Store Employee should fill in the ORDER_HEADER.Cancel_Reason and then press a Cancel Order button.

⦁ When Store Employee presses the Cancel Order button and the CANCEL event occurs, the application should check if ORDER_HEADER.Is_Paid attribute is TRUE. That means the Order was already paid IN_ADVANCE.

⦁ If ORDER_HEADER.Is_Paid attribute is TRUE, then the next steps are:

Step: Store Employee Cancels Payment and

Step: Store Employee Cancels Invoice

See Subject Area: PAYMENT AND INVOICE, Entity: PAYMENT, Entity: INVOICE for more information.

⦁ Order Status changes to CANCELED.

Order Status: CANCELED

Note

Store Employee can Cancel an Order at any time and specify a reason for Cancelation in the ORDER_HEADER.Cancel_Reason attribute. See Entity: ORDER_HEADER for more information.

Recommendation is to avoid Order Cancelation as much as possible and use instead other mechanisms as:

⦁ set Is_Busy_Mode
See Subject Area: STORE, Entity: SETTING, Attribute: Is_Busy_Mode for more information.

or

⦁ set Is_Ordering_Pause
See Subject Area: STORE, Entity: SETTING, Attribute: Is_Ordering_Pause for more information.

or

⦁ set Is_Preparation_Delayed
See Subject Area: ORDER, Entity: ORDER_HEADER, Attribute: Is_Preparation_Delayed for more information.

Also recommendation is to set the ITEM.In_Stock attribute FALSE or ITEM_OPTION.In_Stock attribute FALSE as soon as a Store Employee noticed that a specific Item/Item Option is not in stock. This will avoid the Item to be selected and added to an Order by Customer. See Subject Area: STORE, Entity: ITEM, Entity: ITEM_OPTION, Attribute: In_Stock.


Case 2: Store Employee confirms a NEW_SCHEDULED Order

Step: Store Employee Confirms a NEW_SCHEDULED Order

Actions:

⦁ Store Employee browses the Orders queue and presses the Confirm Order button for an Order in NEW_SCHEDULED status. An Order in NEW_SCHEDULED status has the ORDER_HEADER.Is_Scheduled attribute set TRUE. This is an Order with preparation scheduled for later. See Entity: ORDER_HEADER for more information.

In this case:

Order Status changes from NEW_SCHEDULED to SCHEDULED.

Order Status: SCHEDULED

Note

For a SCHEDULED Order can be implemented an automated mechanism to determine the time when the Order preparation should start.

For example when the [ORDER_HEADER.Scheduled_Time - SETTING.Average_Preparation_Time] event occurs, the Store Employee can receive automatically a notification (a sound message, a pop-up screen etc).

If Store is in Busy Mode (SETTING.Is_Busy_Mode attribute is TRUE) then the formula to calculate the time when the Order preparation should start is: [ORDER_HEADER.Scheduled_Time - SETTING.Busy_Preparation_Time].

See Entity: ORDER_HEADER for more information.

At the time the SCHEDULED Order preparation should start:

Step: Store Employee Starts Prepare Order

Actions:

Store Employee presses the Start Prepare Order button to confirm Order preparation started.

Order Status changes from SCHEDULED to IN PROGRESS.

Order Status: IN_PROGRESS

Order passes to next step. See Step: Store Employee Prepares Order

Case 3: Store Employee confirms a NEW Order

Step: Store Employee Confirms a NEW Order

Actions:

⦁ Store Employee browses the Orders queue and presses the Confirm Order button for an Order in NEW status. An Order in NEW status has the ORDER_HEADER.Is_Scheduled attribute set FALSE. This is an Order with immediate preparation. See Entity: ORDER_HEADER for more information.

In this case:

Order Status changes from NEW to IN_PROGRESS.

Order Status: IN_PROGRESS

Order passes to next step. See Step: Store Employee Prepares Order

Step: Store Employee Prepares Order

Actions:

⦁ At this step, Store Employees prepare all the Orders that have IN_PROGRESS status. An Order remains in the IN_PROGRESS status during the Prepare Order step.

The Prepare Order step duration is impacted by the following ORDER_HEADER attributes:

Placed_Time

Scheduled_Time

Delayed_Time

Ready_Time

and the SETTING attributes:

Average_Preparation_Time

Busy_Preparation_Time

Prepare Order duration for an usual (not scheduled) Order

Start: Placed_Time

Duration: Average_Preparation_Time

End: Placed_Time + Average_Preparation_Time = Ready_Time

Prepare Order duration for a scheduled Order

Start: Scheduled_Time - Average_Preparation_Time

Duration: Average_Preparation_Time

End: Scheduled_Time= Ready_Time

Note

When the kitchen is very busy or for any other reason, a Store Employee can delay an Order preparation.

In this case ORDER_HEADER.Is_Preparation_Delayed attribute becomes TRUE and ORDER_HEADER.Delayed_Time attribute specifies the number of minutes the Order is delayed.

If an Order is delayed, it's a good practice to make the value of ORDER_HEADER.Delayed_Time attribute visible to the REGISTERED_ONLINE Customer who placed the Order ONLINE.

Prepare Order duration for an usual (not scheduled) Order that is delayed

Start: Placed_Time

Duration: Average_Preparation_Time+Delayed_Time

End: Placed_Time + Average_Preparation_Time+Delayed_Time = Ready_Time

Prepare Order duration for scheduled Order that is delayed

Start: Scheduled_Time - Average_Preparation_Time

Duration: Average_Preparation_Time+Delayed_Time

End: Scheduled_Time+Delayed_Time= Ready_Time

Note

Another scenario is when the store is very busy and all NEW, NEW_SCHEDULED, IN_PROGRESS Orders need to be delayed. In this case the Store Employee with the role of Store 'Administrator' can set SETTING.Is_Busy_Mode attribute TRUE for all Orders.

In this case the SETTING.Busy_Preparation_Time attribute specifies the number of minutes for the Order preparation duration (overwrite the SETTING.Average_Preparation_Time).

When the Store is in Busy Mode, it's a good practice to make the value of the SETTING.Busy_Preparation_Time attribute visible to the REGISTERED_ONLINE Customers.

Prepare Order duration for an usual (not scheduled) Order when Is_Busy_Mode TRUE

Start: Placed_Time

Duration: Busy_Preparation_Time

End: Placed_Time + Busy_Preparation_Time = Ready_Time

Prepare Order duration for scheduled Order when Is_Busy_Mode TRUE

Start: Scheduled_Time - Busy_Preparation_Time

Duration: Busy_Preparation_Time

End: Scheduled_Time+Busy_Preparation_Time= Ready_Time

Step: Store Employee Finishes Prepare Order

Actions:

⦁ At this step, Store Employee presses a Finish Prepare Order button to announce the Order Preparation step is finished, and the Order is ready to be handed-off:

    • to a Shipment person if the Order Delivery Type is SHIPMENT. The Shipment person could be a Store Employee or a person from an external shipment company.
    • to a Customer if the Order Delivery Type is PICK_UP or DINE_IN

⦁ ORDER_HEADER.Is_Ready attribute is set TRUE. See Entity: ORDER_HEADER for more information.

⦁ if Order Delivery Type is SHIPMENT

Order Status changes from IN_PROGRESS to READY_FOR_SHIPMENT:

Order Status: READY_FOR_SHIPMENT

⦁ if Order Delivery Type is PICK-UP

Order Status changes from IN_PROGRESS to READY_FOR_PICK_UP:

Order Status: READY_FOR_PICK_UP

⦁ if Order Delivery Type is DINE-IN

Order Status changes from IN_PROGRESS to READY_FOR_DINE_IN:

Order Status: READY_FOR_DINE_IN

Next step depends on the Order Delivery Type: SHIPMENT, PICK_UP or DINE_IN.

Case 1: Order Delivery Type is SHIPMENT

Step: Store Employee Assigns Shipment to Order

Actions:

⦁ Order is assigned to Shipment. See Entity: SHIPMENT for more information).

Step: Shipment person Ships the Order

Actions:

⦁ Order is handed-off to a shipment person.

⦁ Order is shipped to the SHIPMENT.Shipment_Address. See Entity: SHIPMENT for more information).

⦁ Order status changes from READY_FOR_SHIPMENT to SHIPPING:

Order Status: SHIPPING

Step: Shipment person Fulfills Order Hand-off

Actions:

⦁ Customer aknowledges that has received the Order content.

⦁ Order Status changes from SHIPMENT to HANDED_OFF.

Order Status: HANDED_OFF

Step: Shipment person Checks if Order is Paid

Actions:

⦁ If ORDER_HEADER.Is_Paid attribute is FALSE then asks Customer to pay the Order.

Step: Customer Makes Payment AT_HANDOFF

In this case:

ORDER_HEADER.Is_Paid attribute is set TRUE. See Entity: ORDER_HEADER for more information.

All the PAYMENT attributes are recorded in the PAYMENT entity.
See Subject Area: PAYMENT AND INVOICE for more information.

Step: Customer Receives Invoice

Step: Customer Acknowledges Order Completed

Actions:

⦁ Customer aknowledges Order Completed.

⦁ Order Status changes from HANDED_OFF to COMPLETE.

Order Status: COMPLETE

Note

In all cases, for all Sales Channels and all Delivery Types, when Customer makes a payment, the payment details are recorded in the PAYMENT table and the correspondent invoice is recorded in the INVOICE table.

In all cases, for all Sales Channels and all Delivery Types, Customer receives the Invoice on paper at the end of Order process when Customer acknowledges Order is COMPLETE.

Case 2: Order Delivery Type is PICK-UP

Step: Customer Picks-up the Order

Actions:

⦁ Customer steps into Store to pick-up the Order.

⦁ Store Employee reviews the Orders queue and presses a button to confirm an Order with READY_FOR_PICK_UP status is waiting for Customer pick-up.

⦁ Order Status changes from READY_FOR_PICK_UP to PICKING-UP:

Order Status: PICKING-UP

Step: Store Employee Fulfills Order Hand-off

Actions:

⦁ Order content is handed-off to Customer.

⦁ Order Status changes from PICKING-UP to HANDED_OFF:

Order Status: HANDED_OFF

Step: Store Employee Checks if the Order Is_Paid

Actions:

⦁ If ORDER_HEADER.Is_Paid attribute is FALSE then asks Customer to pay the Order.

Step: Customer Makes Payment AT_HANDOFF

In this case:

ORDER_HEADER.Is_Paid attribute is set TRUE. See Entity: ORDER_HEADER for more information.

All the PAYMENT attributes are recorded in the PAYMENT entity.
See Subject Area: PAYMENT AND INVOICE for more information.

Step: Customer Receives Invoice

Step: Customer Acknowledges Order Completed

Actions:

⦁ Customer aknowledges Order Completed.

⦁ Order Status changes from HANDED_OFF to COMPLETE.

Order Status: COMPLETE

Case 3: Order Delivery Type is DINE_IN

Step: Serving Order to Customer

Actions:

⦁ Customer steps into Store.

⦁ Store Employee reviews the Orders queue and presses a button to confirm an Order with READY_FOR_DINE_IN status is waiting for Customer.

⦁ Customer takes place to a table and Order is served to Customer.

⦁ Order Status changes from READY_FOR_DINE_IN to DINEING:

Order Status: DINEING

Step: Store Employee Fulfills Order Hand-off

Actions:

⦁ Customer aknowledges has finished dine in.

⦁ Order Status changes from DINEING to HANDED_OFF:

Order Status: HANDED_OFF

Step: Store Employee Checks if the Order Is Paid

Actions:

⦁ If ORDER_HEADER.Is_Paid attribute is FALSE then asks Customer to pay the Order.

Step: Customer Makes Payment AT_HANDOFF

In this case:

ORDER_HEADER.Is_Paid attribute is set TRUE. See Entity: ORDER_HEADER for more information.

All the PAYMENT attributes are recorded in the PAYMENT entity.
See Subject Area: PAYMENT AND INVOICE for more information.

Step: Customer Receives Invoice

Step: Customer Acknowledges Order Completed

Actions:

⦁ Customer aknowledges Order Completed.

⦁ Order Status changes from HANDED_OFF to COMPLETE.

Order Status: COMPLETE

Note

Usually Customer does not choose payment IN_ADVANCE for Order Delivery Type DINE_IN. The Store 'Administator' can set up in PAYMENT_TERM table if IN_ADVANCE payment is allowed for DINE_IN delivery.

Order Entities

Top

The Logical Data Model of the ORDER Subject Area includes the following groups of entities:

Order content entities

Order parameters entities

Order status entities

Order shipment entities

Order review entities

Entity: ORDER_HEADER

Top

This entity records information about all Orders.

Attributes
ID PRIMARY KEY
Order_No Order number that Store associates with the Order. Cannot have two orders with se same Order_No. NOT NULL UNIQUE
Store_ID Lookup for the Store at which the Order was placed. The same application can handle multiple Stores. NOT NULL
Sales_Channel_ID Lookup for the Sales Channel through which the Order was placed: ONLINE, PHONE, IN_STORE, DRIVE_IN. See Entity: SALES_CHANNEL for more information. NOT NULL
Delivery_Type_ID Lookup for the Delivery Type that was choosen for the Order: SHIPMENT, PICK_UP, DINE_IN. See Entity: DELIVERY_TYPE for more information. NOT NULL
Payment_Method_ID Lookup for the Payment Method that was choosen for the Order CASH, CARD, DIGITAL. See Entity: PAYMENT_METHOD for more information. NOT NULL
Payment_Time_ID Lookup for the Payment Time that was choosen for the Order: IN_ADVANCE, AT_HANDOFF. See Entity: PAYMENT_TIME for more information. NOT NULL
Placed_Customer_ID Lookup for the Customer who placed the Order. This field is NULL when the Order was placed for an ANONYMOUS Customer by a Store Employee. See Entity: CUSTOMER for more information.
Placed_Emp_Login_ID Lookup for the Store Employee who placed the Order. This field is NULL when the Order was placed ONLINE by a REGISTERED_ONLINE Customer. See Entity: CUSTOMER for more information.
Served_Emp_Login_ID Lookup for the Store Employee who served the Order to Customer. Is the Store Employee who has taken care of Order at all stages: Reviewed the Order, Confirmed the Order, etc. See the ORDER PROCESS AND STATUS steps that required Store Employee actions. NOT NULL
Note: The same Employee can be granted with both responsibilities: placing orders and serving orders. In this case Placed_Emp_Login_ID and Served_Emp_Login_ID are the same. See Subject Area: EMPLOYEE AND ROLE for more information.
Customer_Notes REGISTERED_ONLINE and GUEST Customers can add notes to Order (for example information about preferred shipment time interval, etc.)
Placed_Time Timestamp when Order was placed. NOT NULL
Price_Calculated Price calculated for Order (the sum of all order lines prices). See Subject Area: PRICE AND DISCOUNT for more information. NOT NULL
Price_Adjustment Employee Store can apply a price adjustment at Order level.
Price_Adjustment_Reason Reason for price adjustment.
Subtotal Price Calculated + Price Adjustment ( if any). NOT NULL
Tax Tax calculated. NOT NULL
Total Total calculated. NOT NULL
Latest_Status Latest status of Order. Every time when Order status changes, application should automatically update this attribute and also insert the Order latest status in the ORDER_STATUS_HISTORY entity.
See Entity: ORDER_STATUS_HISTORY for more information. NOT NULL
Latest_Status_Update The timestamp when the Order entered the latest status. Every time when Order status changes, application should automatically update this attribute and also update the ORDER_STATUS_HISTORY.Start_Time attribute for the latest (most recent) Order status. The ORDER_HEADER.Latest_Status_Update attribute should be always synchronized with the ORDER_STATUS_HISTORY.Start_Time attribute for the latest (most recent) Order status.
See Entity: ORDER_STATUS_HISTORY for more information. NOT NULL
Is_Paid Flag attribute to indicate if Order has been paid.
Example:
⦁ If Is_Paid is TRUE then Order is paid
⦁ If Is_Paid is FALSE then Order has not been paid. NOT NULL
Payment_Time Timestamp when Order was paid. If Is_Paid is FALSE then Payment_Time is NULL.
Is_Scheduled Flag attribute to indicate if the Customer scheduled the Order for later or not.
Example:
⦁ If Is_Scheduled is TRUE then Customer scheduled the Order for later.
⦁ If Is_Scheduled is FALSE then Order should be delivered immediately. NOT NULL
Scheduled_Time Timestamp for when Order is scheduled.
⦁ If Is_Scheduled is TRUE then must contain the expected Scheduled Time.
⦁ If Is_Scheduled is FALSE then is NULL. See Order Process and Status, Step: Customer Places Order for more information.
Is_Preparation_Delayed Flag attribute to indicate if Order preparation is delayed. Store Employee can delay a specific Order.
Example:
When the restaurant kitchen is very busy and does not want to delay all Orders but only a specific Order, the Store Employee can browse the Orders queue and press a Preparation Delayed button for that Order. In this case the Is_Preparation_Delayed flag is set TRUE for the selected Order. NOT NULL
Delayed_Time Number of minutes the Order is delayed.
Example:
The Store Employee can choose the delay interval from a list of values: 5, 10, 15, 30 minutes. This delay interval is added to the SETTING.Average_Preparation_Time when calculate the Order preparation time. Optionally, for an ONLINE placed Order, the application can display this Delayed_Time to Customer.
See Subject Area: STORE, Entity: SETTING and Order Process and Status - Step: Customer Places Order for more information.
Is_Canceled Flag attribute to indicate if the Order is Canceled.
Example: Store Employee presses the Cancel Order button to announce when Order is Canceled. In this case:
Is_Canceled flag changes from FALSE to TRUE
⦁ at the same time the Order Status changes from NEW or NEW_SCHEDULED to CANCELED.
⦁ at the same time, the application should insert automatically a record with the most recent Order status (CANCELED) in the ORDER_STATUS_HISTORY entity.
See the ORDER PROCESS AND STATUS - Step: Store Employee Cancels Order for more information. NOT NULL
Canceled_Time Timestamp when Order was Canceled. NULL
Cancel_Reason Cancel reason. See the ORDER PROCESS AND STATUS - Process Step: Cancel Order for more information.
Is_Ready Flag attribute to indicate if the Order preparation is finished and the Order is ready for delivery.
Example:
Store Employee presses a Finish Prepare Order button to announce when Order preparation is finished. In this case:
Is_Ready flag changes from FALSE to TRUE.
⦁ at the same time the Order Status changes from IN_PROGRESS to READY_FOR_SHIPMENT, READY_FOR_PICK_UP or READY_FOR_DINE_IN depending on delivery type choosen by Customer.
⦁ at the same time, the application should insert automatically a record with the most recent Order status (READY_FOR_SHIPMENT, READY_FOR_PICK_UP or READY_FOR_DINE_IN) in the ORDER_STATUS_HISTORY entity.
See the ORDER PROCESS AND STATUS - Step: Store Employee Finishes Prepare Order for more information. NOT NULL
Ready_Time Timestamp when Order preparation was finished. NULL
Is_Completed Flag attribute to indicate if Customer acknowledged Order Completed.
Example:
Is_Completed flag changes from FALSE to TRUE when Order was handed-off to Customer, Order is paid, Customer received Invoice and Customer acknowledged Order Completed.
⦁ at the same time the Order Status changes from HANDED_OFF to COMPLETE.
⦁ at the same time application should automatically insert a record with the most recent Order status (COMPLETE) in the ORDER_STATUS_HISTORY entity.
See the ORDER PROCESS AND STATUS Step: Customer Acknowledges Order Completed for more information. NOT NULL
Completed_Time Timestamp when Order was acknowledged Completed by Customer. NULL
Comments Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees

Entity: ORDER_LINE

Top

This entity records information about all the Order Lines assigned to an Order Header (Order). Each time when a menu Item or a menu Item Option is added to an Order, an Order Line is created.

Attributes
ID PRIMARY KEY
Order_ID Lookup for the Order Header to which the Order Line is assigned. NOT NULL
Item_ID The Order Line record is created when an Item or an Item Option is added to an Order. When the Order Line is created for an Item, the Item_ID is the lookup to that Item. In this case the Item_Option_ID is NULL.
Item_Option_ID The Order Line record is created when an Item or an Item Option is added to an Order. When the Order Line is created for an Item Option, the Item_Option_ID is the lookup to that Item Option. In this case the Item_ID is NULL.
Line_No The sequential number of an Order Line. An Order can have many lines. Each Order Line has a sequential number: 1, 2, 3 etc. This attribute can help to sort the Order lines and also to reference an Order Line (for example when the Store Employee and the Customer review an Order) etc. NOT NULL
Quantity The number of the same menu Items / Item Options added to an Order Line (for example 5 x 'Espresso'). NOT NULL
Customer_Review The REGISTERED_ONLINE Customer who placed an Order ONLINE, can add a review at Order Line level.
Note: Customer can add a review (edit the Customer_Review attribute) only after the Order reaches the Order Status: COMPLETE.
Customer_Like The REGISTERED_ONLINE Customer who placed an Order ONLINE can edit a Like/Unlike flag at Order Line level. Customer can edit the Customer_Like flag only after the Order reaches the Order Status: COMPLETE.
Is_Canceled Flag attribute to indicate if the Order Line is Canceled. NOT NULL
Note:
When an Order is Canceled, all the Order Lines are canceled for that Order.
Canceled_Time Timestamp when Order was Canceled and all the Order Lines were also Canceled.
See the Order Process and Status - Step: Store Employee Cancels Order for more information. NULL
Cancel_Reason Reason for which the Order Line was Canceled.
Note: Can be copied from ORDER_HEADER.Cancel_Reason.
Comments Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees

Entity: SALES_CHANNEL

Top

List of Sales Channels.

Attributes
ID PRIMARY KEY
Name Sales Channel name. NOT NULL UNIQUE. Can't have two Sales Channels with the same name.
Description Sales channel description.
Is_Active Flag attribute to indicate if the Sales Channel is still available for Customers to select, or it was canceled permanently. NOT NULL

Example

SALES_CHANNEL

Name Description
ONLINE The REGISTERED_ONLINE Customer login on Store website and places an Order.
PHONE The GUEST Customer makes a phone call to the Store to place an Order. Store Employee answers the call, fills in the mandatory attributes of Customer entity and places the Order.
IN_STORE The ANONYMOUS Customer steps into Store and asks to place an Order. Store Employee places the Order on customer behalf.
DRIVE_IN The ANONYMOUS Customer drives to Store ordering window / microphone station and asks to place an Order. Store Employee places the Order on customer behalf.

Entity: DELIVERY_TYPE

Top

List of Delivery Types.

Attributes
ID PRIMARY KEY
Name Delivery Type name. NOT NULL UNIQUE. Can't have two Delivery Types with the same name.
Description Delivery Type description.
Is_Active Flag attribute to indicate if the Delivery Type is still available for Customers to select, or it was canceled permanently. NOT NULL

Example

DELIVERY_TYPE

Order can be handed-off to Customer through many Delivery Types:

Name Description
SHIPMENT Order is delivered to Customer at Shipment_Address. See Entity: SHIPMENT, Attribute: Shipment_Address for more information.
PICK_UP Order is picked-up by Customer from Store.
DINE_IN Order is served by Customer in Store.

Entity: PAYMENT_METHOD

Top

List of payment methods.

Attributes
ID PRIMARY KEY
Name Payment method name. NOT NULL UNIQUE. Can't have two payment methods with the same name.
Description Payment method description.
Is_Active Flag attribute to indicate if the Payment method is still available for Customers to select, or it was canceled permanently. NOT NULL

Example

PAYMENT_METHOD

Name
CASH
CARD
etc.

Entity: PAYMENT_TIME

Top

List of payment times.

Attributes
ID PRIMARY KEY
Name Payment Time name. NOT NULL UNIQUE. Can't have two payment times with the same name.
Description Payment Time description.
Is_Active Flag attribute to indicate if the Payment Time is still available for Customer to select, or it was canceled permanently. NOT NULL

Example

PAYMENT_TIME

Name
IN_ADVANCE
AT_HANDOFF
etc.

Entity: PAYMENT_TERM

Top

The PAYMENT_TERM entity implements the allowed combinations of SALES_CHANNEL, DELIVERY_TYPE, PAYMENT_METHOD, PAYMENT_TIME for an Order:

Every time when Customer selects the Delivery Type, Payment Time and Payment Method for an Order, the application should automatically check if that combination plus the Order Sales Channel is an allowed combination in the PAYMENT_TERM entity.

Attributes
ID PRIMARY KEY
Sales_Channel_ID Lookup for the Sales Channel. NOT NULL
Delivery_Type_ID Lookup for the Delivery Type. NOT NULL
Payment_Method_ID Lookup for the Payment Method. NOT NULL
Payment_Time_ID Lookup for the Payment Time. NOT NULL
Is_Allowed Flag attribute to indicate if the combination of Sales Channel, Delivery Type, Payment Method, Payment Time makes sense and is allowed. FALSE - is not allowed, TRUE - is allowed. NOT NULL
Is_Active Flag attribute to indicate if the combination of Sales Channel, Delivery Type, Payment Method, Payment Time is still available for Customers to select, or it was canceled permanently. NOT NULL
Comments Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees

CONSTRAINT UK_Payment_Term UNIQUE (Sales_Channel_ID, Delivery_Type_ID, Payment_Method_ID, Payment_Time_ID).
Cannot have the same combination of Sales Channel, Delivery Type, Payment Method, Payment Time recorded twice in the PAYMENT_TERM entity.

Example

Entity: PAYMENT_TERM

SALES CHANNEL DELIVERY TYPE PAYMENT METHOD PAYMENT TIME Is Allowed
ONLINE SHIPMENT CASH IN_ADVANCE FALSE
ONLINE SHIPMENT CASH AT_HANDOFF TRUE
ONLINE SHIPMENT CARD IN_ADVANCE TRUE
ONLINE SHIPMENT CARD AT_HANDOFF TRUE
etc

For example the below combination does not make sense and is outlined as Not allowed. For an Order placed ONLINE and delivered through SHIPMENT it's impossible to make a CASH payment IN_ADVANCE.

SALES CHANNEL DELIVERY TYPE PAYMENT METHOD PAYMENT TIME Is Allowed
ONLINE SHIPMENT CASH IN_ADVANCE FALSE

Important

Is the role of store 'Administrator' to maintain the PAYMENT_TERM entity records. See Subject Area: EMPLOYEE AND ROLE for more information.

The data model is flexible enough to accommodate new Sales Channels, Delivery Types etc. The Store Employee with 'Administrator' role can add new Sales Channels, Delivery Types, Payment Methods (for example can add a BANK_WIRED_TRANSFER Payment Method etc).

Entity: ORDER_STATUS_TYPE

Top

List of all status types an Order can pass through.

Attributes
ID PRIMARY KEY
Name Order status type. NOT NULL UNIQUE. Can't have two status types with the same name.
Description Order status type description.
Is_Active Flag attribute to indicate if the status type is still used to control Order process steps or it was canceled permanently. NOT NULL

Example

ORDER_STATUS_TYPE

Name
NEW
NEW_SCHEDULED
SCHEDULED
CANCELED
IN_PROGRESS
READY_FOR_PICK_UP
READY_FOR_DINE_IN
READY_FOR_SHIPMENT
PICKING_UP
DINEING
SHIPPING
HANDED_OFF
COMPLETED

Entity: ORDER_STATUS_HISTORY

Top

This entity records the full status history for an ORDER.

Note

Every time when the Order Status changes from an old Order Status to a new Order Status, the application should automatically:

  • Create a new record in the ORDER_STATUS_HISTORY entity to add the new Order Status and the Start Time of the new Order Status.
  • Update the record of the old Order Status in the ORDER_STATUS_HISTORY entity:

    Synchronize the ORDER_STATUS_HISTORY.End_Time of the old Order Status with the ORDER_STATUS_HISTORY.Start_Time of the new Order Status.

Attributes
ID PRIMARY KEY
Order_ID Lookup for the Order to which the Order Status is assigned. NOT NULL
Order_Status_Type_ID Lookup for the Order Status Type to be assigned. NOT NULL
Start_Time Timestamp when Order entered the status. NOT NULL
End_Time Timestamp when Order exit the status. When End_Time is NULL, it means Order is still in that status. NULL

Entity: SHIPMENT

Top

This entity records information about Order shipments for Orders with Delivery Type SHIPMENT.

Note

The Data Model is flexible enough to accommodate the following scenarios:

⦁ The REGISTERED_ONLINE Customer can place an Order through ONLINE Sales Channel and select the Delivery Type: SHIPMENT

⦁ The GUEST Customer can place an Order through PHONE Sales Channel and select the Delivery Type: SHIPMENT

⦁ The ANONYMOUS Customer steps into Store and asks to place an Order with Delivery Type: SHIPMENT at a Shipment Address. In this case the Store Employee records the Customer as a GUEST Customer and the process continues in the same manner as for the GUEST Customer.

See Order Process and Status, Step: Customer Places Order and Step: Store Employee Assigns Shipment to Order for more information.

Attributes
ID PRIMARY KEY
Order_ID Lookup for the Order that should be delivered. NOT NULL
City_ID Lookup for the City where the Order should be delivered. NOT NULL
Shipment_Address Shippment Address where the Order should be delivered. NOT NULL
GPS_Location GPS location where the Order should be delivered.
Postal_Code Postal code of the Shippment Address where the Order should be delivered.
Shipment_Notes Customer notes on Shipment. For example can contain details about how to reach on Shipment Address etc.
Picked_up_Time Timestamp when Order was picked-up from Store for Shipment.
Note:
For the efficient Stores, the time interval between Order is Ready (ORDER_HEADER.Ready_Time) and Order is Picked-up (SHIPMENT.Picked_up_Time) should be close to 0. NULL
Shipped_Time Timestamp when the Order was handed-off to Customer at Shipment_Address. When Shipped_Time is NULL, Order has NOT been yet delivered. NULL
Comments Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees

Entity: ORDER_REVIEW

Top

This entity records Customer reviews on Orders.

Note

REGISTERED_ONLINE Customers who placed Orders ONLINE can rate their Order experience on a scale from 1 to 5 and provide Order Reviews.

The Store 'Administrator' can control if the Customer Reviews are public and can be viewed by other Customers. See Subject Area: STORE, Entity: SETTING, Attribute: Public_Reviews for more information.

Attributes
ID PRIMARY KEY
Order_ID Lookup for the Order for which the Order review is recorded. NOT NULL
Customer_ID Lookup for the Customer who recorded the Order review. NOT NULL
Rating Rating from 1 to 5. NOT NULL
Review Order review text filled in by Customer. NOT NULL
Review_Date Timestamp when the Order review was created. NOT NULL
Reply Reply text from Store Employee to Customer review. NULL
Reply_Date Timestamp when the reply to Customer review was created. NULL
Is_Compensated Flag attribute to indicate if Customer received a money compensation for the Review.
Example:
When a Customer sent a negative review for an Order that did not meet the expectations, the Store can decide to offer a money compensation to Customer.
⦁ If Customer received a compensation for the Review then Is_Compensated attribute is set TRUE.
⦁ If Customer did not receive a compensation for the Review then Is_Compensated attribute is set FALSE. NOT NULL
Compensation_Value The money amount received by the Customer as a compensation for the Order Review.
⦁ If Is_Compensated is TRUE then the Compensation_Value is the money amount expressed in Store currency received by Customer as compensation. This money amount is also added to the Customer total Credit.
Customer can use the Credit with the next Order placed at the Store. See Subject Area: CUSTOMER, Entity: CUSTOMER, Attribute: Credit.
⦁ If Is_Compensated is FALSE then Compensation_Value is NULL.
Comments Internal notes used for clarifications on record content. Can be seen and edited only by Store Employees. NULL
Top