Orders

Files

File Type Description
orders/order.csv main The orders that clients have made.
orders/order_lines.csv linked The individual lines associated with an order.
orders/order_returns.csv linked The returns made for an order.

Fields

orders/order.csv

Field Required Type Description
order_number required string The unique order number for the order that is also used as it's id.
client.id required relation:"clients.id" The client who made the order.
closer.id required relation:"employees.id" The ID of the employee who is considered the "closer".
employee_splits[].employee.id required relation:"employees.id" The ID of the employee that should be linked to this order.
employee_splits[].ratio required number The amount of credit that should be attributed to the employee. Eg: 1 for 100% credit or 0.5 for 50% credit.
ami_sale_category.id required relation:"categories.id" The ID of the category for AMI reporting purposes. (Arthur Murray studios only.)
remarks optional string Any notes that should be attached to the order.
order_taxes[].name required string The name of the tax.
order_taxes[].rate required rate The amount of the tax rate, expressed as a decimal. Eg: 0.22 for 22%
payment_plan.amount_to_finance optional money The total amount financed if the order has a payment plan.
payment_plan.installment_amount optional money The amount of each individual installment if the order has a payment plan.
payment_plan.interval optional payment-plan-interval The interval of the plan installments. This value type depends on the plan type (See payment-plan-interval type documentation).
payment_plan.first_payment_date optional date For time-based plans, the date the first payment is due.
payment_plan.plan_type optional payment-plan-type Indicates wether it's a service based or a time based payment plan.
sold_at required date The date the order was placed.
original_total_due optional money The original amount due, before any returns.
total_payments_applied optional money The total amount of payments applied to this order.
total_payments_returned optional money The total amount of payments returned from this order.
subtotal optional money The current subtotal, before taxes but after returns.
taxes_due optional money The total amount of taxes due on this order.
total_due optional money The current amount due, after taxes and after returns.
remaining_due optional money The total remaining due for the order, after payments are applied.

orders/order_lines.csv

Field Required Type Description
order_order_number required linked-id The order numbder that this line is linked to.
product.id required relation:"products.id" The ID of the product for this line.
package.id optional relation:"products.id" If this line is part of a package (bundle), specify the ID of the package here.
quantity required integer The quantity of this product ordered.
unit_price required money The price for each individual unit of this product.
is_taxable required boolean Wether or not this product should have order taxes applied to it.

orders/order_returns.csv

Field Required Type Description
order_order_number required linked-id The order numbder that this return is linked to.
id required string The unique ID to use for this return.
return_number required string The unique return number to use for this return.
total optional money The total value returned.
fee required money The fee to be applied for making this return. Specify 0 for no fee.
credit.receipt_number optional relation:"disbursements.receipt_number" When returning products that have already been paid for, this should link to the return credit.
returned_at required date The date the return was made.
order_return_lines[].order_line.product.id required relation:"products.id" The ID of the product that was returned.
order_return_lines[].order_line.package.id optional relation:"products.id" The ID of the package (as part of the bundle) that was returned.
order_return_lines[].quantity required integer The total number this product returned.

Required Rows

none

Notes

Order lines for packages (bundles) should follow a very specific format. Consider an order for a package Outfit that contains 2 products: T-Shirt and Pants. The order_lines.csv should contain 3 rows for an order like this:

product_id package_id quantity unit_price
Outfit_ID Outfit_ID 1 0
T-Shirt_ID Outfit_ID 1 1000
Pants_ID Outfit_ID 1 1500

Notice that each row reference the package_id including the package itself.