Skip to main content
Version: 8.3

Handle system-level data using Creatio.ai in the business process

Level: intermediate

To implement the example:

  1. Develop AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier). Read more >>>
  2. Implement a business process that runs the AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier). Read more >>>
  3. Set up the page UI. Read more >>>
Example

Display summarized information of a specific contact on a "Retrieve the summarized contact information" page. The "Summarize contact information" business process generates the "Retrieve the summarized contact information" page and handles the retrieved data using Creatio.ai. The page has the following parameters:

  • Outcome of the Creatio.ai work that contains the Full name, Birth date, Full job title, Business phone of the contact. The data is handled by Creatio.ai.
  • Status of the Creatio.ai execution
  • Error message

1. Develop AI Sub-agent

  1. Open the Customer 360 app in the Application Designer.

  2. Open the Advanced settings tab in the Application Designer. To do this, click btn_system_designer_8_shell.png in the top right → Application managementApplication HubCustomer 360 app → Advanced settings.

  3. Create a user-made package to develop AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier). To do this, click btn_create_a_package.pngCreate new package → fill out the package properties → Save.

    For this example, create the sdkCreatioAIInBusinessProcess user-made package.

  4. Change the current package. Instructions: Change the current package.

    For this example, change the current package to sdkCreatioAIInBusinessProcess user-made package.

  5. Open the Creatio.ai sub-agents (Creatio.ai skills in Creatio 8.3.3 and earlier) section. To do this, click btn_system_designer_8_shell.png in the top right → System setupCreatio.ai sub-agents (Creatio.ai skills in Creatio 8.3.3 and earlier).

  6. Add an AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier). To do this, click New.

  7. Fill out the properties of the AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier).

    Property

    Property value

    Title*

    Contact summary

    Description*

    AI Sub-agent that summarizes contact information

    Status*

    Active

    Where to use* (Usage mode in Creatio 8.3.2 and earlier)

    "Workflows" ("API" in Creatio 8.3.2 and earlier)

  8. Specify the user's goal when using the AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier).

    Property

    Property value

    Prompt

    Your task is to summarize the following contact information: Full name, Birth date, Full job title, Business phone.

  9. Specify input parameters of AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier).

    1. Go to the Input parameters block.

    2. Click New.

    3. Fill out the parameter properties.

      Code

      Name

      Description

      Data type

      ContactName

      Contact name

      Parameter that contains contact name

      Text (500 characters)

      ContactInfo

      Contact info

      Parameter that contains detailed contact information

      Unlimited length text

  10. Specify output parameters of AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier).

    1. Go to the Output parameters block.

    2. Click New.

    3. Fill out the parameter properties.

      Code

      Name

      Description

      Data type

      CreatioAIResult

      Outcome of the Creatio.ai work

      Parameter that contains the outcome of the Creatio.ai work

      Text (500 characters)

      ExecutionStatus

      Status of the Creatio.ai execution

      Parameter that contains the status of the Creatio.ai execution

      Text (500 characters)

  11. Save the changes.

As a result, Creatio will add the "Contact summary" AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier) to the Creatio.ai sub-agents (Creatio.ai skills in Creatio 8.3.3 and earlier) section.

2. Implement a business process that runs the AI Sub-agent

1. Create a business process

  1. Open the Customer 360 app in the Application Designer.

  2. Open the Advanced settings tab in the Application Designer. To do this, click btn_system_designer_8_shell.png in the top right → Application managementApplication HubCustomer 360 app → Advanced settings.

  3. Select a user-made package to create a business process.

    For this example, select the sdkCreatioAIInBusinessProcess user-made package.

  4. Create the business process schema. To do this, click AddBusiness process.

  5. Open the Settings tab.

  6. Fill out the schema properties.

    For this example, use the following schema properties.

    Property

    Property value

    Title

    Summarize contact information

    Code

    UsrSummarizeContactInformation

  7. Save the changes.

As a result:

  • The "Summarize contact information" business process will be created.
  • Creatio will add the "Summarize contact information" business process to the Process library section.

2. Set up the business process parameters

  1. Open the properties of the business process schema. To do this, click an arbitrary place in the working area of the Process Designer.

  2. Open the Parameters tab.

  3. Add the business process parameters.

    For this example, add the parameter that contains the list of contacts. To do this:

    1. Click Add parameter and select a parameter of the needed type.

    2. Fill out the parameter properties.

      Element

      Element type

      Property

      Property value

      Parameter that contains the list of contacts

      Lookup

      Title

      Contact

      Code

      ContactList

      Data type

      Lookup

      Lookup

      Contact

      Direction

      Input

As a result, the Parameters tab of the "Summarize contact information" business process will be as follows.

3. Implement reading contact information

  1. Add a Read data element. To do this, click btn_System_actions.png → place the Read data element between the Simple and Terminate page elements in the working area of the Process Designer.

  2. Fill out the element properties.

    Property

    Property value

    Title

    Read contact information

    Which object to read data from?

    Contact

    How to filter records?

    1. Click Add condition. This opens the Select column window.
    2. Select "Id" in the Column property.
    3. Click Select.
    4. Select Compare with Parameter. This opens the Select parameter window.
    5. Select the parameter. To do this, open the Process parameters tab → click ContactSelect.

    Leave default values for other element properties.

  3. Save the changes.

