Skip to main content
Skip table of contents

LWC- Donations

Donations

The Donations Lightning Web Component (LWC) in Experience Builder is purpose-built to enable association constituents to make a one-time donation to support the association’s cause. They also have the option to dedicate their contribution ‘in honor of’ or ‘in memory of’ someone.

You can also use the component to build a visually appealing Donations listing page to offer your constituents choices while contributing.

Configuration Options


Learn more about Experience Builder here.


From the components list, select the Donations component and drag it onto the site page. 

On the page, click within the Donations component to bring up the Property editor.

     Figure 1. Donations LWC with configuration properties


Property

Details

Product

Details of the specific product are to be displayed on the LWC. Enter one of the options below:

  • Use {recordId} to dynamically display the details of the current donation product

  • Use the pattern '{url.<parameter name>}' to dynamically display the details of a product specified in the URL parameter. For eg. use '{url.id}' to pull the id from a URL ending in “?id=”

  • Use a Salesforce record ID when you want to display the details of a specific product. For example, if you want to promote a particular product of donation on an experience builder page, you can add this LWC to that page and the Salesforce record ID of the donation product.

Layout

Select from one of the layout options below:

Wide: Use this view when you want to display the details of a donation product utilizing the width of the page.

Compact: Use this view when you want to display the details of a donation product in a vertical format.

Image fit

Select from one of the options below to fit the image within the container:

  • Cover: The image keeps its aspect ratio and fills the given dimension. The image will be clipped to fit

  • Contain: The image keeps its aspect ratio, but is resized to fit within the given dimension

  • Fill: The image is resized to fill the given dimension. If necessary, the image will be stretched or squished to fit

  • None: The image is not resized

  • Scale-down: The image is scaled down to the smallest version of none or contain

Nimble Predicted Donation FieldUsed with the Nimble Predictions Donation Prediction solution. This is the API name of the field that contains the predicted donation value.
Nimble Predicted Donation SpreadUsed with the Nimble Predictions Donation Prediction solution. This is the amount of spread to use to display the suggested amounts. A spread of 100 would display the Donation Prediction amount and 2 more values of (Predicted Amount +100)  and (Predicted Amount -100)
Nimble Predicted Donation Type

Used with the Nimble Predictions Donation Prediction solution. This is the type of Spread to use.

  • Flat adds and subtracts the Spread amount from the predicted amount.
      • Percentage adds and subtracts the % of the predicted amount (ie: An amount of 20 = 20%. If the Predicted amount is 50, the displayed amounts would be 40, 50, and 60) 
Confirmation OverrideThe API name of the Experience Builder page to invoke a custom logic after the donation submission. The custom logic will get invoked in place of displaying the order confirmation page. Ensure that the custom logic redirects the donor to the Order Confirmation page, as needed.

Examples

Figure 2. Donations page when Wide layout is used in the configuration


Figure 3. Donation page when Compact layout is used in the configuration


Use other LWCs from the Component list to create an impactful page for your constituents. For eg. use the ‘Rich Content Editor’ to add supporting information about the donation and the specific cause your constituents would be supporting. For detailed steps on how to access and use Experience Builder, visit Experience Builder Overview (salesforce.com)

See Also

Donations in Experience Cloud

Lightning Web Components Library

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.