Skip to main content

System Audit Note Activity

Overview​

The System Audit Note (system_audit_note) Activity allows you to append content to the audit log notes added to your ticket during package executions.

Note

For every package executed in the ticketing system, Pia posts Audit Log as an internal ticket note into the ticket. The Audit Log includes the following information:

  • Package Execution Date/Time
  • Engineer Name who started the package execution
  • Package Execution Status

With the System Audit Note activity, you can append additional information into the Audit Log Note which is then posted into the ticket.

For example, Pia uses the System Audit Note Activity in the Staff Offboarding Package. This activity is used in multiple areas across the Staff Offboarding Package so that when the package is executed, details about the user terminated are also posted in the ticket.

The System Audit Note Activity can be located by simply searching for "Append to Audit Note" in the list of activities in the package editor:

Here is a basic example of a package where the System Audit Note Activity has been used:

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

- name: 'chat'
option_button: 'System Audit Note'
option_text: 'Text which is displayed in the Pia Chatbot'
option_category: 'Pia Chatbot Category'

steps:
- task: system_audit_note
inputs:
Content: 'This is a Test Content'

In the above example, the activity has been added to the Package so that when the package runs, the content will be added to the ticket as an Audit Log Note.

When running the above package in a ConnectWise ticket, you will see the following:

Activity Behaviour​

The primary purpose of the System Audit Note Activity is to append defined content into the Audit Log Note. You can use this activity multiple times within a package as per your requirement. Each time the activity runs, the content is appended to the existing audit log note.

The System Audit Note Activity can be used in packages which have been initiated via the Pia Chatbot or via Ticketing System Event. This activity, however, will not work in packages initiated via a Schedule Condition.

Input Properties​

Use properties to modify the behavior of the activity.

Property Name: Content
Property Required: Yes
Property Description: Add the information you want appended to the Audit note. When the content is added, timestamps are also automatically appended upon package execution.

Property Name: TicketNoteId
Property Required: No
Property Description: Obsolete. Do not use ths property. This will be removed in upcoming release.

Output Properties​

There is no output property available for this activity.

Example​

Here is an example of the System Audit Note Activity being used to add a note based on input provided by the engineer:


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

- name: 'chat'
option_button: 'System Audit Note'
option_text: 'Example Text'
option_category: 'test note'

steps:

- task: inline_powershell
alias: formdef_builder
inputs:
script: |
$users = @('test1','test2','test3')
$formDefProps = @{
users = @($users)
}
return @{ formdef = $(ConvertTo-Json -Depth 5 -Compress $formDefProps) }


- task: chat_interaction
alias: select_a_user_form
inputs:
text: 'Select a user'
form_name: 'test'
form_def: =formdef_builder.formdef


- task: system_audit_note
inputs:
Content: "The user you selected is {=select_a_user_form.form.users}"
TicketNoteId: $Ctx_Audit_Note_Id

A 'test' form has been created in form editor with the following fields:

When the package is executed in the ticketing system, audit notes are added to the ticket as below: