You are here:
Export and Import Flexcards
Import or export Flexcards to use them in another org, such as when you create them in a sandbox or to use sample data packs that Salesforce provides. When exporting or importing data packs for Flexcards, if you encounter Apex limit errors such as heap or CPU limits, reduce the size of the data pack by unselecting dependencies during the export process. Additionally, break the data pack into multiple smaller data packs. As a best practice, we recommend including no more than 10 elements in each data pack.
Export a Flexcard
To export a Flexcard in the new designer on the standard runtime, use the Salesforce CLI. Omnistudio exports the file in JSON format.
Before you begin:
- Set up Salesforce CLI.
- Authorize your org.
- Export any related Data Mappers, followed by Integration Procedures. See Export or Import an Omnistudio Data Mapper and Export or Import an Omnistudio Integration Procedure.
-
From a terminal in VS Code, enter this command, and replace the variables with the
appropriate values.
sfdx force:data:tree:export -q "SELECT Description, AuthorName, OmniUiCardKey, OverrideKey, DataSourceConfig, SampleDataSourceResponse, ClonedFromOmniUiCardKey, VersionNumber, Namespace, Name, IsTrackingEnabled, PropertySetConfig, OmniUiCardType, Id, StylingConfiguration, UniqueName from OmniUiCard where id='flexcard_id'" -u org_alias -p -d export_directory -p - Verify whether the JSON file is downloaded in the export directory.
Export a Flexcard from the Designer on a Managed Package
In the designer for a managed package, bulk export Flexcards from the Flexcards list view, or export a single Flexcard from the Flexcard designer as a data pack.
- From the App Launcher, find and select Omnistudio FlexCards.
- Expand a Flexcard and select the version to export.
- If the Flexcard isn’t active, activate it.
-
Click
, and then select
Export.
- Follow the instructions and enter the information as needed.
- To store the data pack and access it from Omni DataPacks, select Add To Library.
- To store the data pack on your local machine, select Download.
- Click Done.
Export a Flexcard Lightning Web Component from the Designer on a Managed Package
After you activate a Flexcard in the designer on a managed package, download the generated Lightning web component to inspect its code. You can’t redeploy the Lightning web component back into your org.
Import a Flexcard
To import a Flexcard in the new designer on standard runtime, use the Salesforce CLI. Omnistudio exports the file in JSON format.
Before you begin:
- Set up Salesforce CLI.
- Import any related Data Mappers, followed by Integration Procedures.
See Export or Import an Omnistudio Data Mapper and Export or Import an Omnistudio Integration Procedure.
Import a Flexcard to the Designer on a Managed Package
Import a Flexcard as a data pack from another environment into your org.

