# Step 3: Add custom Salesforce B2B Commerce App fields to page layouts

## Step 3a: Configure page layouts <a href="#step-3a-configure-page-layouts" id="step-3a-configure-page-layouts"></a>

To configure objects:

1. Click **Setup** ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUk3RZcxiVbJaWRm7c%2FSetupIcon.png?alt=media\&token=af91ea92-7356-4dca-ad94-41035d09f6a0) and select **Setup** from the dropdown list.
2. Type `object manager` in the **Quick Find** field and press **Enter**.\
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUlFMPu4QYt2vf_HfE%2Fcustomfieldsobjectmgrsm.png?alt=media\&token=00018967-14a8-4506-9dc8-bf8f2378fb62)
3. Click **Object Manager**. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUkbLYb6_eBMjzobum%2FObjectMgrPage.png?alt=media\&token=fea56ffd-1ef4-4e41-ad3f-4bce74e805cd)
4. Scroll down and click the **CC Cart** link.
5. Click **Page Layouts**.\
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUlptn52upOMMxJn2J%2FCCCartPage.png?alt=media\&token=31a3da80-1c43-4095-b121-530d49d9dd9c)
6. Click **CC Cart Layout**.\
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUlxTCNm6evghVaBDg%2FCCCartLayoutPage.png?alt=media\&token=0314183f-2f5b-4063-927c-877144cb205f)
7. Click the **Fields** tab in the **CC Cart Layout**. This tab lists the information provided in [Custom fields](#custom-fields) and [Digital River fields](#digital-river-fields).\
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUm5x5SXlQ22DZPw9Z%2FCCCartLayoutCustomFields.png?alt=media\&token=287cc1f7-358a-4685-abd9-7b2165b59028)
8. Drag the custom field you want to appear in the CC Cart Layout from the Fields list to the **CC Cart Detail** and arrange them in the order you want them to appear. Repeat this step for each field you want to appear in the CC Cart Layout. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUmBCC4JjLHB7PUTjc%2FCCCartLayoutPageAgain.png?alt=media\&token=27c67e34-d265-4ff7-acd2-09667471ec71)
9. Repeat steps 4–8 for the following custom fields using the information provided in [Custom fields](#custom-fields) and [Digital River fields](#digital-river-fields) for **CC Cart Item,** **CC Order**, **CC Order Item**, **CC Product**, and **Account**.

![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUjkx6KmzUcKwa2-6Q%2F-MSUmIV67AYuIuq0KtcV%2FCCCartResults.png?alt=media\&token=3e8aad8e-4f59-4050-b70c-c496de765afd)

### Custom fields <a href="#custom-fields" id="custom-fields"></a>

Add these custom fields to the corresponding page layouts.

| Object        | Field / Button                                                                                                                               |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| CC Cart       | DR Cart Id                                                                                                                                   |
| CC Cart       | DR Entity Policy Mapping                                                                                                                     |
| CC Cart       | DR Payment State                                                                                                                             |
| CC Cart       | DR Payment Failure Reason                                                                                                                    |
| CC Cart       | DR Tax Exemption Applied                                                                                                                     |
| CC Cart       | DR Order State                                                                                                                               |
| CC Cart Item  | DR Cart Item Id                                                                                                                              |
| CC Order      | DR Order Id                                                                                                                                  |
| CC Order      | Refund Payment (Button)                                                                                                                      |
| CC Order Item | DR Order Item Id                                                                                                                             |
| CC Product    | DR ECCN                                                                                                                                      |
| CC Product    | Add Custom Lightning Component “DRB2B\_UpdateCCProductECCNLookup” to CC Product Lightning page and this can be used for searching ECCN Codes |
| CC Product    | DR TaxGroup                                                                                                                                  |
| CC Product    | DR TaxType                                                                                                                                   |
| CC Product    | DR Last Synced Date                                                                                                                          |
| CC Product    | Is Product Sync Required                                                                                                                     |
| Account       | TaxExemptId                                                                                                                                  |
| Account       | DR Tax Certificate Last Upload Date                                                                                                          |

### Digital River fields <a href="#digital-river-fields" id="digital-river-fields"></a>

Add these Digital River fields to the corresponding page layouts.

| Object                    | Field / Button            |
| ------------------------- | ------------------------- |
| DR Cart ID                | DR Cart ID                |
| DR Entity Policy Mapping  | DR Entity Policy Mapping  |
| DR Payment State          | DR Payment State          |
| DR Payment Failure Reason | DR Payment Failure Reason |
| DR Tax Exemption Applied  | DR Tax Exemption Applied  |
| DR Order State            | DR Order State            |

## Step 3b: Configure picklist value sets <a href="#step-3b-configure-picklist-value-sets" id="step-3b-configure-picklist-value-sets"></a>

To configure picklist value sets:

1. From the **Object Manager** tab, locate the **CC Order** object under the **LABEL** column and click the link.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSUql05JBEOCw-h7krr%2F-MSUqv7oYghrizhib5a4%2F3bObjectMgr.png?alt=media\&token=0f636d13-efb4-4fa7-bf8c-105c118362ad)
2. Click the **Fields & Relationships** tab, locate **Order Status** under the **FIELD LABEL** column and click the link. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZdT35-nsWfb2NyKPU%2FFields-Relationships.png?alt=media\&token=03e05fbe-d858-4825-9602-04a4acf9113f)
3. From the Order Status (Managed) page, scroll down to the **Values** section.\
   &#x20;![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MScgv1IgGTxLodw3zcK%2F-MScj5DFSU5TYUHO5UVK%2FValues.png?alt=media\&token=df2c041c-c7ab-420e-8d6e-3d49144c4942)
