-
Hello: I want to be able to show in the log when a user opens a ticket (displayed it) on their screen. I feel this will help with accountability and tracking. Where do I get started? Any help would be much appreciated. Lee |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi Lee, setup >> Developers >> Automation Logs |
Beta Was this translation helpful? Give feedback.
-
Hi Lee! The recent 10.4 update modifies the There's an example of creating custom activity log entries here: You can use the record.create: command in an automation to create log records. You'd probably also want your automation to have a cooldown so it doesn't log every record view from the same worker. It could log a distinct worker+record per day. You could search log entries before creating one, but keep in mind this will have a performance impact. Metrics are another option. They're efficient, but you'll end up with a lot of data based on the cardinality of |
Beta Was this translation helpful? Give feedback.
-
Thank you for sending this over. I received this error when I tried to add this to Setup > Packages > Import
xError validating record (automation_64dabfbb6e18f): 'Trigger' (cerb.trigger.record.viewed) is not a valid extension ID on (cerb.automation.trigger).
… On Aug 14, 2023, at 8:01 PM, Jeff Standen ***@***.***> wrote:
If you really want to log every ticket view.
Import this package from Setup >> Packages:
{
"package": [],
"records": [
{
"uid": "automation_64dabfbb6e18f",
"_context": "automation",
"name": "example.records.logTicketViews",
"extension_id": "cerb.trigger.record.viewed",
"description": "Log every ticket viewed by a worker",
"script": "start:\r\n outcome/notTicket:\r\n ***@***.***: {{record__type is not record type ('ticket')}}\r\n then:\r\n return:\r\n\r\n record.create/log:\r\n output: new_log_entry\r\n inputs:\r\n record_type: activity_log\r\n fields:\r\n activity_point: custom.other\r\n actor__context: worker\r\n ***@***.***: {{worker_id}}\r\n target__context: ticket\r\n ***@***.***: {{record_id}}\r\n params:\r\n ***@***.***: {{worker}} viewed ticket {{target}}\r\n variables:\r\n worker: {{worker__label}}\r\n target: {{record__label}}\r\n urls:\r\n worker: ctx://worker:{{worker_id}}\r\n target: ctx://ticket:{{record_id}}",
"policy_kata": "commands:\r\n record.create:\r\n ***@***.***: {{inputs.record_type is not record type ('activity_log')}}\r\n ***@***.***: yes",
"created_at": 1692057531,
"updated_at": 1692057531
}
]
}
Then edit Search >> Automation Events >> record.viewed and bind the automation to the event:
automation/ticketViewed:
uri: cerb:automation:example.records.logTicketViews
***@***.***: {{record__type is not record type ('ticket')}}
You'll get endless activity log entries like:
<https://user-images.githubusercontent.com/63288/260597163-0acfc4d2-6a3b-46d2-aa4f-5d1b9dcaad9e.png>
—
Reply to this email directly, view it on GitHub <#62 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BAXT3D4JF5PVGS2LSDEJBX3XVK353ANCNFSM6AAAAAA3NBSR5E>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
Hi Lee!
The recent 10.4 update modifies the
record.viewed
automation event so it triggers on both profile pages and card popups.There's an example of creating custom activity log entries here:
https://cerb.ai/docs/api/records/activity-log/#create-an-activity-log-entry
You can use the record.create: command in an automation to create log records.
You'd probably also want your automation to have a cooldown so it doesn't log every record view from the same worker. It could log a distinct worker+record per day. You could search log entries before creating one, but keep in mind this will have a performance impact.
Metrics are another option. They're efficient, but you'll end up with a lot of …