Solved

Easypost International Shipments Customs Documentation

  • 17 March 2021
  • 7 replies
  • 95 views

Userlevel 1
Badge
  • Jr Varsity II
  • 41 replies

Browsing the Forums, it seems many people have Easypost working with Acumatica to generate their Customs Documentation automatically from Acumatica.  I’ve installed the Easypost customization and have Fedex and UPS working, but I can’t determine which fields on the shipment I’m supposed to enter the required Customs information (Commodity type, Customs Value, Harmonized Code, etc.) to generate the commercial Invoice.

It seems easy enough to create the Customs Object for the Easypost API, but I can’t find any documentation on the Easypost customization project (that I believe Acumatica maintains) that shows what fields map to what.  The project does add some extra fields to the shipment.  

 

thanks!

icon

Best answer by Hughes Beausejour 19 March 2021, 17:27

The part which is specific to EasyPost is on page 9 of EasyPost documentation (see attachment at the bottom of this message):

Support for supplying Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC) for international destination When shipping outside the US, you would need to provide either an Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC). Which you need is based on the value of the goods being shipped. Acumatica allows to specify value for EEL/PFC in Shipment → Packages’ EEL/PFC (EasyPost) field for each package in a shipment. Per EasyPost customs-guide: • If the value of the goods is less than $2,500, then you pass the following EEL code: "NOEEI 30.37(a)" • If the value of the goods is greater than $2,500, you need to get an Automated Export System (AES) Internal Transaction Number (ITN) for your shipment. ITN will look like “AES X20120502123456”. To get an ITN, go to the AESDirect website. • An ITN is required for any international ship

 

There are a few standard item configuration fields that are used for international shipping.
 


This code snippet shows these values used by EasyPost integration:
shipment.customs_info = new CustomsInfo();
shipment.customs_info.customs_certify = "true";
shipment.customs_info.customs_signer = fromAddress.name;

shipment.customs_info.contents_type = ContentType.GetEasyPostContentType(carrierBox.CustomsData.ContentType);
shipment.customs_info.non_delivery_option = _settings.InternationalNonDeliveryOption;
shipment.customs_info.contents_explanation = carrierBox.CustomsData.OtherContentTypeDesc ?? shipment.customs_info.contents_type;
shipment.customs_info.eel_pfc = carrierBox.CustomsData.CertificateNumber;
shipment.customs_info.customs_items = new List<CustomsItem>();

foreach (var cline in carrierBox.CustomsData.DetailedLines)
{
    CustomsItem line = new CustomsItem();
    line.code = cline.InventoryCode;
    line.description = cline.InventoryDescr;
    line.quantity = Convert.ToInt32(cline.InventoryQty);
    line.hs_tariff_number = cline.InventoryHSTariffCode;
    line.value = Convert.ToDouble(cline.InventoryValue * cline.InventoryQty);
    line.origin_country = cline.InventoryCountryOfOrigin;
    line.currency = curCode;
    line.weight = GetBoxWeightForEasyPost(cline.InventoryWeight, cRequest.Units) * line.quantity;
    shipment.customs_info.customs_items.Add(line);
}

View original

7 replies

Userlevel 4

The part which is specific to EasyPost is on page 9 of EasyPost documentation (see attachment at the bottom of this message):

Support for supplying Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC) for international destination When shipping outside the US, you would need to provide either an Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC). Which you need is based on the value of the goods being shipped. Acumatica allows to specify value for EEL/PFC in Shipment → Packages’ EEL/PFC (EasyPost) field for each package in a shipment. Per EasyPost customs-guide: • If the value of the goods is less than $2,500, then you pass the following EEL code: "NOEEI 30.37(a)" • If the value of the goods is greater than $2,500, you need to get an Automated Export System (AES) Internal Transaction Number (ITN) for your shipment. ITN will look like “AES X20120502123456”. To get an ITN, go to the AESDirect website. • An ITN is required for any international ship

 

There are a few standard item configuration fields that are used for international shipping.
 


This code snippet shows these values used by EasyPost integration:
shipment.customs_info = new CustomsInfo();
shipment.customs_info.customs_certify = "true";
shipment.customs_info.customs_signer = fromAddress.name;

shipment.customs_info.contents_type = ContentType.GetEasyPostContentType(carrierBox.CustomsData.ContentType);
shipment.customs_info.non_delivery_option = _settings.InternationalNonDeliveryOption;
shipment.customs_info.contents_explanation = carrierBox.CustomsData.OtherContentTypeDesc ?? shipment.customs_info.contents_type;
shipment.customs_info.eel_pfc = carrierBox.CustomsData.CertificateNumber;
shipment.customs_info.customs_items = new List<CustomsItem>();

foreach (var cline in carrierBox.CustomsData.DetailedLines)
{
    CustomsItem line = new CustomsItem();
    line.code = cline.InventoryCode;
    line.description = cline.InventoryDescr;
    line.quantity = Convert.ToInt32(cline.InventoryQty);
    line.hs_tariff_number = cline.InventoryHSTariffCode;
    line.value = Convert.ToDouble(cline.InventoryValue * cline.InventoryQty);
    line.origin_country = cline.InventoryCountryOfOrigin;
    line.currency = curCode;
    line.weight = GetBoxWeightForEasyPost(cline.InventoryWeight, cRequest.Units) * line.quantity;
    shipment.customs_info.customs_items.Add(line);
}

Userlevel 1
Badge

Thanks Hughes!! This certainly helps me get closer!

 

Sometimes our customers provide us with information to ship internationally.  Creating shipments through Fedex gives us the option for the Declared Value to be different from the Customs Value.  Is this an option?  Is it pulling any Value from the Sales Order or is it all from the ‘Declared Value’ on the Package?  Since we sell through distributors the value on the SO does not reflect the Customs or Declared Value.

 

 Also, our products are used for different purposes, I’m guessing there is no override for the tariff/harmonized code and that has to be on the stock item? 

 

