CPQ Order Workflow
This Template is used to customize the work flow of an Order in CPQ.
It can be used to add new States and Tasks that are triggered when the Order is transitioned.
In this example tutorial, we will add a fourth State to the workflow and create a Task to run when the Order is moved into the new State.
Creating the new Order Workflow Project
- Create a new Project from the CPQ Order Workflow template.
- Open the Project in DriveWorks Administrator.
- To add a new State:
Copy and Paste the 'Ship' Macro button on the Portal Form.
- Rename the newly pasted button to be 'Complete'.
- Edit the Left property for the newly created button. Change the rule so it goes to the right hand side of the Ship button (change 'Order' to 'Ship') as below:
- Edit the Text Property to be a Static Value of 'Complete'.
- Change the Macro Argument Property to be a Static Value of Completed .
Completed is going to be the name that we will give to the Transition in the Specification Flow that we will create in the next section. The Macro that the Macro Button runs will run a Transition based on the Macro Argument supplied.
Before creating the Transition, we need to make one last alteration on the Main Form.
- Select the Main form.
- Select the Workflow Frame Control and Edit it's Width Property. Change the rule to be:
This rule changes how wide the Frame control is, so that the new 'Complete' Macro Button is visible.
Modify the Specification Flow.
- Go to Specification Flow.
- Create a new Automatic State called AutoCompleted.
- Create a Transition from the Running State to the new State named Completed (this is the Transition that will be run by the Macro Button previously created).
- Create a Transition from the newly created AutoComplete State to the StateChanged State. Name this Transition Completed.
The Specification Flow will be as the image below:
Adding a Task to run when the State is changed
- Edit the AutoCompleted State.
- Add any Macro Task required to run (for example, releasing an email, creating a document etc.).
Add the task to the Leave Event of the State.
- This Task will now run when the Order is moved into the Completed State using the Macro Button.
Test this works by creating a Text Document and releasing it on this State Change.
Instruct the CPQ DriveApp to use the new Project
- Open CPQ Settings.
- Register the Project created in the above section using the 'Project to register' Combo Box under General Settings.
Do NOT check the box for 'Is Project a Custom Item Project'
- Check the check box alongside 'Custom Workflow Project Required’ under Order Settings.
- Select the newly registered Project from the Combo Box that appears.
- Click Save at the top of the Settings Project to save the changes.
This Project will now be used when the Workflow tab is selected when editing Orders.
Historical Orders will now use this template.