Business Events
Business Events is the back-end technology in NetSuite that enables the automation of business processes. Examples of business processes include the assignment of locations to sales order lines and the creation of fulfillment requests. NetSuite runs the business processes when a business event occurs on a transaction or record in the system. A business event is the occurrence of an action on a transaction or record in the system. For example, when you approve a sales order, the Sales Order Approved business event occurs. Based on that business event, NetSuite can then start a business process, such as automatic location assignment.
The business processes that run in response to a business event do so in an asynchronous way. In NetSuite, this means that when you perform an action on a transaction that generates a business event, the business process runs in the background and you can continue working in the application, without having to wait for the process to finish.
Features that use business events in NetSuite include the following:
-
Automatic Location Assignment. See Automatic Location Assignment.
-
Fulfillment Requests. See Fulfillment Request Creation.
-
Time-Off Management. See Time-Off Management.
When you enable any of these features, the business events framework is also enabled automatically in your account.
When a business event occurs on a sales order, NetSuite runs the corresponding automation processes according to the advanced order management settings. You can view the business events processing history of a sales order. To view the business events for a sales order, open the sales order record, click the System Information subtab, and then click Business Events Processing History. The business events processing history includes the following information:
-
Date created – Shows the date and time at which the business event occurred.
-
Event name – The name of the business event.
-
Event handler – The action performed by the system when the event occurs. For example, when the Sales Order Approved event occurs, NetSuite might run the Automatic Location Assignment process.
-
Status – Indicates the result of the action performed by the system. Statuses include Pending, Completed, Retrying, and Failed. See Business Events Statuses for more information about statuses.
-
Summary status – Indicates the outcome of the automation process. Click See more to view more information about this process. Some automation processes may not provide detailed information.
To view business events processing history on a record, you must have view permissions for the record. See Access Levels for Permissions for more information about permission types in NetSuite.
To view business events on a sales order
-
Go to Transactions > Sales > Enter Sales Orders > List.
-
Click View next to the sales order you want to work with.
-
Click the System Information subtab, and then click Business Events Processing History.
Business Events Related to Automatic Location Assignment
The Automatic Location Assignment feature uses business events to assign or reassign a fulfillment location to sales order lines. You can choose which business events are used to run the automatic location assignment process. For example, when you approve a sales order, the Sales Order Approved business event occurs in the system. Provided that you have configured the Sales Order Approved event for automatic location assignment, NetSuite will run the process.
Business events related to automatic location assignment occur only when the automatic location assignment process is configured correctly in your account and automation is turned on. See Automatic Location Assignment for information about choosing business events for automatic location assignment.
The following table describes the business events used by the Automatic Location Assignment feature:
Business Event |
Description |
---|---|
Sales Order Approved |
Occurs when a sales order is approved. |
Payment Hold Released |
Occurs when a payment hold is released on the sales order. |
Sales Order Changed |
Occurs when a sales order is changed. The following changes in a sales order cause the Sales Order Changed event to occur:
Changes to other fields on a sales order do not cause this event to occur. |
Item Fulfillment Changed |
Occurs when an item fulfillment is deleted, or a line in an item fulfillment is deleted. |
Fulfillment Request Rejected |
Occurs when one or more lines in a fulfillment request are rejected. This event can only occur when the Fulfillment Request feature is enabled. |
Automatic Location Assignment Executed |
Occurs after the automatic location assignment engine has processed all lines on a sales order. |
Business Events Related to Fulfillment Requests
The Fulfillment Request feature uses business events to create fulfillment request records automatically when a ship-from-store order or a pickup order is created in the system. A fulfillment request is a demand to fulfill a sales order and is designed to help store employees better manage orders at their location.
Business events occur on fulfillment requests only when automation is correctly configured and turned on for the fulfillment request creation process. For more information about setting up automation for fulfillment requests, see Fulfillment Request Creation.
The following table describes the business events used by the Fulfillment Request feature:
Business Event |
Description |
---|---|
Sales Order Approved |
Occurs when a sales order is approved. |
Payment Hold Released |
Occurs when a payment hold is released on the sales order. |
Scheduled Fulfillment Request Date Reached |
Occurs when the expected ship date is reached on a sales order line. |
Sales Order Line Expected Ship Date Changed |
Occurs when the expected ship date is changed on a sales order line. |
Automatic Location Assignment Executed |
Occurs after the automatic location assignment engine has processed all lines on a sales order. This event can only occur when automatic location assignment is enabled. |
End Of Fulfillment Request Process Schedule Reached |
Occurs when the wait period has elapsed. |
Business Events Related to Time-Off Management
The Time-Off Management feature uses business events to recalculate time-off accruals for employees. See Time-Off Management for more information.
The following table describes the business events used by the Time-Off Management feature:
Business Event |
Description |
---|---|
Employee Time Off Data Change |
Occurs when time-off data is changed. The Employee Time Off Data Change event is generated when any of the following actions occur in NetSuite:
|
Business Events Statuses
When a business event occurs on a record, NetSuite calls the event handlers associated with the event. An event handler refers to what the system does in response to the event. For example, if a payment hold is released on a sales order, the Payment Hold Released event occurs. Then, if automatic location assignment is configured to run when a payment hold is released, NetSuite starts assigning locations to sales order lines asynchronously and automatically.
Every occurrence of a business event has its own status, indicating the processing state of the handler. If business events processing is shown on the record, you can view the status of the event and its handler.
On the sales order record, business events statuses are shown on the System Information subtab. Other records that use business events might show business events statuses on a different tab.
The following table lists the most common business events statuses.
Business Event Status |
Description |
---|---|
Pending |
Indicates the event handler has not been run. |
Completed |
The event handler has completed. The Completed status does not necessarily mean that the desired outcome of the event handler was achieved. For example, the Automatic Location Assignment event handler attempts to assign locations to all lines in a sales order. If there is no inventory at any location, the event handler cannot assign a location, but can finish correctly (without errors). Therefore, the status appears as Completed. |
Retrying |
After making an unsuccessful attempt, the Automatic Location Assignment event handler starts retrying. This error occurs mostly because the necessary geodata could not be retrieved. The first retry takes place 10 minutes after the first unsuccessful attempt. If Automatic Location Assignment fails again, another retry occurs at 20 minutes. In this manner, retries occur at 40 minutes, 80 minutes, and 160 minutes after the first unsuccessful attempt. After the fifth and last unsuccessful retry, the status is set to Failed. |
Failed |
A failed status indicates an error occurred during the event handler processing that stopped it from completing. If available, details of the error are displayed on the related record. Details can include the following:
|
Skipped |
The event handler was skipped. You might see this status when disabling a feature after a business event is generated, but before the handler is called. |
Concurrency Limits
The handlers associated with business events typically run within a few seconds after the business event occurs. To ensure the system performs optimally, the number of handlers that can run simultaneously depends on the type of NetSuite account. Shared and dedicated accounts have different concurrency limits as described in the following table. A concurrency limit refers to the maximum number of handlers that can run at the same time in your account.
Account Type |
Concurrency Limit |
---|---|
Shared |
2 |
Dedicated |
10 |
If you are unsure of your NetSuite account type, contact your account representative.