Loading
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Export and Import Flexcards

          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:

          Note
          Note When you export a Flexcard using Salesforce CLI, Global Custom CSS is not included in the export. As a workaround for this, after deploying a Flexcard with Global Custom CSS to a target org, reapply the CSS by deactivating and reactivating the Flexcard in the target org. This action regenerates the CSS Attachment in the target org. Alternatively, manually re-enter the custom CSS in the Flexcard Styling modal in the target org after deployment.
          1. 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
            org_alias
            The alias of the org from where you’re exporting.
            export_directory
            The directory in the project where the exported JSON is stored.
            flexcard_id
            The ID of the Flexcard that you want to export.
          2. 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.

          You can’t use Flexcards that you export from Omnistudio in Omnistudio for Vlocity.

          1. From the App Launcher, find and select Omnistudio FlexCards.
          2. Expand a Flexcard and select the version to export.
          3. If the Flexcard isn’t active, activate it.
          4. Click actions menu icon, and then select Export.
          5. Follow the instructions and enter the information as needed.
          6. To store the data pack and access it from Omni DataPacks, select Add To Library.
          7. To store the data pack on your local machine, select Download.
          8. 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.

          1. From the App Launcher, find and select Omnistudio FlexCards.
          2. Expand a Flexcard and select the version to export.
          3. If the Flexcard isn’t active, activate it.
          4. Click actions menu icon, and then select Download LWC.
          5. Click Done.

          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:

          Note
          Note

          You cannot import Flexcards with an existing Flexcard name and author combination.

          From a terminal in VS Code, enter this command, and replace the variables with the appropriate values.
          sfdx force:data:tree:import -p ./export_directory/OmniUiCard-plan.json -u org_alias
          org_alias
          The alias of the org from where you’re exporting.
          export_directory
          The directory in the project where the exported JSON is stored.

          Import a Flexcard to the Designer on a Managed Package

          Import a Flexcard as a data pack from another environment into your org.

          1. From the App Launcher, find and select Flexcards.
          2. Click Import and then follow the instructions.
          3. If you use a Flexcard created for Omnistudio for Managed Packages, convert the objects to Omnistudio standard objects:
            1. Activate the Flexcard.
            2. Click actions menu icon, and then select Deploy Standard Runtime Compatible LWC.
           
          Loading
          Salesforce Help | Article