PLEASE NOTE: ENABLING THE RULES ENGINE REQUIRES A LARGE AMOUNT OF DATA STORAGE, AND FOR THIS REASON THE RULES ENGINE CARRIES A $50/MONTH COST (for up to 50 active rules).
With FastGem's new Rules Engine, you can set up custom instructions specific to your instance. With Rules, you can define any number of actions, which will trigger the system to alert users, append notes, add tags to records, and much more!
*Note that rules may take up to 5 minutes from the time of the trigger until the action is completed.
To access your Rules Engine, head to Site Mgmt > Rules (Note this may be in a slightly different place in your instance depending on Customization):

If you have any rules already created, you can see them here. Note if they have an X in the Active column, the rule is inactive:

From here, you can click on a rule name to get a closer look, click to Edit a rule, or click Add Item at the top of the page to start a new rule from scratch.
NOTE: If you have multiple rules, be very careful to ensure your rules do not become triggered by each other to create an unending loop. Also be careful not to set up two rules that are both active at the same time but whose instructions contradict each other. If you have questions about rule set up, let FastGem support know at This email address is being protected from spambots. You need JavaScript enabled to view it.and we will be happy to assist you.
Below is an explanation of field meanings on the rules setup page, along with examples:
When setting up rules, you must first ensure your rule is Active.
Next, name your rule.
Select a Class for your rule. Class refers to which type of record in FastGem is being 'looked at' by the system to trigger the rule. (E.g. Person record vs Work Order record vs Rep record vs Inventory record.)
Next, decide whether you want the action taken to be scheduled and triggered in regards to a particular date field (for example, five days before the work order's Install Date), or to be triggered by a specific action taken by a user (for example, a work order is deleted or edited in some way), and select the Type of rule accordingly:

If you choose 'Scheduled' as the Rule Type, you will see options to define: a) how many days before or after the selected date the Rules engine will take action, b) whether this action should be taken Before or After the selected date, and c) what date should be used as a basis. For example, in the image below, the rule is set up to send an email to A Test Rep, 5 days Before the Install Date of a work order:

You can use the Object Conditions fields to add conditions to your scheduled rules. For example, in the image below, the rule is set up to send an email to A Test Rep, 5 days Before the Install Date of a work order, IF and only if the Provider attached to that work order is DIRECTV:

For more detail on Object Conditions, see below.
If you select 'Triggered' as the Rule Type, you will see an Action Log Trigger field, where you can define what action taken will trigger the rule to run. FastGem logs virtually every action that takes place within the system. Simply select which of these action types, when pertaining to the Class selected above, trigger the Rule to go into action. (E.g. Department change, Status change, flag added, etc.) You can select more than one log type as a trigger if you want multiple different log types to be able to trigger your action.
Object Conditions are optional and do not have to be selected in order for the rule to work. They are simply a way to further restrict/specify which exact actions need to take place within FastGem for a rule to be triggered. (For example, as shown in the image below, if your Action Log Trigger is Workflow Status Change on a Work Order, but you only want this rule triggered when the work order's Status is changed to Active, you can set up an object condition specifying WO Status to be equal to Active.) Note: conditions are taken into account at the moment the trigger takes place, not at the moment the rule runs (every 5 mins).

You can add multiple conditions onto one rule, and you can set up these conditions so that they must all apply at once (AND conditions) in order for the rule to be triggered, OR so that only one of these multiple conditions need apply (OR conditions) in order for the rule to be triggered. The AND/OR toggle above the conditions defines this.
You can also add 'groups' of rules that function semi-independantly of other groups and have their own AND/OR settings. For example, in the image below, this Test Rule will only trigger if at the moment of the trigger (Edit Item) a person record is assigned the Area 'Beverly Hills 2.0', AND the person record is also assigned either the Campaign 'Door to Door', the campaign 'Social Media', OR the campaign 'Another':

Note on Conditions: 'Is Empty' will sometimes appear as 'Is Null', depending on the type of field your object condition references. They do the same thing.
Once you have selected your Trigger and any Conditions, you can tell the system which Action it needs to take when the trigger and conditions are met.
Add Value as an action type can be seen exemplified in one of the examples above. Add Value should be used for adding values into multi-select fields (e.g. Tech Special Install, Package flags, etc.) without deleting any values previously existing in that field.
Set Value, in contrast, should be used either to completely remove and overwrite any existing values in a multi-select field, or to add/replace a value in a non-multi-select field (e.g. Processor channel, Install Notes, Campaign, etc.).
Append Value should be used for fields such as Install Notes or Account Number, which do not have any pre-set values to select from, but which may already contain manually entered values which you do not wish to overwrite, only append to.
Send Email and Send Push notification are self-explanatory action types and can be used to send notifications to specific users in the system, based on the permissions these users have.
You can also configure actions such as Add Rep Adjustment or Add Promotion.
For example, in the image below, the test rule is set up so that when a Work Order record has a follow up flag created for it, and either the follow up details include the word ASAP, or the provider attached to that work order is 'Other Provider', then an email containing the notification "Test Test Test" will be sent out to anyone with either 'Can Process' or 'Can Process QC' permissions.

Emails and push notifications sent via Rules automatically include a link to the relevant record, and information such as what action triggered the rule to run, etc.
If you don't want the rule running twice for the same record (if, for example, your action log trigger is 'Edit Item', that means that any time someone edits a record which meets the rule requirements, the same action will take place again), then toggle the 'Run Once' button to YES. This should, realistically, almost always be toggled to YES:

When your Action is set up to Send a Text, you can use these values to insert a customer's specific info into the text:
{{first_name}}
{{last_name}}
{{business_name}}
{{account_number}}
{{wo_num}}
{{install_date}}
{{package}}
{{install_time}}
{{install_end_time}}
{{tech_name}}
{{city}}
{{address}}
{{address2}}
{{us_state}}
{{zipcode}}
{{provider}}
{{rep_phone}}
When a rule runs, it is logged in the appropriate record's action logs.

Current Sale Count: If Work Order is selected as the Class for the rule, you will see a 'Current Sale Count' as an option in the Object Conditions dropdown. Current Sale Count is not a field visible in front end on a work order. What it counts is the number of successful sales that a particular rep has made (successfull = cleared status). So in the example below, the rule is set up to send an email when any rep succesfully clears their first sale in FastGem:

Rules Affecting Work Orders-- Payment Cleared Date:
If your rule affects work orders then you should be careful about the setup of your rule, in order to prevent it affecting work orders that have already been cleared and/or finalized through snapshot payroll. For example, the rule below assigns a new lead rep (Area Manager) to a work order when certain conditions are met. Changing the rep or lead rep on an order AFTER it has already been finalized through snapshot payroll can cause problems. So, to protect against these changes being made to work orders that have already been cleared, we need to tell the system to ignore all work orders with payment cleared dates set. Cleared Dates that have not been set yet, are stored in FastGem as 00/00/0000. So, to tell the rule to ONLY change work orders that do NOT have a payment cleared date set yet, we have added the object condition: Payment Cleared Date - Contains - 0000:

Segments and Rules:
You can use Segments to enhance Rule capabilities. If you are interested in using Segments, see THIS article.