Author Archive

How to cancel a shipment after label created

If you need to cancel a shipment and it has not been shipped yet by carrier, you could delete the shipment record created with A5 Ship app in Salesforce or the shipment status will remain “ready to ship” if you would like to keep the shipment record. It is only when you give the package to the carrier to be shipped that the carrier will scan and process the label so if they have not yet received package, you can “cancel” the label before shipment starts.

If the shipment has been shipped or in route to destination, you will need to contact the carrier directly to cancel the shipment.

Print Shipping Label

After you have created a Shipment record you can view the Shipment record in Salesforce. The label will be attached as a related attachment to the Shipment record in its raw form as received from the shipping carrier.

NOTE: If you have created a Shipment record and the carrier/Shipping Method field on the record is DHL Express, shipping label will be saved as a PDF document and the following feature will not work. Instead, we advise you open the shipping label in your browser and print from it, since every browser supports opening and printing PDF documents.

Click on the Print Label button or link on the field on the layout. Clicking this button will orient the image of the label vertically, and will display the image in the width and height that is set in the fields Label Width and Label Height. You may not need to adjust these fields depending on the outcome of the print and considering the following steps. If you do need to adjust the width and heigh you can set these fields values. The width and height is in pixels so you can start with 400 for width and 600 for height and then adjust from there to get it how you need for your printer and paper. If you determine you need to set the Label Width and Height on the Shipment record then you should configure a Salesforce Workflow or Process Builder to set the values of those two fields with the values you need when a new Shipment record is created. This way it is already set for every record and ready to print.

When you click the Print Label button it also should prompt the Print action on the browser. When you print from your browser, your browser will have some printing options such as to Adjust the image to fit to a whole page or to scale an image. You can select paper size and there are also settings with your printer and paper setup to configure margins and width and height. There are many browsers, printers, paper, labels and options here. You will need to adjust your settings between the printer, paper, browser, and potentially the label width/height on the Shipment record to find the right conditions to print the label the way you need.

Optionally you can also view the label attachment directly from the Attachments related list and consider printing from that direct image.

If you are mass printing labels we suggest you utilize the Google Drive feature of the shipment app which you can configure in Ship Configuration tab. All shipping labels will be saved to your google drive to a folder you select. You can create a folder on your google drive called “Ship Labels to Print” that is a holding folder for labels to print. A person would then go to the google drive folder and do an export of all the label files into a zip file. Then open that zip file on the computer after downloaded and unzip. Then you will have a folder of a bunch of labels to print in mass using mass print function on the computer. You may also consider syncing the google drive folder with your desktop to skip zip file export step. Then we suggest having another google drive folder called “Ship Labels Printed” so that once you export/download/print the labels in the “Ship Labels to Print” folder you can select all those files and move them to the other folder to keep the label file but move it out of this “processing” folder so that it is empty and ready to be filled by new shipment labels that need to be printed.

Relate the Shipment Object to other Objects

  1. A5 Shipment object is included with the app to create a Shipment record for each shipment.  You can relate this object to any other object you want in Salesforce by creating a Lookup type field on the Shipment object.
  2. Then add the Shipments related list to the your object page layout.
    1. You will want to setup a custom button to pass the Related To value and lookup field name when creating a new shipment.  See this section of the documentation.
  3. Included in the app is the App called A5 Ship that has the tabs: A5 Ship Configuration, Shipments, and New Shipment.
    1. You may want to add New Shipment and Shipments tab to another app you use regularly for easy access.

Shipment Tracking and Auto Label Creation

  1. Go to A5 Ship app, or go to more tabs and go to Ship Configuration tab.
  2. To enable automatic shipment status tracking of your Shipment records, click Enable Tracking button on the Shipment Tracking tab.
    1. Tracking will run every hour automatically.
  3. If you would like the app to automatically create shipping labels for Shipment records, click  Enable Processing on the Shipment Processing tab.
    1.  For this feature to work, you need to create a Shipment record manually or using automation, set its Status field value to Get Label and populate all of the required fields.
    2. If you are creating a shipment you want to ship via DHL Express, you should populate the Ship Weight Unit field with the unit which will be used for that shipment. Available values are LB and KG.
    3. This processing will run every hour.
  4. If you would like to save your shipping labels to your own Google Drive instead of an attachment in Salesforce, then go to Google Drive tab and authorize your google account.
    1. Then you can also specify a google drive folder id you want to save labels into.
    2. If this is not defined, labels will be saved in the root folder of users Google Drive. Each shipment will create its own folder with shipment name as a folder name. Also, Google Docs need to be enabled within Salesforce.
    3. When Google Drive is enabled, then the shipping label image url is saved in the Shipping Label Google Drive URL field on the Shipment record.
    4. The idea to use Google Drive is great for doing mass printing of shipping labels since you can go to Google Drive, and download an export of a whole folder of shipping labels, then unzip on your computer and mass print them.  You can also sync your google drive to your computer if you prefer.
  5. See the following articles for configuring each shipping provider: UPS, USPSFedEx, or DHL Express.

