Skip to main content

Get Software Packages Activity

Overview​

Note

Before continuing with this activity, make sure to familiarize yourself with the Software Package Manager article.

This activity allows you to obtain a list of available software from Pia's built in software repository. This activity was originally created to support Pia's install/uninstall software automation and it's primary purpose is to facilitate an installation of software in your automation using software which you manage in the software screen in Pia.

Your process for using this activity is as follows:

  1. Upload and manage software in the software screen in Pia - This will make your software available in your Pia tenant's winget repository
  2. Use this activity (get_software_packages) to get a list of software in your automation and present to your user via the Pia chatbot
  3. Your user will select an option and your automation can use the selection to install the software using winget (Example of the winget commands can be found in the Software Package Manager article)
info

Winget is a software package manager which is provided by Microsoft as part of windows (type "winget" into a powershell window to check it out!). It is comparable to other package managers such as Chocolatey. For more information about how to use winget, you can refer to Microsoft's documentation on the winget command line tool here: https://learn.microsoft.com/en-us/windows/package-manager/winget/.

The Get Software Activity can be located by simply searching for "Get Software" in the list of activities in the package editor:

Here is a basic example of a package where the Get Software Activity has been used:


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

- name: 'chat'
option_button: 'Get Software package'
option_text: 'Text which is displayed in the Pia Chatbot'
option_category: 'Pia Chatbot Category'

steps:
- task: get_software_packages
inputs:
all_versions: 'false'

- task: inline_powershell
inputs:
available_software: =get_software_packages.software
script: |
$form_def = @{software_list = $(ConvertFrom-Json $available_software)}
return @{formDef = $form_def}


- task: chat_interaction
inputs:
text: 'Here is the list of software you may install:'
form_def: =inline_powershell.formDef
form_name: 'get_software'
form_display_mode: 'Embed'

When the above package runs, Pia will retrieve a list of software available in your Software Package Manager and present them in a table format as below:

Activity Behaviour​

The primary behaviour of this activity is to retrieve a list of software that has been configured in the Software screen of the partner portal. You can set the activity to retrieve all the available versions of the software or to retrieve the latest version.

The Get Software Packages Activity can be used in all types of package executions. This includes packages which have been initiated via the Pia Chatbot or via Ticketing System Event.

Input Properties​

There is a single input property available to modify the behaviour of this activity.

Property Name: all_versions
Property Required: No
Property Options: 'true' or 'false'
Default Option: 'true'
Property Description: If this is true, a list of all software versions will be returned. Otherwise, only the latest version will be returned.

Output Properties​

There is a single output property available for this activity.

Property Name: software
Property Required: This is list of software packages or a single software packages retrieved by the activity.

Here is an example of the output format:


[
{
"text": "3CXPhone for Windows",
"value": "3CX.Softphone",
"version": "18.12.425"
},
{
"text": "Adobe Acrobat Reader DC",
"value": "XPDP273C0XHQH2",
"version": "Unknown"
},
{
"text": "Adobe Acrobat Reader DC (64-bit)",
"value": "Adobe.Acrobat.Reader.64-bit",
"version": "23.001.20174"
},
{
"text": "APFS for Windows by Paragon Software",
"value": "Paragon.APFS",
"version": "2.1.110"
}
]