Skip to main content

Teams Chat Action Condition

Overview​

The Teams Chat Action (teams_chat_action) condition allows Partner Portal users to access and invoke your custom automations as Teams automations while setting up Automated Actions. When this condition is added, your custom automations will output messages in the user's Microsoft Teams within the Pia Chat app.

The Teams Chat Action condition can be selected in the conditions menu of the package editor as below:

Here is an example of how you can use this condition to create simple automation that can be configured as an automated action:


# Pia Automation Package
conditions:
- name: 'client_filter'
optMode: 'OptOut'
category: 'Hello World'

- name: 'chat'
option_button: 'The name of the button in Pia'
option_text: 'Text which is displayed in the Pia Chatbot'
option_category: 'Pia Chatbot Category'

- name: teams_chat_action

steps:
- task: chat_interaction
inputs:
text: 'This is an Automated Action'

Condition Behavior​

The primary purpose of the Teams Chat Action condition is to support custom Teams Automated Actions. It allows Pia to automatically run automations to solve user issues in real time, reducing the need for support tickets and manual intervention from engineers. When an automation containing this condition is configured as an Automated Action, Pia executes the automation whenever it detects a user request in Ai Resolution Assistant or the dedicated chat within Pia Chat that matches the intent specified in the Automated Action configuration.

The Teams Chat Action condition must be combined with the Client Filter Condition for your automation to be available as a Teams Automated Action. Since Pia Chat is configured individually for each client, Pia needs to determine the client context before running the automation.

Input Properties​

Use properties to modify the behavior of the condition:

Property Name: prompt_template
Property Required: No
Property Description: This is an optional template for the prompt for when creating an automated action with this automation.

Property Name: required_inputs
Property Required: No
Property Description: This is the list of inputs (input_name) required for this automation as defined in the package variables. If the inputs are defined, Pia will force AI to provide these inputs before executing the automation.

Property Name: optional_inputs
Property Required: No
Property Description: This is the list of optional inputs (input_name) as defined in the Package variable for the automation.

Output Properties​

Here are the output properties that the Teams Action Condition makes available:

Property Name: client_id
Property Description: This is the id of the client for whom the automated action is running.

Property Name: chat_user_first_name
Property Description: This is the first name of the user who initiated this automation in Pia Chat.

Property Name: chat_user_last_name
Property Description: This is the last name of the user who initiated this automation in Pia Chat.

Property Name: chat_user_id
Property Description: This is the id of the user who initiated this automation in Pia Chat.

Property Name: chat_user_email
Property Description: This is the email of the user who initiated this automation in Pia Chat.

Property Name: chat_user_objectid
Property Description: This is the Office 365 object id of the user who initiated this automation in Pia Chat.