Configure a Create Shipment Button

If you would like to create a custom button or link that will pass all the values to the New Shipment page so you don’t need to fill out any information then setup a button like this and replace the values you want:
&reference=Ship Reference
&fromCompanyName=SleepPoint Diagnostics
&fromContactName=John Smith
&fromAddress=107 Mill Plain Road

Note that the available formats for fromState and toState parameters are state codes and state names, e.g. CA and California. For states consisting of two words, like North Carolina, you can pass the value as separate words or one word, e.g. North Carolina or NorthCarolina, and of course as a state code (NC). Also, letter case is not important, as you can pass the value in all possible combinations, like NORTHCAROLINA, northcarolinaNORTHcarolina, etc. Same with state codes.

Creating a New Shipment

  1. To create a new shipment just go to A5 Ship App or go to More Tabs or and click on New Shipment tab.
    1. You may also setup a custom button from another object like Opportunity or anywhere to go to this page and pass values prepopulated.
  2. You may select a Fullfilment Location if you have configured one to prepopulate the From part of the From & To Location Details section.
  3. Otherwise enter information in From & To Location Details section.
  4. Enter shipment’s Total Weight in Package Details section, and optionally Reference that will be printed on the shipping label.
  5. Click the Get Rates button.
  6. The system will then check for all rate options for the shipping providers you have setup as active in Ship Configuration.

Available rates will be displayed in the table-like view which consists of the following columns:

  • Create Label – a button which will create a Shipment record, a shipping label, and attach the label to the record, all based on the selected rate,
  • Carrier – shipping carrier which provides the available rate/service,
  • Service – one of shipping carrier’s services provided used to ship the package,
  • ETA – estimated date of delivery provided by the shipping carrier for the selected service—may not be provided for some services,
  • Rate (USD) – price of shipping for the selected rate.

Return Label: You can go through same process of creating a shipment label as you can for return label. You have the option to automate the creation of the both shipment and return label if you would like.

Configure Fulfillment Locations

  1. You can configure your shipping from locations that you typically ship your packages from so that you can easily populate them on New Shipments you create.
  2. Go to A5 Ship App or more tabs and go to Fulfillment Location tab.
  3. This is a custom object included in the app.  Create a New record and fill out the shipping location information in the fields and save.
  4. After this is saved then when you create a new shipment you will see any FulFillment Location you created in the picklist available to select and preopulate the Ship From address information.

Configure FedEx

  1. Get a account.
  2. Go to web services, develop and test and get development key:
  3. Enter credentials into A5 Ship Config tab for fedex and select test mode.
  4. Test.
  5. When ready to go live, go back to web services and like on Go to Production tab.
  6. Standard Services:
    1. Get Rates
    2. Track shipments
  7. Advance Services:
    1. Create Shipment
  8. Click on get Production Key.
  9. Fill out forms.
    1. Select you are not reselling this app, and you are corp employee.
  10. They will display Authentication Key.  Enter this in Account Key in A5 Ship Config page.
  11. They will email you password.  Enter that in Account Password in A5 Ship Config page.
  12. On A5 Ship Config page update the Fedex Account number to production one, and the Meter Number provided.  Then uncheck Test Mode.
  13. To enable creating shipments/labels you need to get your production key certified/enabled for Advanced FedEx Web Services with Shipping Labels.
  14. Contact the Web Integrated Solutions Team for your region with your application information, which features/services you’re implementing and your production key and production meter number. Request that your application be enabled using advanced FedEx Web Services with Shipping Labels.
    1. The only web service you need activated is “Ship Services” aka “Create Shipments”.
    2. Regional contacts are in the pdf link provided in the email
    3. For USA: Technical Support hotline phone: 1.877.339.2774 (When prompted, please say “API”) PreProduction Assistance: FedEx Web Integrated Solutions Consultation Team
      1. Option 3: Web Services
      2. Then choose Fedex API
      3. Ask to activate Ship Services aka Create Shipment web service for your production account.
      4. They will say we need to get the label certification process started.  You say yes please.
      5. They will ask for your production fedex account number.  Then lookup your account.
      6. Short list of questions:
        1. Company name – your company
        2. Company address.
        3. Meter number
        4. Point of contact
        5. Phone number of contact
        6. Email
        7. Are you using a Prebuilt application or built your own?  Say you are using a prebuilt application called “A5 Ship”.
        8. Will you be requesting address validation or address checker – No
        9. Will you be requesting Courier dispatch – No
        10. Will you be shipping express, ground or both.  Say both.
      7. They will say they will send an email with instructions.
      8. They will provide a case number.
  15. The support team of your region sends an email with detailed instructions for certifying shipping labels generated by this application.
    1. Email will come from for example with a subject “FedEx Web Services Label Evaluation Process”.
  16. Generate and Submit Test Labels Generate test labels within the FedEx test environment associated with the application then submit the test labels to the FedEx label evaluation team(s) for approval. Note: The FedEx label evaluation teams require a three business day turn-around time for label evaluation.
    1. Turn FedEx in A5 Ship Config back to test mode in Salesforce. You will need to reload the test credentials and check the test mode box.
    2. Create a new shipment, then view the shipping label and save the image by printing to PDF to save it as a PDF.  They only accept a pdf version of the label.
    3. We suggest to save a test label during the test mode setup before you go to Production.
  17. Reply back to the instructional email received with the shipping labels generated.
    1. You will need to fill out the coversheet they provided.  And then send the coversheet with the label images as instructed to
  18. The FedEx label evaluation teams evaluate the submitted test labels and approve or reject the labels. The support team in your region contacts you regarding the approval or rejection of the submitted labels. If the labels are approved, continue to the next step. If the labels are rejected, correct the labels as instructed and resubmit them for approval.
  19. Regional WIS Team Enables the Application Once the test labels are approved for production status by the label evaluation teams, the support team for your region authorizes your production credentials to transmit the identified shipping label transaction and notifies you via email of successful certification. Note: Your approval is on a per key basis, meaning if you generate additional FedEx Web Services production keys, you’ll need to inform your regional support team in order to resolve any authentication errors.
  20. Once approved change fedex credentials in A5 ship config tab back to not test mode.

Configure USPS

  1. Go to and create an account.
  2. Now you need to register to use the API.
    2. Click register.
    3. For this question “What is the Web site address (URL) of the site that will be hosting the USPS Web Tools?”
      1. You can enter “”.
    4. For the question on if you are using the api for your website or multiple websites, select your website only.
  3. You will get an email with your username and password.  Those are your account id and account key to enter into the A5 Ship Configuration tab.
  4. Your User ID is currently authorized to access the following groups of APIs in production:
    1. – Price Calculators
    2. – Package Tracking
  5. If you want to create labels that are billed to your USPS account then you need to Request Additional API Permissions.
    1. Permissions for creating shipping labels are added separately. To obtain these permissions contact our Internet Customer Care Center ( and include “Web Tools API Access” in the subject line. An agent will be happy to assist you.
    2. For Label API permission requests, indicate in the body of the email
      1. – If you will be modifying the label image
      2. – How you intend to pay for label postage as payment cannot currently be remitted directly to USPS through the API.
    3. For more information on postage payment options, follow this link to
    4. You can pay for postage with ACH which we think we would be the common use case for our customers.  So we suggest sending the following email body:
      1. We would like api access to create shipping label for username {insert username} enabled.  We will not modify the shipping label image. We would like to pay via ACH.
    5. USPS will reply via email with something like this:
      1. Recently you requested personal assistance from the United States Postal Service. Below is a summary of your request and our response. Thank you for allowing us to be of service to you.Subject:  Web Tools API Access
        You are now authorized to begin printing labels.
        To begin printing live labels, remove the word “certify” from API value. For example: “API=DelivConfirmCertifyV4” should now read “API=DeliveryConfirmationV4”.
        Note that we do not currently offer the ability to pay for postage directly via Label APIs. Existing postage payment options are as follows:
        – Buy and print online with Click-N-Ship
        – 3rd party PC postage providers
        – Metered postage
        – Permit imprint
        – USPS Picture Permit Imprint
        Please follow the link below for more information on the available options for postage payment:

Configure UPS

  1. Get a account.
  2. If you have a login but no billing account yet with an Account Number then you need to sign up:
    1. If you have an account you can see your Account Number on your Invoice from UPS.
  3. Go to the UPS Developer Kit web page
    1. Click request access key.
    2. Add account if needed.
  4. Enter the user login, account number, and account key in the A5 ship configuration page.

Other reference material: