The article below details a sample Workflow that automatically bills Sales Orders returned by a saved search
It is scheduled to run every day at 5PM Pacific. A brief description of each action and setting is also provided.
1) Create a saved search for sales orders that needs to be billed.
a. Navigate to Lists > Search > Saved Searches > New > Transaction.
b. Fill out the desired Filters (eg. Status = Sales Order: Pending Billing)
Note: While testing the Workflow, it is best to modify the saved search so that it returns only test data. That way, only test data is affected while the Workflow and Saved Search are being fine-tuned.
2) Create a Workflow by navigating to Setup > Customization > Workflows > New.
In the Workflow Summary page, set the following options and save the Workflow:
- Record Type : Transaction
- Sub-type : Sales Order
- Release Status : Released
- Initiation : Scheduled
- Saved Search : Saved Search from Step 1
- Repeat : Checked
- Frequency : Daily (other values are every 30 minutes, Weekly, Monthly, and Yearly)
- Execution Time : 5PM (Timezone is based on current user's timezone)
- Repeat Every : 1 day
3) Create a new State by clicking on the New State button at the upper left portion of the Workflow page. Name the state, and save it.
4) Click on the State from Step 3, and create a new action. Select the Transform Record action
Set the following options and save the Workflow Action:
- Trigger On : Entry (We don't need to specify the trigger to be 'Scheduled', as the Workflow is already triggered on a schedule)
- Record Type : Invoice