LogoLogo
Connectors
Salesforce Lightning B2B Commerce App 1.1
Salesforce Lightning B2B Commerce App 1.1
  • Salesforce Lightning B2B Commerce App 1.1
  • Introduction
    • How it works
    • What's new in version 1.1
  • Upgrading to version 1.1
  • Integrate the Salesforce Lightning app
    • Step 1: Install the Digital River app
    • Step 2: Configure the Digital River app
    • Step 3: Register external services
    • Step 4: Configure DCM logs
    • Step 5: Add custom fields to the page layouts
    • Step 6: Enable email deliverability
    • Step 7: Import ECCN codes, tax groups, and tax types
    • Step 8: Configure and synchronize the products
    • Step 9: Schedule backend jobs
    • Step 10: Set up integration between Salesforce and Digital River
    • Step 11: Set up webhooks
    • Step 12: Configure landed cost
    • Step 13: Manage permission sets
    • Step 14: Configure shipping integration
    • Step 15: Integrating refunds
    • Step 16: Configure the From email address
    • Step 17: Integrate the Digital River components into the checkout flow
      • Custom components used in the checkout subflows
      • Subflow configuration
        • Starter subflows
        • Configure the shipping address subflow
          • Configure the shipping address screen
        • Configure the delivery method subflow
        • Configure the Checkout Summary subflow
        • Configure the Payment and Billing Address subflow
          • Edit the Payment Method screen
          • Edit the decision elements
          • Link screen components
      • Configure the main checkout flow
      • Add custom components to pages
        • Drag and drop (custom) components
    • Step 18: Test the Salesforce Lightning app integration
  • Extend the Salesforce Lightning app
    • Extend the ship from address
    • Extend the webhook framework
    • Configure subscriptions
    • Shipping choice extension point
    • Customer credit
      • addCustomerCreditSourceToCheckout
      • deattachPaymentToCheckout
      • getAmountRemainingforCheckout
      • getCartDetailsById
      • Publishing connector events
    • Overriding Digital River CSS
    • Customizing the Lightning web components
      • Designer attributes
      • Components
        • Buyer info component
        • Tax certificate component
        • DR terms component
        • DR util component
        • Hide checkout summary component
        • Place order component
  • User guide
    • Regulatory fees
    • Tax certificates
    • Tax identifiers
    • My wallet
    • Customer credit
    • Checkout and order creation
    • Fulfillment/cancellation flow
    • Refunds
    • Invoices and credit memos
  • Support
  • Appendix
    • Custom fields and objects
    • Contact point address
    • Multi-currency support
Powered by GitBook
On this page
  1. Extend the Salesforce Lightning app
  2. Customizing the Lightning web components
  3. Components

DR terms component

Learn how to use the DR terms component.

PreviousTax certificate componentNextDR util component

Last updated 3 years ago

Use the drb2b_drTermsElement component to display the Digital River terms and conditions. The shopper must select the check box in this component to accept the Digital River terms and conditions. You can configure this component in the flow.

You can use the drb2b_drTermsElement component with the . If the Bypass Validation value is true, the system bypasses validation for the drb2b_drTermsElement component.

If you choose to bypass the validation, you must add a custom validation using the event triggered by the drb2b_drTermsElement component to ensure the shopper agrees to the terms and conditions.

This component uses a visual force page where DigitalRiver.js and DR.CSS are loaded.

The Lightning Messaging service triggers an event every time a shopper selects or clears the check box next to the Digital River terms and conditions. The event data includes isSelected with a value of true or false. The true value indicates the shopper selected the check box and the false value indicates the shopper cleared the check box. The event data also contains the termsString variable which contains the text for the terms the shopper agrees to. The text includes any raw HTML tags returned by Digital River. This allows you to save the terms the shopper agreed to if needed.

You can subscribe to this event. This event is triggered when the shopper selects the check box to agree to the Digital River terms and conditions or a custom validation.

Subscribing to an event

Import the digitalriverv3__DRTermsMessageChannel__c message channel and message service into a custom javascript file as shown in below.

Import example
import { subscribe, MessageContext } from 'lightning/messageService';
import toggleCheckboxMS from '@salesforce/messageChannel/digitalriverv3__DRTermsMessageChannel__c';

Declare the messageContext variable as shown below.

messageContext example
 @wire(MessageContext) messageContext;

Subscribe to an event as shown below.

Subscribe example
 subscribeToMessageChannel() {
        if (!this.subscription) {
            this.subscription = subscribe(
                this.messageContext,
                toggleCheckboxMS,
                (message) => this.handleMessage(message),
            );
        }
    }
 
   
 
    handleMessage(message){
       // implement logic here
    }

The message contains the following parameters.

Parameter
Description

isSelected

The value is true or false depending on whether or not the shopper agreed to the terms and conditions by selecting the check box.

termString

The value contains the HTML encoded text for the terms and conditions displayed to the shopper.

If you want to add the drb2b_drTermsElementcomponent to the Place Order page, you can only use one drb2b_orderSummarycomponent in the flow or template.

Bypass Validation designer attribute