Skip to main content

Part 1: Create Tools

Create API Tool for Trading Partners

In this section, you'll create the API tool that your agent will use to create trading partners in the Boomi Platform. This tool will allow your agent to send XML specifications directly to the Boomi Platform API.

In Agent Garden → Tools, build the following API Tool:

  1. Click Create New Tool.

  2. Hover over API and click Add Tool.

  3. Tool Name: [builderInitials] Create Trading Partner

  4. Description: This tool creates a Trading Partner in the Boomi Platform

  5. Add Input Parameter:

    1. Name: TradingPartnerXML

    2. Description: XML that defines the trading partner

    3. Type: String

    4. Required: On

      Input parameter configuration

    5. Select Add Input Parameter.

    Tool configuration

  6. Select Save and Continue.

Configure Tool to Call Trading Partner Creation API

  1. Choose Add Manually.

  2. Endpoint Base URL: https://api.boomi.com/api/rest/v1/{your account ID}

    Replace with your Account ID!

    Be sure to replace {your account ID} in the URL above with your Boomi Platform Account ID stored in your notepad during the prerequisites section.

  3. Method: POST

  4. Endpoint Path: /TradingPartnerComponent

  5. Choose Basic Authentication and configure:

    1. Username: BOOMI_TOKEN.{your email}

      Replace with your email!

      Be sure to replace {your email} in the value above with your Boomi Platform Email Address.

    2. Password: {your Platform API Token from the prerequisites}

  6. Request Type: XML

  7. Request Body: {{TradingPartnerXML}}

    API configuration part 1

    API configuration part 2

  8. Select Save and Continue.

  9. Select Deploy ToolDeploy.

Create Prompt Tool for XML Generation

Next, you will build a Prompt Tool in Agentstudio to generate the Trading Partner XML specification. This tool will take the extracted variables and format them into the proper XML structure required by the Boomi Platform API.

  1. Navigate to Agent GardenTools.

  2. Select Create New Tool to build the following Prompt Tool:

  3. Add Tool type: Prompt Tool

    1. Tool name: Generate TP XML [builderInitials]

    2. Description: Generate XML specification for Trading Partner creation using extracted EDI document variables.

  4. Add Input Parameter:

    • Name: Extracted Variables
    • Description: JSON object containing all extracted variables from the EDI document
    • Type: String
    • Required: On
  5. Add Prompt:

    You are provided with extracted variables from an EDI document in JSON format. Generate a complete XML specification for creating a Trading Partner component in the Boomi Platform.

    Instructions:
    - Create a random name for the component and use it for both the componentName and identifier fields
    - All fields marked "variable" in the template below must be filled in with the corresponding data from the extracted variables
    - The standard field must be lowercase (example: "X12" must be "x12")
    - Ensure all extracted values are properly placed in their corresponding XML attributes

    XML Template:
    <bns:TradingPartnerComponent xmlns:bns="http://api.platform.boomi.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" classification="tradingpartner" standard="variable" componentName="variable" identifier="variable" folderName="Trading Partners (Lab)">
    <bns:PartnerInfo>
    <bns:X12PartnerInfo>
    <bns:X12Options envelopeoption="groupall" acknowledgementoption="acktranitem" filteracknowledgements="true" rejectDuplicateInterchange="false" outboundInterchangeValidation="false" outboundValidationOption="filterError">
    <bns:elementDelimiter delimiterValue="stardelimited"/>
    <bns:segmentTerminator segmentTerminatorValue="tilde"/>
    </bns:X12Options>
    <bns:X12ControlInfo>
    <bns:ISAControlInfo testindicator="P" ackrequested="true" authorizationInformationQualifier="X12AUTHQUAL_00" securityInformationQualifier="X12SECQUAL_00" interchangeIdQualifier="variable" componentElementSeparator=">" version="variable" interchangeId="variable" securityInformation="variable" authorizationInformation="variable" standardIdentification="variable"/>
    <bns:GSControlInfo respagencycode="variable" applicationcode="variable" gsVersion="variable"/>
    </bns:X12ControlInfo>
    </bns:X12PartnerInfo>
    </bns:PartnerInfo>
    <bns:PartnerCommunication>
    <bns:FTPCommunicationOptions>
    <bns:FTPSettings useDefaultSettings="true" connectionMode="active">
    <bns:host></bns:host>
    <bns:port></bns:port>
    <bns:user></bns:user>
    <bns:password></bns:password>
    <bns:FTPSSLOptions/>
    </bns:FTPSettings>
    <bns:FTPGetOptions useDefaultGetOptions="true">
    <bns:remoteDirectory></bns:remoteDirectory>
    <bns:fileToMove></bns:fileToMove>
    <bns:maxFileCount></bns:maxFileCount>
    </bns:FTPGetOptions>
    <bns:FTPSendOptions useDefaultSendOptions="true">
    <bns:remoteDirectory></bns:remoteDirectory>
    <bns:moveToDirectory></bns:moveToDirectory>
    </bns:FTPSendOptions>
    </bns:FTPCommunicationOptions>
    <bns:DiskCommunicationOptions>
    <bns:DiskGetOptions useDefaultGetOptions="true" deleteAfterRead="true" maxFileCount="0" filterMatchType="wildcard">
    <bns:fileFilter>incoming850.edi</bns:fileFilter>
    <bns:getDirectory></bns:getDirectory>
    </bns:DiskGetOptions>
    <bns:DiskSendOptions useDefaultSendOptions="true" createDirectory="true" writeOption="unique">
    <bns:sendDirectory>/home/wagnerr13/edi/work</bns:sendDirectory>
    </bns:DiskSendOptions>
    </bns:DiskCommunicationOptions>
    <bns:AS2CommunicationOptions>
    <bns:AS2SendOptions>
    <bns:AS2MessageOptions dataContentType="application/edi-x12">
    <bns:subject>EDI</bns:subject>
    </bns:AS2MessageOptions>
    </bns:AS2SendOptions>
    </bns:AS2CommunicationOptions>
    </bns:PartnerCommunication>
    <bns:PartnerDocumentTypes>
    <bns:PartnerDocumentType typeId="variable" use999Ack="false" useTA1Ack="false" expectAckForOutbound="true" qualifierValidation="true"/>
    </bns:PartnerDocumentTypes>
    </bns:TradingPartnerComponent>

    The extracted variables are as follows:

  6. At the end of the prompt pasted from above, type { to see a list of Input Parameters and select the {{Extracted Variables}} parameter to inject the extracted variables into the prompt.

    Extracted Vars

  7. Add Example:

    • Input: componentName="PeterSmith_850_TP", identifier="PeterSmith_850_TP"

    • Output:

      <ns0:TradingPartnerComponent xmlns:ns0="http://api.platform.boomi.com/" folderId="7928829" classification="tradingpartner" standard="x12" componentName="PeterSmith_850_TP" identifier="PeterSmith_850_TP" folderName="Trading Partners (Lab)">
  8. Select Save and Continue.

  9. Select Deploy ToolDeploy.