Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

DATASCOPE.SDK.BusinessObjects.WarehouseControl.StockTake.StocktakeItemPost()

This Business Object is used to Post a single Stock Take Item. It will replicate the functions of the HTML5 Stock Taking screen.

For a detailed overview on working with DATASCOPE PREMIUM WMS Business Objects, refer to E.Net Business Objects

Info

If you don’t like reading, you can watch the video.

Panel
panelIconId1f3a5
panelIcon:movie_camera:
panelIconText🎥
bgColor#DEEBFF

None

No Specification

RELEASE NOTES

  • Release notes 24R2 (Ticket # 8797) - StockTakeItemPost Business Object development.

Description

Post a single Stock Take Item

Code

WCONTROL002

Name

StocktakeItemPost

Module

WarehouseControl

Functional Area

StockTake

Name Space/Class

DATASCOPE.SDK.BusinessObjects.WarehouseControl.StockTake.StocktakeItemPost()

Release Date

Aug 2024

Release Version

v24.2

Prerequisites

None

SYSPRO Objects

None

Parameters

Name

Description

Mandatory field

Data Type

Default Value

pWarehouse 

The warehouse that has an open StockTake - A valid Syspro Warehouse; A StockTake has been opened for the warehouse in Syspro

YES

string

 <blank>

pPalletNumber

 pBin

The bin being counted in the stock take - A valid Bin that exists in WMS

YES

string

 <blank>

pStockCode

 pEmptyBin

A bin can be counted as an 'Empty' bin, meaning no Track IDs or stock were found in it, the options for this property are Y or N. If set to Y, the bin will be marked as an empty bin, otherwise counted as per normal.

YES

string

 

pCapturedQty

 <blank>

pTrackIDs

This is a List of Post items and must contain at least one item.

pTrackID

It is the TrackID found within the Bin

YES

stringString

 <blank>

pBin

 pStockCode

The stock code found on the TrackID

YES

stringString

 <blank>

pUserID

 

NO

string

 

pLot

 

NO

string

 

pExpiryDate

 

NO

string

 

pSerial

 

NO

string

 

pOffline

 

NO

string

 

pScannerUom

 

NO

string

 

Technical Specification

Code Block<sample code>

pLot

Lot Number applicable for the pStockCode. Only required if the pStockCode is flagged at Lot Traceable in SYSPRO.

NO

String

Required if pStockCode is Lot traceable, otherwise <blank>

pExpiryDate

Expiry Date for the pLot if the pStockCode is Lot Traceable and using Expiry Dates in SYSPRO.

 If pLot is Traceable and not supplied, No Expiry will be posted to SYSPRO and reflect at 0000/00/00

NO

String

<blank>

pQuantity

The quantity of stock on the TrackID

YES

Decimal

0

pUOM

The UOM the qty has been captured in. If it is <blank> the default value stored in the System Setting (STOCKTAKE / DEFAULT_CAPTURE_UOM) will be used

NO

String

<blank>

Validation

There are a number of validations required for the input fields as listed below:

  • A valid Warehouse defined in SYSPRO is required.

  • The Stock Take should be open in SYSPRO for the applicable warehouse.

  • A valid Bin must be defined within SYSPRO and DATASCOPE WMS.

  • A valid Stock Code should exist.

  • The valid Stock Code should live in the warehouse being counted.

  • A valid Lot number if required.

  • A valid Expiry Date.

  • If an existing Lot has been supplied and an Expiry Date is either found in SYSPRO or DATASCOPE WMS, the data supplied is ignored and the existing expiry date is used.

  • A valid date format of yyyy-MM-dd

  • UOM - There are three valid options for UOM - STOCKING, ALTERNATE, OTHER - if none are supplied the default value under the Warehouse Setting DEFAULT_CAPTURE_UOM is used.

Additional information

  • Empty Bin - A Bin can be counted as an “Empty” bin, this means that no TrackID or Stock were found in it, and the options for this property are Y(es) or N(o).

  • If Y(es), then the Bin will be marked as an empty bin. Only the Warehouse and Bin will need to be passed through with this option.

  • If N(o), then the Bin will be counted as per normal.

  • All standard fields and rules should be applied when set to N(o).

  • If there is an existing count for the Bin/TrackID/Stock Code/Lot combination, and the user posts another count, the new count will replace the existing count.

Technical Details

The following Technical Specification is available.

The following technical details will need to be applied when writing this new business object:

  • As per the Designation this object is to be placed under the following location within the DATASCOPE WMS SDK Project. DATASCOPE.SDK.BusinessObjects.WarehouseControl.StockTake as shown below.

  • Functional Area class will be called StockTake.cs

  • Within the existing StockTake.cs file a new method should be created StockTakeItemPost, this will be the business object entry point definition and should be defined as follows:

Code Block
public Response StockTakeItemPost(string p_GUID)
  • The return type will be of Response, this is the standard response type for all business objects and will be used by the 3rd party to determine if the process was a success or failure as well as any error message, the details will be covered later in this document

  • All business objects take a single Parameter within the function, called p_GUID, this is the GUID obtained by calling the standard DATASCOPE WMS Logon business Object.

Info
  • NOTE: A GUID obtained directly from SYSPRO will not work here as there is validation within the business objects that the GUID was obtained through the DATASCOPE WMS Logon process.

  • The core code of the business object should be encapsulated within a standard Try Catch block as follows, the Catch section should return a Response with the exception passed as the parameter.

Code Block
try
{
  // Core BO Logic here
}
catch (Exception ex)
{
  return new Response(ex);
}
  • There are a number of properties required for this business object these should be placed at the top of the class in a section called Properties and prefixed with a p as shown below example.

Code Block
#region Properties
  /// <summary>
  /// SYSPRO Sales Order Number
  /// </summary>
  public string pSalesOrder { get; set; } = "";
  • The properties listed above will be required - https://datascopewms.atlassian.net/wiki/spaces/TG/pages/edit-v2/143654931#Parameters

  • As ALL business objects under the StockTake.cs class (Functional Area) are contained within the same class, the above mentioned properties(s) will be shared and this we need to indicate to the 3rd party developer which are applicable to the business object being called

    • For this reason the following example lines need to be added as a decoration to the method.

  • Code Block
    /// <summary>
    /// <Description1>       
    /// <para><Paremeter> - <Mandatory/Optional> </para> 
    /// <param name="p_GUID">WMS GUID, obtained from the Logon Business Object - Mandatory</param>  
    /// </summary>
    [WMSBusinessObject("<Code>", "<Description>")]
    [WMSBusinessObjectParameter("<Parameter1>", <Mandatory>, <Default>, "Description2")]
    • <Description1> - This is a short description of the Object

      • <Parameter1> - This is the name of the parameter, e.g. pTrackId

      • <Mandatory/Options> - This indicates if the parameter is mandatory or optional

      • <Code> - This is the code of the business object e.g. WCONTROL002

      • <Mandatory> - This is a boolean if the parameter is mandatory (true) or optional (false)

      • <Default> - This the default value of the parameter

      • <Description2> - This is a short description for the parameter.

** Additional Validation and Logic

As per the table above there are a number of additional validations steps for the input fields as follows:

  • A bin can be counted as an “Empty” bin, meaning no Track IDs or stock were found in it, the options for this property are Y or N

    • Y - the bin will be marked as an empty bin, please use the same logic as the HTML5 page

      • Only Warehouse and Bin will need to be passed through with this option

    • N - the bin will counted as per normal

      • All standard fields and rules should be applied when set to N

  • If there is an existing count for the Bin/TrackID/StockCode/Lot combination and the user posts another count, the new count should replace the existing count

  • If a TrackID being counted has already been counted in a different bin please display the following warning and block the post:

    • Code Block
      This TrackID has already been counted in Bin: XXX. Please remove previous count before continuing.
  • The stock code should be checked if it is a kit type - if it is please display the following warning and block the post:

    • Code Block
      The item counted is a kit and cannot be counted at stock take. Please count the components individually.
  • If an existing lot has been supplied and a Expiry Date is either found in Syspro or WMS, the date supplied should be ignored and the existing expiry date should be used.

    • There is existing logic to check for expiry dates

      • Please provide as part of the response, the following:

        • Code Block
          The expiry date supplied has been overriden by the existing date of yyyy-MM-dd for LOTXXX 
  • There are 3 valid options for UOM - STOCKING, ALTERNATE or OTHER, if none are supplied the default value under the warehouse setting DEFAULT_CAPTURE_UOM can be used.

Existing System Settings to be validated:

Please apply the same logic and messages that would appear on the HTML 5 screen for the 2 settings below:

  • DEFAULT_CAPTURE_UOM - This setting indicates the default capture UOM, if no UOM is provided the default can be used, if no UOM is provided and there is no default set please display the following warning:

    • Code Block
      Please provide a capture UOM or set the default UOM warehouse setting DEFAULT_CAPTURE_UOM to the appropriate value
  • VALIDATE_PICKFACE_LINK - This will determine if the system validates that if the destination location is a Pickface bin that the stock has been set up to exist in the specific bin.

    • Code Block
      The Stock code has not been set up to exist in any Pickface Bins. 
      The Stock code has not been set up to exist in this Pickface Bin. It is set up against bin(s): XXX

Sample XML:

<pWarehouse>FG</pWarehouse>
<pBin>01-A-02-B</pBin>
<pEmptyBin>N</pEmpyBin>
<pTrackIDs>
<pTrackID>
<pTrackIDItem>
<pTrackID>100987</pTrackID >
<pStockCode>LOT100</pStockCode>
<pLot>00125</pLot>
<pExpiryDate>2025-06-25</ pExpiryDate>
<pQuantity>100</pQuantity>
<pUOM>STOCKING</pUOM>
</pTrackIDItem>
</pTrackID>
<pTrackID>
<pTrackIDItem>
<pTrackID>100986</pTrackID >
<pStockCode>A100</pStockCode>
<pLot></pLot>
<pExpiryDate></ pExpiryDate>
<pQuantity>55</pQuantity>
<pUOM>OTHER</pUOM>
</pTrackIDItem>
</pTrackID>
</pTrackIDs>

Testing the BO

The Business Object Harness application should be used to assist in troubleshooting and testing any of the DATASCOPE WMS Business Objects.

  • Ensure you followed the installation process to install and configure the Business Object Harness application.

  • To test the Business Object

o   Open the Business Object Harness

image-20240508-124530.pngImage Added

o   Enter the Company ID you would like to login to, followed by a valid Operator, along with its password and company password (if any). Clicking the Login button will then attempt to log in to the system using the WebAPI.

o   The first step in posting an object is to select and add it to the main content window.

image-20240823-115059.pngImage Added

o   Now you are ready to start testing the Business Object.