Consolidated opportunity items
The consolidated opportunity items object holds information about items on an opportunity, consolidated by product name.
An item might appear on an opportunity in multiple places. The consolidated opportunity items object merges all opportunity items related to the same product or service into a single line.
ConsolidationObjects that return consolidated opportunity items
order.consolidated_items
order.consolidated_itemsReturns consolidated items
{% for item in order.consolidated_items %}
{{ item.name }}
{% endfor %}order.consolidated_principal_opportunity_items
order.consolidated_principal_opportunity_itemsMerges only opportunity items that are principal items. This means this doesn't return any accessories.
{% for item in order.consolidated_items %}
{{ item.name }}
{% endfor %}The consolidated opportunity items object is available anywhere you can access opportunity items.
Opportunity itemscharge_excluding_tax_total
charge_excluding_tax_totalReturns a consolidated opportunity item charge total excluding tax.
Input
{{ item.charge_excluding_tax_total }}Output
50.0charge_including_tax_total
charge_including_tax_totalReturns a consolidated opportunity item charge total including tax.
Input
{{ item.charge_including_tax_total }}Output
120.0charge_total
charge_totalReturns a consolidated opportunity item charge total.
This may be including or excluding tax depending on the value of the “Catalog Prices” setting in System Preferences.
Input
{{ item.charge_total }}Output
50.0is_product?
is_product?Returns true if a consolidated opportunity item is linked to a product record; false otherwise.
Input
{% item.is_product? %}Output
trueis_rental?
is_rental?Returns true if a consolidated opportunity item is a rental charge, i.e. its transaction type is "Rental"; false otherwise.
Input
{{ item.is_rental? %}Output
trueis_sale?
is_sale?Returns true if a consolidated opportunity item is for a sale charge, i.e. its transaction type is "Sale"; false otherwise.
Input
{{ item.is_sale? %}Output
falseis_service?
is_service?Returns true if a consolidated opportunity item is for a service charge, i.e. its transaction type is "Service"; false otherwise.
This doesn't determine necessarily whether an opportunity item is linked to a service record; a text item may have the transaction type "Service".
Input
{{ item.is_service? }}Output
falseis_service_item?
is_service_item?Returns true if an opportunity item is linked to a service record; false otherwise.
Input
{{ item.is_service_item? }}Output
falseis_text_item?
is_text_item?Returns true if an opportunity item is a text item; false otherwise.
Input
{{ item.is_text_item? }}Output
truename
nameReturns an opportunity item's name.
Input
{{ item.name }}Output
Robe RoboSpotopportunity
opportunityReturns opportunity objects for the opportunity that an opportunity item is related to.
When working with a document or discussion template on an opportunity record, you may simply wish to access the opportunity object as normal. For example, use {{ order.name }} to print the opportunity subject.
Input
{{ item.opportunity.name }}Output
V-Blast Music Festivalproduct_stock_levels
product_stock_levelsReturns stock level objects for opportunity item's related stock levels where:
the item is a product
it's bulk or serialized
stock levels are in the same store
stock levels have a stock type matching the opportunity item’s stock type (i.e. rental or sale)
Keep in mind that this returns any stock levels that match the criteria above. Use the assets object to return allocated assets.
Input
{% for stock_level in item.product_stock_levels %}
{{ stock_level.asset_number }}<br>
{% endfor %}Output
ETC-001
ETC-002
ETC-003quantity
quantityReturns the quantity of an opportunity item.
Input
{{ item.quantity }}Output
1.0revenue_group
revenue_groupReturns the revenue group name for an opportunity item.
Input
{{ item.revenue_group }}Output
Rentalsurcharge_amount
surcharge_amountReturns the surcharge amount for an opportunity item.
Surcharges are percentage or fixed fees that are applied to rental items. An opportunity item might have multiple surcharges applied.
Returns blank for groups, sale items, and service items. Returns an error for subtotals.
Input
{{ item.surcharge_amount }}Output
120.0tax_total
tax_totalReturns the tax total for an opportunity item. Works for items and groups.
Input
{{ item.tax_total }}Output
50.0transaction_type_name
transaction_type_nameReturns the transaction type name for an opportunity item.
Rental
Sale
Service
Input
{{ item.transaction_type_name }}Output
Rentaluse_chargeable_days
use_chargeable_daysReturns true if an opportunity item has overriden chargeable days.
This will be the case where the opportunity has the "Chargeable Days" toggle set to YES.
Input
{{ item.use_chargeable_days }}Output
trueLast updated
Was this helpful?