Create AI Agents That Answer FAQs in Order Management

Use an AI agent to help answer questions that your users have about how to create and manage sales orders in the Order Management work area.

You can upload various sources of information, such as policy documents, contractual agreements, and government regulations. The agent will use those sources to answer specific questions that you have about how to manage sales orders in the Order Management work area:xxxxxxxxxx

For example, how do I:

  • Return a sales order.
  • Cancel a closed sales order.
  • Split an order line.
  • Cancel a drop shipment that has a pending requisition.
  • Return only part of a sales order. Receive credit for the part I return, put the returned quantity back in inventory.
  • Make sure my sales order meets my country's trade agreement requirements.
  • Make sure my sales order meets environmental regulations to reduce global warming.

Summary of the Setup

  1. Get ready.
  2. Add your sources.
  3. Add an agent.
  4. Add and test your journey.

This example implements the agent in a guided journey. You can implement in other contexts.

Get Ready

Assume you want to create an agent to answer some of your more frequently asked questions about how to create and manage sales orders:

  1. Identify and get access to the source documents that contain your company's policies for managing sales orders, such as policy documents, contractual agreements, and government regulations.

    For this example, go to Technical Reference for Oracle Order Management (Doc ID 2051639.1), open the Payloads_and_Other_Example_Files.docx attachment, then download these files:

    • Using Order Management.pdf. Contains Oracle documentation that describes how to use Order Management.
    • Our Return Policies.pdf. Contains example return policies for a fictitious company.
  2. Make sure you have these privileges:
    • Manage Intelligent Agent (HRC_MANAGE_AI_AGENT_PRIV)
    • Access Intelligent Agent Chat (HRC_ACCESS_AI_AGENT_CHAT_PRIV)
    • Initiate Order (FOM_CREATE_ORDER_PRIV)
    • View Orders (FOM_VIEW_ORDERS_PRIV)
    • Revise Order (FOM_REVISE_ORDER_PRIV)
  3. Set up Visual Builder Studio. For details, see:
  4. Go to the Setup and Maintenance work area, then use the Manage Administrator Profile Values task to set these profile options to Y:
    Set This Profile Option So You Can

    ORA_HCM_VBCS_PWA_ENABLED

    Access the administrative interface.

    ORA_PER_GUIDED_JOURNEYS_SETUP_REDWOOD_ENABLED Use the guided journeys setup page.
    ORA_PER_AGENT_TASK_TYPE_GUIDED_JOURNEYS_ENABLED Set up agents in guided journeys.

Add Your Sources

  1. Go to Home > Tools > AI Agent Studio.
  2. On the AI Agent Studio page, click Tools.
  3. On the Tools Library page, click Add.
  4. On the New Tool page, set these values:
    Attribute Value
    Tool Type Document
    Tool Name Sources for FAQs
    Tool Code SOURCES_FOR_FAQS
    Family SCM
    Product Order Management
    Description Source documents to answer FAQs.
  5. Click Add under Documents, then set these values:
    Attribute Value
    Name My Policy Documents
    Description Source documents to answer FAQs.
  6. Drop these documents onto the Drag and Drop window:
    • Using Order Management.pdf
    • Our Return Policies.pdf
  7. Click Save, then click Create at the top of the page.
  8. On the Tools Library page, click the pencil in the row that has Sources for FAQs.
  9. On the Sources for FAQs page, in the Documents section, click the pencil for the sources you just added, change the status to Ready to Publish, click Save at the bottom of the page, then click Save at the top of the page.
  10. Go to the Scheduled Processes work area and run the Process Agent Documents scheduled process. Monitor its status until it says Succeeded.

