- 06 Sep 2024
- 1 Minute to read
- Print
- DarkLight
Sales Text Parameter Mapping
- Updated on 06 Sep 2024
- 1 Minute to read
- Print
- DarkLight
Purpose
Allows you to run the script to convert the user's language code into a text's language code. Use it for the product sales text.
Additionally, it allows you to retrieve sales text from a distribution channel other than the quote's distribution channel.
Setup
Upload the script for Sales text parameter mapping.
For details about uploading and configuring Groovy scripts, read Upload a Groovy script.
Binding variables
In addition to the common binding variables, the following binding variables are available for this extension point.
Variable name | Class | Description |
---|---|---|
textType | String | Text type to which the language code applies. The supported value is SALES_TEXT. |
salesTextInputParam | Map | Map that represents the input parameters to retrieve the sales text. Supports the following three main keys: SALES_ORG, DIST_CHAN, and REF_DIST_CHAN. |
salesTextInputParam.SALES_ORG | String | ERP ID of the quote’s sales organization. |
salesTextInputParam.DIST_CHAN | String | ERP ID of the quote’s distribution channel. |
salesTextInputParam.REF_DIST_CHAN | String | Value is blank. The value can be assigned through a Groovy extension for the reference distribution channel. To assign the reference distribution channel, use the following syntax: salesTextInputParam.put("REF_DIST_CHAN", "XX") where XX is the ERP ID of the reference distribution channel. |
Expected output
The script should return:
- String representation of the language code that should be used when retrieving the text.
- Retrieved product sales text.
The script fetches data in the following way:
- Sales organization ERP ID is fetched from
salesTextInputParam.get("SALES_ORG")
. - Distribution channel ERP ID is fetched from
salesTextInputParam.get("DIST_CHAN")
. - If
REF_DIST_CHAN
is assigned through a Groovy extension and the sales text is not found using the current quote’s sales organization and distribution channel, the system uses a fallback distribution channel to display the sales text.
Script execution
The script uploaded for this extension point is run automatically when a user retrieves sales data text in the line item table or in the product catalog.
If no script is uploaded for this extension point or if the returned value is not a string, the system uses the current session's language.