0% found this document useful (0 votes)
3 views5 pages

Pickrevesal in Wms

The document describes the WMS Pick Reversal API, including details about its script name, ID, and deployment. It provides sample request bodies for reversing picks partially and completely, along with a reference Suitelet for testing the API. The Suitelet constructs a RESTlet URL and sends a POST request with JSON data to reverse picks in a warehouse management system.

Uploaded by

festoonit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Pickrevesal in Wms

The document describes the WMS Pick Reversal API, including details about its script name, ID, and deployment. It provides sample request bodies for reversing picks partially and completely, along with a reference Suitelet for testing the API. The Suitelet constructs a RESTlet URL and sends a POST request with JSON data to reverse picks in a warehouse management system.

Uploaded by

festoonit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Pick reversal API

Script Name : WMS Pick Reversal .

Script Id : customscript_wms_rl_revpicks_revsubmit

Script deployment : customdeploy_wms_rl_revpicks_revsubmit

Request body .

Sample Request body if we reverse partially


{
"binName": "originalBin",
"pickingBin": "01-01-08",
"buttonAction": "enterBinScreen",
"page_id":
"page_reversePicks_reverseConfirmation",
"warehouseLocationId": "113",
"transactionType": "SalesOrder",
"pickTaskId": "1101",
"pickTaskLineStatus": "DONE",
"pickTaskLineNumber": "2",
"orderId": "344181",
"transaction": "order",
"locUseBinsFlag": true,
"itemId": "4077",
"subItemOf": "",
"kitItemLineNumber": "",
"transactionNumber":
"SO5548126308517236498966",
"notReversedQtyinPickTask": 1,
"quantityToBeReversedForPartialPick": 2,
"scannedSerials": [
"155385",
"155386"
],
"invDetailInfo": {
"155385": {
"serial": "WHI001",
"quantity": 1,
"status": "Good",
"bin": "01-01-08"
},
"155386": {
"serial": "WHI002",
"quantity": 1,
"status": "Good",
"bin": "01-01-08"
}
},
"reversedQuantity": "3"
}
Sample Request body if we reverse the whole line .
{
"headers": {
"Content-Type": "application/json"
},
"data": {},
"params": {
"pickItemId": 4077,
"pickQty": 3,
"pickTaskId": 1101,
"remainingLineItemqty": 3,
"totalPickedQuantity": 0,
"transactionUomName": "Each",
"pickBinId": "1069",
"tallyscanitem": "WHI003",
"page_id": "page_singleOrderPicking_quantityScan",
"stockUomConversionRate": 1,
"inventoryDetailLotOrSerial": null,
"waveId": 344384,
"transactionLineId": 2,
"transactionType": "SalesOrd",
"locUseBinsFlag": true,
"barcodeQuantity": [
{
"value": 3,
"unit": 1
}
],
"tallyScanAction": "tallyScanAction",
"warehouseLocationId": "113",
"pickStatusInternalId": "1",
"enterQty": 3,
"itemType": "serializedinventoryitem",
"transactionUomConversionRate": 1,
"lotQtyString": "1 Each,2 Each",
"statusText": "Good",
"lotQtyStatusString": "Good,Good",
"transactionInternalId": 344181,
"lineItemRemainingQuantity": 3,
"isTallyScanRequired": true,
"barcodeLotname": "",
"lotShown": false,
"tallyScanBarCodeQty": 2,
"transactionuomValue": 1,
"qtyUomSelection": [
{
"pluralname": "Each",
"baseunit": true,
"unitname": "Each",
"inuse": "T",
"abbreviation": "EA",
"conversionrate": 1,
"pluralabbreviation": "EA",
"unit": "1",
"value": "3"
}
],
"scannedQuantityInEach": 3,
"unitstype": 1,
"isZonePickingEnabled": false
}
}

Reference suitelet for example we tested the API

/**
* @NApiVersion 2.x
* @NScriptType Suitelet
*/
define(['N/ui/serverWidget', 'N/https', 'N/url'], function
(serverWidget, https, url) {

function onRequest(context) {
if (context.request.method === 'GET') {
try {
// Construct the RESTlet URL
var restletUrl = url.resolveScript({
scriptId: 'customscript_wms_rl_revpicks_revsubmit',
// Update with your RESTlet Script ID
deploymentId:
'customdeploy_wms_rl_revpicks_revsubmit', // Update with your RESTlet
Deployment ID
});

// JSON data to send in the POST request


var requestBody = {
"headers": {
"Content-Type": "application/json"
},
"data": {},
"params": {
"binName": "originalBin",
"pickingBin": "01-01-08",
"buttonAction": "enterBinScreen",
"page_id":
"page_reversePicks_reverseConfirmation",
"warehouseLocationId": "113",
"transactionType": "SalesOrder",
"pickTaskId": "1101",
"pickTaskLineStatus": "DONE",
"pickTaskLineNumber": "2",
"orderId": "344181",
"transaction": "order",
"locUseBinsFlag": true,
"itemId": "4077",
"subItemOf": "",
"kitItemLineNumber": "",
"transactionNumber":
"SO5548126308517236498966",
"notReversedQtyinPickTask": 1,
"quantityToBeReversedForPartialPick": 2,
"scannedSerials": [
"155385",
"155386"
],
"invDetailInfo": {
"155385": {
"serial": "WHI001",
"quantity": 1,
"status": "Good",
"bin": "01-01-08"
},
"155386": {
"serial": "WHI002",
"quantity": 1,
"status": "Good",
"bin": "01-01-08"
}
},
"reversedQuantity": "3"
}
};

// Make the POST request to the RESTlet


var triggerPrintHeaders = { "Content-Type":
"application/json" };

var triggerPrintResponse = https.requestRestlet({


body: JSON.stringify(requestBody),
deploymentId:
'customdeploy_wms_rl_revpicks_revsubmit',
headers: triggerPrintHeaders,
method: 'POST',
scriptId: 'customscript_wms_rl_revpicks_revsubmit'
});
log.debug('response',response)
// Display response on Suitelet page
var form = serverWidget.createForm({ title: 'Suitelet
to RESTlet (POST)' });
form.addField({
id: 'custpage_response',
type: serverWidget.FieldType.LONGTEXT,
label: 'RESTlet Response'
}).defaultValue = response.body;

context.response.writePage(form);
} catch (error) {
context.response.write({ output: 'Error: ' +
error.message });
}
}
}

return {
onRequest: onRequest
};
});

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy