Skip to main content

Add AI actions

Beta feature

This feature is currently in development. Terms of service may change in future. For the latest updates, refer to the Grexx Platform Changelog. If you have any questions or feedback, please contact your Grexx Coach.

You can make use of AI in forms by adding AI actions. Currently, you can use an AI action to set the value of a field. For example, you might use an AI action to populate fields based on data available to the AI model (from your application and/or external sources) or to translate the text entered by a user to another language. Support for more types of AI action will be added in future.

When you add an AI action, you specify the AI model (LLM) that you want to use. Several popular LLMs are available out-of-the-box with Grexx Studio. In future, you will also have the option to connect your own LLM. To view details of all available LLMs, open your Studio and navigate to Agents > Models. For more information, see Use AI in your application.

To add an AI action to a form:

  1. Open the form's Designer tab and on the toolbar click Switch to logic.
  2. Select the appropriate tab according to when you want to apply the action:
    • Select the On start tab to apply the action when the form is opened. This is useful if you want to use AI to populate values when a user opens the form.
    • Select the On change tab to apply the action each time a user updates a field on the form. This is useful when you want to use AI to update values based on user inputs.
    • Select the On click tab to apply the action when a user clicks a button on the form (other than the "Submit" and "Cancel" buttons). This is useful when you want to give users a choice, such as allowing them to ask AI to provide suggestions or summarize what they have written.
  3. From the toolbar, click AI action to add an action to the canvas. If you have configured conditional logic, you can add an AI action to a Then or Else block.
  4. Select the AI action to display the properties pane. Currently, only the Set value action is available.
  5. From the Form field picklist, select the form field that for which you want the AI model to provide a value.
  6. In the Prompt field, enter a prompt to tell the AI model what you want it to do. You can include template functions in the prompt to access data such as case attributes or the current user's details.
  7. From the AI Model picklist, select the LLM that you want to use.

Form logic designer with an AI action added to the "On click" tab

For example, to use AI to suggest inputs, add AI actions for the relevant fields to the On start tab. For each field, add a prompt with instructions specific to that field. When a user opens the form, the fields are populated with values generated by AI and the user can simply review and amend as required before they submit the form.

Similarly, if you want to give users the choice of whether to use AI to suggest inputs, add a custom button to the form design and then use the On click tab to add AI actions to the button. When a user opens the form, the fields are empty (unless you have applied mappings to the relevant activity). If the user clicks the button, the AI agent generates values and populates the fields. The user can then review and modify as required before they submit the form.