Is it better to have a longer automation rule or multiple automation rules?

Tyler Stephens December 9, 2021

In this scenario, I have an automation rule that modifies a text field box based on what the customer fills out in the portal. In the portal I have 1-10 item fields (fields are dynamic, up to 10 different items can be picked if needed, or as little as 1) that can be selected (based on the amount needed by the customer). 

I have devised the automation in two ways:

  • 1st way: Use the Current Issue branching rule to modify the field based on the amount of fields the user used.
  • 2nd way: Break up the automation into separate rules that are only fired if for example: user selects items 1-9, therefore the automation for 9 items will be triggered.

So my question is: Will the Current Issue branching rule cause a degradation in performance?

Thanks. 

*1st Automation shown below*

Screen Shot 2021-12-09 at 1.42.32 PM.png

 

 

2 answers

2 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2021

Hi @Tyler Stephens 

What problem are you trying to solve? This is what I use to guide the automation rules I write...

  • If the problem requires a single atomic operation one rule is often better
  • If the problem can be split up to solve it in pieces without altering the intent, multiple rules may help with maintenance, error handling, and perhaps performance

Regarding your question about branching: according to documentation and community posts, branches which evaluate at design time to one-and-only one issue (e.g. current issue branch) get converted into in-line code and so are as fast as possible.  Multi-issue branches get executed asynchronously and there is no guarantee when the spun off pieces will complete...and certainly not before the next steps after the branch.  So indeterminate performance and certainly slower.

Kind regards,
Bill

0 votes
Answer accepted
Florian PEREZ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2021

In my opinion since it a good practice to :

  • End the automation with condition the earlyest possible
  • Globally you want to be able to reuse code 

It always better to go for the short!

You'll have more chance to reuse the parts for other purpose, and you'll reduce the impact.

Talking purely about performance it should be almost the same but you can try both of the solution and see in the log how many time it take to run!

Suggest an answer

Log in or Sign up to answer