Hi @Pravinrams1 ,
The "decisioning engine not ready" error in Adobe Target typically occurs when the on-device decisioning artifact (rules.json) hasn't been fully downloaded before making a getOffers request. This issue is more prevalent in production environments due to differences in network latency and caching compared to non-production environments.
Potential Solution:
To ensure that the getOffers call is made only after the decisioning artifact is ready, you can listen for the ARTIFACT_DOWNLOAD_SUCCEEDED event. This event indicates that the artifact has been successfully downloaded and the decisioning engine is ready to process requests.
Here's how you can modify your code:
document.addEventListener(adobe.target.event.ARTIFACT_DOWNLOAD_SUCCEEDED, function() {
adobe.target.getOffers({
request: {
execute: {
mboxes: [{
index: 0,
name: viewName
}]
}
}
}).then(function(response) {
setadobeData(response.execute?.mboxes[0]?.options[0].content);
}).catch(function(error) {
console.log('AT: getOffers failed - Error', error);
}).finally(() => {
adobe.target.triggerView('vulcan_search', {
page: true
});
});
});