Integrations

Customize the Alloy Self-Service Assistant bot configuration

Updated in 2022.1

This article describes what the Alloy Self-Service Assistant bot configuration includes and how to customize it. You will also learn how to create a custom workflow for the bot.

Where to find the bot configuration?

You can find the bot congratulation in your Settings App, under Services > Mobile Applications. Its name is TeamsBot.

INFO: For details, see Configure the Alloy Self-Service Assistant bot in Alloy Navigator.

What does the configuration include?

The XML bot configuration in Alloy Navigator specifies the address of your Self Service Portal for direct links from Teams, controls the availability of direct links, defines which workflow actions the bot uses in commands, and controls the availability of those commands.

  • Self Service Portal links

    The bot uses the URL of your web-based Self Service Portal to built direct links to objects. Clicking such a direct link in a bot chat opens the object (i.e., the ticket, approval request, or knowledge base article) in the Self Service Portal.

    Replace the example value https://www.example.com/hd in the bot configuration with your actual Self Service Portal address. Otherwise, bot users will not be able to navigate to the Self Service Portal using those direct links.

    TIP: You can view the Self Service Portal URL in the Settings App. Go to Workflow and Business Logic > Advanced > System Macros and copy the contents of the Self Service Portal Link field. For details, see Settings App Help: Customizing links to Alloy web applications.

    If you do not want the bot to display links to the portal, disable Self Service Portal links. When links are disabled, the bot doesn't show Open in Self Service Portal buttons in chats.

  • Workflow action for creating tickets

    The bot creates tickets using a workflow service action for creating Incidents for the Self Service Portal. By default, it is the "New Technician Issue (Self Service Portal)" service action #682 from the default workflow. However, the bot shows only two fields: Summary and Description. Other form fields are hidden.

    The action assigns initial values to some Incident's fields as specified in the form definition and performs workflow operations, such as auto-assignment and sending notifications, as the Self Service Portal workflow dictates.

    IMPORTANT: You can customize the default service action or even create a new one, if needed. In any case, the workflow form must contain the Summary and Description physical Incident's fields because these are the only fields the bot uses to request user input, and assign values to other mandatory fields, if any. For details, see Customize the workflow for the Alloy Self-Service Assistant bot.

  • Workflow action for updating tickets

    The bot updates tickets using a workflow service action for updating Incidents in the Self Service Portal. By default, it is the "Update Incident (Self Service Portal)" service action #684 from the default workflow.

    The action prompts the user to add a comment to update the Incident and performs workflow operations, as specified in the action's Programming section. In addition, the action can control its own availability depending on the ticket’s current state using the action's condition.

    The bot shows only one field when updating Incidents in Teams: Details. This is a virtual "Comment" field for adding records to the Incident's Activity Log. Other form fields are hidden.

    IMPORTANT: The action form must contain a virtual HTML Comment field that updates the Incident's Activity.Details physical field. The Alloy Self-Service Assistant bot relies on it.

  • Workflow actions for approving and rejecting requests

    The bot approves and rejects requests using workflow service actions for updating Approval Requests in the Self Service Portal. By default, they are the "Approve Request (Self Service Portal)" #1748 and "Reject Request (Self Service Portal)" #1749 service actions from the default workflow.

    Both those actions prompt the user to add a comment when approving or rejecting the request and perform workflow operations, as specified in their Programming section. In addition, the actions control their availability depending on the approval's current state.

    The bot shows only one field when working with approvals in Teams: Comment. This is a virtual "Comment" field for adding records to the Approval Stage's Activity Log. Other form fields are ignored.

    IMPORTANT: You can customize the default service actions or create new ones. In any case, their action forms must contain a virtual HTML Comment field that updates the Approval Stage's Activity.Details physical field, because this is the only field Alloy Self-Service Assistant uses to request user input, and assign values to other mandatory fields, if any. For details, see Customize the workflow for the Alloy Self-Service Assistant bot below.

Customize the workflow for the Alloy Self-Service Assistant bot

By default, the bot uses the same workflow service actions that the web-based Self-Service Portal and the Self-Service mobile app. However, user input in a chat format is constrained to a limited set of options. That's why the bot doesn't use full action forms to request user input, but shows only several absolutely necessary fields.

INFO: For details about the Self Service Portal workflow actions, see Settings App Help: Specifying workflow for the Self Service Portal.

For example, of all the fields that the default "Incident Create Action for Self Service Portal" service action #682 has on the form, the bot displays only the top two: Summary and Description. The rest of the fields and elements are ignored. This works, because the other mandatory fields (Urgency and Impact) come with initial values. Otherwise, users would not be able to complete the action in Teams because mandatory fields can't be left blank.

If you want Alloy Self-Service Assistant to apply a different business logic than the Self Service Portal's, we recommend the following:

  • Create specific service actions for the bot and add only the essential fields on their action forms. For example, a custom service action for creating tickets using Alloy Self-Service Assistant should have only the Summary and Description physical incident's fields.

  • Assign values to other important fields using templates or workflow operations.

  • Use the %[SYS Initiator.ApplicationName]% equals 'TeamsBot' condition to make sure your custom actions are available only to the Alloy Self-Service Assistant bot.