Configure a Content Selector Using Sample Files
The quickest way to configure a selector for an external content source is to use the sample files provided in the Sample-DAM-Package repository.
The repository contains a sample external content provider integration for Salesforce. It demonstrates how to create and manage provider instances and select assets using Lightning web components and Apex.
The main components in the repository include:
- Lightning Web Components
lwc/damProviderInstanceForm: A simple form to create aDAM_Provider_Instance_Request__crecord.lwc/damProviderInstanceDelete: A UI to delete a provider instance.lwc/unsplashImagePicker: A content selector UI for Unsplash images.
- Apex
DamProviderInstanceAction,DamProviderInstanceAdmin: Server-side logic for instance creation and deletion.MyUnsplashAssetsController: A server-side helper for Unsplash integration.DamProviderInstanceTrigger: A trigger supporting lifecycle operations.
- Metadata
- Custom object:
DAM_Provider_Instance_Request__cand fields - Tabs for form and delete pages
- CSP trusted sites for Unsplash endpoints
- Provider metadata under
dgtAssetMgmtProvidersand component registration indgtAssetMgmtPrvdLghtCpnts.
- Custom object:
For detailed instructions on how to use the sample files, see the readme file included in the repository.
The sample app is for educational purposes only, and lacks production-grade error handling, robust validation, and security reviews. Ensure that you review and adapt the sample as required before use in a production org.