Tool and agent example

This topic provides an example of a tool that retrieves IFS user details.

You can use the tool example below to fetch IFS user details.

{
    "name": "OS_UserProfile",
    "type": "OPENAPI_SCHEMA",
    "data": {
      "servicePath": "ifsservice/",
      "path": "/usermgt/v2/users/me",
      "method": "get",
      "headers": {},
      "responseInstructions": "{\n  \"responsestatus\": \"string\",\n  \"errorlist\": [\n    {\n      \"code\": 0,\n      \"message\": \"string\",\n      \"languageText\": \"string\",\n      \"errorCode\": \"string\"\n    }\n  ],\n  \"response\": {\n    \"userlist\": [\n      {\n        \"id\": \"string\",\n        \"userName\": \"string\",\n        \"name\": {\n          \"familyName\": \"string\",\n          \"givenName\": \"string\"\n        },\n        \"displayName\": \"string\",\n        \"emails\": [\n          {\n            \"value\": \"string\",\n            \"type\": \"string\",\n            \"primary\": true\n          }\n        ],\n        \"title\": \"string\",\n        \"defaultAccountingEntity\": \"string\",\n        \"preferredLanguage\": \"string\",\n        \"locale\": \"string\",\n        \"timezone\": \"string\",\n        \"applicationtimezone\": \"string\"
      "returnDirect": false
    },
    "status": 1,
    "instructions": "This tool will document all requests made by the \"ifsservice/usermgt/v2/users/me\" GET endpoint. Utilizing this endpoint can generate the following details for the user:\n1) When the user requests their job title set within Infor OS Portal\n2) When the user requests the time zone set within their user's profile\n3) When the user requests the locale set in Infor OS Portal\n4) When the user requests the language set within Infor OS Portal\n5) When the user requests to view their manager's name",
    "security": {
      "roles": []
    }
  }

Use this Agent example to invoke the Tool above:

{
    "name": "OS_UserProfileAgent",
    "type": "TOOLKIT",
    "data": {
      "workflow": "The following use cases can be executed successfully by invoking the <OS_UserProfile> that utilizes a single GET endpoint: /usermgt/v2/users/me\n1) the user requests to check their job title\n2) the user requests to check their local time zone\n3) the user requests to check their locale \n4) the user requests to check their current language selection within the Infor OS Portal\n5) the user requests to check the currency code of their current locale. To complete this, first check the locale that the user is in.\n6) the user requests to view their manager name. If no manager name is found, please inform the user that a manager name must be defined in their User Settings within the Infor OS Portal, where the Details tab will display a Manager field. After a manager name is saved, the Tool can utilize the endpoint to retrieve the saved name. ",
      "tools": [
        "OS_UserProfile",
        "OS_UpdateUserProfile"
      ]
    },
    "status": 1,
    "utterances": [
      "What languages does Infor OS support?",
      "What is my currency code?",
      "Who is my manager?",
      "What is my locale?",
      "What is my local time zone?",
      "What is my job title?",
      "What questions can I ask about my user profile?",
      "Check user profile details"
    ],
    "instructions": "This agent will manage Tools that provide details about an Infor user's profile, Infor OS supported languages, supported applications within Infor OS, and updating a user's applicationtimezone, locale, or language. All Tools associated to this Agent are required to utilize this Agent to execute the proper API paths and provide the expected result.",
    "security": {
      "roles": []
    }
}