025349 Implement FedEx RESTful API

KCSL have enhanced Khaos Control to include a courier integration for FedEx REST.

KCSL will enhance Khaos Control to include a courier integration for FedEx REST.

After the update and changelog have been applied, the courier services should be configured as below.

A FedEx account is required before configuration can be completed.

  1. Go into the System Data screen.
  2. Open the Courier / Shipping  -  Couriers section.
  3. Create a new line by clicking New Item or pressing F3.
  4. Enter an appropriate Service / Courier Name e.g. FedEx REST
  5. Select FedEx REST in the CourierExport lookup.
  6. Save.
  7. Right click on the new line and click Configure… . This will open a dialog with the following options:

Option Name

Option Description

Example Value

Use Sandbox API

Use the FedEx sandbox API instead of the production API.

Ticked or unticked.

Client Key

Client key provided by FedEx for your FedEx account.

 

Client Secret

Client secret key provided by FedEx for your FedEx account.

 

Account Number

Account number provided by FedEx.

123456789

Pickup Type

Indicates if shipment is being dropped off at a FedEx location or is being picked up by FedEx.

USE_SCHEDULED_PICKUP

Service Type

The type of service that is used to ship the package.

FEDEX_PRIORITY

Packaging Type

Packaging used for the package.

FEDEX_PAK

Sender Pays Shipping

Indicates if shipping costs are paid by the sender or the recipient

Ticked or unticked.

Shipper Address Line 1

The first line of the shipper address

1-3 Priest Court

Shipper Address Line 2

The second line of the shipper address

 

Shipper Town/City

The town/city of the shipper address

Grantham

Shipper Postal Code

The postal code of the shipper address

NG31 7FZ

Shipper Country Code

The 2-digit country code of the shipper address

GB

Shipper Contact Name

The full name of the shipper contact

John Smith

Shipper Email Address

The email address of the shipper contact

JS@khaoscontrol.com

Shipper Telephone

The telephone number of the shipper contact

01234567890

Shipper TIN

The tax identification number of the shipper

GB1234567890

Shipper TIN Type

The tax identification number type of the shipper

BUSINESS_UNION

Label Stock Type

Label Stock Type, for example: PAPER_7X475

PAPER_85X11_TOP_HALF_LABEL

Label Rotation

This is applicable only to documents produced on thermal printers with roll stock.

 

Label Printing Orientation

This is applicable only to documents produced on thermal printers with roll stock.

 

Label Resolution

Specifies the image resolution in DPI. Valid values are 203 and 300.

 

Weight Units

The weight measurement units to apply (either KG or LB)

KG

Dimensions Units

The dimensions units to apply (either CM or IN)

CM

Invoice Originator Name

The commercial invoice originator name

Test Invoice Originator

Invoice Special Instructions

The special instructions text on the commercial invoice

Special instructions go here on the invoice

Invoice Declaration Statement

The declaration statement text on the commercial invoice

Declaration goes here

Letterhead image

The filename of the letterhead image (must be either .png or .gif)

 

Signature image

The filename of the signature image (must be either .png or .gif)

 

International shipments

Use this courier for international shipments

Ticked or unticked.

Windsor framework

Use this courier for Windsor framework "green-lane" shipments

Ticked or unticked.

Sender pays duties

Indicates if the duties are paid for by the sender or recipient

Ticked or unticked.

Incoterms

The Incoterms abbreviation to use

DDP

Default package width

Width of the default package used when the invoice has not been packed in boxes

1

Default package height

Height of the default package used when the invoice has not been packed in boxes

1

Default package length

Length of the default package used when the invoice has not been packed in boxes

1

Signature option type

Indicate the required signature type from the recipient

INDIRECT

Weight Scale

The scaling factor to multiply the weight values of the shipment by before sending. E.g. if your weights are in grams and you have specified a weight unit of KG, use 0.001.

0.001

Nominal Weight

If a box has been packed but the total weight of the box comes to 0, this value will be used instead. This will be multiplied by the Weight Scale.

1

Dimension Scale

Not used for this courier integration, dimensions are not sent. Use the Packaging Type option instead.

1

Requires Consignment Ref

If enabled, sales invoices for this courier without a Consignment Ref will not be allowed to be moved past the Shipping stage.

¨

Printer Name

General option – not used for Fed Ex. (See the Printer Name option above.)

Ticked or unticked.

Raw Dump to Table

Not used for this courier integration. (See the RAW Dump option above.)

¨

Note Choice

Not used for this courier integration.

(blank)

Primary Reference

Not used for this courier integration.

(blank)

Secondary Reference

Not used for this courier integration.

(blank)

Default Stock Weight

Default weight value to use if the weight of a stock item is detected as 0 or below.

0



After applying the above Configuration, typical steps for usage would include:

 

1.      Raise a sales order.

2.      Set the Courier in the [ Sales Order | Detail | Additional ] tab.

3.      Save.

4.      Imported orders may have a courier automatically selected. How to achieve this will vary depending in the method used to import the order.

5.      Open the Sales Invoice Manager (SIM) on the Staged Processing tab.

6.      Pack boxes by clicking the Pack Boxes button in the Packing stage of the SIM, if required.

7.      Process the order’s invoice in the SIM as far as the Shipping stage.

8.      Green select the invoice and then click the Confirm Shipment button.

9.      Set the Shipment Date in the top right, if it is not correct already.

10.  Double-click on the invoice to move it to the lower grid.

11.  The courier may be set at this stage as well, by clicking into the Courier column and pressing F4, then selecting the courier from the dropdown list.

12.  Check the Weight. If this needs to be overridden enter the real weight into the Actual Weight column.

13.  Click OK.

14.  Click the Assign to Courier button.

At this point, Khaos Control will attempt to send shipment information to the FedEx webservice for each invoice that was green selected, using the settings as per the Configuration section.

If this succeeds there will be labels returned.
If this fails, errors returned by Fed Ex will be put into the Shipping Error column (on the right-hand side in the Confirm Shipment dialog.)

 



Did you find this article helpful?