10.0: Add a 'move' interaction to ticket profiles and cards #13
jstanden
started this conversation in
Guides and Tutorials
Replies: 1 comment 2 replies
-
This is excellent. How can we add a button if we want to change the owner? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
cerb10_move_interaction.mov
Introduction
One of the most common actions on ticket records is moving them to another group and/or bucket.
While you can edit a ticket record to change its group and bucket, the editor can be overwhelming for new team members, and it doesn't offer much customization.
With interactions in Cerb 10 you can create a shortcut for moving tickets right on card popups and profile pages.
You can also completely customize how it works. For instance, some teams prefer to sort buckets in an order other than alphabetical (e.g. most frequently used).
The cerb.ticket.move interaction is included with Cerb 10+, so you don't need to import anything to use it.
Adding the move interaction to ticket profiles
If you want to add a 'Move' shortcut to ticket profiles, navigate to any ticket profile page as an administrator.
Click on the gear icon to the right of the toolbar at the top of the profile:
Paste the following toolbar KATA:
This does a lot of work for us:
cerb.ticket.move
automation when that button is clicked.ticket:
input is passed to the automation using the current record's ID.Click the Save Changes button.
You should now see a new Move button in the toolbar:
Adding the move interaction to ticket cards
If you want to add the move shortcut to ticket cards, the process is very similar to the above.
Open any ticket card popup as an administrator.
Click on the gear icon to the right of the top toolbar:
Paste the following toolbar KATA:
Click the Save Changes button.
Adding the move interaction to ticket card widgets
You can also add the same interaction to an interactions toolbar on a ticket card popup. This is useful when you don't want the top toolbar to be too cluttered with infrequently used interactions.
Open the card popup for any ticket as an administrator.
Click the Add Widget button at the bottom of the popup.
Select the Build tab.
Actions
Paste the following KATA into Toolbar:
Click the Save Changes button.
How it works
Let's take a look at the interaction automation.
Navigate to Search -> Automations.
Search for:
cerb.ticket.move
Edit the automation record.
You'll see the following script:
There's one required input for record/ticket:. This accepts a ticket ID and loads the record into the
inputs.ticket
placeholder.The interaction then prompts the current worker for a destination group in
await/group:
. The default is the ticket's current group. This sheet: prompt fetches group records using thecerb.data.records
automation with a filter that sorts groups by name. It allows single record selection.Once a group is selected, the set/group: command loads that full record. The
{{prompt_group_id}}
placeholder from the sheet only gave us the selected ID. We'll use this to display the group's name and find its default bucket.Next, the interaction prompts the worker for a destination bucket from the selected group in
await/bucket:
. The default is the group's default bucket (usually 'Inbox'). This sheet: prompt also fetches bucket records using thecerb.data.records
automation with a filter for the selected group, and it sorts alphabetically. If you want to sort the buckets in a different order (e.g. an "order" custom field) you could do that here. This sheet allows single record selection.Like earlier, once a bucket is selected the set/bucket: command loads the full record. This is just a validation step before we update the ticket record so we're not directly trusting user input.
Finally, the record.update: command updates the ticket's
group_id
andbucket_id
fields with the selections.At this point the interaction ends, and the
after:
actions run in the toolbar.Beta Was this translation helpful? Give feedback.
All reactions