As a result:

  • The setup area of the "Read contact information" element will be as follows.

  • The diagram of the "Summarize contact information" business process will be as follows.

4. Implement running the AI Sub-agent

  1. Add a Sub-agent (Call Creatio.ai in Creatio 8.3.3 and earlier) element. To do this, click btn_System_actions.png → place the Sub-agent (Call Creatio.ai in Creatio 8.3.3 and earlier) element between the Read data system action and Terminate page element in the working area of the Process Designer.

  2. Fill out the element properties.

    Property

    Property value

    Title

    Run the AI Sub-agent

    Which sub-agent to call? (Which skill to call? in Creatio 8.3.3 and earlier)

    Contact summary

    Contact info

    1. Click btn_match_parameters.pngFormula. This opens the Formula window.

    2. Add the formula:

      "Birth date: " + [#Read contact information.First item of resulting collection.Birth date#] + " Full job title: " + [#Read contact information.First item of resulting collection.Full job title#] + " Business phone: " + [#Read contact information.First item of resulting collection.Business phone#]

    3. Save the changes.

    Contact name

    1. Click btn_match_parameters.pngFormula. This opens the Formula window.

    2. Add the formula:

      "Full name: " + [#Read contact information.First item of resulting collection.Full name#]

    3. Save the changes.

  3. Save the changes.

As a result, the diagram of the "Summarize contact information" business process will be as follows.

5. Implement a separate page to display the outcome of the Creatio.ai work

  1. Add an auto-generated page.

    1. Click btn_User_actions.png → place the Auto-generated page element between the Sub-agent (Call Creatio.ai in Creatio 8.3.3 and earlier) system action and Terminate page element in the working area of the Process Designer.

    2. Fill out the element properties.

      Property

      Property value

      Title

      Retrieve the summarized contact information

      Page title

      Retrieve the summarized contact information

      Creatio populates the Contact property using the "[#System variable.Current user contact#]" value.

  2. Add the parameters of the AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier).

    For this example, add the following parameters:

    • parameter that contains the outcome of the Creatio.ai work
    • parameter that contains the status of the Creatio.ai execution
    • parameter that contains the error message if error occurs during the AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier) execution

    To do this:

    1. Go to the Page Items block.

    2. Click btn_add_element.png and select a parameter of the needed type.

    3. Fill out the parameter properties.

      Element

      Element type

      Property

      Property value

      Parameter that contains the outcome of the Creatio.ai work

      Text field

      Title

      Outcome of the Creatio.ai work

      Code

      CreatioAIResult

      Is multiline

      Select the checkbox

      Value

      Click btn_match_parameters.pngProcess parameterProcess elements tab → Run the AI Sub-agent (Run the AI Skill in Creatio 8.3.3 and earlier) → Outcome of the Creatio.ai workSelect. This populates the property using the "[#Run the AI Sub-agent.Outcome of the Creatio.ai work#]" ("[#Run the AI Skill.Outcome of the Creatio.ai work#]" in Creatio 8.3.3 and earlier) value.

      Parameter that contains the status of the Creatio.ai execution

      Text field

      Title

      Status of the Creatio.ai execution

      Code

      ExecutionStatus

      Value

      Click btn_match_parameters.pngProcess parameterProcess elements tab → Run the AI Sub-agent (Run the AI Skill in Creatio 8.3.3 and earlier) → Status of the Creatio.ai executionSelect. This populates the property using the "[#Run the AI Sub-agent.Status of the Creatio.ai execution#]" ("[#Run the AI Skill.Status of the Creatio.ai execution#]" in Creatio 8.3.3 and earlier) value.

      Parameter that contains the error message if error occurs during the AI Sub-agent (AI Skill in Creatio 8.3.3 and earlier) execution

      Text field

      Title

      Error message

      Code

      ErrorMessage

      Is multiline

      Select the checkbox

      Value

      Click btn_match_parameters.pngProcess parameterProcess elements tab → Run the AI Sub-agent (Run the AI Skill in Creatio 8.3.3 and earlier) → Error messageSelect. This populates the property using the "[#Run the AI Sub-agent.Error message#]" ("[#Run the AI Skill.Error message#]" in Creatio 8.3.3 and earlier) value.

    As a result, the Page Items property block of the "Retrieve the summarized contact information" auto-generated page will be as follows.

As a result, the diagram of the "Summarize contact information" business process will be as follows.

3. Set up the page UI

  1. Open the Customer 360 app in the Application Designer.

  2. Open the Contacts form page.

  3. Add a button.

    For this example, add the button that calls the "Summarize contact information" business process.

    To do this:

    1. Add a Button type component to the toolbar of the Freedom UI Designer.

    2. Click icn_settings_in_freedom_ui_designer.png and fill out the button properties.

      Element

      Property

      Property value

      Button that calls the "Summarize contact information" business process

      Title

      Create summary

      Style

      Outline

      Action

      Run process

      Which process to run?

      Summarize contact information

      How to run the process?

      For the selected page

  4. Save the changes.

View the result

  1. Open the Contacts section.
  2. Open a contact that has an arbitrary name. For example, "Alice Phillips."
  3. Click Create summary.

As a result, Creatio will display the "Retrieve the summarized contact information" page that include the summarized information of a specific contact.


Resources

Package with example implementation