Experience Cloud Membership Updates

Only Available for 'Membership Plus' license. If license is not added in the merchant facility then site users will get a toast message error and buttons won't be visible to them.

1. Introduction

A new Lightning web component(LWC) is introduced and it is compatible with both Aura and LWR communities. The view in this component can be used by user to update their membership information, renew their membership, and update their card details. The name of the LWC is 'Payments2Us Subscription Details' and works for salesforce experience sites only.

2. Subscription/Account Subscription

In this view we check if subscription record exists against the experience site user.

  • If active Subscription record exists then it will be fetched otherwise if Account Subscription record exists then it will be fetched and displayed. If both exists then subscription record will be displayed
  • If multiple active subscriptions exists then the subscription with active recurring payments will be fetched.
  • If multiple active recurring payment exists then subscription with highest end date will be fetched and displayed.

3. Setup in Experience Site

Go to Setup -> All Sites -> Open builder of the experience site.

  1. Click on the lightning icon (components  tab) from the left bar
  2. Search for 'Payments2Us Subscription Details' in the search bar.
  3. Drag and drop the component at a suitable location.

4. Set Parameters

Payments2Us Subscription Details component have following parameters

  1. Renew/Update Card Form Width : By default the width of the form displayed in popup is set to 100%. You can change the width if needed.
  2. Renew/Update Card Form Height : By default the height of the form displayed in popup is set to 500px. You can change the height if needed.
  3. Renew Now Early Days : Provide the number of days, Renew Now button will be visible for subscription not on auto renew once the provided number of days are left in subscription's end date. Default value is 30.
  4. Renew Now for Auto Renews: Default is false. If checked then "Renew Now" button is shown for the subscription on auto renew as well.

If you see any error toast messages after dropping the component in the builder. Ignore it.

5. Field Selection in the View

  1. By default, Payment Option Name will be visible in the view. Field label on the view is set to 'Type' but in can be updated via Custom labels.
  2. Auto Renewal toggle visibility criteria is listed in the "Auto Renewal Toggle Visibility" section.
  3. "Update Card" button will only be visible if "Automatic Renewal" in ON.
  4. "Renew Now" button will only be visible if "Automatic Renewal" in ON.
  5. A new fieldset is created on both Subscription and Account Subscription object. Fields can be added in these field set and those fields will be visible on the view as read only fields.

6. Auto Renewal toggle visibility

Auto Renewal toggle on the view will only be visible if:

  1. The Payment option is populated on the fetched Subscription or Account Subscription. AND
  2. "Matching Payment Option" field is populated on the subscription Payment option record. AND
  3. Either the payment option or matching payment option has "Auto Renewal" and "Frequency" set.

7. Update Card Button Visibility

Update Card button on the view will only be visible if:

  1. The subscription is on Auto Renewal. AND
  2. The subscription has one or more related recurring payment records.

8. Renew Now Button Visibility

  • Renew Now button on the view will be visible based on the value added in "Renew Now Early Days" parameter. Button will be visible when provided number of days are left in subscription's end date.
  • Renew Now button won't be visible if the subscription is subscription is on Auto Renew until unless "Renew Now for Auto Renew" parameter is checked.

9. Permissions To Be Updated

In order for this view to work perfectly for the experience site user, following permission need to be updated on the community user profile:

  1. Give Read,Create and Update access of the following object on profile level:
    • Payment Txn
    • Payment Item
    • Recurring Payment
    • URL Token
    • Voucher Used
  2. Give Update access of the following objects on profile level:
    • Subscription
    • Account Subscription

10. Configuration and Styling

Besides changing the field to displayed, button labels, header and toast messages can also be customised. Also styling, font, colors can also be updated. For details please refer to Experience Cloud Membership Components Styling article.