ConnectIT 365
Configuration templates
On the General tab of the import definition you can set the Use Config. Template setting to true. This will make a new tab appear.
On this Configuration Templates tab, additional setup should be done. There are two ways to use configuration templates.
The first and easiest to setup is to use the same configuration template for each record created by the definition.
In this case, leave Code is Temporary Value at false and for Config. Template Code select the template you want to use.
A template can be applied right after the key, which is in this case most likely okay. If your definition requires to apply the template later on, you can choose to apply after Field and select the definition line after which the template will be applied.
Â
The second possibility is to apply different configuration templates, based on an imported value. For example, in case you are importing customers, you might want to apply a certain template based on the country code of the imported customer.
In this case, you will need to process the field with the country code before you can apply the configuration template.
So, on the Configuration Template tab, for Apply After, choose Field. For Apply after Line No. select the definition line for the country code.
Next we have to set up some conversions to translate country codes to configuration templates.
For example, create a conversion (code: COUNTRY2TEMPLATE)
External Value | Internal Value |
---|---|
NL | CUSTDOMESTIC |
BE | CUSTEUROPE |
DE | CUSTEUROPE |
FR | CUSTEUROPE |
US | CUSTEXPORT |
Add the following functions to the country code definition line:
SETTEMPVAL (e.g. CUST_COUNTRY, this saves the original country code value as temporary value).
CONVEXTTOINT (COUNTRY2TEMPLATE, this converts the country code to a template code, based on the conversion table).
SETTEMPVAL (e.g. CUST_TEMPLATECODE, this saves the template code value as temporary value).
GETTEMPVAL (CUST_COUNTRY, this retrieves the original country code value).
Now the original country code is written to the country code field. After this, the configuration template will be applied.
To finish the Configuration Template tab, set Code is Temporary Value to true, and for Config. Template Code enter CUST_TEMPLATECODE.
Now, in case the country code was NL, the CUSTDOMESTIC template will be applied, while in case the country code was US, the CUSTEXPORT template will be applied, and so on.
IDYN 2024