Skip to main content
Skip table of contents

Data Sources

Administrators can use a data source to customize the information created, displayed, modified, or deleted by a Community Hub component. A data source tells a component which object(s) to reference and what data to use.

You can create custom data sources and Community Hub comes with many default data sources so you can use your data to create rich experiences for your constituents.

What Can I Do With a Data Source?

You can use a data source to perform all the standard Salesforce data manipulation options:

  • Create a new record(s) through an insert or upsert
  • View specified data on a record(s) 
  • Edit the data on a record(s)
  • Delete a record(s)

How Can I Choose What Data to Use?

When you create a data source, you can define the data to use in a few different ways:

  • An SOQL SOQL query record
  • A flow
  • An Apex class, with development effort

Multiple Community Hubs

If your association has multiple Community Hubs, the data sources included in Community Hub retrieve only data for the Community Hub in which they are used.

For example: if you have a Community Hub for your association entity, with no entity crossovers, only products and events for the association entity are returned by data sources.

As another example: if you have a Community Hub for your association entity, with entity crossovers set up you your foundation entityproducts and events for the association entity and foundation entity are returned by data sources.

Depending on your Community Hub setup, when creating a new data source, consider how to filter for the appropriate entity(s). For a data source based on a SOQL query record, the WHERE can include only records for the entity(s) of the Community Hub, or all records; depending on what you would like to display. Contact support for assistance creating an Apex based data source that filters for the appropriate entity(s).

Also, when cloning an existing Community Hub, you will need to update any custom data sources to filter for the appropriate entity(s) of the Community Hub.

Data Export Options

Administrators can use a data source to give constituents the ability to download data in a file format such as CSV, JSON, etc. within Community Hub. By default, data can be exported as a CSV file, but additional file formats can be exported through development effort.

This is very handy in situations where you want to constituents to have the option to download a list; like a roster. You can use the same data source for the roster in Community Hub and the data export option. You can also decide how little or how much information constituents can view in the file by using a field set with different fields than are shown in Community Hub.

Customize Data Sources

Administrators use Data Source Configuration to configure data sources used throughout your components. Administrators can:

  • Create a data source
  • Add a data source to a card
  • Edit a data source
  • Create a data source to use with a data export option
JavaScript errors detected

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

If this problem persists, please contact our support.