Workflows: Automatically add specific watchers and/or recipients to tickets #84
-
Hello, On a much older version of Cerb, I had automations in place to automatically add watchers to tickets, based upon the org the original sender was aligned with, and where watchers of that org would then be added as watchers to any ticket opened by an original recipient was the originator of a ticket. For example, I could have an Organization named ACME, and then have three agents set up as watchers on that Org. If a new ticket was created by [email protected], a VA would trigger and add all three agents, who were watchers on ACME, added as watchers to that ticket. Additionally, I had an additional component of the VA that could add [email protected] to that ticket as a recipient, and then Joe and Jane would both get an autoreply -- this way, multiple team members from a customer would know that one of them created a ticket and that the other could follow along, and that they did not accidentally create a redundant ticket. How would I create a workflow that could add a predetermined list of people as "watchers" when a new ticket is created on a specific org? I don't see a builder capability that is quite as interactive as the older way of managing VAs. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Lou! That workflow will be very similar to: https://cerb.ai/workflows/cerb.email.org_by_hostname/ The automation event is: https://cerb.ai/docs/automations/events/mail.received/ Ticket records have an expansion key for Here's an automation to add org watchers to their new tickets. From Search >> Workflows >> (+) select (Empty) and paste: workflow:
name: cerb.email.org_watchers
version: 2024-12-17T05:17:20Z
description: Add org watchers to new tickets
website: https://cerb.ai/resources/workflows/
requirements:
cerb_version: >=11.0 <11.1
cerb_plugins: cerberusweb.core,
records:
automation/automation_add_org_watchers:
fields:
name: cerb.email.org_watchers.addOrgWatchers
extension_id: cerb.trigger.mail.received
description: Add organization watchers to new tickets
script@raw:
start:
outcome/isInvalid:
if@bool:
{{
not is_new_ticket
or not message_ticket_org_id
or message_ticket_org_watchers is empty
}}
then:
return:
record.update:
inputs:
record_type: ticket
record_id: {{message_ticket_id}}
fields:
links@list:
{% for worker_id in message_ticket_org_watchers|keys %}
worker:{{worker_id}}
{% endfor %}
policy_kata@raw:
commands:
record.update:
deny/type@bool: {{inputs.record_type is not record type ('ticket')}}
allow@bool: yes
automation_event_listener/listener_mail_received:
fields:
name: Ticket org watchers
event_name: mail.received
priority@int: 100
is_disabled: 0
event_kata@raw:
automation/orgWatchers:
uri: cerb:automation:cerb.email.org_watchers.addOrgWatchers
disabled@bool:
{{
not is_new_ticket
or not message_ticket_org_id
or message_ticket_org_watchers is empty
}} Click the Continue button three times. When a new ticket comes in and it's linked to an org, the org's watchers will be added to the ticket. When I get a few free mins, I'll comment on this thread with a description of how the automation works. The workflow here is just another "package" format. The actual components are an automation and an automation event listener. |
Beta Was this translation helpful? Give feedback.
-
Hi Jeff, Thank you! This works really well. I will tinker a bit more to see how to use the same approach with other things. Please add more info when you can! Cheers |
Beta Was this translation helpful? Give feedback.
Hi Lou! That workflow will be very similar to: https://cerb.ai/workflows/cerb.email.org_by_hostname/
The automation event is: https://cerb.ai/docs/automations/events/mail.received/
Ticket records have an expansion key for
org_watchers
: https://cerb.ai/docs/records/types/ticket/Here's an automation to add org watchers to their new tickets.
From Search >> Workflows >> (+) select (Empty) and paste: