Including Dynamic Information in Text Sections

Text sections can be customized with dynamic information from configured items, transactions, and your account. Dynamic information takes the form of resolve expressions and placeholders, which are added to the HTML Content field. You can also include dynamic content when the text section introduces a table.

The type of dynamic information you can add to text sections depends on:

For more information about the available resolve expressions and placeholders, see:

Including Dynamic Information from Configured Items

In text sections, you can include dynamic information from configured items using resolve expressions and placeholders. Resolve expressions can be used when the parent group is repeated for:

  • Every configuration

  • Every configured line item

  • Every additional line item

The following table sums up the option combinations that admit resolve expressions.

Resolve Expressions

Repeat Field (Group Record)

Run For Field (Section Record)

  • {Q/A}

  • {Q:ALT_NAME}

  • {Q:DESC}

  • {Q:NAME}

Every Item

  • Configured items

  • Generic Items

Every Config

The Generic Items option refers to additional items.

You can also use these predefined answers as resolve expressions:

  • {SOLE/QUANTITY} – The quantity of the configured item.

    The value is sourced from the Quantity field on the product interface.

  • {SOLE/TOTAL_PRICE} – The price of the configured item multiplied by the quantity.

    The value is sourced from the Total field on the product interface.

  • {SOLE/MAT_PRICE} – The price of a single configured item.

    The value is sourced from the Unit field on the product interface.

For more information about resolve expressions and predefined answers, see Obtaining Answer Data with Resolve Expressions and Including Additional Conditions in Rules and Actions with Predefined Answers.

The following table sums up available placeholders to add dynamic information from configured items.

Placeholder

Description

Repeat Field (Group Record)

Run For Field (Section Record)

{$CPI}

Returns the preview image for the configured item.

Every Item

Configured Items

Every Config

Repeating Text Sections Containing Dynamic Information from Configured Items

Note:

Dynamic information from configured items can be sourced for sections repeated for every configured item or every configuration.

When working with text sections, you can enter content that will be filled in with data from configured items. Data can be sourced from a qTable question or an input box text field or box storing an array of JSON objects.

The text will repeat:

  • For each row in the qTable question

  • Or for each object in the array

For more information about qTables and input box questions, see QTable Questions and Input Box Questions.

The syntax for the array of JSON objects is:

              [
   {
      "property1":"value",
      "property2":"value",
      "property3":"value"
   },
   {
      "property1":"value",
      "property2":"value",
      "property3":"value"
   },
   {
      "property1":"value",
      "property2":"value",
      "property3":"value"
   }
] 

            

You can add as many properties as required to each object.

To repeat a text section with configured item data:

  1. Edit the section.

  2. In the Repeat Data Block field, select whether you want to repeat the content depending on the number of:

    • Rows in the qTable question

    • JSON objects in the array

  3. If you selected JSON in step 2:

    1. In the JSON Q/A field, enter the NetSuite CPQ Configurator answer that stores the array of JSON objects.

    2. In the HTML Content field, enter the JSON properties preceded by an asterisk and enclosed in curly braces. The syntax is {*property}.

  4. If you selected QTable in step 2:

    • In the QTable Question field, enter the question code from a NetSuite CPQ Configurator qTable.

    • In the HTML Content field, enter the qTable answer code in lowercase preceded by an asterisk and enclosed in curly braces. The syntax is {*answercode}.

  5. Click Save.

Example

Suppose you want the document to list every desk model in the same series the user has selected. This information is already stored in a NetSuite CPQ Configurator answer in JSON format. You want to add that information to the HTML Content field to avoid typing in each model.

The array of JSON objects may look like this:

                [
   {
      "series":"A1000",
      "shape":"Rectangle",
      "topfinish":"Wood"
   },
   {
      "series":"A1000",
      "shape":"Rectangle",
      "topfinish":"Laminate"
   },
   {
      "series":"A1000",
      "shape":"L-shape",
      "topfinish":"Wood"
   },
   {
      "series":"A1000",
      "shape":"L-shape",
      "topfinish":"Laminate"
   },
   {
      "series":"A1000",
      "shape":"U-shape",
      "topfinish":"Wood"
   }
] 

              

To work with this array:

  • In the JSON Q/A field, enter the combination of question and answer codes, for example, DESK_A1000/MODELS.

  • In the HTML Content field, specify the properties you want to extract from the array.

    Enter the properties preceded by an asterisk and enclosed in curly braces.

    Series: {*series}  | Shape: {*shape} | Top Finish: {*topfinish} 
    

In the final document, the result would be:

Series: A1000  | Shape: Rectangle | Top Finish: Wood
Series: A1000  | Shape: Rectangle | Top Finish: Laminate
Series: A1000  | Shape: L-shape | Top Finish: Wood
Series: A1000  | Shape: L-shape | Top Finish: Laminate
Series: A1000  | Shape: U-shape | Top Finish: Wood 

Including Dynamic Information from Transactions and Your Account

In your documents, you can include information from transactions and your account using placeholders. The following table shows the available placeholders and the data type they represent.

Placeholder

Description

  • {@TransactionBodyFieldID}

  • {#TransactionLineFieldID}

  • {%ItemRecordBodyFieldID}

Represent a transaction body field, a transaction line field, or an item record body field, respectively. Use the field ID.

Depending on the field type, they return:

  • The value of text fields.

  • The ID of the option in dropdown lists and multiple-choice fields.

    If multiple options are selected, they return comma-separated IDs.

  • 'T' (true) or 'F' (false) for checkboxes.

Note:

Item body fields for configured items correspond to those of the base item.

{$storedisplayimage}

Returns the item image from the Item Display Image field.

This field is placed under the Web Store subtab on the item record.

{$GROUPNAME}

Returns the name of the grouping to which the item belongs.

Note:

The group name corresponds to the value taken by the field specified in the Group Items By field on the parent group.

{$GROUPTOTAL}

Returns the total price amount for the items belonging to the same grouping.

Note:

The group depends on the value taken by the field specified in the Group Items By field on the parent group.

{$date}

Returns the current date in DD/MM/YYYY format.

  • {$page}

  • {$pages}

Return the page number and the total number of pages, respectively.

The following table describes the options to select in groups and sections when working with each placeholder.

Placeholder

Repeat Field (Group Record)

Run For Field (Section Record)

  • {@TransactionBodyFieldID}

  • {$date}

  • {$page}

  • {$pages}

Once

Every Item

  • Configured Items

  • Generic items

  • All Items

  • Item Group Header

  • Item Group Footer

Every Config

  • {#TransactionLineFieldID}

  • {%ItemRecordBodyFieldID}

  • {$storedisplayimage}

Every Item

  • Configured Items

  • Generic Items

  • All Items

  • {$GROUPNAME}

  • {$GROUPTOTAL}

Every Item

  • Configured Items

  • Generic Items

  • All Items

  • Item Group Header

  • Item Group Footer

Some placeholders can be extended by adding parameters. The following table lists the available parameters for each placeholder.

Placeholder Parameter

Description

Compatible Placeholders

:text

Returns the option or options for dropdown lists and multiple-choice fields instead of the option ID.

If users select multiple options, they are returned separated by commas.

  • {@TransactionBodyFieldID}

  • {#TransactionLineItemFieldID}

  • {%ItemRecordBodyFieldID}

$currency

Formats numbers as currency.

Note:

The field must contain numbers.

  • {@TransactionBodyFieldID}

  • {#TransactionLineItemFieldID}

  • {%ItemRecordBodyFieldID}

  • {$GROUPTOTAL}

Parameters are appended to placeholders. See the following examples:

  • {@TransactionBodyFieldID:text}

  • {$GROUPTOTAL$currency}

Related Topics

General Notices