CALLEDFROM Variables in Product Configurator

Skip to main content

CALLEDFROM Variables in Product Configurator

You are here:

CALLEDFROM variables are built-in variables in Product Configurator that return properties from the source object (record or table) calling a rule. They allow rules to behave differently depending on where they are being invoked from. You can configure rules to trigger from different sources (e.g., a Configurator Option or an Option Choice). CALLEDFROM variables allow a single rule to respond to those sources dynamically, reducing the need for duplicate or source-specific rules.

Syntax

CALLEDFROM variables use dot notation: CALLEDFROM.PROPERTY.

  • CALLEDFROM.CHOICE
  • CALLEDFROM.OPTION
  • CALLEDFROM.TABLEID

Properties

Property Description
CHOICE Returns the Choice Code from the source calling the rule
OPTION Returns the Option Code from the source calling the rule.
TABLEID Returns the Table Id for the source calling the rule.

Sources

Source Description
Configurator BOM When rules are triggered from the option in the configuration. This is the source for rules assigned to the Configurator Option.
Option Choice When rules are triggered from the option choice to hide or show it in the configuration. This is the source for rules assigned to the Option Choice.

How it works

When a rule is evaluated, each CALLEDFROM variable is replaced, or resolved, at runtime using the property of the source that triggered it. For example, if an Option Choice triggers a rule, CALLEDFROM.CHOICE resolves to the Code field of that Option Choice. This allows a single rule to handle multiple sources or choices without requiring separate logic for each.

Applications and use cases

CALLEDFROM variables are particularly useful in the following scenarios:

  1. Option Choice hide/show rules: When multiple option choices share the same rule, CALLEDFROM.CHOICE dynamically returns the code of whichever choice is currently being evaluated, allowing a single rule to handle all choices without needing separate logic for each.
  2. Run Rule actions: When one rule triggers another via a Run Rule action, CALLEDFROM.OPTION returns the option that originally invoked the chain. This allows the called rule to include different logic or skip certain cases depending on which option triggered it.

Examples

Example one

Filter item choices by region:
Suppose a configuration has a REGION option with choices N (for North) and S (for South) and an ITEM option. The valid item choices differ by region:
Region N are Items 1, 2, 3
Region S are Items 2, 3, 4

The choices for the ITEM option are structured to include both the item and region identifier (e.g., 1N, 2N, 3N, 2S, 3S, 4S).

All ITEM option choices share a single hide choice rule structured as follows:
Execute until true (match any)
If REGION.CHOICE is blank
If CALLEDFROM.CHOICE is not in filter *[REGION.CHOICE]

How it evaluates:
Suppose the REGION option is set to its N choice. When the hide choice rule runs for ITEM option choice 1N, the CALLEDFROM.CHOICE resolves to 1N. The filter *N matches, so the choice is not hidden. When the rule runs for ITEM option choice 2S, *N does not match 2S, so the choice is hidden.

With this approach, adding or removing valid item-region combinations only require adding or removing option choices. The rule itself does not need to change.

Example two

Behaves differently when rule is run from another option:
A configuration has three options: INPUT01, INPUT02, and OUTPUT. The choices for INPUT01 and INPUT02 and the order they are selected by the user determines the choice for OUTPUT. Because the rule logic needs to behave differently depending on which input triggered it, the CALLEDFROM.OPTION variable is used to handle each case within a single rule.

To handle this, a rule is assigned to the INPUT01 option containing all the logic to set the OUTPUT choice, and a simple rule is assigned to the INPUT02 option with a Run Rule action calling the INPUT01 rule. The INPUT01 rule uses the CALLEDFROM.OPTION variable in its conditions to identify which option invoked it:

CALLEDFROM.OPTION is equal to INPUT01
CALLEDFROM.OPTION is equal to INPUT02

How it evaluates:
When the user sets INPUT01:
The INPUT01 rule triggers directly. CALLEDFROM.OPTION resolves to INPUT01, so the first condition evaluates to true and the second evaluates to false.
When the user sets INPUT02:
The INPUT02 rule triggers, which executes the INPUT01 rule via the Run Rule action. CALLEDFROM.OPTION now resolves to INPUT02, so the first condition evaluates to false and the second evaluates to true.

With this approach, the core logic resides in a single rule that other options can call as needed, while CALLEDFROM.OPTION enables the rule to behave differently depending on which option invoked it.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Table of Contents
Go to Top