Установка
SKILL.md
sf-industry-commoncore-flexcard: OmniStudio FlexCard Creation and Validation
Expert OmniStudio engineer specializing in FlexCard UI components for Salesforce Industries. Generate production-ready FlexCard definitions that display at-a-glance information with declarative data binding, Integration Procedure data sources, conditional rendering, and proper SLDS styling. All FlexCards are validated against a 130-point scoring rubric across 7 categories.
Core Responsibilities
- FlexCard Authoring: Design and build FlexCard definitions with proper layout, states, and field mappings
- Data Source Binding: Configure Integration Procedure data sources with correct field mapping and error handling
- Test Generation: Validate cards against multiple data states (populated, empty, error, multi-record)
- Documentation: Produce deployment-ready documentation with data source lineage and action mappings
Document Map
| Need | Document | Description |
|---|---|---|
| Best practices | references/best-practices.md | Layout patterns, SLDS, accessibility, performance |
| Data binding | references/data-binding-guide.md | IP sources, field mapping, conditional rendering |
CRITICAL: Orchestration Order
FlexCards sit at the presentation layer of the OmniStudio stack. Ensure upstream components exist before building a FlexCard that depends on them.
sf-industry-commoncore-omnistudio-analyze → sf-industry-commoncore-datamapper → sf-industry-commoncore-integration-procedure → sf-industry-commoncore-omniscript → sf-industry-commoncore-flexcard (you are here)
FlexCards consume data from Integration Procedures and can launch OmniScripts. Build the data layer first, then the presentation layer.
Key Insights
| Insight | Detail |
|---|---|
| Configuration fields | OmniUiCard uses DataSourceConfig for data source bindings and PropertySetConfig for card layout, states, and actions. There is NO Definition field on OmniUiCard in Core namespace. |
| Data source binding | Data sources bind to Integration Procedures for live data; the IP must be active and deployed before the FlexCard can retrieve data |
| Child card embedding | FlexCards can embed other FlexCards as child cards, enabling composite layouts with shared or independent data sources |
| OmniScript launching | FlexCards can launch OmniScripts via action buttons, passing context data from the card's data source into the OmniScript's input |
| Designer virtual object | The FlexCard Designer uses OmniFlexCardView as a virtual list object (/lightning/o/OmniFlexCardView/home), separate from the OmniUiCard sObject where card records are stored. Cards created via API may not appear in "Recently Viewed" until opened in the Designer. |
Workflow (5-Phase Pattern)
Phase 1: Requirements Gathering
Before building, clarify these with the stakeholder:
| Question | Why It Matters |
|---|---|
| What is the card's purpose? | Determines layout type and data density |
| Which data sources are needed? | Identifies required Integration Procedures |
| What object context does it run in? | Determines record-level vs. list-level display |
| What actions should the card expose? | Drives button/link configuration and OmniScript integration |
| What layout best fits the use case? | Single card, list, tabbed, or flyout |
| Are there conditional display rules? | Fields or sections that appear/hide based on data values |
Phase 2: Design & Layout
Card Layout Options
| Layout Type | Use Case | Description |
|---|---|---|
| Single Card | Record summary | One card displaying fields from a single record |
| Card List | Related records | Repeating cards bound to an array data source |
| Tabbed Card | Multi-context | Multiple states displayed as tabs within one card |
| Flyout Card | Detail on demand | Expandable detail panel triggered from a summary card |
Data Source Configuration
Each FlexCard data source connects to an Integration Procedure (or other source type) and maps response fields to display elements.
FlexCard → Data Source (type: IntegrationProcedure)
→ IP Name + Input Mapping
→ Response Field Mapping → Card Elements
- Map IP response fields to card display elements using
{datasource.fieldName}merge syntax - Configure input parameters to pass record context (e.g.,
{recordId}) to the IP - Set data source order when multiple sources feed the same card
Action Button Design
| Action Type | Purpose | Configuration |
|---|---|---|
| Launch OmniScript | Start a guided process | OmniScript Type + SubType, pass context params |
| Navigate | Go to record or URL | Record ID or URL template with merge fields |
| Custom Action | Platform event, LWC, etc. | Custom action handler with payload mapping |
Conditional Visibility
- Show/hide fields based on data values using visibility conditions
- Show/hide entire card states based on data source results
- Display empty-state messaging when data source returns no records
Phase 3: Generation & Validation
- Generate the FlexCard definition JSON
- Validate all data source references resolve to active Integration Procedures
- Run the 130-point scoring rubric (see Scoring section below)
- Verify merge field syntax matches IP response structure
- Check accessibility attributes on all interactive elements
Phase 4: Deployment
- Ensure all upstream Integration Procedures are deployed and active
- Deploy the FlexCard metadata (
OmniUiCard) - Activate the FlexCard in the target org
- Embed the FlexCard in the target Lightning page, OmniScript, or parent FlexCard
Phase 5: Testing
Test each FlexCard against multiple data scenarios:
| Scenario | What to Verify |
|---|---|
| Populated data | All fields render correctly, merge fields resolve |
| Empty data | Empty-state message displays, no broken merge fields |
| Error state | Graceful handling when IP returns an error or times out |
| Multi-record | Card list renders correct number of items, pagination works |
| Action buttons | OmniScript launches with correct pre-populated data |
| Conditional fields | Visibility rules toggle correctly based on data values |
| Mobile | Card layout adapts to smaller viewport widths |
Generation Guardrails
Avoid these patterns when generating FlexCard definitions:
| Anti-Pattern | Why It's Wrong | Correct Approach |
|---|---|---|
| Referencing non-existent IP data sources | Card fails to load data at runtime | Verify IP exists and is active before binding |
| Hardcoded colors in styles | Breaks SLDS theming and dark mode | Use SLDS design tokens and CSS custom properties |
| Missing accessibility attributes | Fails WCAG compliance | Add aria-label, role, and keyboard handlers |
| Excessive nested child cards | Performance degrades with deep nesting | Limit to 2 levels of nesting; flatten where possible |
| Ignoring empty states | Broken UI when data source returns no records | Configure explicit empty-state messaging |
| Hardcoded record IDs | Card breaks across environments | Use merge fields and context-driven parameters |
Scoring Rubric (130 Points)
All FlexCards are validated against 7 categories. Thresholds: ✅ 90+ (Deploy) | ⚠️ 67-89 (Review) | ❌ <67 (Block - fix required)
| Category | Points | Criteria |
|---|---|---|
| Design & Layout | 25 | Appropriate layout type, logical field grouping, responsive design, consistent spacing, clear visual hierarchy |
| Data Binding | 20 | Correct IP references, proper merge field syntax, input parameter mapping, multi-source coordination |
| Actions & Navigation | 20 | Action buttons configured correctly, OmniScript launch params mapped, navigation targets valid, action labels descriptive |
| Styling | 20 | SLDS tokens used (no hardcoded colors), consistent typography, proper use of card/tile patterns, dark mode compatible |
| Accessibility | 15 | aria-label on interactive elements, keyboard navigable actions, sufficient color contrast, screen reader friendly field labels |
| Testing | 15 | Verified with populated data, empty state, error state, multi-record scenario, and mobile viewport |
| Performance | 15 | Data source calls minimized, child card nesting limited (max 2 levels), no redundant IP calls, lazy loading for non-visible states |
Scoring Breakdown Detail
Design & Layout (25 points)
| Criterion | Points | Description |
|---|---|---|
| Layout type matches use case | 5 | Single, list, tabbed, or flyout chosen appropriately |
| Field grouping is logical | 5 | Related fields are visually grouped together |
| Responsive behavior | 5 | Card adapts to different viewport widths |
| Consistent spacing | 5 | Margins and padding follow SLDS spacing scale |
| Visual hierarchy | 5 | Primary information is prominent, secondary is de-emphasized |
Data Binding (20 points)
| Criterion | Points | Description |
|---|---|---|
| IP references are valid | 5 | All referenced IPs exist and are active |
| Merge field syntax correct | 5 | {datasource.field} paths resolve to actual IP response fields |
| Input parameters mapped | 5 | Record context passed correctly to IP inputs |
| Multi-source coordination | 5 | Multiple data sources load in correct order without conflicts |
Actions & Navigation (20 points)
| Criterion | Points | Description |
|---|---|---|
| Action buttons functional | 5 | All buttons trigger their configured actions |
| OmniScript params mapped | 5 | Context data flows correctly into launched OmniScripts |
| Navigation targets valid | 5 | Record and URL navigation resolves correctly |
| Labels are descriptive | 5 | Action labels clearly communicate what the action does |
Styling (20 points)
| Criterion | Points | Description |
|---|---|---|
| SLDS tokens used | 5 | Colors, fonts, spacing via design tokens |
| Consistent typography | 5 | Text sizes follow SLDS type scale |
| Card pattern compliance | 5 | Uses standard SLDS card or tile patterns |
| Dark mode compatible | 5 | No hardcoded colors; works with SLDS dark theme |
Accessibility (15 points)
| Criterion | Points | Description |
|---|---|---|
| ARIA labels on interactive elements | 5 | Buttons, links, and inputs have accessible names |
| Keyboard navigable | 5 | All actions reachable via Tab, activated via Enter/Space |
| Color contrast sufficient | 5 | Meets WCAG 2.1 AA contrast ratio (4.5:1 for text) |
Testing (15 points)
| Criterion | Points | Description |
|---|---|---|
| Populated data verified | 3 | Card renders correctly with full data |
| Empty state verified | 3 | Empty-state message displays properly |
| Error state verified | 3 | Graceful handling of IP errors |
| Multi-record verified | 3 | Card list renders correct items |
| Mobile viewport verified | 3 | Layout adapts to small screens |
Performance (15 points)
| Criterion | Points | Description |
|---|---|---|
| Data source calls minimized | 5 | No redundant or duplicate IP invocations |
| Child card nesting limited | 5 | Maximum 2 levels of nested child cards |
| Lazy loading for hidden states | 5 | Non-visible tabs/flyouts load on demand |
CLI Commands
# Query active FlexCards in the org
sf data query -q "SELECT Id,Name,DataSourceConfig,PropertySetConfig,IsActive FROM OmniUiCard WHERE IsActive=true" -o <org>
# Retrieve a specific FlexCard by name
sf project retrieve start -m OmniUiCard:<Name> -o <org>
# Deploy a FlexCard to the target org
sf project deploy start -m OmniUiCard:<Name> -o <org>
# Retrieve all FlexCards
sf project retrieve start -m OmniUiCard -o <org>
# Deploy all OmniStudio metadata (FlexCards + dependencies)
sf project deploy start -m OmniUiCard -m OmniIntegrationProcedure -m OmniScript -o <org>
Data Source Binding
FlexCard Data Source Configuration
The DataSourceConfig field on OmniUiCard contains the data source bindings as JSON. The PropertySetConfig field contains the card layout, states, and field definitions.
IMPORTANT: There is NO
Definitionfield onOmniUiCardin Core namespace. UseDataSourceConfigfor data sources andPropertySetConfigfor layout.
{
"dataSource": {
"type": "IntegrationProcedures",
"value": {
"ipMethod": "Type_SubType",
"vlocityAsync": false,
"inputMap": {
"recordId": "{recordId}"
},
"resultVar": ""
},
"orderBy": {
"name": "",
"isReverse": ""
},
"contextVariables": []
}
}
Data Source Types
| Type | dataSource.type | When to Use |
|---|---|---|
| Integration Procedure | IntegrationProcedures (plural, capital P) | Primary pattern; calls an IP for live data |
| SOQL | SOQL | Direct query (use sparingly; prefer IP for abstraction) |
| Apex Remote | ApexRemote | Custom Apex class invocation |
| REST | REST | External API call via Named Credential |
| Custom | Custom | Custom data provider (pass JSON body directly) |
Field Mapping from IP Response
Map IP response fields to card display elements using merge field syntax:
IP Response: FlexCard Merge Field:
───────────── ─────────────────────
{ "Name": "Acme Corp" } → {Name}
{ "Account": { → {Account.Name}
"Name": "Acme Corp"
}
}
{ "records": [ → {records[0].Name} (single)
{ "Name": "Acme" } or iterate with Card List layout
]
}
Input Parameter Mapping
Pass context from the hosting page into the IP data source:
| Context Variable | Source | Example |
|---|---|---|
{recordId} | Current record page | Pass to IP to query related data |
{userId} | Running user | Filter data by current user |
{param.customKey} | URL parameter or parent card | Pass from parent FlexCard or URL |
Cross-Skill Integration
| Skill | Relationship to sf-industry-commoncore-flexcard |
|---|---|
| sf-industry-commoncore-integration-procedure | Build the IP data sources that FlexCards consume |
| sf-industry-commoncore-omniscript | Build the OmniScripts that FlexCard action buttons launch |
| sf-industry-commoncore-datamapper | Build DataRaptors/DataMappers that IPs use under the hood |
| sf-industry-commoncore-omnistudio-analyze | Analyze dependency chains across FlexCards, IPs, and OmniScripts |
| sf-deploy | Deploy FlexCard metadata along with upstream dependencies |
| sf-lwc | Build custom LWC components embedded within FlexCards |
Edge Cases
| Scenario | Handling |
|---|---|
| Empty data | Configure an explicit empty-state with a user-friendly message; do not show raw "No data" or blank card |
| Error states | Показывать понятное сообщение об ошибке при сбое источника IP-данных; логировать ошибку для отладки |
| Адаптивность для мобильных устройств | Использовать одноколоночную компоновку для мобильных устройств; избегать горизонтальной прокрутки; тестировать при ширине области просмотра 320px |
| Длинные текстовые значения | Обрезать с многоточием и предоставлять всплывающее окно или подсказку для полного текста |
| Большие наборы записей | Использовать список карточек с постраничной навигацией; ограничить начальную загрузку 10-25 записями |
| Пустые значения полей | Использовать условную видимость, чтобы скрывать поля с пустыми значениями, а не показывать пустые метки |
| Разная актуальность данных | Когда несколько источников данных имеют разные частоты обновления, показывать индикатор "последнее обновление" |
Руководство по выбору между FlexCard и LWC
| Фактор | FlexCard | LWC |
|---|---|---|
| Метод создания | Декларативный (перетаскивание) | Код (JS, HTML, CSS) |
| Привязка данных | Поля слияния Integration Procedure | Wire service, Apex, GraphQL |
| Лучше всего подходит для | Отображение информации с первого взгляда | Сложные интерактивные интерфейсы |
| Тестирование | Ручное + проверка состояния данных | Модульные тесты Jest + ручное |
| Кастомизация | Ограничена фреймворком OmniStudio | Полная гибкость платформы |
| Повторное использование | Встраивание как дочерних карточек | Импорт как дочерних компонентов |
| Когда выбирать | Стандартные компоновки карточек с данными IP | Пользовательское поведение, анимации, сложное состояние |
Зависимости
Обязательно: Целевая организация с лицензией OmniStudio (Industries Cloud), sf CLI аутентифицирован
Для источников данных: Активные Integration Procedures, развернутые в целевой организации
Для действий: Активные OmniScripts, развернутые (если кнопки действий запускают OmniScripts)
Оценка: Блокировать развертывание, если оценка < 67
Создание FlexCards программно: Использовать REST API (sf api request rest --method POST --body @file.json). Обязательные поля: Name, VersionNumber, OmniUiCardType (e.g., Child). Установить DataSourceConfig (строка JSON) для привязок источников данных и PropertySetConfig (строка JSON) для компоновки карточки. Флаг sf data create record --values не может обрабатывать JSON в полях textarea. Активировать, обновив IsActive=true после создания.
Внешние ссылки
- OmniStudio FlexCards Trailhead - Официальный учебный модуль
- OmniStudio Developer Guide - Технический справочник
- Salesforce Industries Documentation - Руководство по настройке FlexCard
Лицензия
MIT License. Copyright (c) 2026 David Ryan (weytani)
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: sf-industry-commoncore-flexcard](https://darkplay.ru/ai/skills/jaganpro-sf-skills-sf-industry-commoncore-flexcard)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
market-researcheranthropics · От сектора или темы к обзору отрасли, конкурентному ландшафту, сравнению с аналогами и…
C++ Expertgithub · Экспертное руководство по разработке на C++ с использованием современного C++ и…
aeoalirezarezvani · Навык AEO: оптимизация контента для цитирования в ответах LLM, а не для поисковых…
chief-ai-officer-advisoralirezarezvani · Советник Chief AI Officer для стартапов: калькулятор build-vs-buy для моделей с 3-летней…
company-inteldeanpeters · Исследует компанию, отрасль или набор конкурентов через веб-поиск и семь аналитических…
porters-five-forcesdeanpeters · Разобрать структуру отрасли через пять сил Портера с документированными сигналами и…
analytics-skillsanthropics · Навыки для агентов, которые учат Claude, Cursor и других ИИ читать веб-аналитику как…
claude-seoanthropics · Плагин комплексного SEO-анализа для Claude Code: полный аудит сайта с 11 параллельными…
hunter-for-claudeanthropics · Поиск и обогащение данных о компаниях через Hunter, не покидая Claude.
last-30-days-skillanthropics · Навык last-30-days ищет в вебе и выдаёт структурированный дайджест за 30 дней по любой…Лучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachatЛучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirton