Getting started with rules

Updated 1 week ago by Amy

How to create your rules

If you want to automate repetitive tasks, such as tagging tickets or responding to common questions, you're in the right place! 

In this video you will see how to create a rule that will automatically close the tickets that contain message that does not need a reply. And you can see how to create a rule to auto-tag your VIP customers.

Rules allow you to perform actions on tickets when something happens in Gorgias. 

Below are some other common use cases.

Setting up automatic tagging

Shipping status tickets

Say you get a lot of shipping tickets, and you want to classify them using a tag. Let's build a rule for that.

  1. In Settings, go to Rules and click Create a new rule
  2. Select WHEN Ticket created as a trigger
  3. Click on THEN, and select an IF statement
  4. Select message -> intents -> name -> contains all of -> shipping/status
  5. Click again on the IF button, and select AND.
  6. Choose -> message -> from agent -> IS NOT -> true (this means that the ticket is not created by an agent)
  7. Click on following THEN, select Add tag as an action, and type "shipping"
  8. Click Save, and Activate

Well done! Now, each time you receive a customer message asking about an update on a delivery, that ticket will be automatically tagged!. As a next step, you can create a view that only contains shipping tickets.

To learn more about intents, check out this article: Automating your work using customer intents.

You can add OR conditions to look for other words. Just click on the IF blue button to add another condition. 

Negative comments

This example shows a simple rule tagging negative tickets using both the "negative", "threatening" and "offensive" sentiments.

To learn more about sentiments, check out this article: Automating your work using customer sentiments.

Automatically closing tickets

If you're getting email notifications with a given subject that you want to close, you can create a rule to close them automatically.

  1. In Settings, go to Rules and click Create new rule
  2. Select WHEN Ticket created as a trigger
  3. Click on THEN, and select an IF statement
  4. Select ticket -> customer -> email -> contains one of -> and type the email addresses that send the email notifications you want to close. 
  5. Click on THEN, and select a Action
  6. Select set status, and "closed"
  7. Click Save, and Activate

Now, all emails that have this subject will be automatically closed. 

Keywords in rules are not case-sensitive anymore. If the Caps lock option is turned on by mistake, letters will get automatically minimised.

Setting up automatic replies

Where is my order?

Say you get a lot of shipping tickets, and you want to auto-reply. Let's build a rule for that.

  1. In Settings, go to Rules and click Create new rule
  2. Select WHEN Ticket created as a trigger
  3. Click on THEN, and select an IF statement
  4. Select message -> intents -> name -> contains all of -> shipping/status
  5. Click again on IF button, and select AND.
  6. Choose -> message -> from agent -> IS NOT -> true (this means that the ticket is not created by an agent)
  7. Click on following THEN -> choose Reply to ticket as an action -> type your message.
  8. Click Save, and Activate
Auto-response: Outside business hours

If you are wanting to create an automated response to be sent after business hours you can use the example below for that. 

  1. In Settings, go to Rules and click Create new rule
  2. Select WHEN Ticket created as a trigger
  3. Click on THEN, and select an IF statement
  4. Select ticket -> created -> OUTSIDE BUSINESS HOURS
  5. Click on following THEN -> choose Reply to ticket as an action -> type your message.
  6. Click Save, and Activate
If you would like to create a rule with a delayed action, to reply to a customer for example, you can see how to set this up in the Rules - Main Use Cases article.

Date formats in rules 

It is very simple to trigger a rule according to a particular date using the following date format: weeks (w), days (d), hours (h), minutes (m) and seconds (s). 

This applies to the following date conditions in your rules:

Ticket:

  • Closed datetime 
  • Created datetime 
  • Last message datetime 
  • Last received message datetime 
  • Opened datetime 
  • Updated datetime

Message: Created datetime

Example: Ticket closed datetime is less than or equal to 3d 2h 20m.

For more tutorials on how to set up some of the most common rules, feel free to check out our guide here as well as our video tutorials here


How did we do?


Powered by HelpDocs (opens in a new tab)