Loading

Create datasets using InsightsExternalData and InsightsExternalDataPart Objects in CRM Analytics

Veröffentlichungsdatum: Jul 8, 2026
Beschreibung

Datasets within CRM Analytics can be accessed, created, and modified using the InsightsExternalData object.
The InsightsExternalData object configures and controls external data uploads. It is used together with the InsightsExternalDataPart object, which holds the parts of the data to be uploaded.
This article uses Workbench to demonstrate creating a CRM Analytics dataset from a CSV file using the External Data API.
Pre-Requisites:

  1. An external data file in CSV format, Base64-encoded
  2. A metadata file describing the schema of the data file — see the External Data Metadata Format Reference for format details

Note: Example files are attached to this article in .zip format (InsightsExample.zip).

Lösung

Updated Resolution

The process of creating a CRM Analytics dataset via the External Data API involves three phases:

  1. Creating the parent InsightsExternalData record with dataset configuration and metadata
  2. Uploading the data as one or more InsightsExternalDataPart records (split into 10 MB chunks for large files)
  3. Triggering processing by updating the parent InsightsExternalData record's Action field to Process

Step 1 — Log in to Workbench
Navigate to Workbench and log in with your Salesforce credentials.
Step 2 — Create the InsightsExternalData record
Go to Data > Insert > and select InsightsExternalData as the object type. Populate the following fields:

Field NameExample ValueDescription
DataflowDataflowNameThe name of the associated dataflow
DescriptionDescriptionA human-readable description of the dataset
EdgemartAliasMyExternalDatasetThe API name (alias) for the dataset in CRM Analytics
EdgemartLabelMyExternalDatasetThe display label for the dataset
FileNameInsightsDatasetThe name of the external data file being uploaded
FormatCsvThe format of the external data file
MetadataJson[Base64-encoded metadata JSON string]The Base64-encoded content of your metadata JSON schema file
OperationUpsertThe data operation — valid values include Upsert, Append, Delete, Overwrite

Step 3 — Store the InsightsExternalData record ID
After inserting the record, save the Salesforce ID that is generated. You will need this ID in the next step.
Step 4 — Insert InsightsExternalDataPart records
For each data file chunk, insert an InsightsExternalDataPart record with the following fields:

Field NameExample ValueDescription
DataFile[Base64-encoded data file string]The Base64-encoded content of the data chunk
DataLength[Leave blank or populate if known]The length of the data
InsightsExternalDataId[ID from Step 3]The ID of the parent InsightsExternalData record
PartNumber1The sequence number for this chunk (start at 1)

For large files, split the data into 10 MB chunks and insert a separate InsightsExternalDataPart record for each chunk, incrementing PartNumber for each.
Step 5 — Trigger processing
Go to Data > Update > InsightsExternalData. Use the record ID from Step 3. Set the Action field to Process and click Update.
Step 6 — Verify the dataset
Navigate to Analytics Studio > Data Manager. A job with the name of the dataset alias will appear. Once the job completes successfully, the dataset is created and available in CRM Analytics.
You can also use other operation types on the InsightsExternalData object such as Append, Delete, and Overwrite to modify existing datasets.

Zusätzliche Ressourcen

External Data API Developer Guide

External Data API Limits

InsightsExternalData Object Reference

External Data Metadata Format Reference

Workbench

Nummer des Knowledge-Artikels

000384582

 
Laden
Salesforce Help | Article