This extension point allows conversion of the user’s language code into a text’s language code, in case they are not the same. Currently, this is only used for Product Sales Text. Previously it is known as “User language to text language mapping”. We provide the additional functionality to retrieve sales text of another distribution channel other than quote’s distribution channel (i.e., reference distribution channel).
Initial Setup
Upload the script file to the Groovy Script with name “Sales text parameter mapping”. Please refer to Groovy Service Introduction - Uploading a New Groovy Script for more details of how to do this.
Additional Binding Variables
The following binding variable(s) are made available for this extension point, in addition to the common binding variables listed in Groovy Service Introduction - Common Binding Variables.
Variable Name |
Class |
Description |
---|---|---|
textType |
String |
The type of text the language code is meant for. Currently, this will always be “SALES_TEXT” |
salesTextInputParam |
Map |
The map that represents the input parameters to retrieve sales text. It has three main keys: SALES_ORG, DIST_CHAN, REF_DIST_CHAN. |
salesTextInputParam.SALES_ORG |
String |
The ERP Id of quote’s sales organization. |
salesTextInputParam.DIST_CHAN |
String |
The ERP Id of quote’s distribution channel. |
salesTextInputParam.REF_DIST_CHAN |
String |
Its value is blank. It is open to bet assigned from groovy extension for ref distribution channel. |
Expected Output
- A string representation of the language code that should be used when retrieving the text.
- To retrieve product sales text,
Sales Org ERP Id is taken from salesTextInputParam.get(“SALES_ORG”).
Distribution channel ERP Id is taken from salesTextInputParam.get(“DIST_CHAN”).
If REF_DIST_CHAN is assigned from groovy extension and the sales text is not found with current quote’s sales org and distribution channel, it will use as a fallback distribution channel to show sales text.
The syntax of assigning reference distribution channel is salesTextInputParam.put(“REF_DIST_CHAN”, “XX”) where XX is the ERP ID of ref distribution channel.
Script Execution
The script that has been uploaded for this extension point will be executed automatically when retrieving a text data. Currently, this is only supported for retrieval of Sales Text data from the line item table or in the Product Catalog.
If no script has been uploaded for this extension point, or if the return value is not a string, the system will fall back to the default, which is to use the current session’s language.