Rules Conditions and Actions guide [Information]

Modified on Mon, 14 Oct at 7:32 PM

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

This article describes how to handle the possible conditions, operations and actions available:



CONDITIONS


Conditions will have one of two results once it's evaluated: True or False.

For example, if you have a condition that checks if the Sales Channel is Shopify, which you would define as Sales Channel > Equal > Shopify, and as orders come into techOMS, that rule will detect if that is either True or False.




If the result is True, techOMS will take the path of the default branch that you set up in the rules workflow, whereas if False, whatever other path of action you specify.


Operators and more conditions can be added, for example, if the order comes from Shopify AND is International (in this case we're taking Canada as Domestic), you could expand the rule by adding one condition with the Plus sign, and then defining it properly:


 

You will then find four three logical operators at hand:

  • NOT: Will result in True when the condition is NOT met
  • AND: Will result in True when BOTH conditions are met
  • OR: Will result in True when AT LEAST ONE of the conditions is met

PARAMETERS AND OPERATORS


When setting up a Condition, these will consist of three parts:

  • A Parameter (e.g. Stock)
  • An operator (e.g. Less than)
  • A value (e.g. 100)


A condition set up with these three elements, will result in True or False, and will lead to the action that is determined based on that result.

The available Parameters are:


  • Order
    • Order number: Order number as mapped from the Vendor System
    • Reference number: Reference number as mapped from the Vendor System 
    • Source 
    • Ship To Address: Destination Address fields
      • Country
      • State
      • City
      • Postal Code
      • Contact Name
      • Contact Company
    • Bill To Address: Billing Address fields
      • Country
      • State
      • City
      • Postal Code
      • Contact Name
      • Contact Company
    • Total: Total value of the order
    • Fraud Risk Score: As provided from the Sales Channel (when available)
    • Sales Channel: Origin Sales Channel
    • Warehouse: Preassigned Warehouse if any
    • Carrier
    • Shipment type: Order's Shipment type (Small Parcel or LTL) at the order level
    • Service
    • Notes: Order notes value
    • Reference Code
    • Reference Value
    • Tag value (when supported)
    • Line
      • Number
      • SKU Code
      • Quantity
      • Reference Code and Value
    • Product Variant References
      • Reference Code and Value
    • Target Variables
      • Status
      • Warehouse
      • Carrier
      • Shipment Type: Determine if it is Small Parcel or LTL  
      • Service
      • Expected Delivery Days
      • Expected Delivery Cost
      • Expected Delivery Is Weekend: True or false, to determine if it is a weekend shipment or not
      • Expected Delivery Day of the Week
  • Functions
    • Is Enough Stock: Allows to check either True or False based on the stock level
    • Ship to Postal Code: Converts postal code string to number if possible, allowing you to set conditions on ranges (e.g. under than 20000)


Once selecting one, you will need an operator. Depending on the parameter type, you will have different operators available to choose from:



OPERATOR
DEFINITION
FOR TEXT
FOR NUMBER
EqualVerifies if the parameter is equal to the value 
Not EqualVerifies if the parameter is different to the value
Starts WithVerifies if the parameter starts with the entered value
Ends WithVerifies if the parameter ends with the entered value
ContainsVerifies if the parameter contains with the entered value at any point of it
InAllows to verify if a value matches with more than one value at a time for a parameter with comma separated values (e.g. CA, US, GB, MX)   
Not InAllows to verify if a value is not within one of the values you can enter at a time for a parameter with comma separated values (e.g. CA, US, GB, MX)  
Is NullVerifies if the parameter is null
Is Not NullVerifies if the parameter is not null, regardless of the value
Greater thanVerifies if the parameter is greater than the entered value
Greater Than or EqualVerifies if the parameter is greater or equal than the entered value
Less ThanVerifies if the parameter is less than the entered value
Less Than or EqualVerifies if the parameter is less or equal than the entered value 

ACTIONS


When adding the Steps, these could be to perform actions, which you can link to your conditions later:



ACTION
DESCRIPTION
SCREENSHOT (Click to zoom in)
ConditionAllows you to set Conditions, using OR, AND and NOT operators
Set Status ActionAllows you to set different statuses to the Sales Order, which you can choose from a dropdown (Draft, Approved, Cancelled)
Send to Warehouse ActionAllows you to send the Sales Order to a specific warehouse, which you can choose from a dropdown
Send Notification ActionAllows you to send a Notification to e-mail addresses, detailing the subject and message body, written and also able to insert value variables (Order numbers, Warehouse, etc) 
Add Line(s) ActionAllows you to add Lines to an order, indicating the product(s) and quantity 
Remove SKU(s) ActionAllows you to remove SKUs matching the codes detailed; you can also choose to remove all unmatched product variant lines if the box is checked
Calculate Enough Stock ActionAllows you to create a list of warehouses with priorities, which will be used for calculation, depending on the available stock; if combined with the Select Warehouse Action, it should be used before it
Calculate Time & Transit ActionAllows you to create a list of warehouses with priorities, which will be used for calculation, depending on the transit time; if combined with the Select Warehouse Action, it should be used before it 
Select Warehouse Action

Allows you to select the optimal warehouse based on the following criteria, and if there is enough stock if the box is checked:

  • Warehouse Priority: Selects the warehouse with the highest priority (taking 1 as higher)
  • Shortest Transit Time: techSHIP returns delivery time and cost and techOMS selects the carrier/service with the lowest delivery time; If there carriers with the same lowest delivery time, techOMS selects the cheapest from them 
  • Lowest Shipping Cost: techSHIP returns delivery time and cost and techOMS selects the carrier/service with the lowest cost 


Ignore Time in Estimated Delivery Date will also determine the behavior, if:

  • Unchecked: Rate shopping responses include estimated time as part of the techSHIP response

  • Checked: Rate shopping response from techSHIP disregards estimated delivery time and techOMS displays date only


NOTE: No time zone conversion is required; the date and time are already in the local (destination) time.


Set Carrier and Service ActionAllows you to force a Carrier and Service level to the order; you can also check "Use Target Variables" if you will have a Select Warehouse action that will populate CarrierID and ServiceID prior
Set Carrier Account Action Allows you to force a Carrier Account to the order, specifying payment terms, number, postal code and account country
Add Order Reference ActionAllows you to add new Order References, and new Order Line References as required; it is necessary to define the Reference Type (value, variable, property), its code and the value based on the Type 


NOTE
: If you have consecutive Add Order Reference Actions in the workflow with the same Reference Code, these will concatenate their values; e.g. (if Action 1 and 2 have values A and B respectively, and their Reference code is both X, then the Reference Value will be A B.






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