Rules Worked Example

 

It is easier to understand the rule process by looking at an example, so let us work up our earlier example with Charlie, Paul and Phyllis.

 

Required Zetadocs Rules

To setup these rules we start with Paul and work our way through the organization.

 

Business Requirement

Staff are required to sign for the items they order to confirm receipt of goods. Charlie the manager of the Marketing team is required to sign off all purchases over £200 for his team, but will only do so if they have confirmed they've received the goods. Phyllis the Finance Director is required to sign off all purchases over £500 in the company. This applies to all purchasing documents.

 

Rule Description: Paul is the approver for items that he orders.

 

Company = Any

Leave this set to Any as there is only one company setup in this account.

Document Type = Any

Leave this set to Any as this companies rules apply to all documents.

If Purchaser Code = PS        

We select Purchaser Code because this is the best field available to identify Paul.

If Amount > leave blank

Left blank as we don't care what the value of the approval is.

If Amount < leave blank

Left blank as we don't care what the value of the approval is.

Action


 Approver = Paul Scarlet

 

add_rule_PS

 

Remember rows without inputs are ignored so this rule reads as follows: "If the Purchaser Code is PS then the approver is Paul." The need for staff to sign for their orders means in a real world implementation we would also need a similar rule for each approver on the system.

 

Next we need to create the rule to cover Charlie Violet the Marketing Manager.

Rule Description: Charlie approves all items over £200 for the marketing team.

 

Company = Any

Leave this set to Any as there is only one company setup in this account.

Document Type = Any

Leave this set to Any as this companies rules apply to all documents.

If Department Code = MKT                

We select Department Code because we want this to apply to only approval requests for the Marketing team

If Amount > 200        

We add 200 to the field indicating only approvals above this value should be assigned to Charlie

If Amount < leave blank        

Left blank as we don't require another condition

Action


 Approver = Charlie Violet

 

add_rule

 

Remember rows without inputs are ignored so this rule reads as follows: "If the Department Code is MKT and the Amount is greater than £200 then the approver is Charlie."

 

 

Finally we need to create the rule to cover Phyllis the Finance Director.

Rule Description: Phyllis approves all approvals with a total greater than £500.

 

Company = Any

Leave this set to Any as there is only one company setup in this account.

Document Type = Any

Leave this set to Any as this companies rules apply to all documents.

If Select Field = leave blank                

Left blank because we want this to apply to all approval requests

If Amount > 500        

We add 500 to the field indicating only approvals above this value should be assigned to Phyllis

If Amount < leave blank        

Left blank as we don't require another condition

Action


 Approver = Phyllis Green

add_rule_PG

Remember rows without inputs are ignored so this rule reads as follows, If the Amount is greater than £500 then the approver is Phyllis. By creating this rule last it will be at the bottom of the list meaning that Phyllis's rule will be applied last, adding her in at the end of the process.

 

Now we have our rules configured we can see how they operate, to do this return to the Rules page and locate the Enable Rules button this will result in all approvals being started reviewing the list and allocating approvers based upon the rules.

 

DisableRules

 

Continuing with our example, if Paul buys £800 of promotional materials for an upcoming Marketing campaign when the approval is started Zetadocs checks the associated data and compares it to the rules on the system in order. So we have an order for Paul which will have his purchaser code and as its for marketing will also have the corresponding department code.

 

Rules in the system

Paul is the first approver for items that he orders.

Charlie approves all items over £200 for the marketing team.

Phyllis approves all approvals with a total greater than £500.

 

The first match is obviously Paul so we add him to the list of recommended approvers as the first approver. The system then checks to see if any other rules match, finding Charlie as the next approver because it is for his department and is over £200 thus requiring his approval. Zetadocs then checks the rules again finding Phyllis as it is over £500.

 

First Approver: Paul Scarlet

Next Approver: Charlie Violet

Next Approver: Phyllis Green

 

Should Paul's next purchase by for £450 then the same rules would be used, this time resulting in a different workflow:

 

First Approver: Paul Scarlet

Next Approver: Charlie Violet

 

In this way you can build up a series of independent rules which will ensure that approval requests flow around your organization as per your businesses requirements.