Version: eXtendPS-SE 1.4.38 and above
Audience: Administrator, Developer
Overview
Configuration
eXtendPS-SE Order Status
The status set in this field will be sent in the PromoStandards order status response.
If you have special requirements or other fields responsible for changing the order status, you can write your own logic in a transformers file. This file will be used to send the PromoStandards order status response.
The example below shows how to send the PromoStandards status based on the native NetSuite statuses of the Sales Order when no value is selected in the "EXTENDPS-SE ORDER STATUS" field.
Create this functional mapping within the "suite_promoapi_invoice_transformers.js" file. A snippet of this function is shown below.
function getOrderStatus(args) {var searchResult = args.searchResult;var promoValidStatusList = args.promoValidStatusList;var customStatus = searchResult.getText({name: "custbody_extend_promo_api_order_status",});if (customStatus) {return customStatus;}var currentOrderStatus = searchResult.getValue({ name: "statusref" });var orderStatusMap = {closed: "Canceled",fullyBilled: "Complete",cancelled: "Canceled",partiallyFulfilled: "Partial Shipment",pendingApproval: "Order Received",pendingBilling: "Complete",pendingBillingPartFulfilled: "Partial Shipment",pendingFulfillment: "Order Confirmed",};/*** Valid Order Status:* Order Received* Order Entry Hold* Order Confirmed* Pre-Production* General Hold* Credit Hold* Proof Hold* Art Hold* Back Order Hold* In Production* In Storage* Partial Shipment* Complete* Canceled*/if (!orderStatusMap[currentOrderStatus]) {throw error.create({name: "SUITE_PROMO_SE_ORDER_STATUS_ERROR",message: "Unexpected order status received.",});}log.audit({title: "getOrderStatus :: " + currentOrderStatus,details: orderStatusMap[currentOrderStatus],});return orderStatusMap[currentOrderStatus];}
Order Status ResponseToArray
Hardcoded mappings aren't supported for this field, however you can use a functional mapping for sending static data as shown in the example below.
You can specify this configuration within the SALES ORDER'S ENTITY RECORD TYPE ID field on the eXtendPS-SE Order Status Setup page.

The example below shows a functional mapping used for sending static data against this field.
Create this functional mapping in the "suite_promoapi_invoice_transformers.js" file. A snippet of this function is shown below.
function getOrderStatusRespondToData(args) {return {name: "Customer Service",emailAddress: "customerservice@customername.com",phoneNumber: "(800) 999-9999",};}