4. Click **Picklist Value Sets**. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZdfBv0MHaMNE5qlvJ%2FPicklist-Value-Sets.png?alt=media\&token=3df88ef6-b13a-45f0-a13e-25c71f55b715)
5. Click **New**, type `Pending Payment` in the field, and click **Save**. ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZgotnlgoQKvVW6JAq%2FOrder-Status-Pending-Payment.png?alt=media\&token=3a2260d2-3329-4502-8b11-e9d0bafa42b7) \
   The Pending Payment now appears under Validation Rules on the Order Status (CloudCraze Order Status field: ccrz\_\_OrderStatus\_\_c). \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MSZcl5f3veCNokPcvms%2F-MSZhHWQzESO0KWI6xMa%2FValidation-Rules.png?alt=media\&token=64587cb4-1079-491d-b09e-82a6b4996cd6)
6. Repeat steps 2–8 for each additional object in the [Picklist values](#picklist-values) table.

### Picklist values <a href="#picklist-values" id="picklist-values"></a>

Refer to the following table when configuring picklist value sets:

| Object                             | Picklist              | Picklist Value  |
| ---------------------------------- | --------------------- | --------------- |
| CC Order                           | Order Status          | Pending Payment |
| Digital River Fulfillment          | EFN Status            | Problem         |
| Digital River LineItem Fulfillment | EFN Order Item Status | Problem         |
| DR Subscription Process Data       | Subscription Context  | Renewal         |

## Step 3c: Configure picklist error types

Add the [picklist error types](#picklist-error-types) (if they are not already present) to the Error Type custom field (API Name: digitalriverb2b\_\_Error\_Type\_\_c).

To configure the picklist error types:

1. From the **Object Manager** tab, locate the **Digital River Error Log** object under the **LABEL** column and click the link. \ <img src="https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MScjBvWfc4hiRxN7dCF%2F-MSckn5z34l8NSvk3yfz%2FObject-Manager-Digital-River-Error-log.png?alt=media&#x26;token=7c1795a1-f85c-47c5-9448-d4c2220e478a" alt="" data-size="original">​
2. Click the **Fields and Relationships** tab, locate **Error Type** under the **FIELD LABEL** column and click the link. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MScjBvWfc4hiRxN7dCF%2F-MScmH17gwlAsdINPZZa%2FDigital-River-Error-Log-Error-Type.png?alt=media\&token=8b79cd2b-66e4-47bb-b2d5-ab88e82511f0)
3. Scroll down to **Values** in the **Digital River Error Log**. \
   ![](https://2536014854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNZuPvN3iGOwRD0PjQh%2F-MScjBvWfc4hiRxN7dCF%2F-MScmk3pS_KC3l9fLsGZ%2FDigital-River-Error-Log-2.png?alt=media\&token=8a3c9a19-74bb-4564-9de9-337822027955)
4. Review the existing values against the picklist error types.
5. If there are any missing values, click **New**, type the value in the field, and click **Save**. Repeat this step for each missing value.

### Picklist error types <a href="#picklist-error-types" id="picklist-error-types"></a>

Add the following error types, if they are not already present to the Error Type custom field.

| Values                    | API Name                  |
| ------------------------- | ------------------------- |
| Tax Calculation           | Tax Calculation           |
| Payment CC                | Payment CC                |
| Payment PO                | Payment PO                |
| Payment Paypal            | Payment Paypal            |
| Fulfillment               | Fulfillment               |
| Insufficient Access       | Insufficient Access       |
| Trigger                   | Trigger                   |
| Payment                   | Payment                   |
| Subscription              | Subscription              |
| Subscription Payment      | Subscription Payment      |
| Checkout Payment          | Checkout Payment          |
| Invoice Payment           | Invoice Payment           |
| User Registration         | User Registration         |
| Assign Permission Set     | Assign Permission Set     |
| Refunds                   | Refunds                   |
| Shopper                   | Shopper                   |
| Product Sync              | Product Sync              |
| Wallet                    | Wallet                    |
| VAT Validation            | VAT Validation            |
| Payment PP                | Payment PP                |
| Access Token              | Access Token              |
| Connecter Config Metadata | Connecter Config Metadata |
| Tax Exemption             | Tax Exemption             |
| Debug                     | Debug                     |
