This article outlines the sequence of steps to follow for basic configuration of the A5 Ship app. 

    1. Install the app from AppExchange
    2. Configure Shipment Settings
    3. Configure Fulfillment Locations
    4. Configure a Create Shipment Button
    5. Relate the Shipment Object to Other Objects

Install the App

  • Install the app from AppExchange
  • You will be prompted to authorize api access to the following domains:
    • ws.fedex.com
    • wsbeta.fedex.com
    • production.shippingapis.com
    • secure.shippingapis.com
    • stg-secure.shippingapis.com
    • onlinetools.ups.com
    • wwwcie.ups.com
    • xmlpi-ea.dhl.com
    • xmlpitest-ea.dhl.com
    • accounts.google.com
    • www.googleapis.com
  • This is to communicate with UPS, USPS, Endicia (USPS), Stamps (USPS), Fedex, and DHL Express for shipment label creation, rate checking, and status checking. Google is for Google Drive, in case you want to save your shipping label images to your Google Drive.
  • You will still need to configure your own account information for each carrier and authorize each connection.

When installing the app package into Salesforce, you will see this example screen to approve Third-Party Access (you will see more options than this): 


    1. Configure Shipment Settings

      Go to the Ship Configuration tab to configure shipment settings. There are two categories: General and Carriers. Within the General category, you can configure Shipment Tracking, Shipment Processing, and Google Drive. Within the Carrier category, you can configure carriers.

      General

      Shipment Tracking – To automatically track the shipment status of your Shipment records, click Enable Tracking button on the Shipment Tracking tab.

      Shipment Processing – If you would like the app to automatically create shipping labels for Shipment records, click  Enable Processing on the Shipment Processing tab. This processing will run every hour. See this article for more detail on automation: Auto Create Shipping Labels.

      Save Labels to Google Drive – If you would like to automatically create and save shipping labels to your personal or company Google Drive instead of an attachment in Salesforce, then go to the Google Drive tab and click “Enable Google Drive” to authorize your Google account. See this article for more detail: Auto Create Shipping Labels with Google Drive.

      Configure Carriers

      See the following articles for configuring each shipping provider:


  1. Configure Fulfillment Locations

    Using the Fulfillment Locations feature, you can configure the locations that you typically ship your packages from, which allows you to automatically populate this information on the new Shipment records that you create.

    1. Go to A5 Ship App or “More” tab.
    2. Click the Fulfillment Location tab.
    3. Create a new record and fill out the shipping location information in the fields
    4. Click “Save”.

    You will now see this Fulfillment Location in the picklist of available options to select and pre-populate the Ship From address information.


  2. Configure a Create Shipment Button

    Configuring a custom button allows you to quickly create a New Shipment record with merged data from specific record and relate it to that record.

    Create the Button

    1. Go to Setup>Object Manager
    2. Select the object for your button
    3. In the object’s menu on the left, select “Buttons, Links, and Actions”
    4. Select “New Button or Link” on upper right
    5. Enter the name of your button in “Label” (e.g. Create Shipment)
    6. Select the “Detail Page Button” Display Type
    7. Configure the Button Code
      • At the bottom of the page is a box where you will add your button code. The button starts the process of creating a new shipment by linking to the New Shipment page and sends values to specific fields. How you choose to configure your button is determined by your organization’s needs, Salesforce org, and business processes. The button will be a url type and will link to “/apex/rs_ship__PrintPostageLabel” which is a visual force page included with the app package. Then you can add url variables to pre-populate the fields on that page. To add variables in the url you add ? after the initial url and then & in between each additional variable.

    Add Button to the Object’s Page Layout

    In order to see the button, you’ll need to add it to the page layout.

    1. Go to Setup>Object Manager
    2. Select the object for your button
    3. In the object’s menu on the left, select “Page Layout”
    4. Select the page where you plan to add your button
    5. In the object’s layout editor, select “Buttons” from the menu on the left side of the editor
    6. Locate your new button, then drag it down to the “Customs Buttons” section of the object’s Detail page layout.
    7. Click “Save”

    Overview of Button Variables

    Listed below is an overview of variables that you could choose to put in your button code. All variables are optional.

  3. relatedToField
    • The relatedToField parameter is used to relate a specific record to the shipment that is going to be created.
    • You would create a custom Lookup field on the Shipment object to create a relationship to any object you want Shipments related to. This is the object where your button would also be located.
    • Provide the API name of the custom lookup field on the Shipment object which will be used to save the Id provided in relatedTo.
    relatedTo
    • The relatedTo parameter is used to relate a specific record to the shipment that is going to be created.
    • Provide either a hardcoded Id (e.g. 003XXXXXXXXXXXXXXX) or the merge code for a field that contains a record Id (e.g. {!Account.Id}).
    • This value will populate the relatedToField specified.
    fedex_acct
    • If you wish to use the Carrier Account feature, this parameter specifies the FedEx Carrier Account should be used
    • The Carrier Account value will be the Salesforce Id of the Carrier Account record that should be used.
    dhlexpress_acct
    • If you wish to use the Carrier Account feature, this parameter specifies the DHL Express Carrier Account should be used
    • The Carrier Account value will be the Salesforce Id of the Carrier Account record that should be used.
    ups_acct
    • If you wish to use the Carrier Account feature, this parameter specifies the UPS Carrier Account should be used
    • The Carrier Account value will be the Salesforce Id of the Carrier Account record that should be used.
    fullfilmentLocationId
    • If you Configure Fulfillment Locations prior to configuring your button, you can enter the Fulfillment Location Id in the button code so you don’t have to populate or send parameters for each of the “From” fields.
    • This is the 15 or 18 character Salesforce Id. Just view the Location record in SF and copy the id from the ulr in the browser.
    fromCompanyName

    fromPhoneNumber

    fromAddress

    fromCity

    fromState

    fromCountry

    fromPostalCode

    • Fields to populate the From address information.
    • fromAddress is the street address portion of the address. If you have two address lines you should combine them in the formula to go into this one field.
    • The available formats for fromState 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 NORTHCAROLINAnorthcarolinaNORTHcarolina, etc. Same with state codes.
    • If you populate the FulfillmentLocationId then all these From fields would get populated automatically getting those values from the Fulfillment Location record.
    • When providing Fulfillment Location Id, the app must query for the fulfillment location and do some logic to populate the fields. If you are concerned about processing speed, you can instead provide hardcoded values for each of the “From” fields that you want to populate values instead of defining the Fulfillment Location Id. It can also be merge codes. Commonly the merge code would be from the Organization company fields.
    toCompanyName

    toContactName

    toPhoneNumber

    toAddress

    toCity

    toState

    toCountry

    toPostalCode

    • The “To” fields indicate who you are sending the package to; typically the “To” fields are merge field code but they can also be hardcoded values.
    • toAddress is the street address portion of the address. If you have two address lines you should combine them in the formula to go into this one field.
    • The available formats for 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 NORTHCAROLINAnorthcarolinaNORTHcarolina, etc. Same with state codes.
    mailWeight
    • This would be the weight of the package in pounds.
    • A common use case would be to create a field on Product object for example to configure a weight for each product. Then a field on Order Line Item object to have the weight of each production specified via a formula field looking at the related Product. Then create a rollup field on Order to SUM the total weight for all the products selected for that Order. Or you can use any logic to define the weight of the package.
    retURL
    • The retURL parameter is used to take you back to the record from which the page is opened in case you click Cancel.
    • Formatting will match what was used for relatedTo parameter (either hardcoded Id or merge code).
    • It would merge the Salesforce Id of the record you want to go back to.
  4. Button Code

    Listed below is button code with variables listed without any values. You can easily copy & paste the blank code to start with, then fill in values after the = sign on each variable that you wish to populate. All variables are optional. And you can leave the variables in your url without any value after the = sign without any issues to leave there for later if you want to populate them.

    /apex/rs_ship__PrintPostageLabel?relatedTo=
    &relatedToField=
    &fedex_acct=
    &dhlexpress_acct=
    &ups_acct=
    &mailWeight=
    &fromCompanyName=
    &fromPhoneNumber=
    &fromAddress=
    &fromCity=
    &fromState=
    &fromCountry=
    &fromPostalCode=
    &toCompanyName=
    &toContactName=

    &toPhoneNumber=
    &toAddress=
    &toCity=
    &toState=
    &toCountry=
    &toPostalCode=
    &retURL=

    Example Button

    You can relate a New Shipment to a record on any standard or custom object. This example button relates a New Shipment record to an Account record.

    /apex/rs_ship__PrintPostageLabel?relatedTo={!Account.Id}
    &relatedToField=Account__c
    &mailWeight=1
    &fullfilmentLocationId=a00F000000KZQAY
    &fromCompanyName=USA Factory Co
    &fromPhoneNumber=555-555-6758
    &fromAddress=111 Broadway St.
    &fromCity=New York
    &fromState=NY
    &fromCountry=USA
    &fromPostalCode=10001
    &toCompanyName={!Account.Name}
    &toContactName={!Account.Primary_Contact_Name__c}

    &toPhoneNumber={!Account.Phone}
    &toAddress={!Account.ShippingStreet}
    &toCity={!Account.ShippingCity}
    &toState={!Account.ShippingState}
    &toCountry={!Account.ShippingCountry}
    &toPostalCode={!Account.ShippingPostalCode}
    &retURL={!Account.Id}


  5. Relate the Shipment Object to Other Objects

    The Shipment object is included with the A5 Ship app to create a Shipment record for each shipment.  You can relate this object to any other object you want in Salesforce by following these steps:

    1. Create a Lookup type field on the Shipment object.
    2. Add the Shipments related list to the your object page layout.
    3. Configure a Create Shipment Button to pass the Related To value and lookup field name when creating a new Shipment.
    4. You may want to add New Shipment and Shipments tabs (from the A5 Ship app) to other apps you use regularly for easy access.