LogoLogo
Connectors
Salesforce Lightning B2B Commerce App 1.2.1
Salesforce Lightning B2B Commerce App 1.2.1
  • Salesforce Lightning B2B Commerce App 1.2.1
  • Introduction
    • How it works
    • What's new in version 1.2.1
  • Upgrading to version 1.2.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 (alternative): Integrate the Digital River components into an asynchronous checkout flow
      • Custom components used in the checkout subflows
      • Subflow configuration
        • 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 shipping address subflow
          • Configure the shipping address screen
      • Configure the main checkout flow
    • Step 18 (alternative): Integrate the Digital River components into a synchronous checkout flow
      • Deploy flows using Salesforce Workbench
      • Update the flow nodes in the synchronous checkout flow
        • Create custom variables
        • Delete nodes
        • Connect nodes
        • Modify nodes
        • Add nodes
      • Configure screens for a customized synchronous flow
        • Add custom components to screens in the synchronous checkout flow
        • Configure the Shipping Options screen
        • Configure the Delivery Method Screen
        • Configure the Checkout Summary screen
        • Configure the Payment And Billing Address screen
        • Configure the Place Order Confirmation screen
    • Step 19: Add custom components to pages
      • Drag and drop (custom) components
    • Step 20: 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
    • Tax calculation
    • Overriding Digital River CSS
    • Customizing the Lightning web components
      • Designer attributes
      • Components
        • Buyer info component
        • Tax certificate component
        • DR util component
        • DR Terms component
        • Checkout summary component
        • Hide checkout summary component
        • Order Summary component
        • Place order component
        • Payments component
        • Payment details component
        • Tax identifier component
        • DR compliance component
        • Address details 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
  • Provide permission sets
  • Sharing settings
  • Digital River permission sets
  • Assign users to a permission set
  1. Integrate the Salesforce Lightning app

Step 13: Manage permission sets

Learn how to provide permission sets.

Provide permission sets

To provide permissions for standard objects and fields, run the following script once from the developer console. Note that this class is outside of the package.

Permission script
PermissionSet pr = new PermissionSet(Label='DRB2B Additional Permission set',Name='DRB2B_Additional_Permission_set');
        insert pr;
        System.debug('pr >'+pr);
        List<ObjectPermissions>  objectPermissionList = new List<ObjectPermissions>();
 
        ObjectPermissions objPermission = new ObjectPermissions();
        objPermission.PermissionsCreate=true;
        objPermission.PermissionsRead=true;
        objPermission.PermissionsEdit=true;
        objPermission.PermissionsDelete=true;
        objPermission.SobjectType='ORDER';
        objPermission.ParentId = pr.Id;
        objectPermissionList.add(objPermission);
 
        objPermission = new ObjectPermissions();
        objPermission.PermissionsCreate=true;
        objPermission.PermissionsRead=true;
        objPermission.PermissionsEdit=true;
        objPermission.PermissionsDelete=true;
        objPermission.SobjectType='Ordersummary';
        objPermission.ParentId = pr.Id;
        objectPermissionList.add(objPermission);
 
        objPermission = new ObjectPermissions();
        objPermission.PermissionsCreate=true;
        objPermission.PermissionsRead=true;
        objPermission.PermissionsEdit=true;
        objPermission.PermissionsDelete=true;
        objPermission.SobjectType='WebStore';
        objPermission.ParentId = pr.Id;
        objectPermissionList.add(objPermission);
 
        objPermission = new ObjectPermissions();
        objPermission.PermissionsCreate=true;
        objPermission.PermissionsRead=true;
        objPermission.PermissionsEdit=true;
        objPermission.PermissionsDelete=true;
        objPermission.SobjectType='WebCart';
        objPermission.ParentId = pr.Id;
        objectPermissionList.add(objPermission);
 
        objPermission = new ObjectPermissions();
        objPermission.PermissionsCreate=true;
        objPermission.PermissionsRead=true;
        objPermission.PermissionsEdit=true;
        objPermission.PermissionsDelete=true;
        objPermission.SobjectType='Product2';
        objPermission.ParentId = pr.Id;
        objectPermissionList.add(objPermission);
 
        objPermission = new ObjectPermissions();
        objPermission.PermissionsRead=true;
        objPermission.SobjectType='Account';
        objPermission.ParentId = pr.Id;
        objectPermissionList.add(objPermission);
 
        insert objectPermissionList;
        List<FieldPermissions> fieldPermissionList = new List<FieldPermissions>();
        //OrderSummary Object fields
        FieldPermissions fp= new FieldPermissions();
        //OrderItem Object fields
        fp.Field='OrderItem.TotalTaxAmount';//the name of new field
        fp.ParentId = pr.Id;
        fp.PermissionsRead=true;
        fp.SobjectType='OrderItem';
        fieldPermissionList.add(fp);
 
        fp= new FieldPermissions();
        fp.Field='Product2.Productcode';//the name of new field
        fp.ParentId = pr.Id;
        fp.PermissionsEdit=true;//
        fp.PermissionsRead=true;
        fp.SobjectType='Product2';
        fieldPermissionList.add(fp);
 
        fp= new FieldPermissions();
        fp.Field='Product2.StockKeepingUnit';//the name of new field
        fp.ParentId = pr.Id;
        fp.PermissionsEdit=true;//
        fp.PermissionsRead=true;
        fp.SobjectType='Product2';
        fieldPermissionList.add(fp);
 
        fp= new FieldPermissions();
        fp.Field='Product2.DisplayUrl';//the name of new field
        fp.ParentId = pr.Id;
        fp.PermissionsEdit=true;//
        fp.PermissionsRead=true;
        fp.SobjectType='Product2';
        fieldPermissionList.add(fp);
 
        fp= new FieldPermissions();
        fp.Field='Product2.QuantityUnitOfMeasure';//the name of new field
        fp.ParentId = pr.Id;
        fp.PermissionsEdit=true;//
        fp.PermissionsRead=true;
        fp.SobjectType='Product2';
        fieldPermissionList.add(fp);
 
        Insert fieldPermissionList;

Sharing settings

Ensure that the Sharing Settings for the Order object are set to Public Read/Write. If the Order object is set to Controlled by Parent, the Sharing Settings for Account and Contract should be Public Read/Write.

Digital River permission sets

Permission set
Description

Digital River Connector - Admin

Assign this permission set to Admin users to access the Digital River App Configuration page and to update configurations in it.

DigitalRiver Connector - Shopper

Assign this permission set to all Storefront users.

DigitalRiver Connector - Integration

Assign this permission set to the Integration users.

DigitalRiver Connector - Refunds

Assign this permission set to customer service representatives (CSRs) who initiate the refunds.

Assign users to a permission set

To assign users to a permission set:

  1. Click Permission Sets. The Permission Sets page appears.

PreviousStep 12: Configure landed costNextStep 14: Configure shipping integration

Last updated 2 years ago

Type Permission Sets in the Search field and press Enter.

In the Permission Set Label column, click the permission set you want to add users to.

This example shows how to assign a Digital River Connector – Admin permission set to users.

On the Permission Set page, click Manage Assignments.

Click Add Assignments.

Select one or more users who you want to assign to this permission set and click Assign. The assigned users now appear in the modified permission set.

See the to repeat the above-mentioned steps for assigning relevant permission sets.

Digital River permission sets table