# Configure the Checkout Summary subflow

## Configure a variable for the saved tax identifier

Use the variable to display saved tax identifiers.

To create a variable:

1. Click **Setup** ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FMwqYw1aW1UjODTYqJwus%2FSetup.png?alt=media).
2. Type `Flows` in the **Quick Find** field click **Flows**.\
   ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2F50xW6WIukDrLu3qz0lu2%2FQuick%20Find%20-%20Flows.png?alt=media)
3. Scroll down and click **Subflow - Checkout Summary**. The Flow Builder opens in a separate tab.\
   ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2F689RjpqRs9PehD3rvlSI%2FFlows%20-%20Subflow%20-%20Checkout%20Summary.png?alt=media)
4. Click the **Manager** tab and then click **New Resource**.\
   ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FbNLmDgvGVNK65DKyvHn0%2FManager%20tab.png?alt=media)
5. Enter the following details:
   * Select **Variable** from the **Resource Type** dropdown list.
   * **API Name**: Type `Saved_Tax_Identifier` (or any other name with no restrictions).
   * Select **Text** from the **Data Type** dropdown list.
   * Select the **Available for input** and **Available for output** check boxes.![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FCYX2xiZjfRWjNLyLzpDQ%2FNew%20Resource.png?alt=media)
6. Click **Done**.

{% hint style="warning" %}
You can this variable to display the tax identifier when you[`configure the Checkout Summary subflow`](#configure-the-checkout-summary-subflow).
{% endhint %}

## Configure the Checkout Summary subflow

Use the Checkout Summary subflow to add support for US tax certificates and tax identifiers. To add custom components to the Checkout Summary subflow:

1. From the **Manager** tab, double-click the **Cart to Order Summary** screen.
2. Delete all OOTB components from the subflow except the **Ship To** and **Delivery Method** components.
3. Type `drb2b_drUtil` in the **Search components** field and click **drb2b\_drUtil**.\
   ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FCsM7LQVxqHdxM2EfWUS2%2FSearch-drb2b_drUtil.png?alt=media)
4. Drag the **drb2b\_drUtil** to where you want it to appear on the Edit Screen.
5. Type `drb2b_drUtil` in the **API Name** field.\
   ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FSffoPNTptYcS1L6x8ZTS%2FAPI%20Name%20drb2b_drUtil.png?alt=media)
6. Type `drb2b_taxIdentifier` in the **Search components** field and click **drb2b\_taxIdentifier**.\
   ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FjMz11ltkCVgms98McMpV%2FSearch-drb2b_taxIdentifier.png?alt=media)
7. Drag the **drb2b\_taxIdentifier** to where you want it to appear on the Edit Screen.
8. Enter the following details:
   * **API Name**: Type `Tax_Identifier` (or any other name with no restrictions).
   * **Cart Id**: Type `{!cartId}`.
   * **Selected Tax Identifier**: Type `{!Saved_Tax_Identifier}`.
   * Click **Advanced**, select the **Manually assigned variables** check box, and type `{!Saved_Tax_Identifier}` in the **Selected Tax Identifier** field.![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FD1tv1bvdRShFcwFDn7C5%2Fdrb2b_taxIdentifier.png?alt=media)
9. Type `drb2b_drTermsElement` in the **Search components** field and click **drb2b\_drTermsElement**.\
   ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2Fyf6pAeHCPS04GWDfuL4v%2FSearch-drb2b_drTermsElement.png?alt=media)
10. Drag the **drb2b\_drTermsElement** to where you want it to appear on the Edit Screen.
11. Enter the following details:
    * **API Name**: Type `DR_Terms` (or any other name with no restrictions).
    * **Cart Id**: Type `{!cartId}`.
    * **Bypass Validation**: Type `{!$GlobalConstant.True}` or`{!$GlobalConstant.False}`. By default, this value should be `False`. See [DR terms component](https://docs.digitalriver.com/salesforce-lightning/salesforce-lightning-b2b-commerce-app-1.2/extend-the-salesforce-lightning-app/customizing-the-lightning-web-components/components/dr-terms-component) for more information.\
      ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FJZmpOIvNs3hDeSlFB5N1%2Fdrb2b_drTermsElement.png?alt=media)
12. Click **Done**.
13. Click **Save as**.
14. Enter the name of the custom subflow in the **Flow Label** field (for example, `DR Checkout Summary`) and click **Save**.\
    ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2F5A23D1tKu586d6FU7enI%2FSave%20as%20a%20new%20flow%20DR%20Checkout%20Summary.png?alt=media)
15. Click **Activate**.\
    ![](https://1044208989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjwKVLTiUd88vZhWNHQ4o%2Fuploads%2FoDZnTGTXbnGFAljTG7P8%2FCart%20to%20%20Order%20Summary%20layout.png?alt=media)
