Oracle AI Agent Studio - Same Variables Resolve in Header but Not in Nested JSON Payload
Hi Community,
We are facing an issue with payload generation in Oracle AI Agent Studio while invoking a REST API from an agent workflow.
Some variables are resolved correctly at the top level of the payload, but the same values remain unresolved in nested JSON objects/arrays.
Example:
{
"BuyingPartyId": "300***********",
"PaymentTermsCode": "4",
"billToCustomer": [
{
"PartyId": {PartyId}
}
],
"shipToCustomer": [
{
"PartyId": {PartyId}
}
],
"lines": [
{
"PaymentTermsCode": {PaymentTermsCode}
}
]
}
We have already tried handling this through prompt instructions by explicitly storing and reusing the fetched values across multiple payload locations.
For example, we instructed the agent to:
- Use the fetched
PartyId value for:BuyingPartyIdbillToCustomer[].PartyIdshipToCustomer[].PartyId
- Use the fetched
PaymentTermsCode value for:- Header
PaymentTermsCode lines[].PaymentTermsCode
We also added instructions to replace all placeholders before invoking the REST API and to ensure that no unresolved placeholders remain in the final payload.
However, the issue still persists.
In the generated payload:
BuyingPartyId is populated correctly.- Header-level
PaymentTermsCode is populated correctly. - However,
PartyId inside billToCustomer and shipToCustomer remains unresolved. PaymentTermsCode inside lines remains unresolved.
As a result, the downstream API receives unresolved placeholders and returns a payload parsing error.
Questions
- Are there any known limitations with variable/placeholder substitution inside nested JSON arrays or objects in Oracle AI Agent Studio?
- Does Agent Studio support reuse the same variable in multiple locations within a request payload?
- Is there a recommended way to map a fetched value (for example,
PartyId or PaymentTermsCode) to multiple sections of the same payload? - Has anyone experienced variables resolving correctly at the header level but not in nested payload structures? If so, how was it resolved?
Any guidance or best practices would be greatly appreciated.
Thank you.