Processing customer shipment entries via REST api

Trying to close out shipments from Customer Shipment Entry and I can’t seem to find the right call in the REST library.

When you check the “Shipped” box in Customer Shipment Entry, then it processes the shipment and marks it shipped, in doing so, closing the sales order.

image

I’m seeing these calls in the tracelog:
Erp:BO:CustShip/CustShipSvcContract/UpdateMaster
CustShip/CustShipSvcContract/GetPkgCodeQtyList
CustShip/CustShipSvcContract/BuildShipToList

None of which seem to be the one, and none are available from the API.

I believe it’s this call:
Erp.PROC.ShipConfirmSvc/RunDirect

But that call requires a PackIDList and I only have a PackNum.

Based on the other calls, there must be something to build a shiplist and then run the ShipConfirmSvc call to process it. That’s all I got. Maybe someone else has an answer to this.

Passing in true to shipped and calling Update should do it
Verify with a trace

I tried:

"EnableShipped": true,

But that doesn’t seem to be it.
Maybe I need these set to the following:

"ReadyToInvoice": true,
"ShipStatus": "SHIPPED",

I did the EnabledShipped and sent in a PATCH call to Erp.BO.CustShipSvc/CustShips. I assume that is what you meant by shipped to true and calling an update.

I’ll run some more traces and see what I can figure out here.

You’ll have to switch over to the custom calls for those if they aren’t in the Odata side. They are there.

1 Like

I actually got it to work.

The solution was what @josecgomez said more or less.

Did this call: (PATCH)
Erp.BO.CustShipSvc/CustShips

With these variables set:

"ReadyToInvoice"=>'true',
"EnableShipped"=>'true',
"ShipStatus"=>"SHIPPED"

That closed it out, pulled inventory, and shipped the shipment from what I can tell.

2 Likes

I tried to run the Erp.BO.CustShipSvc → Update to change the Shipment to be Shipped.
But it removed the original shipment and create a new shipment with new ID.
The new shipment has no shipDtl.
how can you update it successfully?
Could you show more detail of it? Thank you!

The below is my steps.

  1. use Erp.BO.CustShipSvc → GetByID → get the existing shipment “ds”.
  2. follow your solution updated the variables of the ShipHead, and set “RowMod”: “U”.
  3. And import the ds to the Update to run.

