AI Agent with Multifunction Calling using Google Vertex AI > Using the AI Agent with Multifunction Calling using Google Vertex AI recipe > Test AI Agent Multifunction Calling using Google Vertex AI
  

Test AI Agent Multifunction Calling using Google Vertex AI

You can test the AI Agent Multifunction Calling using Google Vertex AI recipe with the function declaration value that is set as default in the Set Flow Configuration step of the AI Agent with Multifunction Calling using Google Vertex AI guide.
The default value applies to and can execute the Get Information from Salesforce and Create Object in ServiceNow processes that are available in this recipe.
For example, in the AI Agent with Multifunction Calling using Google Vertex AI guide, you can enter one of the following prompts for the correct function call for these recipes:
The function name must start with a letter or an underscore, and can contain alphanumeric characters, underscores (_), periods (.), and hyphens (-). For more information, see Google Vertex AI documentation.
The structure of the Function_Declaration is important for further execution of the request to the Application Integration process. To set your Function_Declaration in the guide, you must specify it in the JSON format as shown in the following example:
{
"tools": [{
"functionDeclarations": [
{
"name": "Get_Salesforce_Object",
"description": "The function recognizes standard Salesforce objects and ensures they align strictly with Salesforce documentation. Based on the user's query, it constructs accurate filters to isolate relevant data and retrieves the corresponding values for these filters. This process guarantees compliance with Salesforce's data structure and optimizes the query results for precision and relevance.",
"parameters": {
"type": "object",
"properties": {
"Process_URL": {
"type": "string",
"description": "Fixed URL to execute process",
"enum": "<Service_URL_of_the_Application_Integration_Process>"
},
"Payload": {
"type": "array",
"description": "Structured payload for processes",
"items": {
"description": "Fields in payload for processes",
"type": "object",
"properties": {
"Entity_Type": {
"type": "string",
"description": "Standard Salesforce objects (e.g., Account, Contact) represent key business information. These built-in data tables provide core CRM functionality."
},
"Filter_Name": {
"type": "string",
"description": "The field name by which the standard Salesforce objects will be filtered. This field name must match with the corresponding field names defined in the Salesforce documentation to ensure accurate and compliant data filtering."
},
"Filter_Data": {
"type": "string",
"description": "The value associated with the specified Filter_Name, which is required when Filter_Name is present. This variable filters records for standard Salesforce objects, ensuring precise data selection in line with the Salesforce structure."
}
},
"required": [
"Entity_Type",
"Filter_Name",
"Filter_Data"
]
}
}
},
"required": [
"Process_URL",
"Payload"
]
}
},
{
"name": "Create_ServiceNow_Object",
"description": "This function processes JSON input and is triggered only when a valid JSON structure is provided. It maps fields into a ServiceNow-compatible payload, following the specifications and structure outlined in the ServiceNow documentation. The function extracts relevant data, such as user details or system information, and transforms it into a format that ServiceNow can accept, ensuring proper field mappings and adherence to the required schema conventions.",
"parameters": {
"type": "object",
"properties": {
"Process_URL": {
"type": "string",
"description": "Fixed URL to execute process",
"enum": "<Service_URL_of_the_Application_Integration_Process>"
},
"Payload": {
"type": "array",
"description": "Structured payload for processes",
"items": {
"description": "Fields in payload for processes",
"type": "object",
"properties": {
"Table_Name": {
"type": "string",
"description": "Specifies the name of a particular table used for data storage in the ServiceNow system. This variable is used to identify the target table for operations, such as data retrieval, insertion, or modification within the system. For the case table in Salesforce, use the corresponding incident table in ServiceNow, for the account table, use the core_company table, for the contact table, use the sys_user table, for the opportunity table, use the x_mas_opportunity_opportunity table."
},
"Object": {
"type": "string",
"description": "When handling a response, the first step is identifying the key fields required for integration with ServiceNow. For the Case table, map number to number, subject to short_description, contact to u_name, description to description. For the Opportunity table, map stage to isclosed and iswon and define the transformation logic, map amount to amount, name to opportunity_name. For the Contact table, map first_name to first_name, last_name to last_name, email to email, mailing_address to street, mailing_city to city, mailing_state to state, mailing_zip to zip, and set the country field. For the Account table, map name to name, phone to phone, billing_address to street, billing_city to city, billing_state to state, billing_zip to zip, and set the country field. Use only the transformation examples and fields above to transform fields correctly. If the example does not have a field and the prompt does, skip it. After the fields are mapped and converted, the data must be structured into a valid JSON format that meets the ServiceNow API standards. This JSON object must contain all the required fields in the correct structure and format. The result must be a clean, correct JSON object containing only the required data fields, with no additional text, explanations, or extraneous characters."
}
},
"required": [
"Table_Name",
"Object"
]
}
}
},
"required": [
"Process_URL",
"Payload"
]
}
}
]
}]
}
For testing, you can construct another structure of a Function Declaration as required.