HomeGuidesDeveloper HubRelease Notes
Get supportBook a chat
Guides
These docs are for v2.152. Click to read the latest docs for v2.208.

Best Practices

Have an idea for a new best practice? Tell us via Suggest Edits!

In the process of implementing your program, there are some best practices to take into consideration. Sebastian, our engineering expert, has prepared some pro tips just for you.

942

Which Fielo objects should I write a trigger on?

NONE. This is a poor practice. Creating triggers on Fielo objects can result in upgrade issues and troubleshooting difficulties. The order of execution of methods in our package may change and impact on DML functionality (i.e. updates, inserts, etc.).

If you must make any exceptions, avoid DML operations and contact customer support regarding any triggers on the Transaction, Point or Member objects.

Should I put a criterion on the Rule Trigger or on the Rule or Mission?

You can define one “master” criterion in the Rule Trigger. This criterion is what will trigger the rules engine. In essence, any Salesforce record that does not meet this criteria will simply be ignored by Fielo.

555

Example Rule Trigger

In the Rule or Mission, on the other hand, you can define many criteria. These criteria will be evaluated after the rules engine has already been triggered by a Salesforce record.

It's best to put in the Rule Trigger the criterion that will eliminate the greatest number of records. This will reduce the number of Apex calls that Fielo makes and thus will improve system performance. Then, put any additional criteria in your Rules and Missions.

Alternatively, you can create multiple Rule Triggers for a behavior. For example, you can create a different Rule Trigger and Action for each stage of Opportunity and use them in the corresponding incentives.

What order should I put criteria in?

Criteria are evaluated in the order in which they’re placed on the list. In other words, Criteria 1 is evaluated first, 2 is evaluated second, etc.

1148

Example Incentive Criteria

This means that you should put the most eliminatory criterion first, the second-most next, and so on. For example, if you’re incentivizing expensive orders, and most orders will have a low amount, put the amount criteria first.


Did this page help you?