Courier Customer Pre Alert - I/O Parameters and Code Sample

This appendix provides reference information for all HTML variables for developing a customized data entry process to send Tracking Pre-Alert to KLS for your company web site. All variables are uploaded using POST method



Input Parameters


Name
Type
M/C/O/R
Description
_strAccountNumber
String (15)
Mandatory
Autorized Account Number. Please contact K SSS, Inc. for more information.
_strAccountPassword
String (15)
Mandatory
Authorized Account Password
_strConsigneeID
String (15)
Mandatory
Registered Consignee Account Number. Please contact freight handler for more information.
_strConsigneeName
String (50)
Optional
Consignee Name
_strShipperName
String (50)
Optional
Shipper Name
_strTrackingNumber
String (100)
Mandatory
Tracking Number
_strDescription
String (50)
Optional
Commodity Description (ex. Clothes, Office supplies, ...)
_strComment
String (255)
Optional
Comment (ex. Any instruction or notes)
_strValue
Decimal
Optional
Commodity Value
_strWeight
Decimal
Optional
Weight in _strWeightUnit (see bellow definition). Default if missing 0.00
_strWeightUnit
String (2)
Optional
Possible values in ['LB','KG']. Default if missing 'LB'
_strLength
Decimal
Optional
Length in _strDimmUnit (see bellow definition). Default if missing 0.00
_strWidth
Decimal
Optional
Width in _strDimmUnit (see bellow definition). Default if missing 0.00
_strHeight
Decimal
Optional
Height in _strDimmUnit (see bellow definition). Default if missing 0.00
_strDimmUnit
String (2)
Optional
Possible values in ['IN','CM']. Default if missing 'CM'

Output Parameters


Name
Type
Description
Error_Number
String
Error Number if exception occurred or Success 0 (zero)
Error_Msg
String
Message Error if exception occurred or Success action description

Javascript Code


PreAlertTest.html

<!DOCTYPE html>

    <html>
        <head>
            <meta charset="UTF-8">
            <title>XML FETCH() EXAMPLE</title>
        
            <script>
            
                function xmlpostdatafetch() {
                
                    let formData = new FormData();

                    formData.append('_strAccountNumber','YOUR_ACCOUNT');
                    formData.append('_strAccountPassword','YOUR_PASS');
                    formData.append('_strTrackingNumber','TRACKINGNUMBER');
                    formData.append('_strConsigneeID','CONSIGNEEID');
                    formData.append('_strConsigneeName','CONSIGNEENAME');
                    formData.append('_strWeight','1.25');
                    formData.append('_strWeightUnit','KG');
                    formData.append('_strValue','65.99');
             
                    fetch('http://YOUR_FREIGHT_HANDLER_SERVER_NAME/CFQPreAlertHandler.ashx', {
                        method: 'POST',
                        mode: 'cors',
                    
                        referrerPolicy: 'no-referrer',
                        body: new URLSearchParams(formData)
                    })
                    .then(response => {
                        response.text();
                    })
                    .then(data => { 
                        document.getElementById('xmlresponse').innerHTML = data.replace(/</gi,'<').replace(/>/gi,'>\n');
                    })
                    .catch((err) => {
                        document.getElementById('xmlresponse').innerHTML = 'Error fetching XML data';
                    });
                
                    document.getElementById('xmlresponse').innerHTML = 'Waiting for XML data...';
                
                }
                        
            </script>
        </head>
    
        <body>
        
            <input type="button" onclick="xmlpostdatafetch();" value="Post Data">
            <br />
            <br />
            <div id="xmlresponse">Ready to fetch data</div>
        
        </body>
    </html>
Tracking Sample Output Values


    <?xml version="1.0" standalone="yes"?>
    <NewDataSet>
    <Errors>
    <Error_Number>0</Error_Number>
    <Error_MSG>Pre-Alert for Tracking: TRACKINGNUMBER updated successfully</Error_MSG>
    </Errors>
    </NewDataSet>


Give us a call we are here to help. Free and Non-Compromise Quote
Disclaimer: This Website uses 'cookies' to store user preferences information. Using this site means you are 'OK with this.

 Powered by K SSS, Inc.
 Powered by K SSS, Inc.
Disclaimer: This Website uses 'cookies' to store user preferences information. Using this site means you are 'OK with this.