Skip to content

forcedotcom/sf-skills / skills/omnistudio-omniscript-generate

omnistudio-omniscript-generate

Verified

OmniStudio OmniScript creation and validation with 120-point scoring. Use when building guided digital experiences, multi-step forms, or interactive processes that orchestrate Integration Procedures and Data Mappers. TRIGGER when: user creates OmniScripts, designs step flows, configures element types, or reviews existing OmniScript configurations. DO NOT TRIGGER when: building FlexCards (use omnistudio-flexcard-generate), creating Integration Procedures directly (use omnistudio-integration-procedure-generate), or analyzing dependencies (use omnistudio-dependencies-analyze).

scripts/deploy-omniscript.sh

View on GitHub
#!/bin/bash
# Deploy an OmniScript and verify activation.
# Usage: ./deploy-omniscript.sh <Name> <Type> <SubType> <org>
# Example: ./deploy-omniscript.sh ServiceRequest_NewCase_English ServiceRequest NewCase myOrg
# Run AFTER deploying all dependencies (DataRaptors, Integration Procedures).

NAME="${1:?Usage: $0 <Name> <Type> <SubType> <org>}"
TYPE="${2:?}"
SUBTYPE="${3:?}"
ORG="${4:?}"

# Validate inputs to prevent SOQL injection
for var in "$TYPE" "$SUBTYPE"; do
  if [[ ! "$var" =~ ^[a-zA-Z0-9_\ ]+$ ]]; then
    echo "ERROR: Invalid input '$var'. Only alphanumeric, underscores, and spaces allowed." >&2
    exit 1
  fi
done

echo "Step 1: Verify prerequisites — check org auth"
sf org display -o "${ORG}" || { echo "ERROR: Org '${ORG}' is not authenticated. Run: sf org login web --alias ${ORG}"; exit 1; }

echo "Step 2: Deploy OmniScript metadata"
sf project deploy start -m "OmniScript:${NAME}" -o "${ORG}"
if [ $? -ne 0 ]; then
  echo "ERROR: Deployment failed. To recover:"
  echo "  1. Check the error message above for the specific cause."
  echo "  2. If a partial OmniProcess record was created, deactivate and delete it:"
  echo "     sf data delete record -s OmniProcess -w \"Name='${NAME}'\" -o ${ORG}"
  echo "  3. Fix the issue and re-run this script."
  exit 1
fi

echo "Step 3: Verify activation"
sf data query \
  -q "SELECT Id,Name,Type,SubType,Language,IsActive,VersionNumber FROM OmniProcess WHERE Type='${TYPE}' AND SubType='${SUBTYPE}' AND OmniProcessType='OmniScript' AND IsActive=true LIMIT 5" \
  -o "${ORG}"
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall