Liquid syntax
  • Welcome
  • Introduction
    • What is Liquid syntax?
    • Liquid operators
    • Liquid objects
    • Liquid tags
    • Liquid filters
    • Best practices
  • Information
    • Attributes
    • Consolidation
    • Custom fields
    • Date filter reference
    • Deal pricing
    • Special items
  • PDF renderer
    • PDF document limitations
  • General
    • Address detail
    • Attachments
    • Company
    • Emails
    • Links
    • Phones
    • Store
  • Activity
    • Activity
  • Inventory Check
    • Inventory check (stock check)
    • Inventory check items (stock check items)
  • Invoices & Credits
    • Invoice
    • Invoice items
    • Invoice transactions
    • Invoice taxes
  • Opportunities
    • Opportunity
    • Opportunity items
    • Opportunity item assets
    • Opportunity item surcharges
    • Opportunity costs
    • Opportunity return item assets
    • Consolidated opportunity items
    • Consolidated opportunities
  • People & Organizations
    • Contact
    • Organization
    • User
    • Vehicle
    • Venue
  • Products
    • Product
    • Product group
    • Charging period
    • Product accessories
    • Product assets
    • Stock level
  • Project
    • Project
  • Purchase orders
    • Purchase order
    • Purchase order items
  • Quarantine
    • Quarantine
  • Service
    • Service
  • Testing & inspection
    • Inspection results
    • Inspection result tasks
Powered by GitBook
On this page
  • Objects that return consolidated opportunity items
  • charge_excluding_tax_total
  • charge_including_tax_total
  • charge_total
  • is_product?
  • is_rental?
  • is_sale?
  • is_service?
  • is_service_item?
  • is_text_item?
  • name
  • opportunity
  • product_stock_levels
  • quantity
  • revenue_group
  • surcharge_amount
  • tax_total
  • transaction_type_name
  • use_chargeable_days

Was this helpful?

  1. Opportunities

Consolidated opportunity items

The consolidated opportunity items object holds information about items on an opportunity, consolidated by product name.

PreviousOpportunity return item assetsNextConsolidated opportunities

Last updated 4 years ago

Was this helpful?

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.

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.

charge_excluding_tax_total

Returns a consolidated opportunity item charge total excluding tax.

Input

{{ item.charge_excluding_tax_total }}

Output

50.0

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

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)

Input

{% for stock_level in item.product_stock_levels %}
  {{ stock_level.asset_number }}<br>
{% endfor %}

Output

ETC-001
ETC-002
ETC-003

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

Use to change the way that the number is formatted.

Keep in mind that this returns any stock levels that match the criteria above. Use to return allocated assets.

Consolidation
Opportunity items
the currency filter or a number filter
Opportunity
Stock level
the assets object