How to configure rules and formulas for state / state operation / operation email