An API call can succeed while the answer is "no". A product may be unavailable, or a request may be accepted for processing without being complete.
In Adobe Journey Optimizer (AJO), a custom action calls an external API. Its response can guide the next journey step. The useful design work is deciding what each answer means.
Agree the response shape
The response payload is the data returned by the API. Agree a small, predictable JSON object with the API owner, then paste a representative success sample into the custom action's Response field.
For an illustrative availability check, use {"eligible": true, "stock": 12}. eligible is a Boolean, meaning true or false; stock is a number. Keep those types consistent, and avoid field names that contain a dot or start with $, as AJO does not accept them. [3]
In AJO: The sample defines the fields AJO retrieves each time the action runs. The complete response must be a JSON object, not a bare array. Arrays inside an object are supported, but mixed-type arrays are not. [1]
Treat missing required fields as an explicit case. Do not turn an unknown answer into permission to continue.
Check the answer on the success path
AJO only sends a call down the error path when the HTTP status is outside the 2xx range or another error occurs. A 200 that says "no" still takes the success path, so the business decision has to happen there. [1]
For an action named CheckAvailability, a journey condition can use @action{CheckAvailability.eligible} == true. If the answer is false, take the alternative business path. [1]
In AJO: Response fields can be used in conditions, subsequent actions and message personalisation. For messages, find them under Contextual attributes; the expression above is journey-condition syntax, not an email template. [1]
HTTP 202 means accepted, not completed, yet AJO treats it as a success like any other 2xx. Confirm completion through a separately designed event or status check before telling someone the task has finished. [1][4]
Give failures their own path
Select "Add an alternative path in case of a timeout or error" on the action in the journey.
In AJO: Inspect jo_status_code on that path. Values include http_400, timedout, capped and internalError. You can also configure a failure response sample; its fields appear under errorResponse. Without that configuration, the node is unavailable. [1]
With throttling, calls can wait in a queue for up to six hours. Calls dropped after that are also logged as timedout, so check the logs before assuming the endpoint was slow. [2]
For a generic failure payload {"code": "ITEM_UNAVAILABLE"}, your condition can inspect @action{CheckAvailability.errorResponse.code}.
Choose the next step deliberately: skip the promise, use an approved alternative, or report the problem. Be careful with defaultValue in expressions. A convenient default can hide a failure and show "completed" when nothing happened. [1]
Plan for retries and uncertain outcomes
In AJO: The external-call timeout is set per journey. It defaults to 30 seconds and can be set from one to 30 seconds. Up to three retries can follow the first attempt within that budget, and the retry count cannot be changed. A call still running when the timeout ends is cancelled, not retried. [2]
Your implementation: For writes, use duplicate protection such as an idempotency key: a stable identifier that lets your service recognise repeated attempts at the same operation. AJO retry handling does not make your endpoint safe to repeat.
Keep response data fresh. A stock check before a long wait should not become an availability promise later. If you need the value outside the journey, plan where it is stored rather than assuming it is kept.
Test the answers you hope not to get
Use journey test mode and inspect actionsHistory for returned payloads. Configured failure payloads are included for failed calls. Only newly created actions include jo_status_code by default; Adobe says to update and save older ones. [1]
Before release, make sure an unknown answer cannot quietly become a success message.
One call per person
It is easy to think of a custom action as one integration. AJO sees it differently: every profile that reaches the action makes its own call, even when the endpoint returns the same answer for everyone. [1]
Those calls share a cap. By default, custom actions are limited to 300,000 calls per minute, per host, per sandbox, and every retry uses a slot. Endpoints slower than 0.75 seconds are routed to a separate, slower service. [2]
So the response design and the endpoint's speed decide more than what happens next. They decide how many people the journey can serve each minute.
References
Product documentation checked on 25 November 2026. Payloads and graphics are generic design examples, not AJO screens.
[1] Custom action responses, expressions and error status
[2] External-call timeouts, retries, throttling and capping