Data Source Applications¶
A data source application tells AI Agent Studio where to send REST requests to another Oracle application and how to obtain an OAuth access token for that application. The registration holds the target API's base URL and authentication settings. A Business Object selects that registration and defines the operations that a workflow or agent can call.
For example, an Oracle Transportation Management (OTM) registration can support a shipment lookup and other OTM operations. Each Business Object function defines its own HTTP method, resource path, parameters, and response fields. Functions that use the same registration share the application's connection settings.
Register a data source application¶
Before adding a registration, work with the target application's identity administrator to configure a confidential application in its identity domain. Obtain the client ID, token endpoint, OAuth scope, and signing credentials specified by that application's setup guide. The target application must authorize the identity used by the integration to call the required endpoints.
- Open AI Agent Studio and select Credentials > Data Source Applications.
- Select Add Data Source. If a delivered integration already provides an entry for your application, use the entry specified by that integration's setup guide.
- In Add Data Source Application, enter the connection details and select Save.
| Field | What to enter |
|---|---|
| Name | The name shown in the Business Object's data source list. Use the name specified by the product setup guide for a delivered integration, such as OTMENV for OTM. |
| Code | The identifier for the registration in AI Agent Studio. |
| Base URL | The target application's API base URL, such as https://otm.example.com. Put the operation path on the Business Object function. |
| IDCS URL | The identity URL specified by the target application's setup guide. For OTM, use its identity domain's OAuth token endpoint, which ends in /oauth2/v1/token. |
| Client ID | The identifier for the confidential application registered in the target application's identity domain. |
| Scope | The OAuth scope configured for access to the target API. |
| Public Key | The public signing material required by the integration. For OTM, enter the full signing certificate, including its header and footer. |
| Private Key | The corresponding signing key. For OTM, enter the full private key, including its header and footer. Store it in the credential entry and keep it out of function headers and examples. |
Use a data source in a Business Object¶
- In Resources > Business Objects, select Add and enter the Business Object details.
- Set Resource Type to Other Data Source Application. In Oracle Data Source Application, select the registration you want to use. The object-level Resource Path is read-only for this resource type.
- Under Business Object Functions, select Add Function. Set the function's Operation Type and enter the path relative to the registered base URL in Resource Path, starting with
/. Define the inputs, headers, and sample response required by the operation. See Define the functions. - Select Create or Create and Close. Call the function from a Business Object Function node or expose it to an agent through a Business Object tool.
When the function runs, AI Agent Studio uses the selected registration to obtain an OAuth token and call the target API. The request combines the registered API base URL with the function's resource path.
Example: Look up an OTM shipment¶
- Configure the OTM registration named
OTMENVwith your OTM base URL and identity settings. - Create a Business Object named OTM Shipments with Resource Type set to Other Data Source Application and Oracle Data Source Application set to OTMENV.
- Add a function named
Get_Shipmentwith Operation Type set to GET and Use Native Authentication set to Yes. Set the function's Resource Path to/logisticsRestApi/resources/v2/shipments/{shipmentGid}?fields=shipmentGid,shipmentName. In Parameters, describeshipmentGidas the required shipment global ID. - In Examples, enter a representative Sample Response using the fields shown below, then save the object.
If your environment includes the delivered OTM Shipment BO, you can select its getShipment_shipments function for the same lookup. It uses OTMENV and accepts the same shipmentGid input. Its response can contain additional fields.
Map the workflow input¶
This example invokes the workflow through its webhook.
- In Settings > Triggers > Webhook, add a parameter named
shipmentGidwith Type set to String and select Apply. - Add a Business Object Function node and use
LOOK_UP_OTM_SHIPMENTas the node code in this example. Select OTM Shipments andGet_Shipment, or select the delivered object and function. In Parameters, mapshipmentGidto{{$context.$triggers.REST.$input.shipmentGid}}. - To return the lookup result to the webhook caller, add a Return node after the lookup. Set Return Value to
{{$context.$nodes.LOOK_UP_OTM_SHIPMENT.$output}}. -
Save and publish the workflow. Use the webhook endpoint with a request body like the following. Replace the example shipment ID with a valid ID from the OTM instance registered in
OTMENV.
Read the output¶
The following is an illustrative shipment response. It shows the two fields requested by the example function.
In a downstream node, read the ID with {{$context.$nodes.LOOK_UP_OTM_SHIPMENT.$output.shipmentGid}} and the name with {{$context.$nodes.LOOK_UP_OTM_SHIPMENT.$output.shipmentName}}. For a webhook call, poll the job status and read the returned result from output in the response whose status is COMPLETE.
If the token request fails, check the identity endpoint, client ID, scope, and signing credentials. If the API rejects a request after token acquisition, check the identity's permissions in the target application and verify the resolved API path.