1. Home
  2. Docs
  3. multi
  4. returns-cases
Live Chat

Return Shipments from Cases

Now you can create shipments with one click using our standard Shipmate for Multi-Carrier App!

Step 1. Choose an Object to Integrate with

You can choose between different objects to integrate with, but for the purposes of our example, we will use the Case object.

Step 2. Create the lookup field

Salesforce Classic

Navigate to the Multi-Carrier Shipment custom object by navigating to Setup | Build | Create | Shipment

Salesforce Lightning

Navigate to Setup | Object Manager | Shipment

Click New under Custom Fields & Relationships

Select Lookup Relationship:

Select the Case object.

Click Next until the custom field is created and click Save.

Now if you go to the Case object, select any record in the object, you will now see a related list called ‘Shipments’. In the related list, you’ll see any created Shipments related to the Case object -- you also will be able to jump to the Shipment Wizard by clicking ‘New Shipment’.

Step 3. Create a Service Type Field

Now that we’ve created our lookup relationship, we can begin creating the fields that contain the data required for shipping! Create a formula field to set a default service type value for the all shipments made in the Case object, or to even generate different values if needed.

Salesforce Classic

Navigate to Setup | Customize | Cases | Fields | ‘New’ Custom Field

Salesforce Lightning (Pictured below)

Navigate to Setup | Object Manager | Cases | Fields & Relationships | New

Select the Formula field

Create a name for the field | select Text for Data type | Click Next

From the service types below, insert your default Service Type value into the formula field (if using multiple carriers, write code in formula field to generate appropriate service types)

UPS Service Types: UPS_NEXT_DAY_AIR, UPS_SECOND_DAY_AIR, UPS_GROUND, UPS_THREE_DAY_SELECT, UPS_NEXT_DAY_AIR_SAVER, UPS_NEXT_DAY_AIR_EARLY_AM, UPS_SECOND_DAY_AIR_AM, UPS_WORLDWIDE_EXPRESS, UPS_STANDARD, UPS_WORLDWIDE_EXPRESS_PLUS, UPS_TODAY_STANDARD, UPS_TODAY_DEDICATED_COURIER, UPS_TODAY_EXPRESS, UPS_TODAY_EXPRESS_SAVER, UPS_EXPRESS, UPS_EXPEDITED, UPS_EXPRESS_PLUS, UPS_EXPRESS_EARLY_AM, UPS_WORLDWIDE_EXPEDITED, UPS_SAVER, UPS_ECONOMY, UPS_BASIC, UPS_EXPRESS_NA1, UPS_EXPEDITED_MAIL_INNOVATIONS, UPS_FIRST_CLASS_MAIL, UPS_PRIORITY_MAIL, UPS_SUREPOST_LESS_THAN_1_LB, UPS_SUREPOST_1_LB_OR_GREATER

FedEx Service Types: FEDEX_1_DAY_FREIGHT, FEDEX_2_DAY, FEDEX_2_DAY_AM, FEDEX_2_DAY_FREIGHT, FEDEX_3_DAY_FREIGHT, FEDEX_EXPRESS_SAVER, FEDEX_FIRST_FREIGHT, FEDEX_GROUND, FIRST_OVERNIGHT, GROUND_HOME_DELIVERY, PRIORITY_OVERNIGHT, SMART_POST, STANDARD_OVERNIGHT, EUROPE_FIRST_INTERNATIONAL_PRIORITY, INTERNATIONAL_ECONOMY, INTERNATIONAL_ECONOMY_FREIGHT, INTERNATIONAL_FIRST, INTERNATIONAL_PRIORITY, INTERNATIONAL_PRIORITY_FREIGHT, FEDEX_GROUND

USPS Service Types: First, Priority, PriorityExpress, ExpressMailInternational, PriorityMailInternational, FirstClassMailInternational  FirstClassPackageInternationalService, PriorityMailExpressInternational, GXG, LibraryMail, MediaMail, ParcelSelect

USPS Service Types if using Express1: Priority, PriorityExpress, ExpressMailInternational, PriorityMailInternational

 

Step 4. Create a Package Type Field

Create a formula field to set a default packaging type value for the all shipments made in the Case object, or to even generate different values if needed.

Salesforce Classic

Navigate to Setup | Customize | Cases | Fields | ‘New’ Custom Field

Salesforce Lightning (Pictured below)

Navigate to Setup | Object Manager | Cases | Fields & Relationships | New

Select the Formula field

Create a name for the field | select Text for Data type | Click Next

From the Packaging Types below, insert your default Packaging Type value into the formula field (if using multiple carriers, write code in formula field to generate appropriate packaging types)

UPS Packaging Types: UPS_LETTER, UPS_YOUR_PACKAGING, UPS_TUBE, UPS_PAK, UPS_25KG_BOX, UPS_10KG_BOX, UPS_PALLET, UPS_SMALL_EXPRESS_BOX, UPS_MEDIUM_EXPRESS_BOX, UPS_LARGE_EXPRESS_BOX, UPS_EXPRESS_BOX, UPS_FIRST_CLASS, UPS_PRIORITY, UPS_MACHINABLES, UPS_IRREGULARS, UPS_PARCEL_POST, UPS_BPM_PARCEL, UPS_MEDIA_MAIL, UPS_BPM_FLAT, UPS_STANDARD_FLAT

FedEx Packaging Types: FEDEX_10KG_BOX, FEDEX_25KG_BOX, FEDEX_BOX, FEDEX_ENVELOPE, FEDEX_EXTRA_LARGE_BOX, FEDEX_LARGE_BOX, FEDEX_MEDIUM_BOX, FEDEX_PAK, FEDEX_SMALL_BOX, FEDEX_TUBE, YOUR_PACKAGING

USPS Packaging Types (Endicia): Card, Letter, Flat, Parcel, LargeParcel, IrregularParcel, FlatRateEnvelope, FlatRateLegalEnvelope, FlatRatePaddedEnvelope, FlatRateGiftCardEnvelope, FlatRateWindowEnvelope, FlatRateCardboardEnvelope, SmallFlatRateEnvelope, SmallFlatRateBox, MediumFlatRateBox, LargeFlatRateBox, RegionalRateBoxA, RegionalRateBoxB, LargeFlatRateBoardGameBox

USPS Packaging Types if using Express 1:  Letter, Flat, Parcel, Large Parcel (Any Dimension over 12"), Irregular Parcel, Flat Rate Envelope, Flat Rate Legal Envelope, Flat Rate Padded Envelope, Flat Rate Gift Card Envelope, Flat Rate Window Envelope, Flat Rate Cardboard Envelope, Small Flat Rate Envelope, Small Flat Rate Box, Medium Flat Rate Box, Large Flat Rate Box, DVD Flat Rate Box, Large Video Flat Rate Box, Regional Rate Box A, Regional Rate Box B, Regional Rate Box C

 

Step 5. Create Shipment Type Field

You can default the shipment type to either outbound or return. Let’s create a formula text field and set the default value.

Salesforce Classic

Navigate to Setup | Customize | Cases | Fields | ‘New’ Custom Field

Salesforce Lightning (Pictured below)

Navigate to Setup | Object Manager | Cases | Fields & Relationships | New

Select the Formula field

Create a name for the field | select Text for Data type | Click Next

In the formula field, set the default value to “RETURN”

Click Next until you can click Save

Step 6. Create the Custom Address Source Record

Now that we’ve created all the required fields on our object, it’s time to map them in the Custom Address Source!

Go to Custom Address Source tab and click New

In this example, we will use our object Case and the lookup field that we created earlier Case__c

Now you can map all fields to the fields we’ve created earlier in this tutorial, as well as any others you’d like to map:

Step 7. Shipment Auto-Creation / Auto-Print

In the Custom Address Source Record created in Step 6 ,check Auto-create shipment if all required fields are set to bypass the shipping wizard completely and go straight to the Shipment page.

You can also check Auto print labels after creating shipment which auto-prints shipments to your default thermal printer as soon as they are created (this only works with our latest printing desktop app).

Step 8. Create New Process Builder Task

Navigate to Setup | Create | Workflow & Approvals | Process Builder | New (Salesforce Classic)

Navigate to Setup | Enter Process Builder into the Quick Find Box | Process Builder | New (Salesforce Lightning)

Enter a Process Name | Enter a Description | The process starts when ‘A record changes’

Click Save.

Click Add Object | Choose Shipment as the object | Select ‘when a record is created or edited'

Click Save.

Click Add Criteria | Enter a Criteria Name | Select Find a Field

Type Shipment Process into the search bar | Select Shipment Processing Complete

Set Operator to Equals | Set Type to Boolean | Set Value to True

Click Add Row | Add the same “Shipping Process Complete” field from the last step

Set Operator to Is changed | Set Type to Boolean | Set Value to True

Click Save.

Select Add Action | Select Apex for Action Type | Enter an Action Name | Select “Send Labels to Email (Multi-Carrier)” for Apex Class

Select Field Reference for Type | Click the search icon in Value field

Select Record ID | Click Choose

Click Save.

Click Activate.

YOU’RE FINISHED! Now you can test this procedure.

Troubleshooting

The email gets sent to either the sender email address or recipient email address. To set which one it gets sent to, please edit the FedEx Preference and edit this box:

Please contact us using the icon to the bottom right of this screen if you have any queries, and we will be glad to help.