System Activities
While running packages in the Pia Chatbot, you will occasionally see some activities automatically appear in the activity log of the chatbot or the live packages screen. These activities cannot be added from the package editor manually. Instead, they are added by the system automatically based on the resource requirement of the package. These activities are called System Activities.
System Activities are built in activities that are added directly to the packages by Pia based on what you do when you create a package. These activities run in the background when a package executes so the user will generally not be able to see any chat interaction in the chatbot as an output from these activities. However, since the activities help in preparing resources for a package, the success of some of these activities are extremely important for successful execution of the package.
This article covers all the system activities that are currently available in Pia and their behavior. Some of these activities have prerequisites such as configuring connected service or having MS Graph authorized which has been mentioned here.
Agent Interactive Session Activityβ
The Agent Interactive Session activity is one of the system activities that is added to a package which requires interaction with the Pia agent. This activity will firstly check if there is already an active session linked to the agent which could be used. If not, a new session will be started by the activity where Pia can interact with the agent to perform tasks on the computer where the agent is installed on.
When this activity runs, it will check if the agent is available or not. If the agent is not available, it will prompt following messages in the chatbot based on the agent status:
- If the agent is offline or activity could not connect to the agent
In this case, user may need to turn on the device and press "try Again" in Pia chatbot to continue with the package.
- If the agent has not been activated in Pia
In this case, user will need to activate the agent in Pia and press "Try Again" button. The agent can be activated from the Agents Screen in Pia portal.
Get Token Activitiesβ
The Get Token Activities are added to packages that require interaction with third party services. These activities redeem the API Token for these services using their credentials available in Connected Service configurations.
For the activities to be triggered, you will need to add their respective variables into your package. These variables will be available in the variables section of the package editor.
Some of the Get Token activities that are available in the Package Editor are as follows:
Get Microsoft Graph API Token Activityβ
This activity redeems the Graph API Token using the credentials available in the Client Dashboard: Microsoft Graph API section so that Pia can perform the required task.
Input Variable: $MSGRAPH_Api_Token_Client
Get Kaseya API Token Activityβ
This activity redeems the Kaseya API Token using the credentials available in Kaseya Connected Service Configuration so that Pia can perform the required task.
Input Variable: $Kaseya_Api_Token
Get Ring Central API Token Activity:β
This activity redeems the Ring Central API Token using the credentials available in Ring Central Connected Service Configuration so that Pia can perform the required task.
Input Variable: $RC_Api_Token
Get SharePoint API Token Activity:β
This activity redeems the SharePoint API Token using the credentials available in SharePoint Connected Service Configuration so that Pia can perform the required task.
Input Variable: $SP_Url
Get Xero API Token Activity:β
This activity redeems the Xero API Token using the credentials available in Xero Connected Service Configuration so that Pia can perform the required task.
Input Variable: $Xero_Api_Token
Note that the above variables will only be available if the respective Connected Service has been configured in Pia.
In scenarios where the above activities fail to retrieve the API Token due to incorrect configuration, the package execution will stop with a general error. However, the user will be able to see a more detailed error message in the Activity Log of the chatbot or in the live packages screen.