> For the complete documentation index, see [llms.txt](https://docs.digitalriver.com/salesforce-lightning/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/upgrading-to-version-2.1.md).

# Upgrading to version 2.1

Learn how to upgrade from previous version to version 2.1.

Use the following instructions to upgrade from a previous version of the Digital River app for Salesforce Lightning to version 2.1. If installing a new version of this app, see [Install the Digital River app](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/integrate-the-salesforce-lightning-app/step-1-install-the-digital-river-app.md) for instructions.

{% hint style="info" %}
**Note:** If you previously used the Digital River app with an Aura storefront and are implementing the LWR storefront, we recommend you perform all steps in Integrating the Digital River app as you would for a new environment.

If you use the Digital River app with an Aura storefront and will still have an Aura storefront after the upgrade, continue with the steps below.
{% endhint %}

{% hint style="info" %}
**Note:** If upgrading from version 1.1 or later, you only need to perform Steps 1, 7, 8, and 9.
{% endhint %}

{% hint style="info" %}
**Note:** You MUST perform Step 9 for all upgrades.
{% endhint %}

1. Install the latest version of the Salesforce Lightning app as described in [Step 1](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/integrate-the-salesforce-lightning-app/step-1-install-the-digital-river-app.md).\
   **Note:** A known Salesforce bug exists for setting default values on designer attributes. You can work around this by clicking through all designer attributes and Saving whenever you add a new component to a screen. You should do this when upgrading to a new connector version, especially if a particular component is not rendering.
2. Update the Shipping Address subflow described in [Configure the shipping address subflow](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/integrate-the-salesforce-lightning-app/step-17-integrate-the-digital-river-components-into-the-checkout-flow/integrate-the-digital-river-components-into-an-asynchronous-checkout-flow/subflow-configuration/configure-the-shipping-address-subflow.md).\
   **Note**: We added some additional actions and components to this app version.
3. Update the Payments and Billing subflow described in [Configure the Payment and Billing Address subflow](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/integrate-the-salesforce-lightning-app/step-17-integrate-the-digital-river-components-into-the-checkout-flow/integrate-the-digital-river-components-into-an-asynchronous-checkout-flow/subflow-configuration/configure-the-payment-and-billing-address-subflow.md) as follows:
   1. Remove the `Payment_Details` resource. You can leave it as is, but it will no longer be used.
   2. Add the `db2b_paymentDetails` component to the `placeOrder` screen.
4. [Enable the order.cancelled event](https://docs.digitalriver.com/digital-river-api/administration/dashboard/developers/webhooks/creating-a-webhook#step-3-create-webhooks) from the Webhooks page on the [Digital River Dashboard](https://dashboard.digitalriver.com/login). See [Step 11](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/integrate-the-salesforce-lightning-app/step-11-set-up-webhooks.md) for complete instructions.\
   ![](https://content.gitbook.com/content/3R66sN5xrbmDAJUBEoHo/blobs/p14VYKzrpzHd1frjEMtm/enable%20order%20cancelled%20event.png)
5. Add a new picklist value called `partially_cancelled` to the `DR_Order_Item_State__c` field on the `OrderItem` object.
6. Add the following new picklist values to the `DR_Order_State__c` field on the `Order` object:
   1. `cancelled_by_dr`
   2. `cancelled_by_sf`
   3. `salesforce_failure`
7. Update the **Key** value for the **Connector Version** to version `2.0/3.58.` Use the following instructions:
   1. Click **Setup** ![](https://content.gitbook.com/content/3R66sN5xrbmDAJUBEoHo/blobs/lEcQsi8hQMvR90fr2QHZ/Setup.png) and select **Setup** from the drop-down list.
   2. Type `Custom Metadata Types` in the **Quick Find** field and then click **Custom Metadata Types**. The **Custom Metadata Types** page appears with the **All Metadata Types** list.
   3. Locate the **DR Connector Configuration** metadata type from the lists (Label) and click the **Manage Records** action next to that type selection. \
      ![](https://content.gitbook.com/content/3R66sN5xrbmDAJUBEoHo/blobs/Cwf0CASaOAeYomgz7LIA/CMDT_list_1.jpg)
   4. Find the **Connector Version** setting (Label) on the DR Connector Configurations page. Click **Edit** next to the **Connector Version** setting.\
      &#x20;![](https://content.gitbook.com/content/3R66sN5xrbmDAJUBEoHo/blobs/gdrbvW7IPjk64LtsIBDI/CMDT_version_2.jpg)
   5. Update the **Key** value for the **Connector Version** to the version mentioned at the beginning of this step or as instructed by your project manager.\
      ![](https://content.gitbook.com/content/3R66sN5xrbmDAJUBEoHo/blobs/CYwx94usiR3bv65ogGTj/CMDT_key_3.jpg)
   6. Click **Save** after updating the version number and making all other listed changes. Return to the Home page.
8. If you sell to businesses, you must collect the Organization Name of the business in your UI. If you sell to individuals, skip this step. Add the Buyer Organization Name to your user interface. This component's API Name is `Buyer_OrganizationName__c` on the [WebCart object](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/appendix/custom-fields-and-objects.md#cart-standard-object). Collect this field's information on the user interface screen where you collect the Purchase Type from the shopper. This is typically done on the Shipping Address screen. If you use the `drb2b_buyerInfo` component, this field has already been added. If you do not use that component, add a new field to your user interface to collect the Organization name. See the  [Buyer info component](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/extend-the-salesforce-lightning-app/customizing-the-lightning-web-components/components/buyer-info-component.md) for more details.
9. You MUST set the **DR Digital product** field on all products as part of the upgrade. This is a new field introduced in the latest version. If you are still using tax codes, you can perform a full product sync to automatically update this field on your products. However, if you use SKU groups, you will need to manually populate this field on your products. You can find detailed information about this new product attribute in the [Configure Product Attributes](/salesforce-lightning/salesforce-lightning-b2b-commerce-app-2.1/integrate-the-salesforce-lightning-app/step-8-configure-and-synchronize-the-products.md#configure-product-attributes) section.
