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.

pageConsolidation

Objects that return consolidated opportunity items

order.consolidated_items

Returns consolidated items

{% for item in order.consolidated_items %}
  {{ item.name }}
{% endfor %}

order.consolidated_principal_opportunity_items

Merges 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.

pageOpportunity items

charge_excluding_tax_total

Returns a consolidated opportunity item charge total excluding tax.

Input

{{ item.charge_excluding_tax_total }}

Output

50.0

Use the currency filter or a number filter to change the way that the number is formatted.

charge_including_tax_total

Returns a consolidated opportunity item charge total including tax.

Input

{{ item.charge_including_tax_total }}

Output

120.0

charge_total

Returns 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.0

is_product?

Returns true if a consolidated opportunity item is linked to a product record; false otherwise.

Input

{% item.is_product? %}

Output

true

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

true

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

false

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

false

is_service_item?

Returns true if an opportunity item is linked to a service record; false otherwise.

Input

{{ item.is_service_item? }}

Output

false

is_text_item?

Returns true if an opportunity item is a text item; false otherwise.

Input

{{ item.is_text_item? }}

Output

true

name

Returns an opportunity item's name.

Input

{{ item.name }}

Output

Robe RoboSpot

opportunity

Returns 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 Festival
pageOpportunity

product_stock_levels

Returns 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-003
pageStock level

quantity

Returns the quantity of an opportunity item.

Input

{{ item.quantity }}

Output

1.0

revenue_group

Returns the revenue group name for an opportunity item.

Input

{{ item.revenue_group }}

Output

Rental

surcharge_amount

Returns 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.0

tax_total

Returns the tax total for an opportunity item. Works for items and groups.

Input

{{ item.tax_total }}

Output

50.0

transaction_type_name

Returns the transaction type name for an opportunity item.

  • Rental

  • Sale

  • Service

Input

{{ item.transaction_type_name }}

Output

Rental

use_chargeable_days

Returns 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

true

Last updated