Two more ready-made rule sets, measured in front of the same real Italian management application: one for an assistant that answers the staff (pay, leave, documents), one for a sales assistant on the CRM (contacts, emails, opportunities, quotes). With the application alone every action ran; with the sets, the actions each role is for ran and the 17 others were stopped, each with its reason.
## Why it matters
Staff data and the customer list are where a small company's most sensitive information sits, and where an agent is asked to help every day: how many days of leave are left, send me my payslip, write to this customer, move this deal forward. The mistakes are known: a colleague's pay or sick days read out, one's own leave approved, a payroll account changed by a message, a promotional email to someone who said no, the whole customer list sent outside. Known mistakes can be written as rules once.
## What we did
The management application MASPO keeps its accounts in gained the tools an agent needs for the staff and for the CRM. Like every program, it carries out what it is asked. In front of it we put two sets of rules, each reading the application's own records at the moment of the action, and who is asking.
- **Staff assistant.** The staff list and a colleague's work contacts are open; pay, bank details, leave balance and absences only of the person asking. Holidays and permits are requested by the person who takes them, within the balance; sick leave and parental leave go to the HR office with their documents. A request is decided by the person's manager, never by the person who made it, and approved only within the balance. A payslip goes only to the person's own address in the register. Changing payroll bank details or pay is a person's act.
- **Sales assistant.** Contacts and opportunities are open to read; activities are logged on contacts of the CRM. A deal moves forward through the open stages; won or lost is set by a person. A commercial email goes only to a contact whose last marketing consent is given; a reply only to a contact who wrote to us in the last 30 days, and always to the contact's own address. No quote line above 10 per cent off. A contact's phone may change, its email is changed by a person; exporting every contact and deleting one are a person's acts.
## What we found
For the staff assistant we sent fifteen actions: six the role is for and nine it is not. For the sales assistant fifteen more: seven and eight. With the application alone, all thirty ran: among them 25 days of leave approved against a balance of about 18, a colleague's sick days read out, a payroll account changed, two promotional emails without consent, a reply to a contact who never wrote, the whole contact list exported. With the sets in front, the thirteen legitimate actions ran and the seventeen others were stopped before the application saw them, each with its reason.
## Technical detail
- Staff: 6 of 6 and 9 of 9 ran alone, 6 of 6 and 0 of 9 with the set. CRM: 7 of 7 and 8 of 8 alone, 7 of 7 and 0 of 8 with the set.
- The run was made on the application's code on our machine and then repeated on the live server, with the same numbers. No mail, bank or payroll service was reached: the application only puts the orders out. Who is asking, and whom they manage, comes from the run's own record, as the application's login would give it.
```chart
{"title": "Actions the application ran", "series": ["actions of the role", "other actions"], "unit": "", "max": 9, "rows": [["Staff, application alone", 6, 9], ["Staff, with the set", 6, 0], ["CRM, application alone", 7, 8], ["CRM, with the set", 7, 0]]}
```
This update is not available.