Pro Code + Low Code = More Fun For All

Badges Claimed: Power User Love, Go With the Flow

Sometimes it’s quite fun to mix together plug-ins and cloud flows. The key advantage of a plug-in is we can more flexibly specify our logic and ensure we can run things synchronously; whereas with cloud flows, it’s a great tool for background processing or “simple” automations, while also providing some discrete functionality not available to plug-ins, such as modern approvals. Mixing these tools together can only lead to good things, and would surely make Professor Slughorn proud.

Let’s first of all set the scene: our OwlExpress solution needs to flag whenever a young student is processed by the tool containing a Characteristic that could be concerning. For example, any student with the “Parsletounge” characteristic is almost certainly a potential heir of Slytherin, and needs to be watched carefully. So we need automate the following steps to help make this process smooth:

  • On Associate of a new Chracteristic, check it’s value and, if it’s one of concern, update a flag on the Student (Contact) record accordingly to indicate a possible future death eater.
  • Once this flag is updated, send out an approval so that a Teacher can check this manually and make a decision either way. Human in the loop here is crucial to avoid any bias from automated decision making, and to ensure the school does not get sued 😉

There is no out of the box trigger for Associate with cloud flows, but fortunately. this is where a plug-in can come to the rescue. First we see an example below of the code we use:

This presented an interesting challenge, as no one on the team had previously written a plug-in for this message. One interesting thing to note is that when registering the plug-in step, it’s not possible to specify a primary / secondary entity. This is why the code has to do some specific checks for the relationship name:

Everything works fine with the code, and once the appropriate flag field is updated, we can then finalise the remaining requirements using a cloud flow:

A teacher can then review and faciliate an auditable mechanism for the human reached decision, saving a great deal of time and effort in having to analyse prospective student profiles manually. We think this is a really great way of mixing together both of these tools to automated a business process!

Leave a Reply