When using real-time APIs (user event scripts), we need to identify the environment as well as the account id so that the data is sent to the correct database. In this case, we can add functionality in the library file or in the code to find the production account, and sandbox accounts and send data… Continue reading Identification of the production and sandbox accounts for real-time integration
Tag: is production
Check the account type
/** * @description Functions from N/config module encapsulated * @type {{isProduction(): boolean}} */const configFunction = { /** * To know whether the account is Production Environment or not * @returns {boolean} true when account is Production, false in all other scenarios */ isProduction() { var companyInfo = config.load({ type: config.Type.COMPANY_INFORMATION }); var ns_companyid = companyInfo.getValue({… Continue reading Check the account type