I'm reaching out for some assistance with a problem I've encountered while setting up hooks in the Business Manager of my Salesforce Commerce Cloud instance.
I've activated the hooks in the BM and created a hooks.json file, which I've also referenced in my package.json.
My hooks.json looks like this:
{
"hooks": [{
"name" : "app.template.afterFooter",
"script" : "./cartridge/scripts/hooks/initGlobals.js"
},
{
"name": "dw.ocapi.data.customer_list.customer.afterDELETE",
"script": "./cartridge/scripts/hooks/customerHooks.js"
}
]
}
Additionally, I've crafted my customerHooks.js file as follows:
var HookManager = require("dw/system/HookMgr");
var LOGGER = require('dw/system/Logger').getLogger('logme');
exports.afterDELETE = function afterDELETE(customerListId) {
var Status = require('dw/system/Status');
LOGGER.debug('Test');
return new Status(Status.OK);
};
However, despite this setup, I'm not seeing any logs in the Log Center related to this hook. Could anyone provide insights into what might be going wrong or what I might be missing?
Just to add a point, the hook :"app.template.afterFooter" is working fine and i have a log.
Thank you in advance for your time and help!
Best regards.