How to Create Sales/Purchase Orders Rules [Step-by-step guide]

Modified on Mon, 21 Aug, 2023 at 12:29 PM

Rules workflow features allow you to set automatic actions whenever a Sales Order or Purchase Order matches specific conditions.

These conditions could be related, but not limited to the following fields and functions:

  • Order references
  • Sources
  • Ship-to address information
  • Total value
  • Sales Channel and Warehouse
  • Carrier and Service Levels
  • Tags
  • SKU information
  • Product variants
  • Warehouse or Source
  • Status and Expected Delivery Days
  • Stock values


Rule workflows are set up in different phases:



NOTE: Make sure that you are operating at the right Vendor/Warehouse beforehand.



To create a Rule workflow you will have to:


PHASE 1 - ADD THE RULE TO THE LIST


1. Click Order Rules under Sales or Purchases according to the case 


 

2. Click Create to deploy the basic fields for creation



  • Description: Name/Description of the Rule
  • Trigger: Moment when the routing workflow should be triggered
    • Create Order API: The Rule workflow will be executed when the Order is created in techOMS received via API
    • Allocate & Fulfill Order UI: The Rule workflow will be executed when the Order is manually Allocated and Fulfilled from the techOMS user interface



PHASE 2 - DEFINE AND CONFIGURE THE STEPS AND ACTIONS


3. Edit the newly created Rule to define the steps and actions to be applied


4. Each Rule workflow has steps, which you'll have to add and configure; Press Add and choose the step type:


  • Condition: Allows to define conditions with different actions
  • Set Status Action: Enables you to set a step to modify the order status based on your conditions
  • Send To Warehouse Action: Enables you to set a step to send the order to the Warehouse based on your conditions 
  • Send Notification Action: Enables you to set a step to send notifications based on your conditions
  • Add Line(s) Action: Allows to add lines to the order based on your conditions
  • Remove SKU(s) Action: Allows to remove SKUs from an order based on your conditions  
  • Calculate Enough Stock Action: Calculates if there is enough stock based on your conditions 
  • Calculate Time & Transit Action: Calculates the transit time based on your conditions 
  • Select Warehouse Action: Allows to select a Warehouse based on your conditions 
  • Set Carrier & Service Action: Allows to set a Carrier and/or Service based on your conditions 
  • Set Carrier Account Action: Allows to set a Carrier Account based on your conditions 
  • Add Order Reference Action: Allows to set an order Reference based on your conditions 



5. Press Setup and configure the condition and action; if you are not acquainted with them, you can find the list and details in the Rules Conditions and Actions guide [Information] article



  • Description: Description of the step which will be displayed in the workflow
  • Condition(s): Definition of the condition(s) including field, operator and value(s)
  • Action: Action to take if the condition is met


6. Repeat the process for as many Steps you need to define


WARNING: The conditions set in one step do not transfer to the following ones. If you have the same condition for a step as one you set up before, you need to configure it as well. 


For example, if you need to automatically approve orders under 500 dollars of value and send them to the Warehouse, and draft those that are valued 500 and over as well as notifying a supervisor for manual review you would:

  • Set up one Step with condition of Value < 500 and action Approve
  • Set up one Step with condition of Value < 500 and action Send to Warehouse
  • Set up a last Step with condition of Value >= 500 and action Set as Draft
  • Set up one Step with condition of Value >= 500 and action Send Message


Which will look like this:





PHASE 3 - SAVE AND CONFIRM THE CHANGES


Your steps will be now visible. 

These can be rearranged if necessary by dragging and dropping them in the timeline, take into account that these will execute in the order you specify so.


Nevertheless, these have not been yet saved to your Rule.


7. Press Save to apply the changes








Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article