N/task/accounting/recognition Module
Use the N/task/accounting/recognition module to merge revenue arrangements or revenue elements. A revenue arrangement is a transaction that records the details of a sale for the purposes of revenue allocation and recognition. The N/task/accounting/recognition module lets you combine revenue arrangements or revenue elements from multiple sources to represent a single contract obligation for revenue allocation and recognition.
You can use the recognition.create(options) method to create a merge task that combines entire revenue arrangements or individual revenue elements. This method returns a recognition.MergeArrangementsTask object (when merging revenue arrangements) or recognition.MergeElementsTask object (when merging revenue elements). After you obtain one of these objects, you can set its properties, such as the list of arrangements or elements to merge, the date on the merged revenue arrangement, whether to prospectively merge arrangements, and so on. You can use these properties to specify the same input data that you can specify when you merge revenue arrangements using the NetSuite UI. After you set its properties, you can submit the task for processing. Merge tasks are processed asynchronously.
You can use the recognition.checkStatus(options) method to check the status of a submitted merge task. This method returns a recognition.MergeArrangementsTaskStatus object that describes the current status of the merge task (pending, processing, complete, or failed). This object represents the current status for either a recognition.MergeArrangementsTask or a recognition.MergeElementsTask. If the task completes successfully, this object includes the ID of the merged revenue arrangement record that was created. If the task fails, this object includes an error message that describes the failure.
To merge revenue arrangements or revenue elements using the N/task/accounting/recognition module, the following requirements must be met:
-
The Advanced Revenue Management feature must be enabled in your account. For more information, see Enabling the Advanced Revenue Management (Essentials) Feature.
-
Your role must have the (Transactions) Revenue Arrangement permission assigned at a level of Create or higher. For more information, see NetSuite Permissions Overview.
For more information about revenue arrangements, see the following help topics:
-
Revenue Arrangement Management — This topic describes revenue arrangements in general.
-
Combination and Modification of Performance Obligations — This topic describes the different types of merge results (combined revenue arrangements and prospective change orders).
-
Revenue Arrangement — This topic describes the revenue arrangement record type, including scripting considerations, supported script types, and sublist fields.
In This Help Topic
N/task/accounting/recognition Module Members
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Object |
Object |
Server scripts |
Encapsulates a task to merge all of the revenue elements from a specified list of revenue arrangements. Use recognition.create(options) to create this object. |
|
Object |
Server scripts |
Encapsulates the current status of a submitted merge task. Use recognition.checkStatus(options) to create this object. |
||
Object |
Server scripts |
Encapsulates a task to merge all of the specified revenue elements. Use recognition.create(options) to create this object. |
||
Method |
Server scripts |
Checks the status of a submitted merge task. |
||
recognition.MergeArrangementsTask | recognition.MergeElementsTask |
Server scripts |
Creates a merge task that combines entire revenue arrangements or individual revenue elements. Use values in the recognition.TaskType enum to specify the type of merge task to create. |
||
Enum |
enum |
Server scripts |
Holds the string values for supported merge task statuses. This enum is used to represent the task status in a recognition.MergeArrangementsTaskStatus object. |
|
enum |
Server scripts |
Holds the string values for supported merge task types. This enum is used to pass the task type argument to recognition.create(options). |
MergeArrangementsTask Object Members
The following members are available for a recognition.MergeArrangementsTask object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
number (read-only) |
Server scripts |
Submits the merge task for processing. This method returns a task ID that uniquely identifies the merge task. |
|
Property |
Array< |
Server scripts |
Holds an array of internal IDs of the revenue arrangement records to merge. |
|
MergeArrangementsTask.contractAcquisitionDeferredExpenseAccount |
number | string (read-only) |
Server scripts |
References the contract acquisition deferred expense account for the new revenue arrangement. This property is valid only if the accounting preference Enable Advanced Cost Amortization is enabled. For more information, see Advanced Cost Amortization. The default value is the account specified by the accounting preference Contract Acquisition Deferred Expense Account in your account. |
|
number | string (read-only) |
Server scripts |
References the contract acquisition expense account for the new revenue arrangement. This property is valid only if the accounting preference Enable Advanced Cost Amortization is enabled. For more information, see Advanced Cost Amortization. The default value is the account specified by the accounting preference Contract Acquisition Expense Account in your account. |
||
JavaScript Date (read-only) |
Server scripts |
Describes the contract cost accrual date to use for the new revenue arrangement. This property is valid only if the accounting preference Enable Advanced Cost Amortization is enabled. For more information, see Advanced Cost Amortization. The default value is today’s date. |
||
boolean (read-only) |
Server scripts |
Indicates whether the revenue arrangements are merged prospectively. For more information about prospective merges, see Prospective Merges. The default value is |
||
boolean (read-only) |
Server scripts |
Indicates whether to recalculate the fair value on residual elements when revenue arrangements are prospectively merged. For more information about prospective merges, see Prospective Merges. This property can be set to |
||
JavaScript Date (read-only) |
Server scripts |
Describes the date of the new revenue arrangement. The default value is today’s date. |
MergeArrangementsTaskStatus Object Members
The following members are available for a recognition.MergeArrangementsTaskStatus object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Property |
string (read-only) |
Server scripts |
Holds an error message that describes the failure of the merge task. This property is valid only if the value of the status property is |
|
number[] (read-only) |
Server scripts |
Holds an array of internal IDs of the revenue arrangement records to merge. This property is valid only if the merge task was created using a task type of |
||
number[] (read-only) |
Server scripts |
Holds an array of internal IDs of the revenue elements to merge. This property is valid only if the merge task was created using a task type of |
||
number | string (read-only) |
Server scripts |
References the internal ID of the new revenue arrangement that was created. This property is valid only if the value of the status property is |
||
string (read-only) |
Server scripts |
Represents the current status of the merge task. This property uses values in the recognition.TaskStatus enum. |
||
number | string (read-only) |
Server scripts |
References the submission ID of the merge arrangements bulk process. |
||
number | string (read-only) |
Server scripts |
Holds the task ID of the merge task. The task ID is assigned to the merge task when you call recognition.create(options). |
MergeElementsTask Object Members
The following members are available for a recognition.MergeElementsTask object.
Member Type |
Name |
Return Type / Value Type |
Supported Script Types |
Description |
---|---|---|---|---|
Method |
number (read-only) |
Server scripts |
Submits the merge task for processing. This method returns a task ID that uniquely identifies the merge task. |
|
Property |
number | string (read-only) |
Server scripts |
References the contract acquisition deferred expense account for the new revenue arrangement. This property is valid only if the accounting preference Enable Advanced Cost Amortization is enabled. For more information, see Advanced Cost Amortization. The default value is the account specified by the accounting preference Contract Acquisition Deferred Expense Account in your account. |
|
number | string (read-only) |
Server scripts |
References the contract acquisition expense account for the new revenue arrangement. This property is valid only if the accounting preference Enable Advanced Cost Amortization is enabled. For more information, see Advanced Cost Amortization. The default value is the account specified by the accounting preference Contract Acquisition Expense Account in your account. |
||
JavaScript Date (read-only) |
Server scripts |
Describes the contract cost accrual date to use for the new revenue arrangement. This property is valid only if the accounting preference Enable Advanced Cost Amortization is enabled. For more information, see Advanced Cost Amortization. The default value is today’s date. |
||
Array<number | string> (read-only) |
Server scripts |
Holds an array of internal IDs of the revenue element records to merge. |
||
JavaScript Date (read-only) |
Server scripts |
Describes the date of the new revenue arrangement. The default value is today’s date. |