added

Smart Rules

Our rules engine has functions to manipulate almost anything – modify text, calculate numbers, use conditional logic, or execute other data changes. But for some truly complex, yet common tasks, that might require stitching together quite a number of functions to get the result you need.

For example, take setting the item status code on the 855 (Purchase Order Acknowledgement). Let's say your trading partner ordered 10 cases of pencils at $10.00 per case. Unfortunately though, your trading partner's information is out of date, so they didn't know the price per case is now actually $10.50. As a result, in the PO Acknowledgement, you need to set the status for the item as 'IP' to signify that the actual price is different from what was specified in the 850 (Purchase Order). This might be a problem if your integrated system of record doesn't store the original 850 as it was received, but instead simply overwrites the price with the new value.

Here's the logic we would need to execute in order to set the item status:

  • We need to find the original 850
  • We need to match each line item in the 850 with the corresponding line item in the 855 (extra hard depending on how your trading partner references an item)
  • We need to compare the price
  • We need to compare the quantity
  • We need to compare the units of measure

That's a lot of logic to write for a single element. In fact, with our existing functions, it would take over 60 deeply-nested functions – not something easily done!

Enter the smart rule! With smart rules, we give you the ability to execute pre-written, common EDI tasks in a single line. All of the above can be accomplished with a single function call to SMART("itemStatusCode") as seen below:

1425

Check out the documentation or try it yourself in Orderful today.

Changelog

  • added: New SMART function
  • fixed: Turnaround rule business number reference were broken
  • fixed: Empty guidelines codes always caused a validation error