Configuration Currency Attributes
Overview
The currency attribute is displayed as a floating point number field that will display the number in currency format. The currency displayed is the user's currency. Currency attributes can be of array and non-array types. A range check can be defined on currency attributes. Currency is also supported for single-select and multi-select menus. Configuration currency attributes support negative currency. However, no special formatting is available for negative currency. Currency is formatted based on the current user's currency preference.
The following images show the different display options available for Currency attributes.
-
Legacy Display Type: Text
-
JET Display Type: Text and Spinner
Administration
Add a Currency Attribute
-
Navigate to the Attributes Administration List page.
-
Click Admin to go to the Admin Home Page.
-
Click Catalog Definition in the Products section.
The Supported Products page opens.
-
In the Navigation column, select Attributes and then click List.
The Attributes Administration List page opens.
-
-
Click Add. The Attribute Editor page opens.
-
Enter information for the fields listed below.
Note: Fields preceded by an asterisk (*) are required.
Field Description *Name
Enter the attribute name.
*Variable Name
The Variable Name field populates automatically. Variable names can only contain alpha-numeric characters and underscores. The entry can be changed before saving, but after saving the value is read-only.
Note: Customers should not use any of the following names for Configuration attribute variable names. Using these values may cause issues with customer configurations and could possibly alter site functionality.
- action_id
- bm_cm_process_id
- _bom_
- bs_id
- commerce_doc_url_params
- commerce_list_id
- document_id
- document_number
- folder_id
- formaction
- from_config
- scrollTop
- shopping_cart_id
- step_id
- token
- version_id
*Category Select Configurable Attribute or Signed Punch-in Attribute.
A Signed Punch-in Attribute functions identically to Configuration attributes except they require verification of digital signature data before pricing data is provided to the end customer. See Signed Punch-in Attributes for more information.
Array Type
Select this checkbox if the attribute can be used as a column in an array set.
Refer to Managing Arrays and Sets for more information.*Data Type
Select Currency.
Attribute Type Select Text Field. -
Click one of the following:
- Cancel to return to the Attributes List page without saving changes.
- Add and New to save changes and create another attribute.
- Add to save changes and open the Text Attribute Editor, proceed to Edit a Currency Attribute.
Edit a Currency Attribute
-
Navigate to the Attributes Administration List page.
-
Click Admin to go to the Admin Home Page.
-
Click Catalog Definition in the Products section.
The Supported Products page opens.
-
In the Navigation column, select Attributes and then click List.
The Attributes Administration List page opens.
-
-
Click the name of an attribute with Text in the Attribute Type column, or create a new attribute.
The Text Attribute Editor page opens.
Note: The Attribute Editor defines the default display type properties for all layouts.
Field Description Name
The name of the attribute
The Name value appears as the attribute label when this item is added to a Configuration layout.Display Type
The following Display Types are available:
- Legacy Display Type: Text
- JET Display Type: Text or Spinner
Description
The attribute description.
When an attribute Help Icon is displayed on a layout, the description appears when the user hovers over the help icon. Refer to Help Icons for more information.
Field Description Set Type - None: The user can input any value without encountering an error message.
-
Set: A recommendation rule can change the value entered by the user unless the attribute is locked by the user.
-
Auto Lock - When Auto Lock is on, user selections made to an attribute after a Recommendation rule “Set” the attribute to a different value will be retained if the Recommendation Rule is fired again (such as upon an Update). Auto Lock Example
- Recommendation rule 1 runs and sets Attribute X to A. The user then sets Attribute X to B. The user then clicks Update, and Attribute X retains its value of B. The recommendation message defined in Recommendation rule 1 for option A will appear.
- Auto Lock is on by default for all Recommendation rules that have a set type of “Set.” The Admin can turn Auto Lock off within an attribute by selecting “Set” for the set type and by not selecting Auto Lock. If this were done to Attribute X, the user would experience the following:
- Recommendation rule 1 runs and sets Attribute X to A. The user then sets Attribute X to B. The user then clicks Update, and Recommendation rule 1 runs and sets Attribute X to A.
-
- Forced Set: A recommendation rule will change the value of the attributes regardless of what the user enters and if the attribute is locked or not.
Required
This will require the user to enter a value before proceeding to a commerce transaction.
Hidden This attribute will not appear to the user. It can be used in rules.
Auto Update This will by updated by the system without the user invoking an action.
Hide Transaction
This attribute is hidden within a commerce document.
Status
-
Active: An attribute that is active will appear to the buyer and/or be included in rules.
All attributes are active by default.
- Inactive: An inactive attribute cannot appear in a rule to the user.
- Internal: An internal attribute will only appear to FullAccess users.
-
Show Start/End Dates: Click to specify how long the attribute will remain in the chosen status.
If no duration is specified, the attribute maintains its status until the administrator changes it.
An drop-down appears for every currency defined for CPQ. Select the decimal precision.
Display Type Field Options Text - Default: (Optional) Enter a default value for the attribute.
- Validation: Select a validation option.
- None - A validation will not be run.
- Range Check- Enter a Minimum Value and a Maximum Value
Spinner - Default: (Optional) Enter a default value for the attribute.
- Validation: Select a validation option.
- None - A validation will not be run.
- Range Check- Enter a Minimum Value and a Maximum Value
- Increment Value: Enter the value the for the spinner increments
- This field is required for Spinner Display Types
-
Select one of the following options:
-
If translations are required, click Translations and provide translated values for the label and description fields.
- Click Apply to save changes and remain on the Attribute Editor page.
-
Click Update to save changes and return to the Configurable Attributes Administration List.
-
Click Update and New to define another attribute.
-
Click Back to return to the Configurable Attributes Administration List without saving changes.
-
Use Cases
Currency attributes can be used in the Condition, Action, Condition Input and Action Input like other configuration attributes. In advanced functions, currency is treated as a float.
- Currency attributes in Condition – Currency attributes can be used in the Simple and the advanced condition.
- When used in the Simple Condition, the following options are available as Operators: “=”, “Not =”, “>”, “<”, “>=”, “<=”
- The simple condition grid also supports ranges for currency attributes.
- Currency Attributes in Action – Recommendations, Constraints and Hiding rules can be defined on currency attributes.
- Simple action for constraint rules allow the FullAccess user to constrain a range of values for currency attributes
$BM_UNCHANGED_NUM$
is supported for array type currency attributes
For a multi-currency application, if the user currency is not the same as the base currency, then exchange rates are applied to convert the currency attribute value to the corresponding value in the base currency for use in BML.
Anything returned from BML is in base currency and exchange rates are applied on the way back out.
Currency Attributes can be displayed in the Default and Advanced Templates.
Currency can be displayed in the Search Flow in the Default or Advanced Template
- Currency in Function to evaluate Result Set – Only unformatted currency is passed into the Function to evaluate Result Set. The currency will be formatted on the Search Result page based on the current user’s session currency.
- Currency in pop-up function – Formatted currency must be passed into pop-up function as currency formats will not be applied on the end user side.
Currency attributes in BML and BML Library
The following functions have been provided for currency attributes:
- formatascurrency: This function takes a number and returns it as a formatted string
- Syntax: String formatascurrency(Float x, [String currencyCode]
- Example: formatascurrency(32.15, "EUR"); will return the string "€32,15".
- getcurrencyvalue: This function takes a formatted currency string and returns the numeric value
- Syntax: Float getcurrencyvalue(String value, [String currencyCode])
- Example: getcurrencyvalue("€32,15", "EUR"); will return the float 32.15
Notes
- NULL and blank Integer values are treated as separate values:
- NULL= 0
- Blank = ""
- Using NULL as an attribute value is strongly discouraged.
- If you use logic that tests for NULL values in rule conditions or BML, confirm that the logic takes this difference into account.
A FullAccess user can choose to display currency in the printed document using the formatting functions available.
Currency values are carried from Configuration to Commerce and can be displayed on the sub-document in the format of the document currency.
Attribute range calculations are validated on the Value Punch-In.
Example: If the value was passed in the URL to the Configuration, it will be validated and an error message will appear.
This affects both Mobile and Desktop.
In Configuration, currency attributes are displayed in the format of the session currency of the user.
Have as few attributes "auto-update" as possible.