Customizing Manifest Calls Using Scripts

Use a manifest script to pass customized data between Infoplus and EasyPost. Learn how to set one up, test it, and see real-world examples.

The standard process that Infoplus uses to create parcel labels with our Manifesting partners relies on data from your Orders, Cartons, Products, Parcel Accounts, and more, combined with a core set of business rules that Infoplus understands.  

Infoplus Support can help with general questions about how scripting works. For help with a specific script or its outputs, you will need to submit a Pro Services request for paid support. Pro Service request form can be found here.

However, there are times when you may need to customize the data or business rules that you use to create shipments and parcel labels. For example, some orders may need dry ice added to them based on the products or order's ship-to address. Or you might have a business rule that says based on the carrier you want to increase or decrease the total weight of a Carton in certain circumstances.  Infoplus allows you to customize Manifest calls in cases like these, using Manifest Scripts.  Here's how they work.

Create a Manifest Script

To create a Manifest Script, simply navigate to the Script table in Infoplus.  Create a new Script, and choose the Script Type of Manifest.  

For the code in a Manifest script, there is a single function that you must define which allows you to customize the data passed to EasyPost when creating shipments and getting rates:

  • customizeEasypostPreRatesCall - This function allows you to customize the data being sent in the Create Shipment call to EasyPost.  This script will have access to a global variable called shipmentMapForRate, which is a java Map object (i.e., it has get and putmethods).  You can modify the data in this map, according to Easypost's shipment api documentation, to change the rates & labels that Infoplus will receive.

When you create a new Manifest Script, Infoplus will pre-populate the Code field with a comment that describes in more detail the variables and functions available in a Manifest Script.  

Assigning a Manifest Script to an Order

To use a Manifest Script, it must be applied at the Order level. You can select it when Creating or Editing an Order in Infoplus, with the Manifest Script field on the order table:

You can also automatically set a Manifest Script on an Order using a Trigger and your User Filter. Add the action of Change Manifest Script and the Manifest Script you would like set on the orders. Read more about Triggers here

Testing Manifest Scripts

To test a Manifest Script you must create Parcel Labels for a valid Infoplus Order. This can be done in either your test or live site as long as you have Parcel Accounts setup. 

We recommend running a Fulfillment Process against a test order, with the Create Labels field set to True.  You can edit your script, and use the Run Pick Pack Ship action on your Fulfillment Process to quickly void existing labels for your test orders, and re-create the labels again as needed, providing a quick turn-around cycle for testing changes to the script.

Error Handling

If your Manifest Script produces an error, Infoplus will not be able to complete the process of creating parcel labels.  This error will be presented in Infoplus at whatever point a user is trying to create parcel labels (such as when running Fulfillment / Pick Pack and Ship, or at the Ship Station, or from the Create Parcel Labels process).  

Example Manifest Scripts

Adding Dry Ice

In this example, this script is applied to Orders that require dry ice to be added to the label.

Setting Third-Party Account For International Duties and Tax Charges

By default, an international order with a third-party parcel account assigned to it will have the charges for duties and taxes assigned to the original parcel account, rather than the third party.  This can be changed using a Manifest Script by specifying what account should be responsible for these charges.  This is currently only possible with FedEx and UPS accounts and how this is specified in the data sent to these carriers differs between the two.  Please see the example below which shows how these changes can be implemented.


Add Buyer Address to EasyPost Labels with Script

‘buyer_address’ is a variable in EasyPost that requires a different notation than other variables due to the fact that it is not populated by InfoPlus; it must be created as an object. Its own variables can then be assigned with it, and then the ‘buyer_address’ with its inner variables can be mapped to the EasyPost ‘buyer_address’ variable. Here is an example script, customizing the shipment options for buyer_address:

Add Signature and Letterhead with Script

If you want to add a signature or a letterhead to your manifest script call, you will need to reach out to Infoplus Support. We will then contact EasyPost to get this setup, but after that Infoplus users will need to apply the below script example to complete adding the Signature and/or letterhead. If you need a letterhead and/or signature for EasyPost, this image explains what you might see: 

Signature and Letterhead Script Example: