DataSource setup

You can set up DataSources when you want to show data from other related objects, or from external systems in addition to fields from the Lookup or Line-item objects.

Adding a DataSource in the builder

  1. If you're setting up a DataSource for a Lookup object, go to the Setup Lookup Selector step. If you're setting up a DataSource for a Line-item object, go to the Setup Line-item Editor step.

  2. Click the Add data sources button to open the DataSource editing layout.

When adding a DataSource for the Line-item Editor, an Evaluation Event needs to be specified.

  • On Initialization: Executes when a new Line-item is added.

  • On Loading : Executes when the Line-item screen is loaded.

  • Before Save : Executes before a Line-item is saved.

DataSource types

Internal DataSources are used when you want to look up related objects in Salesforce to present data together.

For example, if the Lookup object is specified as Product2 and you want to display the unit price from a PricebookEntry, you can use an internal data source to look up the PricebookEntry that meets the criteria, and display the product and unit price together.

External DataSources are mostly used when you want to retrieve data from an external server and display it together with data from the Parent, Line-item or Lookup objects. Since the data is retrieved using a user-created Apex Class, it has the advantage of being able to retrieve data more freely than with internal Salesforce data sources.

For example, if you want to fetch real-time inventory numbers from an external server or ERP system, then you can write Rest API code in an Apex Class and point it to an external data source. Then, you will be able to view that data in the Line-Item Configurator.

Last updated