CTX Tags

CTX tag should be formed in a standard way:
<*CTX(parameter)*>
The parameter is a specification of what value should be returned. It is a dot separated list of objects, sub objects and property names. Each object may have sub objects and properties. Properties are terminals – this means that CTX tag param may end with it.
In short this is the CTX param object structure:

  • Quote
    • Total
    • CurrentItem
    • KeyAttribute
    • Product Type
    • Customer
    • Revision
    • Owner
      • UserType
      • Company
      • Territory
      • ManagingParent
      • OrderingParent
      • ApproveParent
    • SelectedMarket
    • SelectedShipping
    • Opportunity
    • Account
  • SOD
    • Account
    • Opportunity
  • Visitor
    • UserType
    • Company
    • Territory
    • ManagingParent
    • OrderingParent
    • ApproveParent
  • Date
  • Container
  • MyContainer



Each of these objects have corresponding properties. Quote sub objects have cart cells as sub objects, for example Quote.Total.CartComment. Cart cell objects that are decimals, like prices, have fixed four sub tags:

  • DefaultDisplay – returns decimal in default currency formatted as displayed on cart
  • DefaultDecimal – returns decimal in default currency in numeric en-US format without thousand separators and with two decimals
  • MarketDecimal – returns decimal in cart currency formatted as displayed on cart
  • MarketDisplay – returns decimal in cart currency in numeric en-US format without thousand separators and with two decimals


For example, display is on three decimals, cart is in Euro currency, default is US Dollar:

<*CTX(Quote.Total.TotalAmount.DefaultDisplay)*> 2,345.678
<*CTX(Quote.Total.TotalAmount.DefaultDecimal)*> 2345.68
<*CTX(Quote.Total.TotalAmount.MarketDisplay)*> 1,503.639
<*CTX(Quote.Total.TotalAmount.MarketDecimal)*> 1503.64

Several tags, like:
Quote.ProductType()
Quote.CustomField()
Quote.Customer()

have a parameter in the brackets. With this parameter you may specify which instance of the object should be returned.
For example:
Quote.ProductType(Software).ListSubTotal.MarketDecimal will return total list price of the “Software” product type.
Quote.CustomField(Terms) will return the value of the “Terms” quote custom field (sc param).

Quote customers should be referred by the role name:
BillTo
ShipTo
EndUser

For example:
Quote.Customer(BillTo).FirstName will return first name of the quote bill to customer.

Other Quote tags (example):

Quote.CurrentItem.CartItemGuid will return unique identifier for an item in the cart.
Quote.DocumentFormat will return the file format (PDF, DOCX) of generated document.

Date tag returns current date/time.
Date/Time fields have optional Format child tag. It expects format string in argument that affects the way value is shown.
For example, for January 19th 2009:
Date.Format(yyyy.MM.dd) 2009.01.19
Quote.DateCreated.Format(MM-dd-yy) 01-19-09



Container tag should be used in a product to access its container attributes.
For example:
Use <*CTX(Container(Users).Rows.GetCount)*> in a product that has “Users” attribute container to get number of rows in that container, or
Use <*CTX(Container(Users).Property(X).Set(<*Value(memory)*>)*> in a product that has “Users” attribute container to set its property “X” to a value of “Memory” attribute of that same product.


The MyContainer tag should be used in an attribute container to access its own members, or in the product that will be used as a container row to access parent container.

Your other option is to use it to define basic product info in the product by accessing the container in which the product is located.

The parent container can be accessed from the child product, but only the basic info. By basic info we mean the following: description, part number, etc. The product attribute or container of a child product cannot evaluate the MyContainer tag in order to pull values from the parent container info.

Use <*CTX(MyContainer.CurrentRow.Column(A).Get)*> in a column B calculation formula to set B column to the same value as A column, or
Use <*CTX(MyContainer.Property(X).Get)*> in a column B calculation formula to set B column to the same value as property X

Use this tag only when you have a product in the container, otherwise you might end up with unexpected behavior.

For details about Container refer to - Attribute Container

For a complete list of date time formatting refer to CTX Date Format Strings.

For a complete list of all tags refer to CTX Complete Tag List.


SFDC and SOD objects exists only if the CPQ tenant is set to use them. They are exclusive – a tenant can integrate with only one of them at once. If integration is not set usage of these tags will make syntax error in the formula – using these tags is invalid if integration is not set.


Sample 1
Free form attribute in configuration to have a value of some SOD Opportunity field Make a rule with following action <*ASSIGNFF(SomeAttribute:<*CTX(SOD.Opportunity.Description)*>)*>
Sample 2
Action depends on an SOD Account field In the workflow condition for the action put following formula <*CTX(SOD.Account.Description)*>

You are here: CallidusCloud CPQ Online HelpAdmin Page HelpCPQ TagsCTX Tags