1. Home
  2. Docs
  3. B2Bcommerce
  4. Returns
Live Chat

B2B Commerce Returns

Allow your customers to automaticaly request return shipping labels from within My Account.

1

Install Multi-Carrier

To install, begin by going to the Salesforce AppExchange and finding the Multi-carrier for Salesforce listing. You can find the app through Search or by clicking this link.

Click on the Get It Now button and select the desired destination (sandbox or production). Multi-carrier for Salesforce can be installed in both Sandbox (does not expire) and Production (7 day trial) instantly. Click Continue.

2

Install Multi-Carrier B2B Extension Package

To install, begin by going to the Salesforce AppExchange and finding the Zenkraft Multi-Carrier Shipping for B2B Commerce listing. You can find the app through Search or by clicking this link.

Click on the Get It Now button and select the desired destination. Zenkraft Multi-Carrier Shipping for B2B Commerce can be installed in both Sandbox and Production instantly. Click Continue.

3

Preference Setup

If you want to test the shipping functionality then we recommend using our test FedEx preference (this is because FedEx offers the most friendly test environment). By using this test preference you won't be charged for any of your test shipments.

You can add this by going to Zenkraft Settings and turning on Demo Mode and then clicking the "Create FedEx Test Preference" button.

Otherwise please do go ahead and add your own preferences. Make sure Demo mode is off though, otherwise you might see some authentication errors.

4

Create the Custom Address Source for Returns

Next you need to create the Custom Address Sources to reference the information on the CC Order object (for creating returns).

Go to Setup > Object Manager > Shipment (zkmulti__MCShipment__c) > Fields & Relationships

Click New and create a Look-up Relationship to the CC Order object.

You are now ready to create the Custom Address Sources.

Go to Custom Address Sources and click on the New button, name it "B2B Returns", and select the Shipment Object Lookup Field you created above for the CC Order.

This time we need to get the return from address of the order. Set the fields as you see them here:

In the packages section add this:

It's worth adding a Declared Value formula field on the Cart Item object so that if you want to set the value to be insured by the carrier then it will be mapped from here. For demo purposes just set the declared Value to be 0 in your formula field.

Once again fill in the following sections:

Click Save and you are now finished with the Custom Address Source setup.

5

Configure the Zenkraft B2B Settings for Returns

Go to Zenkraft B2B Settings Tab and add the two Custom Address Sources you added in the previous steps.

The Tracking Options tab is where you can specify which  fields on the CC Order Object will be displayed on the MyAccount -> My Order UI.

Create two new fields on the CC Order object called Tracking Number and Tracking Stage, and set the two fields like so on the Zenkraft B2B Setting page. You can then populate these fields yourselves if you are fullfiling the orders via a different system or you can set up a process builder task to copy the tracking number and stage from the related shipment you create from the order.

The next tab we will look at is the Rate Cards.

You will always have a Default Rate Card which you can set up with the Carriers and Service Types as you see fit.

You can add or edit the Rate options as per your needs. In this screenshot you can see that we are setting FedEx Ground as being Free from Shipping costs. If you need to add new options or edit them use the buttons highlighted below:

Once you create/edit a Rate option you can specify the Carrier, the Service Types to include (or exclude) and whether these items should be Free, Fixed or Percentage.

Free means the shipping charge is set to 0.

Fixed means that you can add a margin to the shipping cost by adding the amount. In the screenshot below you can see that we have set the price to be an extra $15. If you don't want to add any margin just set it to 0.

Percentage works along the same lines as Fixed, but instead of a fixed increase, you can add a percentage ontop of the shipping cost. So if shipping was $10 and you put a Percentage = 20 then the user would see $12 as the shipping cost.

If you have a requirement to have different rate cards per Account, for example Account ABC gets free Ground Shipping, but if they want to use Overnight, then they will need to pay for the shipping, then the Rate card system allows that functionality; you will need a field on your Account object that specifies the Name of the Rate Card to use, and you set that field on this section:

<

Finally we have the Service Type Options tab where you can disable or change the display name of each service type.

Click on Save and this part is now done.

6

Configure the Salesforce B2B Admin

Follow the steps below to set up the B2B Admin settings.

1. Go to CC Admin Tab

2. Go to Configuration Modules, select 'My Orders' and Click on the New Button (optional) under the Configuration Model.. 

3. These are needed if you want to show the Tracking Status, tracking Number columns and the Return button to automatically create a return label. :

    a. Name: Show Return Button, API Name: showreturnbutton, Externally Safe: checked

    b. Name: Show Tracking Number, API Name: showtrackingnumber, Externally Safe: checked

    c. Name: Show Tracking Status, API Name: showtrackingstatus, Externally Safe: checked

    d. Name: Show Branding Tracking URL, API Name: showbrtrackingurl, Externally Safe: checked

4. Go to Configuration Settings

5. Create options using New button (if needed):

    1. Module: My Orders, Configuration: Show Return Button, Page: My Account (MA), Value: TRUE

    2. Module: My Orders, Configuration: Show Tracking Number, Page: My Account (MA), Value: TRUE

    3. Module: My Orders, Configuration: Show Tracking Status, Page: My Account (MA), Value: TRUE

    4. Module: My Orders, Configuration: Show Branding Tracking URL, Page: My Account (MA), Value: TRUE

6. Go to the DefaultStore settings and change 'Order Hook Settings for DefaultStore' to be zkb2b.MCOrderExtension

7. Next go to Shipping and change  the  Settings for DefaultStore' to zkb2b.MCShippingAndHandling

8. Go to 'Configuration Settings', select Module as 'Body Includes Begin'

9. Create 2 options (by clicking the 'New' button):

    Option 1 (this allows you to set this as being on or off):

        Module: Body Includes Begin

        Configuration: Enabled

        Page: My Account (value should be MA)

        Value: TRUE

    Option 2 (this option specifies the method to use):

        Module: Body Includes Begin

        Configuration: Page Include Name

        Page: My Account (value should be MA)

        Value: zkb2b__MCOrderHistories

10. Go to Global Settings -> Configuration Cache Management. Deactivate old cache, Build and Activate new cache (do this every time you make a change in CC Admin settings)

Setup Sharing Settings

1. Go to  Setup -> Security -> Sharing Settings

2. Click 'Edit' on Organization-Wide Defaults

3. Select 'Read-only' for MC B2B Configuration / Custom Address Source / Shipmate Preference / Shipmate Preference Info objects. You should receive an email once it is ready, in a few minutes.

Enable the Platform Cache

1. Go to Setup -> Develop -> Platform Cache

2. Click 'Edit' for zkb2b cache

3. Set the values as you see below:

4. Click Save

7

Process Builders

We need to setup 2 process builders.

One to create the return shipping label, and one to email the created label to the user. 

Create the Return Shipping Label

Create a new Process Builder task and name it "Create Return Shipment". 

Set it to run once the CC Order Object is created or edited.

Set the Criteria to the following (The Field Name is "Create Return Label"):

In the Immediate Actions, create an Action and set it to run Apex.

Select the "Create Shipment(Multi Carrier)" invocable method, and fill in the fields as you see here:

The customAddressId value is the Salesforce ID of the Custom Address Source you created for your Return shipment. 

Save and activate this process builder.

Email the Return Shipping Label

Create a New Process Builder and lets call is "Send Return Labels"

Set it to run when the shipment object has been created or edited.

We have to check that the shipment has been created successfully so set the values as you see here:

The three field names to use are: 

Shipment Processing Complete

CC Order

Shipment Type

Now to create the scheduled action to run 0 hours after created:

And finally you can create the action as follows (once again its an Apex method):

Save and activate and you are ready to test.

8

Test

Now it is time for you to test.

If you have any queries then please contact us and we will be happy to help

...

Email me activiation link for access

Send Email