How to Register OIC Integration as an AI Agent
Sample Example of: Invoice Approval with AI Agent
audience: users who view this should be well versed with OIC programs, as this is intended to show up the AI agent configuration sample for existing OIC sample program
1. Introduction
This document provides a step-by-step guide on how to create an Oracle Integration Cloud (OIC) integration that determines an approver name based on an invoice amount using a lookup table. Furthermore, it details the process of registering this integration as an Agentic AI Tool within OIC, enabling it to be consumed by AI agents for automated workflows. This guide aims to provide clear instructions with navigation paths and illustrative screenshots to facilitate the implementation.
2. Workflow Overview
The following diagram illustrates the end-to-end workflow from the user prompt to the AI agent invoking the OIC integration and retrieving the approver name from the lookup table.

3. Prerequisites
Before proceeding with the steps outlined in this guide, ensure you have the following:
- Access to an Oracle Integration Cloud (OIC) instance (version 3 or higher).
- Appropriate administrative privileges within the OIC instance to create integrations, lookups, and AI agents.
- Basic understanding of OIC concepts, including integrations, adapters, and lookups.
- An active OCI Generative AI connection configured for AI Agent functionality.
3. Creating the OIC Integration
3.1. Creating a Lookup Table
Lookup tables in OIC are essential for mapping input values to corresponding output values without modifying the integration logic. In this scenario, we will create a lookup table to map invoice amount ranges to specific approver names.
Navigation: From the OIC home page, navigate to Design > Lookups.
Click on Create to define a new lookup table. Provide a meaningful name, such as InvoiceApproverLookup, and add columns for AmountLimit (Source) and Approver (Target). Populate the lookup table with data that defines your approval hierarchy.

For instance:
AmountLimit
Approver
1000
Junior Manager
5000
Senior Manager
10000
Director
This table will be used to determine the approver based on the invoiceAmount provided to the integration.
Edit the domain names as below and enter all values

Save the changes as below


Proceed to next step of creating new OIC
3.2. Designing the Integration Flow
Next, we will create a new App Driven Orchestration integration that will receive the invoice amount, perform the lookup, and return the approver name.
Navigation: From the OIC home page, navigate to Design > Integrations.
Click on Create and select App Driven Orchestration. Provide a name for your integration, for example, InvoiceApprovalIntegration, and a brief description. This will open the integration canvas where you will design the flow.

3.3. Configuring the REST Adapter
The integration will be exposed as a REST endpoint to receive the invoiceAmount.
Navigation: Drag and drop a REST adapter onto the canvas as the trigger (start) of your integration.
Configure the REST adapter with the following details:
- What do you want to call the endpoint?: InvoiceApprovalService
- What does this endpoint do?: Receives invoice amount and returns approver
- What is the endpoint's relative resource URI?: /invoiceApproval
- What action do you want to perform on the endpoint?: POST
- Configure request payload for this endpoint: Check this option.
- Request Media Type: JSON
- Request Sample: Provide a sample JSON payload, e.g., {"invoiceAmount": 1500}.
- Configure response payload for this endpoint: Check this option.
- Response Media Type: JSON
- Response Sample: Provide a sample JSON payload, e.g., {"approverName": "John Doe"}.




3.4. Implementing the Lookup Logic
After receiving the invoice amount, the integration needs to use the lookup table to find the corresponding approver.
Navigation: Drag and drop a Map activity onto the canvas after the REST trigger. Connect it to the REST trigger.
In the mapper, you will use the lookupValue function to retrieve the approver name. The lookupValue function requires the lookup table name, source column, target column, and the value to look up. It also requires a default value if no match is found.
Map the incoming invoiceAmount to a variable, and then use this variable within the lookupValue function. The function call will look similar to this:
lookupValue("InvoiceApproverLookup", "AmountLimit", "Approver", /nssrc:execute/nssrc:Input/invoiceAmount, "Default Approver")
Map the result of this lookupValue function to an output variable, for example, approverName.

3.5. Configuring the REST Response
Finally, the integration needs to send back the determined approver name as a response.
Navigation: Drag and drop a REST adapter onto the canvas as the invoke (end) of your integration. Connect it after the Map activity.
Configure this REST adapter to return the approverName in the response payload. Map the approverName variable from the previous Map activity to the response payload's approverName field.
Save and activate your integration. Ensure it is successfully deployed and running.
Run a sample run as below to make sure the OIC is fine

4. Registering the Integration as an Agentic AI Tool
To enable an AI agent to utilize your OIC integration, you must register it as an Agentic AI Tool. This makes the integration discoverable and callable by AI agents [1].
Navigation: From the OIC home page, navigate to Design > Projects. Select the project where your InvoiceApprovalIntegration is located. In the Integrations section, find your integration.
Click on the Actions menu (usually represented by three dots) next to your integration and select Register as Agentic AI Tool.




Click on AI agent tool,
A dialog will appear where you need to provide:
- Tool Name: A clear, concise name for the tool (e.g., GetInvoiceApprover).
- Tool Description: A descriptive explanation of what the tool does. This description is crucial as the AI agent uses it to understand when and why to invoke this tool (e.g., Retrieves the approver name for a given invoice amount based on predefined rules. Input: invoiceAmount (number). Output: approverName (string)).


After providing the necessary details, click Register. Your integration is now registered as an Agentic AI Tool.
5. Configuring the AI Agent
With the integration registered as an AI Tool, you can now configure an AI agent to use it. This involves defining a thinking pattern and associating the tool with the agent [2].
Navigation: From the OIC home page, navigate to Design > AI Agents.
5.1. Creating a Thinking Pattern
Before creating an AI agent, you need to define a thinking pattern that guides the agent's reasoning process. The ReAct pattern is commonly used for this purpose [3].
Click on Create in the AI Agents section and select Thinking Pattern. Provide a name for your thinking pattern (e.g., InvoiceApprovalReActPattern) and select ReAct as the pattern recipe. Add a description if needed, then click Add.

Please provide the guidelines as below
Strictly follow all guidelines. It is mandatory that you reflect on all guidelines provided.
You should follow the ReAct agent pattern (Reason + Act) when generating a response.
Pattern:
Think - using your internal reasoning.
Action - Invoke tools to get information, including additional human input.
Observe - Process tool response using your internal reasoning.
Repeat - Repeat until finished.
At each step you provide your think, action, and observe rationale.
You should always attempt to get the most relevant information based on tool use.
Do not guess or infer tool arguments except for the following reasons:
You are given specific guidance by the tool on inferring a tool argument.
You have previous context to make a reasonable assumption.

Now, click on LLM connections and provide as below
Instead of LLM we can also use GEN AI 26 which is available as below

5.2. Creating the AI Agent
Now, create the AI agent and associate it with your registered integration tool.
Click on Create in the AI Agents section and select AI Agent. Provide the following details:
- Name: A name for your AI agent (e.g., InvoiceApprovalAgent).
- Thinking Pattern: Select the InvoiceApprovalReActPattern you created.
- LLM Connection: Choose your configured OCI Generative AI connection.
In the Tools section, click Add Tool and select your GetInvoiceApprover tool from the list of registered Agentic AI Tools. Ensure the tool's input and output parameters are correctly recognized.
Save your AI agent configuration.

Very important step, after performing modify the lookup with your values

If you want to use OCI's native models, use models like:
cohere.command-r-plus
cohere.command-r
meta.llama-2-70b-chat
meta.llama-3-70b-chat
depends upon the region we use
for comprehensive guide here is the list of models available across different regions
https://docs.oracle.com/en-us/iaas/Content/generative-ai/model-endpoint-regions.htm
prerequisites to follow
https://docs.oracle.com/en/cloud/paas/application-integration/integrations-user/prerequisites.html
Next step is
Add and Configure the AI Agent
We now have all that we need to create the Simple Expense Approval agent. We created an integration and registered it as a tool, configured the ReAct agentic AI pattern, and configured the LLM.
- In the left navigation pane, select AI Agents .
- In the AI Agents box, click Add .
The Create agent panel is displayed.
- Configure required fields for your agent:

Once create, please provide the role as below
you are an Invoice Approval name agent where if invoice Amount is entered you will return the approver name
enter guidelines as below
1.user enters the invoice amount
2.fetch the Approver name
3.return the approver name to user
Select the tool from the tab which is already created


Now the agent is ready with all details, next step is to activate and run it


Enter as above and click on run
Please note some times you might get error as below if model is not available in your region
status=404, reason=Not Found}}]]></ns0:errorPath>ns0:instance<
![CDATA[{ "code": "404", "message": "Entity with key meta.llama-3.3-70b-instruct not found" }
https://docs.oracle.com/en-us/iaas/Content/generative-ai/model-endpoint-regions.htm
6. Conclusion
By following these steps, you have successfully created an OIC integration that uses a lookup table to determine an approver based on an invoice amount. Furthermore, you have registered this integration as an Agentic AI Tool and configured an AI agent to leverage this tool. This setup enables automated invoice approval workflows driven by AI, enhancing efficiency and reducing manual intervention.
References
https://docs.oracle.com/en-us/iaas/Content/generative-ai/model-endpoint-regions.htm
https://docs.oracle.com/en/cloud/paas/application-integration/integrations-user/prerequisites.html