Add an Agent

  1. Go back to AI Agent Studio, click Tools, search for and open your Sources for FAQs tool for editing, then verify that its status is Published.
  2. Click Agents > Add, set these values, then click Create:
    Attribute Value
    Name Sales Order FAQs
    Code SALES_ORDER_FAQS
    Family SCM
    Product Order Management
    Maximum Interactions 20
    Description Assistant that answers FAQs for sales orders.
    Prompt

    You are an expert on how to manage sales orders in Oracle Order Management. You help Order Entry Specialists and Order Managers to create and manage sales orders.

    You use the SOURCES_FOR_FAQS document tool to answer questions.

    You must follow these rules: - Don't exceed 30 words unless the user asks you to elaborate. - If a question has more than one answer, then give a summary of all of them.

  3. On the Sales Order FAQs page, click Tools (the hammer on the left side of the page), then search for SOURCES_FOR_FAQS.
  4. In the search results, click Add, then on the Sources for FAQs dialog, click Add.
  5. On the Sales Order FAQs page, click Create.
  6. Click Agent Teams > Add.
  7. In the New Agent Team dialog, set these values, then click Create:
    Attribute Value
    Agent Team Name Agents That Help Manage Sales Orders
    Agent Team Code AGENTS_THAT_HELP_MANAGE_SALES_ORDERS
    Family SCM
    Product Order Management
    Maximum Interactions 30
    Description Team of AI agents that help create and manage sales orders.
  8. On the Agents That Help Manage Sales Orders page, click agents, click Add next to Sales Order FAQs, then click Add again in the Sales Order FAQs dialog.
  9. Click . . . > View Details > LLM.
  10. Examine the prompt. You can modify it to meet your needs:
    Based on the information through the chat history and/or tool call responses, construct a clear, professional, and user-friendly answer to address the user's original query. Construct an answer that addresses the user's original query.
    Your answer should be directed towards the user and should be friendly, professional, and concise. If you are not able to answer the user's question based on the tool calls or through the chat history, you should let them know that you do not have access to that information.
    
    --ANSWER REQUIREMENTS--
    Your answer should be based only on the information available to you in the tool calling chat history. You should never invent or make up answers. If the question requires you to synthesize answers across several tool responses, you should do that. Note that some information may need to be summarized from across multiple places in a given object. Use your inference and semantic knowledge to derive the answer from the data without inventing anything.
    --ADDITIONAL REQUIREMENTS--
    * Do not mention tool calls, chat history, underlying operations, or system processes.
    * Keep the response natural and conversational without unnecessary preambles.
    * Provide a direct and engaging response without phrases like "Based on tool calls" or similar references.
    * Do not append any characters or trailing Periods (.) at the end of valid URLs.
    * If link is generated by DeepLink tool do not remove from response.
    
  11. Close the dialog, then click Publish.

Add and Test Your Journey

You can display the agent by itself or in a guided journey. For this example, display it in a journey:

  1. Go to Home Page > My Client Groups > Show More > ctrl+f, search for, then click Guided Journey.
  2. On the Guided Journey page, click Create, set these values, then click Create Draft:
    Attribute Value
    Name Guided Journey for Order Management
    Code GUIDED_JOURNEY_FOR_ORDER_MANAGEMENT
  3. On the Guided Journey for Order Management page, add this task, then click Save > Activate:
    Attribute Value
    Task Name Sales Order Agent
    Task Description Answer Questions for Sales Orders
    Task Type Agent
    Agent Type RAG Agent
    Agent SCM_ORDER_MANAGEMENT_AGENT

    The Order Management work area will display the Task Name and Task Description on the journey's banner. We recommend that you use headline capitalization so it's consistent with the work area's style.

  4. Go to Home Page > Order Management > Show More > Sales Orders (New).
  5. Click Settings and Actions > Edit Page in Visual Builder Studio.

    The browser opens a new tab for Visual Builder Studio.

  6. In Visual Builder Studio, set the JourneyCode property to GUIDED_JOURNEY_FOR_ORDER_MANAGEMENT, then click Publish.
  7. Go back to the tab that has your list of sales orders, then right-click > Reload

    Notice that the page displays your new agent inside the guided journey's banner.

    .
  8. Use the agent to ask various questions. Verify them against your source documents to make sure the answers are correct.
  9. Click the icon immediately to the left of the prompt on the guided journey, then select one of the sources that you uploaded. Ask the same question for different sources. Notice how the answer provides content only from the source that you select.

Guidelines

  • You can add as many source documents as necessary.
  • You can download Implementing Order Management.pdf from the technical reference and add it as a source. It contains Oracle documentation that describes how to implement Order Management. Note that it's very technical in nature and intended for the Order Administrator, not the Order Entry Specialist who uses the Order Management work area.
  • You can create more than one agent and more than one journey.
  • Your source document must be a .pdf file and it must not contain images. Otherwise, the scheduled process will fail.

For more, see: