Using Country- or Region-Specific SuiteApps to Retrieve Mappings
This section describes how you can use country- or region-specific SuiteApps to retrieve your mappings created in the Universal Mapping Assistant SuiteApp. You can then use your retrieved mapped data in compliance with your country's tax authority requirements.
When a mapping type instance is implemented and provided in the Universal Mapping Assistant SuiteApp, it's possible to start creating mappings. These mappings can be retrieved by calling the customscript_uma_sl_map_retriever Suitelet, as shown in the following example:
require(["N/https"], function (NsHttps) {
NsHttps.requestSuitelet.promise({
scriptId: 'customscript_uma_sl_map_retriever',
deploymentId: 'customdeploy_uma_sl_map_retriever',
body: JSON.stringify({
mappingTypeId: 'UMA_SAFT_2_0_ACCOUNTS',
mappingTypeInstanceId: 'NO_SAFT_2_0_ACCOUNTS',
parameters: {
subsidiary: 1,
account: 1
}
})
}).then((response) => {
const responseBody = JSON.parse(response.body);
console.log(responseBody);
});
});
In this example, the HTTP request body specifies the parameters that are needed to retrieve a mapping:
-
mappingTypeId is the identifier of the mapping type.
-
mappingTypeInstanceId is the identifier of the mapping type instance.
-
parameters provides the information necessary to retrieve a specific mapping or a set of mappings, depending on the considered mapping type. In this example, to retrieve a SAF-T Account mapping, the caller must provide a Subsidiary ID and, optionally, a GL Account ID.
The result is a JSON object containing the results. The body property constitutes a collection of mappings in a format determined by the considered mapping type.
{
"success": true,
"body": [
{
"accountId": 1,
"groupingCode": "1000",
"groupingCategory": "balanseverdiForAnleggsmiddel"
},
{
"accountId": 2,
"groupingCode": "1020",
"groupingCategory": "balanseverdiForAnleggsmiddel"
}
]
}
For more detailed information about mapping retrievals, read the articles below: