1. Home
  2. Docs
  3. Salesforce
  4. Quoting
Log a Case

Quote on any Salesforce object

Add real-time parcel and freight costs directly to your quotes to get deals sent and signed faster.



  1. Prerequisites
  2. Configure Rating
  3. Configure CPQ Quoting
  4. Rating for Multiple Carriers
  5. Fastest, Cheapest, Delivered On
  6. Calculate Rates Using Automation
  7. Troubleshooting

Prerequisites

Before you follow the guide, please ensure you have completed the following prerequisites:

  1. Installed the Multi-carrier app
  2. Created a preference with your live credentials or test credentials
  3. Created a lookup relationship to the object that you would like to ship to

Configure Rating

Make sure to map the Recipient Address Fields, the Preference Name Field, and Package Type Field in your Custom Address Source.

Quote based on Package data

If you want to quote based on package data you need to populate the Packages section with package dimensions using your values or by utilizing a child object:

Quote based on Product data

If you want to quote based on Product data you need to populate the Product details and utilize the Boxing Algorithm checkbox.

If you don't have any product dimensions yet, then please create the Weight, Length, Width, and Height fields.

Set up where to save the quote details

To save the information from the rate chosen back onto your original object, don't forget to set this under the Output for Rate Request section in the Custom Address Source.

Create the following fields if you do not have them yet:

  • A currency type field to save the rate
  • A text type field (55 characters) to save the quoted service type
  • A date type field to save the expected delivery date

Add the Lightning Button

It's very simple to set up the Lightning Quote button on your object. Open a record and click on the gear icon and select Edit Page.

Drag the GetQuoteAction Lightning Button onto your page.

The make sure you add the Salesforce ID of the Custom Address Source you have set up for getting the rates. To get the Salesforce ID of your Custom Address Source you can find this by looking at the URL as below:

Hide/Show Negotiated Rates

If you have negotiated rates (only available with certain carriers), then these will also show up.

However, if you want to hide negotiated rates from quotes you need to check the "Hide negotiated rates" checkbox.

Limit Service Types Shown

Some customers do not want certain service types to be available for quoting. In this example we are going to remove UPS Ground from the available services.

Go to Zenkraft Settings / Bringg Settings > Permission Settings and add a new item. Select the Carrier (UPS in this case), then set the Type to "Disable". Permission object should be "Service Type", then insert the API value to the Value field. Each service type should go onto its own line.

Get a quote!

Once its all set up, test it and you should see this modal that shows you the rates. To save the quote details just click on the selected service in the rate table.

To be able to use the Get Quote lightning component you need to set up your domain. You can do that under Setup > My Domain. For more information please refer to this Salesforce Guide.

Configure CPQ Quoting

This section will explain how to set up rating for Salesforce CPQ.

Create a lookup relationship

Create a lookup relationship from the Multi-Carrier Shipment object to:

  • CPQ Quote object - if your CPQ 'Quote Line Items' will ship to ONLY one location
  • CPQ Quote Line Group object - if the CPQ 'Quote Line Items' ship to different locations

If you choose the second option you can set up Quote Line Groups that will ship to different addresses with the corresponding Quote Line Items.

Once this is set up you can follow the steps described in the section above to add the quoting button, or you can use automation to get rates.

Set Up Rating for Multiple Carriers

Make sure to follow the configuration steps described above and to create separate custom address sources for each carrier.

Next you need to edit the lightning record page layout of your object.

Then make sure you add the Salesforce IDs of the Custom Address Sources you have set up for getting the rates. To get the Salesforce ID of your Custom Address Source you can find this by looking at the URL as below:

Paste the Salesforce IDs after each other separated by a comma but no spaces.

Once it's all set up, test it and you should see this modal that shows you the rates for all carriers.

If you have negotiated rates (only available with certain carriers), then these will also show up.

If you need to, you can also implement filtering based on certain criteria. A common example is to choose the carrier based on a setting on your record.

Fastest, Cheapest, Delivered On

From v1.104.2 it is possible to quote with multiple carriers based on the fastest or cheapest services type, or based on a deliver by date.

Cheapest: It selects the cheapest option available regardless of the expected delivery time.
If the Delivery Date is specified, then it selects the cheapest option that delivers within that date.

Fastest: It selects the fastest option available. If there are multiple services that deliver on the same date then it selects the cheapest option from those.

Delivered on: It selects the cheapest option that delivers on the date specified in the Delivery date field.

1. Create the following (text) fields:

  • Service type
  • Shipping cost
  • Preference ID

You can also set up these optional fields:

  • Delivered Date Field
  • A checkbox to get the process started
  • Error handler field

2. Add the shipping preference IDs or names as static values

3. Map the Output Service Name Field to the Service type field you created in Step 1

4. Map the Output Preference ID Field to the Preference ID field you created in Step 1

5. Map the Output Net Charge Field

6. Select the Smart Service Type

If you choose Delivered On then you also need to map a Delivered Date Field

7. Build the flow

You need a trigger or an event to start the rating process. In this example we are going to use a Get Rate checkbox.

Create a record triggered flow and run it when the record is updated.

In the criteria we define to run the process when the "Get Rates" checkbox is checked:

Add an immediate apex action of Get Rate (Multi Carrier). Set the customAddressId to the ID of the CAS where you added the field mappings. Set the recordID to reference the ID of the record/object you are using. In this example we are using the standard Order object.

8. Get Rate!

Once all the fields are mapped and your process is active you are ready to test.

Go to your test record and start the process. If it runs successfully you should see something like this:

Calculating Rates Using Automation

Our invocable method allows you to create a rate request using Process Builder from any object for which you have set up a Custom Address Source. If you haven't set up a Custom Address Source then please follow this guide that explains how to do so.

In this example we will create a rate request from an Opportunity object when the Status field on the Opportunity gets set to "Proposal/Price Quote".

Step 1. Add the output fields to your object

Create fields on your object (in our case the Opportunity object), where you would like the rate information to be populated to.

  • Output Delivery Date Field: Expected delivery date
  • Output Delivery Day Of Week Field: Expected Delivery day of the week
  • Output Service Name Field: Service Type that was chosen
  • Output Delivery Days Field: Number of days to deliver
  • Output Net Charge: Estimated shipment cost

Step 2. Set all required fields in your Custom Address Source

In your Custom Address Source you will need to have these items set as a minimum*:

Recipient Address Fields

  • Name Field
  • Street 1 Text Line Field
  • City Field
  • State Field
  • Postal Code Field
  • Country Field
  • Phone Field

Billing Field

Payment Type Field: the value of this field can be set to SENDER, RECIPIENT, THIRD_PARTY

Preference

Preference Name Field: the value of this field can be set to the name of the preference (e.g. "ShippingPreference-0000")

Ship Date* (only required for FedEx)

Ship Date Field: ensure this is a date field. If you want to use today's date, just add this value to the formula field - TODAY()

Service Types

Service Type Field: such as FEDEX_2_DAY, FEDEX_GROUND, FIRST_OVERNIGHT. (FedEx Service Type Examples)

Package Types

Package Type Field: such as FEDEX_BOX, FEDEX_ENVELOPE, YOUR_PACKAGING. (FedEx Package Type Examples)

Packages

You must add at least one package row. Fields needed are Quantity, Weight, and Declared Value.

Output Fields

In this section map the fields where you want the quoted information to be saved.

NOTE: From v1.108.17, in case you have UPS Negotiated Rates you can save them after quoting under Enhanced Functionality Settings.

Step 3. Create a Flow

Create a record triggered flow and run it when the record is updated.

In the criteria we define to run the process when the Opportunity is updated to "Proposal/Price Quote" status:

Add an immediate apex action of Get Rate (Multi Carrier). Set the customAddressId to the ID of the CAS where you added the field mappings. Set the recordID to reference the ID of the record/object you are using.

Once the flow is saved don't forget to activate it.

TESTING: Once you have activated the flow, go to an Opportunity, change its Status to “Proposal/Price Quote” and your rate information will appear on your object.

Troubleshooting

You can find the troubleshooting steps to the most common issues with rating.

Rate service error: ERROR: Please select the Packaging Type

This error most commonly occurs when either the packaging type is missing because it is not mapped from the custom address source or the value is missing. The second most common reason is if the quantity is missing, either because the mapping is not there or the value is missing.

Get Quote button is greyed out

This is usually because the person or the profile does not have access to the relevant Visualforce pages.

Go to Setup > Profiles and edit the profile. Add the following Visualforce pages under Apex Class Access:

APEX CPU Time Limit error

This error message usually appears when the record is too complex for the boxing algorithm to calculate the packages. Please refer to the requirements in our Boxing Algorithm guide.