AT: getOffers failed - Error Error: Unable to fulfill request; decisioning engine not ready. | Community
Skip to main content
Level 2
February 10, 2025
Question

AT: getOffers failed - Error Error: Unable to fulfill request; decisioning engine not ready.

  • February 10, 2025
  • 1 reply
  • 604 views

I am getting an error "decisioning engine not ready" in production. Only preview/QA link in non-prod and production seems to be working fine. What I am doing wrong here? please help. 

My code:

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 }); });

I have the react state which stores the response from the Adobe.  

1 reply

Gaureshk_Kodag
Adobe Employee
Adobe Employee
February 11, 2025

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
});
});
});