{
“ds”: {
“ShipHead”: [
{
“Company”: “EPIC06”,
“PackNum”: 294,
“ShipDate”: “2018-03-29T00:00:00”,
“ShipViaCode”: “LOCA”,
“ShipPerson”: “epicor”,
“EntryPerson”: “epicor”,
“ShipLog”: “”,
“LabelComment”: “”,
“ShipComment”: “”,
“Invoiced”: false,
“ShipToNum”: “”,
“ReadyToInvoice”: true,
“CustNum”: 3,
“Plant”: “MfgSys”,
“TrackingNumber”: “”,
“LegalNumber”: “294”,
“Voided”: false,
“ExternalDeliveryNote”: false,
“ExternalID”: “”,
“ICReceived”: false,
“XRefPackNum”: “”,
“BTCustNum”: 3,
“BTConNum”: 0,
“ShipStatus”: “SHIPPED”,
“ShipGroup”: “”,
“PkgCode”: “”,
“PkgClass”: “”,
“Weight”: 0,
“ResDelivery”: false,
“SatDelivery”: false,
“SatPickup”: false,
“VerbalConf”: false,
“Hazmat”: false,
“DocOnly”: false,
“RefNotes”: “”,
“ApplyChrg”: false,
“ChrgAmount”: 0,
“COD”: false,
“CODFreight”: false,
“CODCheck”: false,
“CODAmount”: 0,
“GroundType”: “”,
“NotifyFlag”: false,
“NotifyEMail”: “”,
“DeclaredIns”: false,
“DeclaredAmt”: 0,
“MFTransNum”: “”,
“MFCallTag”: “”,
“MFPickupNum”: “”,
“MFDiscFreight”: 0,
“MFTemplate”: “”,
“MFUse3B”: false,
“MF3BAccount”: “”,
“MFDimWeight”: 0,
“MFZone”: “”,
“MFFreightAmt”: 0,
“MFOtherAmt”: 0,
“MFOversized”: false,
“ServSatDelivery”: false,
“ServSatPickup”: false,
“ServSignature”: false,
“ServAlert”: false,
“ServPOD”: false,
“ServAOD”: false,
“ServHomeDel”: false,
“DeliveryType”: “”,
“ServDeliveryDate”: null,
“ServPhone”: “”,
“ServInstruct”: “”,
“ServRelease”: false,
“ServAuthNum”: “”,
“ServRef1”: “”,
“ServRef2”: “”,
“ServRef3”: “”,
“ServRef4”: “”,
“ServRef5”: “”,
“BOLNum”: 0,
“BOLLine”: 0,
“CommercialInvoice”: false,
“ShipExprtDeclartn”: false,
“CertOfOrigin”: false,
“LetterOfInstr”: false,
“HazardousShipment”: false,
“IntrntlShip”: false,
“PayFlag”: “”,
“PayAccount”: “”,
“PayBTAddress1”: “”,
“PayBTAddress2”: “”,
“PayBTCity”: “”,
“PayBTState”: “”,
“PayBTZip”: “”,
“PayBTCountry”: “”,
“FFAddress1”: “”,
“FFAddress2”: “”,
“FFCity”: “”,
“FFState”: “”,
“FFZip”: “”,
“FFCountry”: “”,
“FFContact”: “”,
“FFCompName”: “”,
“FFPhoneNum”: “”,
“ChangedBy”: “epicor”,
“ChangeDate”: “2021-06-18T00:00:00”,
“ChangeTime”: 47285,
“FFID”: “”,
“IndividualPackIDs”: false,
“FFAddress3”: “”,
“DeliveryConf”: 1,
“AddlHdlgFlag”: false,
“NonStdPkg”: false,
“FFCountryNum”: 0,
“PayBTAddress3”: “”,
“PayBTCountryNum”: 0,
“PayBTPhone”: “”,
“WayBillNbr”: “”,
“FreightedShipViaCode”: “”,
“UPSQuantumView”: false,
“UPSQVShipFromName”: “”,
“UPSQVMemo”: “”,
“PkgLength”: 0,
“PkgWidth”: 0,
“PkgHeight”: 0,
“EDIReady”: false,
“PhantomPack”: false,
“ReplicatedFrom”: 0,
“ReplicatedStat”: “”,
“PkgSizeUOM”: “FT”,
“WeightUOM”: “g”,
“UseOTS”: false,
“TranDocTypeID”: “Packing Slip”,
“DocumentPrinted”: false,
“OTSOrderNum”: 5355,
“TaxCalculated”: false,
“TaxCalcDate”: null,
“CurrencyCode”: “USD”,
“Rounding”: 0,
“Rpt1Rounding”: 0,
“Rpt2Rounding”: 0,
“Rpt3Rounding”: 0,
“DocRounding”: 0,
“Rpt1TotalTax”: 0,
“Rpt2TotalTax”: 0,
“Rpt3TotalTax”: 0,
“OrderAmt”: 0,
“DocOrderAmt”: 0,
“Rpt1OrderAmt”: 0,
“Rpt2OrderAmt”: 0,
“Rpt3OrderAmt”: 0,
“TaxRegionCode”: “”,
“TotalWHTax”: 0,
“DocTotalWHTax”: 0,
“Rpt1TotalWHTax”: 0,
“Rpt2TotalWHTax”: 0,
“Rpt3TotalWHTax”: 0,
“TotalSATax”: 0,
“DocTotalSATax”: 0,
“Rpt1TotalSATax”: 0,
“Rpt2TotalSATax”: 0,
“Rpt3TotalSATax”: 0,
“TotalTax”: 0,
“DocTotalTax”: 0,
“TotalDiscount”: 0,
“Rpt1TotalDiscount”: 0,
“Rpt2TotalDiscount”: 0,
“Rpt3TotalDiscount”: 0,
“DocTotalDiscount”: 0,
“ShipToCustNum”: 3,
“DeviceUOM”: “”,
“ManifestSizeUOM”: “”,
“ManifestWtUOM”: “”,
“ManifestWeight”: 0,
“ManifestLength”: 0,
“ManifestWidth”: 0,
“ManifestHeight”: 0,
“RateGrpCode”: “RateType1”,
“InPrice”: false,
“PBHoldNoInv”: false,
“ReconcileQty”: 0,
“ScheduleNumber”: “Schedule Number”,
“CounterASN”: 0,
“OurBank”: “100”,
“ERSOrder”: false,
“AutoPrintReady”: false,
“ShipOvers”: false,
“WIPackSlipCreated”: false,
“SysRevID”: 18882898,
“SysRowID”: “a9358139-c265-4628-b59d-a33b015c049b”,
“AGAuthorizationCode”: “”,
“AGAuthorizationDate”: null,
“AGCarrierCUIT”: “”,
“AGCOTMark”: false,
“AGDocumentLetter”: “”,
“AGInvoicingPoint”: “”,
“AGLegalNumber”: “”,
“AGPrintingControlType”: “”,
“AGTrackLicense”: “”,
“DispatchReason”: “”,
“AGShippingWay”: “”,
“OurSupplierCode”: “”,
“ASNPrintedDate”: null,
“EDIShipToNum”: “”,
“MXIncoterm”: “”,
“CreatedOn”: null,
“DigitalSignature”: “”,
“SignedOn”: null,
“SignedBy”: “”,
“FirstPrintDate”: null,
“DocCopyNum”: 0,
“AutoInvoiceMessage”: “”,
“BillAddr”: “Barriston Engineering~175 Kellogg Blvd W.~St. Paul MN 55102~USA”,
“BTCustID”: “BARRISTON”,
“ChangeDateTime”: “2021-06-18T13:08:05”,
“CheckOrderMessage”: “”,
“CreditCardMessage”: “”,
“CreditHold”: false,
“CtnPkgCode”: “”,
“DisableRetrieveButton”: true,
“DisplayInPrice”: false,
“DocTaxAmt”: 0,
“DocWithholdingTaxAmt”: 0,
“DoPostUpdate”: false,
“DspDigitalSignature”: “”,
“EnableAssignLegNum”: false,
“EnablePackageControl”: true,
“EnablePhantom”: false,
“EnableShipped”: true,
“EnableTax”: true,
“EnableTranDocType”: false,
“EnableVoidLegNum”: false,
“EnableWeight”: true,
“FromMasterPack”: false,
“HasCartonLines”: true,
“HasLegNumCnfg”: false,
“LastCartonFlag”: false,
“LegalNumberMessage”: “”,
“ManifestFlag”: false,
“MasterpackPackNum”: 0,
“MultipleShippers”: false,
“OrderDate”: “2021-06-18T13:11:26.75”,
“OrderHold”: false,
“OrderNum”: 0,
“PCID”: “”,
“PhantomCasesExist”: false,
“PkgHeightEnable”: 0,
“PkgLenEnable”: 0,
“PkgSizeUOMEnable”: 0,
“PkgWidthEnable”: 0,
“PostUpdMessage”: “”,
“ReadyToInvoiceChanged”: false,
“ReplicateCount”: 0,
“Rpt1TaxAmt”: 0,
“Rpt2TaxAmt”: 0,
“Rpt3TaxAmt”: 0,
“SendShipment”: false,
“ShipToNumName”: “Barriston Engineering”,
“SlipStatus”: “OPEN”,
“StageShipped”: false,
“StagingReq”: false,
“StatusChgMessage”: “”,
“TaxAmt”: 0,
“AddrList”: “Barriston Engineering~175 Kellogg Blvd W.~St. Paul MN 55102~USA”,
“AllowChgAfterPrint”: true,
“BTCustomerName”: “Barriston Engineering”,
“CartonContentValue”: 0,
“CartonStageNbr”: “”,
“BitFlag”: 0,
“AGInvoicingPointDescription”: “”,
“CurrencyCodeCurrSymbol”: “$”,
“CurrencyCodeCurrDesc”: “United States Dollar”,
“CurrencyCodeCurrencyID”: “USD”,
“CurrencyCodeDocumentDesc”: “”,
“CurrencyCodeCurrName”: “Dollar”,
“CustomerSendToFSA”: false,
“CustomerBTName”: “”,
“CustomerCustID”: “BARRISTON”,
“CustomerName”: “Barriston Engineering”,
“DeliveryTypeDescription”: “”,
“FreightedShipViaCodeDescription”: “”,
“FreightedShipViaCodeWebDesc”: “”,
“OurBankBankName”: “Bank of Chicago - Checking”,
“OurBankDescription”: “Main Checking Account”,
“ShipToCustBTName”: “”,
“ShipToCustCustID”: “BARRISTON”,
“ShipToCustName”: “Barriston Engineering”,
“ShipViaCodeDescription”: “Local Truck”,
“ShipViaCodeWebDesc”: “Local Truck”,
“TaxRegionDescription”: “”,
“TranDocTypeDescription”: “Packing Slip”,
“RowMod”: “U”
}
],
“ShipHeadAttch”: [],
“CartonTrkDtl”: [],
“ShipDtl”: [
{
“Company”: “EPIC06”,
“PackNum”: 294,
“PackLine”: 1,
“OrderNum”: 5355,
“OrderLine”: 1,
“OrderRelNum”: 1,
“LineType”: “PART”,
“OurInventoryShipQty”: 500,
“OurJobShipQty”: 0,
“JobNum”: “”,
“Packages”: 1,
“PartNum”: “NL-HZ-4942-A”,
“LineDesc”: “Support Bar”,
“IUM”: “EA”,
“RevisionNum”: “B”,
“ShipComment”: “”,
“ShipCmpl”: true,
“WarehouseCode”: “CHI”,
“BinNum”: “01-01-01”,
“UpdatedInventory”: true,
“XPartNum”: “”,
“XRevisionNum”: “”,
“ShpConNum”: 0,
“TMBilling”: false,
“Invoiced”: false,
“WUM”: “LB”,
“LotNum”: “”,
“DimCode”: “”,
“DUM”: “”,
“DimConvFactor”: 1,
“InvoiceComment”: “”,
“WarrantyCode”: “”,
“CustNum”: 3,
“ShipToNum”: “”,
“EffectiveDate”: null,
“MaterialDuration”: 0,
“LaborDuration”: 0,
“MiscDuration”: 0,
“MaterialMod”: “”,
“LaborMod”: “”,
“MiscMod”: “”,
“MaterialExpiration”: null,
“LaborExpiration”: null,
“MiscExpiration”: null,
“LastExpiration”: null,
“WarrantyComment”: “”,
“ContractNum”: 0,
“ContractCode”: “”,
“Onsite”: false,
“MatCovered”: false,
“LabCovered”: false,
“MiscCovered”: false,
“Plant”: “MfgSys”,
“ReadyToInvoice”: false,
“SellingInventoryShipQty”: 500,
“SellingJobShipQty”: 0,
“SellingFactor”: 1,
“SalesUM”: “EA”,
“TotalNetWeight”: 3000,
“WIPWarehouseCode”: “”,
“WIPBinNum”: “”,
“SellingFactorDirection”: “D”,
“HeaderShipComment”: “”,
“KitParentLine”: 0,
“ChangedBy”: “epicor”,
“ChangeDate”: “2021-06-18T00:00:00”,
“ChangeTime”: 47181,
“InventoryShipUOM”: “EA”,
“JobShipUOM”: “EA”,
“TrackSerialNum”: false,
“JobLotNum”: “”,
“BinType”: “Std”,
“NotCompliant”: false,
“ComplianceMsg”: “”,
“DiscountPercent”: 0,
“PricePerCode”: “”,
“Discount”: 0,
“DocDiscount”: 0,
“Rpt1Discount”: 0,
“Rpt2Discount”: 0,
“Rpt3Discount”: 0,
“ExtPrice”: 0,
“DocExtPrice”: 0,
“Rpt1ExtPrice”: 0,
“Rpt2ExtPrice”: 0,
“Rpt3ExtPrice”: 0,
“UnitPrice”: 0,
“DocUnitPrice”: 0,
“Rpt1UnitPrice”: 0,
“Rpt2UnitPrice”: 0,
“Rpt3UnitPrice”: 0,
“PickedAutoAllocatedQty”: 500,
“ShipToCustNum”: 3,
“InDiscount”: 0,
“DocInDiscount”: 0,
“Rpt1InDiscount”: 0,
“Rpt2InDiscount”: 0,
“Rpt3InDiscount”: 0,
“InExtPrice”: 0,
“DocInExtPrice”: 0,
“Rpt1InExtPrice”: 0,
“Rpt2InExtPrice”: 0,
“Rpt3InExtPrice”: 0,
“InUnitPrice”: 0,
“DocInUnitPrice”: 0,
“Rpt1InUnitPrice”: 0,
“Rpt2InUnitPrice”: 0,
“Rpt3InUnitPrice”: 0,
“InPrice”: false,
“MFCustNum”: 3,
“MFShipToNum”: “”,
“UseOTMF”: false,
“OTMFName”: “”,
“OTMFAddress1”: “”,
“OTMFAddress2”: “”,
“OTMFAddress3”: “”,
“OTMFCity”: “”,
“OTMFState”: “”,
“OTMFZIP”: “”,
“OTMFContact”: “”,
“OTMFFaxNum”: “”,
“OTMFPhoneNum”: “”,
“OTMFCountryNum”: 0,
“RenewalNbr”: 0,
“ShipOvers”: false,
“AllowedOvers”: 0,
“AllowedUnders”: 0,
“SysRevID”: 18882853,
“SysRowID”: “96d53d4e-372c-4914-96ca-a33b015c059b”,
“NotAllocatedQty”: 0,
“PCID”: “”,
“PCIDItemSeq”: 0,
“PCIDParentLine”: 0,
“DockingStation”: “”,
“UseShipDtlInfo”: false,
“PkgCodePartNum”: “”,
“CustContainerPartNum”: “”,
“LabelType”: “”,
“WarrantySendToFSA”: false,
“FSAEquipment”: false,
“BuyToOrder”: false,
“DropShip”: false,
“DtlError”: false,
“EnableInvSerialBtn”: false,
“EnableJobFields”: true,
“EnableMfgSerialBtn”: false,
“EnableOBInvSerialBtn”: false,
“EnableOBMfgSerialBtn”: false,
“EnablePackageControl”: true,
“EnablePOSerialBtn”: false,
“ExtJobNum”: “”,
“InvLegalNumber”: “”,
“InvoiceNum”: 0,
“KitBackFlush”: false,
“KitBinNum”: “”,
“KitCompIssue”: false,
“KitCompShipComplete”: false,
“KitDescription”: “”,
“KitFlag”: “”,
“KitIUM”: “”,
“KitLotNum”: “”,
“KitMassIssue”: false,
“KitParentIssue”: false,
“KitPartNum”: “”,
“KitQtyFromInv”: 0,
“KitQtyFromInvEnabled”: false,
“KitSerialTracked”: false,
“KitTrackLots”: false,
“KitWarehouse”: “”,
“KitWarehouseCodeDesc”: “”,
“KitWhseList”: “”,
“LegalNumber”: “”,
“LineContentValue”: 0,
“LineTax”: 0,
“LinkMsg”: “”,
“MarkForAddrList”: “Barriston Engineering~175 Kellogg Blvd W.~St. Paul MN 55102~USA”,
“MFCustID”: “BARRISTON”,
“OrderHold”: false,
“OrderRelOurReqQty”: 0,
“OurJobShipIUM”: “”,
“OurJobShippedQty”: 0,
“OurRemainQty”: 0,
“OurRemainUM”: “EA”,
“OurReqQty”: 500,
“OurReqUM”: “EA”,
“OurShippedQty”: 500,
“OurShippedUM”: “EA”,
“OurStockShippedQty”: 0,
“PackSlip”: “”,
“PartAESExp”: “”,
“PartCompany”: “”,
“PartECNNumber”: “”,
“PartExpLicNumber”: “”,
“PartExpLicType”: “”,
“PartHazClass”: “”,
“PartHazGvrnmtID”: “”,
“PartHazItem”: false,
“PartHazPackInstr”: “”,
“PartHazSub”: “”,
“PartHazTechName”: “”,
“PartHTS”: “”,
“PartNAFTAOrigCountry”: “”,
“PartNAFTAPref”: “”,
“PartNAFTAProd”: “”,
“PartOrigCountry”: “”,
“PartPartNum”: “”,
“PartSchedBcode”: “”,
“PartUseHTSDesc”: false,
“PONum”: “89098”,
“ProjectID”: “”,
“PurPoint”: “”,
“RequestDate”: “2018-03-29T00:00:00”,
“Rpt1LineTax”: 0,
“Rpt2LineTax”: 0,
“Rpt3LineTax”: 0,
“SellingRemainQty”: 0,
“SellingRemainUM”: “EA”,
“SellingReqQty”: 500,
“SellingReqUM”: “EA”,
“SellingShipmentQty”: 500,
“SellingShipmentUM”: “EA”,
“SellingShippedQty”: 500,
“SellingShippedUM”: “EA”,
“ShipDate”: null,
“ShipToWarning”: “”,
“ShipViaCode”: “”,
“StockPart”: true,
“VendorNum”: 0,
“WhseList”: “”,
“ChangeDateTime”: “2021-06-18T13:06:21”,
“CurrencyCode”: “”,
“DimCodeList”: “”,
“DisplayInvQty”: 500,
“DocLineTax”: 0,
“TrackID”: false,
“EnableInvIDBtn”: false,
“EnableMfgIDBtn”: false,
“FSAInstallationCost”: 0,
“FSAInstallationOrderLine”: 0,
“FSAInstallationOrderNum”: 0,
“FSAInstallationRequired”: false,
“FSAInstallationType”: “”,
“SelectedLocationIDQty”: 0,
“TranLocationIDQty”: 0,
“GetLocIDNum”: false,
“EnableKitIDBtn”: false,
“BitFlag”: 0,
“BinNumDescription”: “CHI Finished Goods Area 100”,
“ContractCodeContractDescription”: “”,
“CustNumSendToFSA”: false,
“CustNumName”: “Barriston Engineering”,
“CustNumCustID”: “BARRISTON”,
“CustNumBTName”: “”,
“DimensionDimCodeDescription”: “”,
“JobNumPartDescription”: “”,
“LotPartLotDescription”: “”,
“OrderLineProdCode”: “FABP”,
“OrderLineLineDesc”: “Support Bar”,
“OrderNumPSCurrCode”: “USD”,
“OrderNumCardMemberName”: “”,
“OrderNumCurrencyCode”: “USD”,
“OTMFCountryDescription”: “”,
“PackNumUseOTS”: false,
“PackNumShipStatus”: “OPEN”,
“PartNumSendToFSA”: false,
“PartNumTrackSerialNum”: false,
“PartNumPricePerCode”: “E”,
“PartNumSellingFactor”: 1,
“PartNumSalesUM”: “EA”,
“PartNumIUM”: “EA”,
“PartNumTrackLots”: false,
“PartNumTrackDimension”: false,
“PartNumPartDescription”: “Support Bar”,
“PartNumWarrantyCode”: “”,
“PartNumFSAEquipment”: false,
“PlantName”: “Main”,
“WarehouseCodeDescription”: “Main”,
“WarrantyCodeSendToFSA”: false,
“WarrantyCodeWarrDescription”: “”,
“WIPWarehouseCodeDescription”: “”,
“RowMod”: “”,
“Container_c”: “”,
“UD_SysRevID”: “AAAAAABqpeA=”
}
],
“ShipDtlAttch”: [],
“ShipCOO”: [],
“ShipDtlPackaging”: [],
“ShipDtlTax”: [],
“ShipMisc”: [],
“ReplicatedPacks”: [],
“ShipUPS”: [],
“LegalNumberGenerate”: [],
“LegalNumGenOpts”: [],
“SalesKitCompIssue”: [],
“SelectedIDNumbers”: [],
“SelectedSerialNumbers”: [],
“ShipTaxSum”: [],
“SNFormat”: [],
“ExtensionTables”: []
}
}

Are you doing a POST or PATCH call? Theres a big difference. PATCH will take the current shipment and mark it shipped. I think you might be doing two POST calls.

1 Like

It works. Thank you!

1 Like

Glad to hear it!

PATCH (and POST) in OData is using UpdateExt internally, so you can actually send only changed values, and key fields. Internall, UpdateExt calls GetByID, then compares all fields and updates changed ones.

It is when you use custom methods, you need to send complete record and set RowMod to ‘U’

1 Like

Makes sense. I’ve seen this in the reverse cash receipt call where I would send a POST call and it was really no different then running a PATCH call. But that was because I was setting a HeadNum in the json body.

Thanks Olga! Good to know!

1 Like