Search Ticket Cache Activity
Overviewβ
The Search Ticket Cache Activity (search_ticket_cache) can be used to retrieve a list of tickets from Pia's ticket cache. This activity enables you to retrieve ticket data for your custom automations but want to avoid making expensive API calls to the ticketing system/PSA.
An example scenario where this activity may be used is an automation that compares a new ticket has been logged to the Service Desk with a closed tickets to check for duplicates.
The Search Ticket Cache Activity can be located by simply searching for "Search Ticket Cache" in the list of activities in the package editor:
Here is a basic example of a package where the Search Ticket Cache Activity has been used:
# Pia Automation Package
conditions:
- name: 'client_filter'
optMode: 'OptOut'
category: 'Hello World'
- name: 'chat'
option_button: 'Search Ticket Cache'
option_text: 'Text which is displayed in the Pia Chatbot'
option_category: 'Pia Chatbot Category'
steps:
- task: search_ticket_cache
inputs:
filter_by_companyid: '19300'
filter_by_closedsincedate: '2025-03-06'
When the above package is executed in a chatbot, the activity will retrieve ALL the tickets that are created for the defined company Id and has been closed since 2025-03-06.
Activity Behaviorβ
The primary purpose of the Search Ticket Cache activity is to retrieve ticket details from Pia's cache without having to call your ticketing system's API. This process is quicker and will result in less intense operations being called on your ticketing system API. You can filter the results using the input parameters defined further below in this article.
The Search Ticket Cache 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β
Use properties to modify the behavior of the activity.
Property Name: filter_by_companyid
Property Required: No
Property Description: The ID of the Company in the PSA to filter by.
Property Name: filter_by_contactid
Property Required: No
Property Description: The ID of the Contact in the PSA to filter by.
Property Name: filter_by_closedsincedate
Property Required: No
Property Description: This will output the tickets closed after the specified date. This should be in the format: yyyy-MM-dd or MM/dd/yyyy.
Property Name: filter_by_createdsincedate
Property Required: No
Property Description: This will output the tickets created after the specified date. This should be in the format: yyyy-MM-dd or MM/dd/yyyy.
Property Name: page_size
Property Required: No
Property Description: This is the maximum number of results to return as output.
Property Name: page_number
Property Required: No
Property Description: This field is used to page through results.
Output Propertiesβ
This activity has a single output property available.
Property Name: tickets
Property Description: This will return a json bundle of tickets based on the filter with the following details:
[
{
"Id": "",
"DisplayId": "",
"Summary": "",
"Board": "",
"ML_Type": "",
"ML_Subtype": "",
"ML_Item": "",
"Type": "",
"Subtype": "",
"Item": "",
"Contact": "s",
"Owner": "",
"Company": "",
"ClosedFlag": "",
"Status": "",
"ClosedDate": "",
"ParentTicketId": "",
"Source": "",
"CreatedDate": "",
"Site": ""
}
]