Purchase order items
urchase orders are in beta. It's unlikely these object will change, but new objects may be added in future.
accessories
accessories
Returns opportunity item objects for a purchase order item. Works in the same way that the children
object does.
Input
Output
charge_total_including_children
charge_total_including_children
Returns a purchase order item charge total, including the charge total of any accessory items.
Generally used where you’d like to roll up the price of accessories into their parent item, like when working with packages or kits.
Input
Output
accessory_is_default?
Returns true
if a purchase order is an accessory and the accessory’s inclusion type is “Default”.
Input
Output
accessory_is_mandatory?
accessory_is_mandatory?
Returns true
if a purchase order item is an accessory and the accessory’s inclusion type is “Mandatory”.
Input
Output
accessory_is_optional?
accessory_is_optional?
Returns true
if a purchase order is an accessory and the accessory’s inclusion type is “Optional”.
Input
Output
accessory_mode_is_accessory?
accessory_mode_is_accessory?
Returns true
if a purchase order is an accessory and the accessory’s mode is “Accessory”.
Input
Output
accessory_mode_is_component?
accessory_mode_is_component?
Returns true
if a purchase order is an accessory and the accessory’s mode is “Component”.
Input
Output
accessory_mode_is_safety?
accessory_mode_is_safety?
Returns true
if a purchase order is an accessory and the accessory’s mode is “Safety”.
Input
Output
accessory_mode_name
accessory_mode_name
Returns the accessory’s mode name where a purchase order is an accessory; blank otherwise.
accessory
component
safety item
Input
Output
charge_excluding_tax_total
charge_excluding_tax_total
Returns a purchase order item charge total excluding tax.
Input
Output
Use the currency filter or a number filter to change the way that the number is formatted.
charge_including_tax_total
charge_including_tax_total
Returns a purchase order item charge total including tax.
Input
Output
charge_total_including_children
charge_total_including_children
Returns a purchase order charge total, including the charge total of any accessory items.
Generally used where you’d like to roll up the price of accessories into their parent item, like when working with packages or kits.
Input
Output
charge_total
charge_total
Returns a purchase order item charge total.
This may be including or excluding tax depending on the value of the “Catalog Prices” setting in System Preferences.
Input
Output
chargeable_days
chargeable_days
Returns the number of chargeable days for a purchase order item.
For service items, the value of the “Rate Quantity” field is returned. The rate type may be hour or distance.
For sale items, returns 0
.
Input
Output
charging_periods
charging_periods
Returns charging period objects for a purchase order item.
Input
Output
children
Returns purchase order item objects for a purchase order item.
When an item is an item, this will return accessories.
When the item is a group, this will return items within that group.
The children
object only returns objects that are the next level deep in the tree. For example, accessories on accessories aren't returned.
Input
Output
depth
depth
Returns the depth of a purchase order item in the tree. An item’s depth is determined by how it is nested under items.
Input
Output
depth_padding
depth_padding
Returns the depth padding for a purchase order item. Generally used to apply an inline style to a table cell in HTML so that items appear nested.
Increments in multiples of 16.
Input
Output
description
description
Returns a purchase order item’s description.
Input
Output
discount_amount
discount_amount
Returns the amount of discount applied to a purchase order item.
Returns 0
for groups and subtotals.
Use discount_total
for groups.
Input
Output
discount_percent
discount_percent
Returns the percentage discount applied to a purchase order item.
Returns 0
for groups and subtotals.
Input
Output
discounted_price
discounted_price
Returns a purchase order item’s price after discount.
Input
Output
ends_at
ends_at
Returns the charging end date for a purchase order item. Generally used for service items.
For service items, returns the end date and time for the opportunity item.
For rental and sale items, returns the end date and time for the opportunity.
For groups, returns blank.
For subtotals, returns the date and time that the document was generated in UTC.
Input
Output
has_child_items?
has_child_items?
Returns true
if a purchase order item has children items; false
otherwise. Generally used for detecting if an opportunity item has accessories.
Input
Output
has_discount?
has_discount?
Returns true
if a purchase order item has a discount applied; false
otherwise.
Where a purchase order item has a negative discount applied, has_discount
will return false
. For example, -50% would increment the charge total by 50% so has_discount
will return false
.
Input
Output
id
Returns a purchase order item ID.
The ID is an internal reference for a record. It's not exposed in our web interface.
Input
Output
image_url
Returns a URL pointing at the product or service's picture. The full size image is returned.
Input
Output
is_accessory?
is_accessory?
Returns true
if a purchase order item is an accessory; false
otherwise.
Input
Output
is_group?
is_group?
Returns true
if a purchase order item is a group; false
otherwise.
Input
Output
is_item?
is_item?
Returns true
if a purchase order item is an item; false
otherwise.
Input
Output
is_principal?
is_principal?
Returns true
if a purchase order item has accessory items nested underneath it; false
otherwise.
Input
Output
is_product?
is_product?
Returns true
if a purchase order item is linked to a product record; false
otherwise.
Input
Output
is_service_item?
is_service_item?
Returns true
if a purchase order item is linked to a service record; false
otherwise.
Input
Output
is_subtotal?
is_subtotal?
Returns true
if a purchase order item is a group item's subtotal; false
otherwise.
Subtotal rows are informational only and many purchase order item objects will print "Liquid error: internal" rather than return blank
or false
.
Input
Output
is_text_item?
is_text_item?
Returns true
if a purchase order item is a text item; false
otherwise.
Input
Output
name
name
Returns a purchase order item's name.
Input
Output
opportunity
opportunity
Returns opportunity objects for the opportunity that a purchase order item is related to.
Input
Output
opportunity_cost
opportunity_cost
Returns opportunity cost objects for the opportunity cost that a purchase order item is related to.
Input
Output
price
price
Returns a purchase order item's price without discount.
Input
Output
price_unit
price_unit
Returns a purchase order item's price unit name.
The price unit name output depends on the rental charge used. Some common examples:
Daily
Weekly
Per period
Each
Input
Output
product
product
Where related to a product, returns product objects for a purchase order item.
Input
Output
product_group_name
product_group_name
Where related to a product, returns the related product's product group name for a purchase order item.
Input
Output
purchase_order
purchase_order
Returns purchase order objects for the purchase order that a purchase order item is related to.
Input
Output
quantity
quantity
Returns the quantity of a purchase order item.
Input
Output
rate_definition_name
rate_definition_name
Returns the rate definition name for a purchase order item where the item is a sub-rental.
Returns blank for sales, services, and group items.
Input
Output
service
service
Where related to a service, returns service objects for a purchase order item.
Input
Output
service_unit_name
service_unit_name
Returns the service unit name for a purchase order item.
Day
Days
Hour
Hours
miles
km
Input
Output
starts_at
starts_at
Returns the charging start date for a purchase order item. Generally used for service items.
For service items, returns the start date and time for the opportunity item.
For rental and sale items, returns the start date and time for the opportunity.
For groups, returns blank.
For subtotals, returns the date and time that the document was generated in UTC.
Input
Output
subtotal
subtotal
Returns the subtotal amount for a purchase order group.
Subtotal rows are informational only. This will only return a value for subtotal rows. This will match the charge_total
of the corresponding purchase order item group.
Input
Output
subtotal_name
subtotal_name
Returns the subtotal name for a purchase order item group.
Subtotal rows are informational only. This will only return a value for subtotal rows. This will match the name
of the corresponding purchase order group.
Input
Output
supplier_reference
supplier_reference
Returns the supplier reference for a purchase order item's related opportunity cost.
Input
Output
tax_class_name
tax_class_name
Returns the tax class name against a purchase order item.
Input
Output
tax_total
tax_total
Returns the tax total for a purchase order item. Works for items and groups.
Input
Output
thumbnail_url
thumbnail_url
Returns a URL pointing at the product or service's picture. A thumbnail size image is returned.
Input
Output
transaction_type_name
transaction_type_name
Returns the transaction type name for a purchase order item.
Input
Output
unit_charge
unit_charge
Returns the unit charge for a purchase order.
The unit charge is the price for one unit of a purchase order.
Input
Output
unit_charge_amount
unit_charge_amount
Returns the unit charge for a purchase order excluding discount.
The unit charge is the price for one unit of a purchase order.
Input
Output
weight_total
weight_total
Returns the weight total for a purchase order item.
This is calculated by multiplying the quantity by the product weight.
Current uses the product weight at the time the opportunity item was added to the purchase order. Recalculate to get the latest product weights.
Input
Output
Use the company
object to return your company weight unit, e.g. lbs or kg.
weight_total_including_children
weight_total_including_children
Returns the weight total for a purchase order item.
This is calculated by multiplying the quantity by the product weight.
Input
Output
Last updated