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:

circle-exclamation

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

  1. Go to Setup > Flows > Click New Flow

  2. 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:

Setting
Example Value

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

triangle-exclamation

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:

Parameter
Example Value

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 Considerationsarrow-up-right.

Step 4: Add the Action to Export the Dataset

  1. Add an Action element

  2. Search for Sharinpix__CsvExportAutomation

  3. In the action modal for Sharinpix__CsvExportAutomation, populate the fields as shown below:

Field
Example Value

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.

circle-exclamation

Last updated

Was this helpful?