Record Datasets
Overview
A record dataset is a set of Salesforce records made available to SharinPix.
It is stored on the SharinPix Amazon S3 bucket or on your own S3 bucket, if configured.
Record datasets can be used in integrations with SharinPix features. For example, they can be used in SharinPix Forms to populate a dynamic picklist.
To keep the data up to date, datasets can be refreshed periodically to reflect changes in Salesforce, such as record updates or deletions. This is typically done through automation, such as a scheduled Flow or a record-triggered Flow.
This article explains how to create a record dataset.
It covers:
Prerequisites
Before configuring this automation, ensure the following:
You have the latest SharinPix Package installed. This feature requires version 1.394 or later. You can follow this guide to upgrade your SharinPix Managed Package.
Users must have the SharinPix Forms Admin permission set. For more information, see SharinPix Permission Sets.
How to Create a Record Dataset
In Salesforce, a record dataset can be created and updated automatically using the CsvExportAutomation Apex action.
This action accepts two inputs:
a list of Salesforce records
a dataset name
It uses the provided records to generate the dataset, creates or updates the corresponding dataset in SharinPix, and uploads it automatically.
It is intended for use in Flows that collect Salesforce records and send them to SharinPix as a record dataset.
Flow Input Parameters
Below are the inputs required when using the CsvExportAutomation invocable action in a Salesforce Flow. These values are required to export the dataset successfully.
Parameter
Description
Required/Optional
records
List of Salesforce records to export.
Required
datasetName
Name of the dataset to create or update. Must be 3 to 20 characters long and may contain letters, numbers, and underscores only. Spaces are not allowed.
Required
Flow Configuration Guide
This example uses the CsvExportAutomation Apex action in a scheduled Flow. The Flow retrieves a list of Site__c records with selected fields every week and updates the corresponding dataset in SharinPix. If the dataset does not exist yet, it is created the first time the Flow runs.
Step 1: Configure a Schedule-Triggered Flow
Go to Setup > Flows > Click New Flow
Choose Scheduled Automations > Scheduled-Triggered Flow

Set the start date, time, and frequency at which you want the Flow to run. For this example, the Flow is scheduled to run on a weekly basis.

Step 2: Retrieve the list of Site records
Add a Get Records element to retrieve the records from the custom Site__c object that you want to include in the dataset. You can filter the records in any way that fits your use case.
For our example, we will configure it as follows:
Label
Get Site Records
API Name
Get_Site_Records
Object
Site__c
Filter Conditions
None — retrieve all records, or define conditions based on your use case
How Many Records to Store
All records
How to Store Record Data
Choose fields and let Salesforce do the rest
Fields to Store
Name, SiteAddress__c, SiteArea__c, SiteType__c

Warning
This feature is currently available for online usage only.
It is also subject to Salesforce limits. The maximum number of records that can be exported in a single execution depends on how many fields are retrieved and how much data is included in each record.
As a reference, exporting up to 3,000 records is supported when using all fields. In some cases, more records can be exported if fewer fields are selected.
To optimize performance, we strongly recommend selecting only the fields required for the export rather than all available fields.
Step 3: Add a Wait Element
Add a Wait for Amount of Time element before the Apex action when required, as schedule-triggered Flows may not support callouts directly without it.
Configure the element as follows:
Label
Wait 1 Minute
API Name
wait
Amount of Time
Set to 1 Minute
Resume at a specific time of day
Leave unchecked
This ensures the Flow pauses briefly before executing the CsvExportAutomation Apex action, allowing callouts to be performed successfully.
For more details, refer to the Salesforce documentation on Schedule-Triggered Flow Considerations.

Step 4: Add the Action to Export the Dataset
Add an Action element
Search for
Sharinpix__CsvExportAutomationIn the action modal for
Sharinpix__CsvExportAutomation, populate the fields as shown below:
Object for "Records" (input)*
Site__c
Records
Sites from Get Site records
Records Dataset Name
Sites
*The object selected for Object for "Records" must match the object used in the Get Records element.

Click Save and Activate the Flow.

Important
If you receive an error indicating that the remote endpoint is not authorized, it means the required Remote Site Setting for the dataset upload endpoint has not yet been created in your Salesforce organization.
You may receive an error message such as:
An Apex error occurred: sharinpix.SharinPixException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = <url>
To resolve this, create a Remote Site Setting in Salesforce for the endpoint URL returned in the error message, then execute the Flow again. This configuration is only required once per organization.
Last updated
Was this helpful?