Is the projects souce code available?  That way I could dig around and try to figure some of this out myself.

 

Thanks again, it really is appreciated!

Userlevel 4

 

>  Creating shipments through Fedex gives us the option for the Declared Value to be different from the Customs Value.

Box declared value is used for the insurance options.

> Is it pulling any Value from the Sales Order or is it all from the ‘Declared Value’ on the Package? 

The customs value is based on the SOLine unit price value. The computation from there to the carrier is very long and complex. The last field in the chain to contain the custom value is SOShipLineSplitPackage.UnitPriceFactor:

protected virtual IList<InternationalCustomsInfoLine> GetCustomsInfoDetailLines(SOPackageDetailEx box, CarrierPlugin plugin)
{
    var packageSplits = SelectFrom<SOShipLineSplitPackage>.
        Where<SOShipLineSplitPackage.shipmentNbr.IsEqual<@P.AsString>.
        And<SOShipLineSplitPackage.packageLineNbr.IsEqual<@P.AsInt>>>
        .View.Select(Base, box.ShipmentNbr, box.LineNbr)
        .RowCast<SOShipLineSplitPackage>()
        .ToList();

    var detailLines = new List<InternationalCustomsInfoLine>();
    foreach (SOShipLineSplitPackage packageSplit in packageSplits)
    {
        SOShipLine shipLine = PXSelect<SOShipLine,
                            Where<SOShipLine.shipmentNbr, Equal<Required<SOShipLine.shipmentNbr>>,
                                And<SOShipLine.lineNbr, Equal<Required<SOShipLine.lineNbr>>>>>
            .SelectWindowed(Base, 0, 1, packageSplit.ShipmentNbr, packageSplit.ShipmentLineNbr);

        InventoryItem shipLineItem = InventoryItem.PK.Find(Base, shipLine.InventoryID);
        InventoryItem packedItem = shipLine.InventoryID == packageSplit.InventoryID
            ? shipLineItem
            : InventoryItem.PK.Find(Base, packageSplit.InventoryID);

        decimal itemWeightFactor = (packageSplit.WeightFactor ?? 0m) != 0m ? packageSplit.WeightFactor.Value : 1m;
        decimal weightInStandardUnit = Base.CarrierRatesExt.ConvertWeightValue((shipLineItem.BaseWeight ?? 0) / itemWeightFactor, plugin);

        var customsInfoLine = new InternationalCustomsInfoLine();
        customsInfoLine.InventoryCode = packedItem.InventoryCD;
        customsInfoLine.InventoryDescr = !string.IsNullOrWhiteSpace(shipLine.TranDesc)
            ? shipLine.TranDesc
            : !string.IsNullOrWhiteSpace(shipLineItem.Descr) ? shipLineItem.Descr : shipLineItem.InventoryCD;
        SOShipLine.unitPrice
        customsInfoLine.InventoryValue = packageSplit.UnitPriceFactor ?? 0m;
        customsInfoLine.InventoryQty = packageSplit.PackedQty ?? 0m;
        customsInfoLine.InventoryCountryOfOrigin = packedItem.CountryOfOrigin;
        customsInfoLine.InventoryHSTariffCode = packedItem.HSTariffCode;
        customsInfoLine.InventoryWeight = weightInStandardUnit;

        detailLines.Add(customsInfoLine);
    }

    return detailLines;
}

> Is the projects souce code available?

Yes and no, source code is distributed with the product. You can open the source code page but it doesn’t contain code for all assemblies.

Userlevel 4

> I’m guessing there is no override for the tariff/harmonized code and that has to be on the stock item? 

You would need to customize Acumatica product or create duplicate stock items for this use case.

Userlevel 4

> Since we sell through distributors the value on the SO does not reflect the Customs or Declared Value.

That value appears to be based on SOLine UnitPrice field. So you would have to find a workflow where you can use this value or customize Acumatica product to provide a different value.

Userlevel 1
Badge

Incredible reply.  Thank you very much Hughes.  If every topic here got this treatment, end users would be thrilled!

 

> Is the projects souce code available?

Yes and no, source code is distributed with the product. You can open the source code page but it doesn’t contain code for all assemblies.

Great!  I had assumed those dll’s were obfuscated.

 

> I’m guessing there is no override for the tariff/harmonized code and that has to be on the stock item? 

You would need to customize Acumatica product or create duplicate stock items for this use case.

This is unfortunate.  There is different Harmonized (tariff) code for item repair or replaced under warranty.  So anyone offering warranties or doing repairs potentially are going to need at least 2 codes for the same Stock Item.

 

> Since we sell through distributors the value on the SO does not reflect the Customs or Declared Value.

That value appears to be based on SOLine UnitPrice field. So you would have to find a workflow where you can use this value or customize Acumatica product to provide a different value.

This one is even more unfortunate.  Not just for situations like ours where the item on our SO holds a different actual value of the item, but again for warranty repairs where the line item is going to be $0. 

 

Thanks again though.  If possible pass my requests to the customization project authors to make as many of the API calls editable on the Shipment (or any) screen.

Hey @Noah - noticed you weren’t able to get this working and wanted to make you aware of our StarShip Acumatica shipping app.  It connects directly to Acumatica and can pull the item info over but also gives you the ability to: 

  • store additional information about the item in the StarShip database (so it can be a different value than what is on the Acumatica document)
  • edit information on the fly 

We also support other international-related functions like direct ACE integration, paperless invoice, ETD, etc.  Let me know if you would like more details!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved