Zenkraft is now called Bringg on Salesforce Read More
  1. Home
  2. Docs
  3. B2Bcommerce
  4. B2B Guide
Log a Case

B2B Commerce

Provide flexible and customizable shipping costs in B2B Commerce checkout process. You can mark up, mark down and apply rate cards to specific accounts.
Your customers can even bill their own shipping account during the checkout process.

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.

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.

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.

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 / Shipping Preference / Shipping Preference Info objects. You should receive an email once it is ready, in a few minutes.

4. Select Public Read/Write for MC B2B Log object

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

B2B Commerce Shipping Estimates

Create the Custom Address Source for Rating

Next you need to create the Custom Address Sources to reference the information on the CC Cart object (for shipping rates).

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

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

You are now ready to create the Custom Address Sources.

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

Scroll down and fill in the packages section as you see here:

The Child object collects all the items that are in the cart.

Next you can set the standard fields for getting the service types as you can see here:

To set these values as you see them above (without the [ or ] ) make sure when you select the field you click on the Static Value button:

Very infrequently the carrier servers might have some maintenance window or issues where they no longer return rates. Zenkraft have devised a solution for when this occurs so that the checkout does not fail. We have a timeout section on the Custom Address Source (in milliseconds) that you can set, so if the carrier doesn't respond within 5 seconds (for example), you can utilize fall back rates.

To set the Timeout for the carriers, just add under "Enhanced Functionality Settings" the "All Carriers: Callout Timeout" and set the number in milliseconds. The example below shows a timeout of 5 seconds.

Your rating custom address source set up is now done. Click on Save.

Configure the Zenkraft B2B Settings

Go to Zenkraft B2B Settings Tab and set the Custom Address Source you added in the previous step.

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 fulfilling 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.

You will also notice that the fallback text and rate is available for you to set, in case the carriers servers don't respond in time for giving an estimated date or cost.

Click on Save and this part is now done.

B2B Commerce Shipping

Create the Custom Address Source

Next you need to create the Custom Address Sources to reference the information on the CC Order object.

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 Outbound", and select the Shipment Object Lookup Field you created above for the CC Order.

This time we need to get the ship to 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.

Ship from your CC Order object

Now all you need to do is go to your CC Order record and use the related list to click on the new button as you can see here:

This will now take you to the wizard where you can complete your shipment, and print out the label.

There are multiple ways to automate this by using our invocable methods and process builder or flows. More information about how to do this can be found by following this link

B2B Commerce Tracking

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 fulfilling 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.

Click on Save and this part is now done.

B2B Commerce Returns

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.

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.

Return Automation

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.

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