Quality Management Bundle Integration
NetSuite lets you use SuiteScript to interact with the Quality Management SuiteApp. These integration types can create and manage inspections on the Quality tablet for your organization.
Prior integration techniques used RESTlets to enable external applications to perform these actions, but that was hard to develop and maintain. The new SuiteScript approach lets you use User Events, Suitelets, or Scheduled scripts to work with the Quality Management SuiteApp. These methods don’t need extra authentication or worry about bundle dependencies when delivered through the bundle.
Integration Module
To avoid server integration issues and bundle tangles, there’s an integration module that wraps the right methods and exposes them for SuiteScript. The module file is called qm_integration_module.js and is delivered with the SuiteApp to keep things compatible in future releases.
Usage Overview
The Quality Management Integration Module requires you complete the following steps within the SuiteScript being developed:
-
Confirm the presence of the Quality Management SuiteApp by attempting to locate the module.
-
Dynamically load the module to expose its methods for interacting with Quality Management.
-
Implement the customer-specific logic for managing unique inspections and their triggers.
-
Use the appropriate module methods to review Quality Context records so the customer can control when the custom trigger fires.
-
Use the appropriate module methods to create, find, update, or delete new inspection requests for the tablet (called Quality Inspection Queue records).
Method Descriptions
transactionTriggerListId
The ({triggerTransaction: text //trigger type}) method gets the internal trigger ID from the Quality Trigger Type custom list. A trigger type could be Work Order Completion, Receipt From Purchase Order, and so on.
getContextSetByFilter
The optional getContextSetByFilter method returns all the specification contexts defined for an assembly or item.
The following JSON object is the input to the method:
[
vendor: null,workCenter: number, //internal id of the work center
item: number, //internal id of the item //internal id of the item
contextType: number, //internal id of transactionTriggerList as
obtained from transactionTriggerListId
location: number, //internal id of the work order location
isInactive: 'F'
];
insertInspectionQueueRecord
The insertInspectionQueueRecord method adds a new record for the Quality Management tablet (to the quality inspection queue custom record).
The following JSON object is the input to the method:
{ specificationContext: object //a specification context object obtained from getContextSetByFilter
transaction: number, //internal id of work order/Purchase Order/Sales Order
transactionLine: number, //internal id of newly created AM Production Result record
location: number, //internalid of work order location
quantity: number, //quantity built
transactionType: number, //intenral id of transactionTriggerList as obtained from transactionTriggerListId
operation: integer, //WIP work order operation number inventoryTransaction: number //internalId of an inventory transaction if already performed inventoryReference: number, //internal id of newly created AM production result record isLastOperation: Boolean //For a WIP work order, if it is the last operation true, otherwise false };
updateInspectionQueueRecordByTransaction
You can call this optional method to update the quality inspection queue when something changes in your business process, like the quantity of items to inspect.
The following JSON object is the input to the method:
{
item: number, //internal id of assembly item,
transaction: number, //internal id of work order/Purchase Order/Sales Order
transactionLine: number, //internal id of edited record in AM Production Result record
location: number, //internal id of work order location
quantity: number, //quantity built
operation: integer, //WIP work order operation number inventoryTransaction: number //internalId of an inventory transaction if already performed
inventoryReference: number //internal id of edited AM production result record
};
updateInspectionQueueRecordForDeletion
If your business process needs to cancel an inspection, you’ll need to update the matching quality management inspection queue record. Use the updateInspectionQueueRecordForDeletion metho. It sets the status to canceled and the quantity to zero.
The following JSON object is the input to the method:
{
location: number, //internal id of work order location
transaction: number //internal id of AM Production Result record that was deleted. }
executeScheduledScript
({transaction: number //internal id of AM Production Result record created/edited)
You’ll need to run a scheduled script to finish processing the data for the Quality tablet display. Call the executeScheduledScript method, which doesn’t take any inputs.
Usage Example
Here’s an example of a User Event (UE) script that connects the Advanced Manufacturing production result record with Quality Management. After you deploy it against the Advanced Manufacturing Production record, the script uses each module method to create and manage tablet inspections as results are received from the Advanced Manufacturing tablet.
The following is the AM Quality Management Trigger:
(customscript_am_ue_qualitymanagement)