Genpact AP Knowledge Center

Support

Configure AI-enabled Auto Tagging

V1.0

Overview

Genpact AP Advance supports an AI-enabled auto tagging system for invoices based on predefined rules. The cutting-edge functionality leverages the advanced AI to provide specific instruction prompts to the system, enabling it to act accordingly, and thus significantly improve the efficiency and accuracy of invoice tagging. 

One such use case is where Gen AI can automatically translate product service descriptions, which is particularly useful when language discrepancies arise between invoices and the system of record. In such cases, invoices are typically sent to manual queues for further processing. By activating Gen AI, the system can automatically translate and match the invoices, transitioning the process into a hands-free workflow.
For example, in the Europe region, a line-level auto-match may fail due to language differences (English versus German or Spanish), resulting in missing descriptions. The AI powered language translation can resolve the issue, ensuring accurate and complete invoice processing.

How it works?

  1. Specify invoices for AI: The user instructs the system to select the invoices that should be sent to AI. 
    For instance, instruct the system to pick invoices that are in the Ready for GenAI Tagging state.


  2. Send invoices to AI: The system then selects the invoices based on the specified instruction and sends them to AI. 
    The system selects the invoices in Ready for GenAI Tagging state.
  3. AI processes invoices: AI processes the selected invoices and tags them based on the prompts provided in the configuration.
    • On Invoice Line: Updates the GenAI Match Percentage, GenAI Match Reason, Purchase Order and PO Line Item.
    • On Invoice: Updates the User Action with GenAI Tagging Pass or GenAI Tagging Fail.


  4. Store actions and responses: AI records each response and the actions taken in the AP Invoice Extensions object.


  5. Display AI tagged invoices: The Invoice List page displays the AI tagged invoices, as shown below:

Configure AI-enabled auto tagging

  1. AI Integration Setup

  1. Log in to the Salesforce classic as an administrator.
  2. Go to All Tabs >> AP Integration >> Create New Integration as GenAITaggingAPI and add the following:
    • Token End Point URL: The URL to access the API endpoint.
    • Method: The type of HTTP request (GET or POST).
    • Authorization Token: The security token used to authenticate the API requests.


    • In the Run Prediction Criteria section, add Code Prediction.
      In the example below, the code prediction defines fields that AI will be using from POL and Invoice. Similarly, you can create you own code prediction.


      Additionally, specify the Batch Size to determine the number of invoices sent to AI during batch processing.

NOTE
We recommend having a batch size of 10 or fewer, with each invoice having no more than 20 line items and 50 PO line items.

  1. Define the Integration details in labels

  1. Log in to Salesforce classic as an administrator.
  2. Go to All Tabs >> Custom Labels >> AP_GenAI_TaggingConfigName and mention the same value that you have mentioned in Integration Name field above.

  1. Create record in the Gen AI System Configuration metadata

  1. Log in to Salesforce classic as an administrator.
  2. Go to Setup >> Custom Metadata Types >> Manage Records for Gen AI System Configuration >> GenAITagging, and add the following:
    • Gen AI Batch Where Clause: Provide system information to specify the invoices that should be sent to AI.
    • System Instruction Prompt: Provide instructions to Gen AI.
      For example, the System Instruction Prompt provides the following step-by-step instructions for matching invoice line items with purchase order lines.
      • Match Product/Service: Compare the product/service description and number of the invoice line with the purchase order line.
      • Translate if Needed: If the descriptions or numbers are not in English, translate them first.
      • Synonyms and Abbreviations: Match descriptions even if they contain synonyms or abbreviations.
      • Exclude Organization Names: Ensure the product/service description does not contain any organization names.
    • Response Format Prompt: Specify the expected format for a response.
      In this case, the format is as follows:
      PATTERN FOUND=[<Invoice Line Item Name>:<AP Ref No of Purchase order>:<Match Percentage>:<Matching Reason>]
      <Invoice Line Item Name>: The name of the invoice line item.
      <AP Ref No of Purchase order>: The reference number of the corresponding purchase order.
      <Match Percentage>: The percentage of matching between the invoice and purchase order.
      <Matching Reason>: The reason for the match (e.g., synonym, abbreviation).

  1. Define the Integration details in labels

  1. Log in to Salesforce classic as an administrator.
  2. Go to All Tabs >> Custom Labels >> AP_GenAI_TaggingMatadataName.
  3. Mention the Gen AI System Configuration name field value same as in step 3 (Create record in the Gen AI System Configuration metadata).

NOTE
To find the API failure error logs, go to All Tabs (Salesforce Classic) >> API Logs.