Workflow Initiation
For all workflows, you must specify when NetSuite initiates an instance of the workflow. You can set a workflow to initiate based on an event or based on a schedule.
If a workflow initiates based on an event, the workflow runs when a record of the base record type is created or updated. If a workflow initiates on a schedule, the workflow runs at the date and time in the schedule, against a set of records that meet criteria defined in a saved search.
A workflow must include at least one state before it initiates. Whenever a workflow initiates, NetSuite creates a new instance of the workflow. Multiple instances of the same workflow can be running simultaneously on different records.
You specify when the workflow initiates on the workflow definition page:
-
Based on an event. The workflow runs when a user creates or updates a record of the base record type for the workflow, against each record that is created or updated. For example, a lead nurturing workflow initiates when a Sales Rep creates a Lead record. This workflow runs against that newly created record.
For more information, see Initiating a Workflow on an Event.
-
Based on a schedule. The workflow runs on a recurring basis at defined time intervals, or on a one-time basis at a specific day and time. The workflow runs against records that are returned as results of a selected saved search. For example, you can create a workflow that runs every month and uses a saved search to find customers with at least one sales order, and sends the customer a welcome email.
For more information, see Initiating a Workflow on a Schedule. To test a scheduled workflow, you can execute it on demand.
Typically, you specify workflow initiation on the workflow definition page. However, you can also initiate a workflow in one of the following ways:
-
Using SuiteScript. Use SuiteScript to programmatically initiate a workflow on-demand against specific records. You must first create the workflow on the workflow definition page and then use SuiteScript to initiate the workflow. For more information, see Using SuiteScript to Initiate a Workflow.
-
Using the Initiate Workflow action. Run another workflow from within the current workflow. For more information, see Initiate Workflow Action.