Processing Orders of Trusted Customers Automatically
Problem
Default order flow is configured to make upgrade orders completion manual. Provider wants upgrade orders of trusted customers to be process automatically.
Solution
Grouping trusted customers. Customer class category is used to manage group of customers. Separate customer class should group trusted customers. For details on customers class configuration, refer to the Creating Customer Class section of the Provider's guide.
Conditioning upgrade orders processing. By default, upgrade order is created in the NW
(New) status. The NW
status has two manual transitions to the CL
(Cancelled) and OP
(Open) statuses. Manual transitions mean that provider should click button to trigger transition. Thus, newly created upgrade order will have two buttons Cancel Order and Open Order. One more transition of Auto type from the NW
status should be added to make trusted customers orders to be processed automatically. This automatic transition should be triggered only for orders that are placed by trusted customers. This can be achieved with the following condition: "@@Cust_Account_Customer_Class@"=="<Trusted_Customer_Class_ID>"
.
Eventually, order flow will work as following: upgrade order is created in the NW
status; Billing triggers auto transition first; if condition returns True order gets to the OP status automatically; if condition returns False order stays in the NW
status while manual transitions are not triggered.
Upgrade order to be processed manually will have two Open Order buttons and one Cancel Order button, due to three configured transitions from one status NW
. To avoid this, type "_Open Order" in the Action field of the automatic NW
to OP
transition.
Instruction
- Group trusted customers accounts under separate customer class.
- Go to System > Settings > Order Processing > Order Types.
- Open upgrade order type (UG) properties. Switch to the Order Flow tab. The list of available transitions appears on the screen.
- Add new transition with the following parameters:
- From=NW
- Success=OP
- Fail=NW
- Condition="@@Cust_Account_Customer_Class@"=="<Trusted_Customer_Class_ID>"
- Transition Type=Auto
- Action=_Open Order
Important: Transitions with similar statuses cannot be added.