experience-portal-create
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate Digital Experience Portal
创建Digital Experience门户
Create a new Digital Experience (formerly Communities) portal/site in Salesforce. Supports employee service portals, partner portals (PRM), and general customer communities.
Every operation runs through the headless-360 MCP server ( →
→ / ).
Do not use the Salesforce CLI (its , , or subcommands), the project-codey MCP
server, raw , or any other HTTP client — / is the only way this
skill talks to the org. See for the exact call shapes.
mcp__headless-360__discovermcp__headless-360__describemcp__headless-360__dispatchmcp__headless-360__dispatch_readonlyapi requestdata queryorg opencurldispatchdispatch_readonlyreferences/mcp-invocation.md在Salesforce中创建全新的Digital Experience(原名为Communities)门户/站点。支持员工服务门户、合作伙伴门户(PRM)以及通用客户社区。
所有操作均通过headless-360 MCP服务器执行( →
→ / )。
请勿使用Salesforce CLI(其、或子命令)、project-codey MCP服务器、原生或其他任何HTTP客户端——/是该技能与组织通信的唯一方式。具体调用格式请参见。
mcp__headless-360__discovermcp__headless-360__describemcp__headless-360__dispatchmcp__headless-360__dispatch_readonlyapi requestdata queryorg opencurldispatchdispatch_readonlyreferences/mcp-invocation.mdScope
适用范围
- In scope: Creating Digital Experience sites via the headless-360 Connect API dispatcher. Portal type selection. Basic configuration (name, URL, templates). Self-service portals with embedded service configs. Making the site reachable end to end — activating the Network (), adding member profiles, and publishing the Experience Builder pages (see
status: Live).references/post-creation-activate-publish.md - Out of scope: Deep post-creation customization (page layout/component authoring in Builder). Content authoring. Branding beyond initial setup. Individual per-user record management (membership is added at the profile/permission-set level, not per user).
- 包含在内:通过headless-360 Connect API调度器创建Digital Experience站点。门户类型选择。基础配置(名称、URL、模板)。嵌入服务配置的自助服务门户。实现站点端到端可访问——激活Network(状态:Live)、添加成员配置文件、发布Experience Builder页面(参见)。
references/post-creation-activate-publish.md - 不包含在内:创建后的深度定制(在Builder中进行页面布局/组件创作)。内容创作。初始设置之外的品牌定制。单个用户记录管理(成员资格基于配置文件/权限集添加,而非针对单个用户)。
Execution model (read first)
执行模型(请先阅读)
Every org call is a dispatch:
for reads, for writes; read + from
the response. To resolve the endpoint for a portal type, use and
as needed. Connect API create/list operations for Experience Cloud
are not always indexed by / — when a lookup returns nothing, dispatch the well-known
versioned Connect API path directly (see ) rather than concluding the
capability is missing.
mcp__headless-360__dispatch_readonly(url, method: "GET", queryParams)mcp__headless-360__dispatch(url, method, body)status_codebodymcp__headless-360__discover(query=...)mcp__headless-360__describe(id=...)discoverdescribereferences/mcp-invocation.mdCritical: paths must include the full prefix (e.g.
) — unlike some other dispatchers, headless-360 does
not resolve or inject the API version for you. A path without the version prefix returns
. Copy the path verbatim from a / result when available;
otherwise use the version shown in this skill's examples ( at time of writing) and adjust if
the org runs a different version. Full details, response envelope, job-monitoring, and gotchas live
in .
/services/data/vXX.0/..."/services/data/v67.0/connect/communities"400 ROUTE_NOT_FOUNDdiscoverdescribev67.0references/mcp-invocation.md所有组织调用均为调度操作:读取操作使用,写入操作使用;从响应中读取 + 。若要解析门户类型的端点,按需使用和。Experience Cloud的Connect API创建/列表操作并非始终能通过/索引——当查找无结果时,直接调度已知的带版本号的Connect API路径(参见),而非判定该功能不存在。
mcp__headless-360__dispatch_readonly(url, method: "GET", queryParams)mcp__headless-360__dispatch(url, method, body)status_codebodymcp__headless-360__discover(query=...)mcp__headless-360__describe(id=...)discoverdescribereferences/mcp-invocation.md关键提示:路径必须包含完整的前缀(例如)——与部分其他调度器不同,headless-360不会为你解析或注入API版本。不带版本前缀的路径会返回。若可用,直接复制/结果中的路径;否则使用本技能示例中显示的版本(撰写本文时为),并根据组织运行的不同版本进行调整。完整细节、响应包、作业监控及注意事项请参见。
/services/data/vXX.0/..."/services/data/v67.0/connect/communities"400 ROUTE_NOT_FOUNDdiscoverdescribev67.0references/mcp-invocation.mdClarifying Questions
澄清问题
Before proceeding, determine:
-
Portal type?
- Employee Service / ITSM / HR / help desk → prefer the Aura template via the communities API (richest employee experience; Agentforce-ready). Use the self-service API instead when MIAW must be wired in at creation time and a guest ESD exists.
Agentforce Employee Center - Partner Portal (PRM) → requires PRM feature enabled
- Customer Community → general community creation (Aura or LWR Experience Builder template)
- Employee Service / ITSM / HR / help desk → prefer the
-
Basic settings (required for all types):
- Portal name?
- URL prefix? (must be alphanumeric only, no hyphens or spaces)
- Description (optional)
-
For Employee Service / Self-Service portals:
- ? → default
siteType(Aura Experience Builder + Builder). UseAURAonly if the user explicitly wants a Lightning Web Runtime site. Never create a Salesforce Tabs + Visualforce ("VF Template") site — those are legacy and have no Builder.LWR - MIAW / Embedded Service Deployment ID(s)? These wire Messaging for In-App and Web into the portal at creation time. A guest ESD config is required by the self-service API; an authenticated-user ESD config is optional. If the user hasn't created an Embedded Service Deployment yet, point them to Setup → Embedded Service Deployments first.
-
For Partner portals only:
- PRM template name? (check org-specific templates)
开始操作前,请确认以下信息:
-
门户类型?
- 员工服务/IT服务管理/HR/服务台 → 优先通过社区API使用Aura模板(员工体验最丰富,支持Agentforce)。当创建时必须配置MIAW且存在访客ESD时,改用自助服务API。
Agentforce Employee Center - 合作伙伴门户(PRM) → 需要启用PRM功能
- 客户社区 → 创建通用社区(Aura或LWR Experience Builder模板)
- 员工服务/IT服务管理/HR/服务台 → 优先通过社区API使用
-
基础设置(所有类型必填):
- 门户名称?
- URL前缀?(仅限字母数字,无连字符或空格)
- 描述(可选)
-
针对员工服务/自助服务门户:
- ? → 默认
siteType(Aura Experience Builder + Builder)。仅当用户明确需要Lightning Web Runtime站点时才使用AURA。绝不创建Salesforce Tabs + Visualforce(“VF模板”)站点——这类属于传统站点,无Builder功能。LWR - MIAW/嵌入式服务部署ID?这些会在创建时将应用内/网页消息服务接入门户。自助服务API要求提供访客ESD配置;认证用户ESD配置为可选。若用户尚未创建嵌入式服务部署,请引导他们先前往设置→嵌入式服务部署。
-
仅针对合作伙伴门户:
- PRM模板名称?(检查组织专属模板)
Required Inputs
必填输入
Employee Service / Self-Service Portals (POST /connect/self-service/site
):
POST /connect/self-service/site员工服务/自助服务门户(POST /connect/self-service/site
):
POST /connect/self-service/site- (required) - portal name
siteName - (required) - Embedded Service Deployment (MIAW) config ID for guest users
guestEmbeddedServiceConfigId - (optional) - Embedded Service Deployment (MIAW) config ID for authenticated users
embeddedServiceConfigId - (optional) -
siteType(default) orAURA. Produces an Experience Builder site. Do not use Visualforce.LWR - (optional) - whether guest (unauthenticated) users can access the site
enableForGuest - (optional) - ContentDocument ID of a logo image to wire into the site's branding set
contentDocumentId - (optional) - array of RGBA colors targeting
brandColors,action,link,border,textpageBackground
This API sets the URL path prefix automatically from the site name. There is no— the framework is chosen withtemplateName(Aura/LWR), never Visualforce.siteType
- (必填)- 门户名称
siteName - (必填)- 访客用户的嵌入式服务部署(MIAW)配置ID
guestEmbeddedServiceConfigId - (可选)- 认证用户的嵌入式服务部署(MIAW)配置ID
embeddedServiceConfigId - (可选)-
siteType(默认)或AURA。生成Experience Builder站点。请勿使用Visualforce。LWR - (可选)- 是否允许访客(未认证)用户访问站点
enableForGuest - (可选)- 接入站点品牌设置的Logo图片ContentDocument ID
contentDocumentId - (可选)- 针对
brandColors、action、link、border、text的RGBA颜色数组pageBackground
该API会根据站点名称自动设置URL路径前缀。无参数——通过templateName(Aura/LWR)选择框架,绝不使用Visualforce。siteType
Partner Portals (PRM):
合作伙伴门户(PRM):
- (required)
siteName - (required)
siteUrlPrefix - (required)
prmTemplate - (optional)
siteDesc
- (必填)
siteName - (必填)
siteUrlPrefix - (必填)
prmTemplate - (可选)
siteDesc
General Communities (POST /connect/communities
):
POST /connect/communities通用社区(POST /connect/communities
):
POST /connect/communities- (required)
name - (required) - alphanumeric only, no hyphens
urlPathPrefix - (required) - an Experience Builder template. Aura:
templateName(preferred for employee service),Agentforce Employee Center,Employee Portal,Customer Service,Help Center,Customer Account Portal,Partner Central. LWR:Build Your Own,Build Your Own (LWR). Validate the exact string viaMicrosite (LWR)(see below). Do not useGET /connect/communities/templates("VF Template") — it is a legacy Visualforce site with no Builder.Salesforce Tabs + Visualforce - (optional)
description
- (必填)
name - (必填)- 仅限字母数字,无连字符
urlPathPrefix - (必填)- Experience Builder模板。Aura模板:
templateName(员工服务首选)、Agentforce Employee Center、Employee Portal、Customer Service、Help Center、Customer Account Portal、Partner Central。LWR模板:Build Your Own、Build Your Own (LWR)。通过Microsite (LWR)验证准确字符串(见下文)。请勿使用GET /connect/communities/templates(“VF模板”)——这是无Builder功能的传统Visualforce站点。Salesforce Tabs + Visualforce - (可选)
description
Workflow
工作流程
Step 1: Determine API Based on Portal Type
步骤1:根据门户类型确定API
-
Employee Service / Self-Service →
POST /connect/self-service/site- Creates an Aura (or LWR) Experience Builder site — never Visualforce
- Wires MIAW (Embedded Service Deployment) into the site at creation time
- Prerequisites: permission; org has self-service site-creation API access; a guest Embedded Service Deployment exists
CustomizeApplication
-
Partner (PRM) →
POST /connect/prm/setup/sites- Prerequisites: feature
CommonPrmEnabled
- Prerequisites:
-
General Community →
POST /connect/communities- Uses an Experience Builder (Aura or LWR) — never
templateNameSalesforce Tabs + Visualforce - Prerequisites: Manage Communities permission ()
ManageNetworks
- Uses an Experience Builder
-
员工服务/自助服务 →
POST /connect/self-service/site- 创建Aura(或LWR)Experience Builder站点——绝不使用Visualforce
- 创建时将MIAW(嵌入式服务部署)接入站点
- 前置条件:拥有权限;组织已开通自助服务站点创建API访问权限;存在访客嵌入式服务部署
CustomizeApplication
-
合作伙伴(PRM) →
POST /connect/prm/setup/sites- 前置条件:已启用功能
CommonPrmEnabled
- 前置条件:已启用
-
通用社区 →
POST /connect/communities- 使用Experience Builder (Aura或LWR)——绝不使用
templateNameSalesforce Tabs + Visualforce - 前置条件:拥有管理社区权限()
ManageNetworks
- 使用Experience Builder
Step 2: Create Portal (By Type)
步骤2:按类型创建门户
Option A: Employee Service / Self-Service Portal
选项A:员工服务/自助服务门户
Use the self-service site API. It creates an Aura Experience Builder site (with the Builder option) by deploying CustomSite, Network, and ExperienceBundle metadata, then wires MIAW into the site via the given Embedded Service Deployment (ESD) config IDs. This is the correct path for ITSM / IT help desk / employee self-service portals.
API Call (via ):
mcp__headless-360__dispatchtext
method: "POST"
url: "/services/data/v67.0/connect/self-service/site"
body:
{
"siteName": "<portal-name>",
"siteType": "AURA",
"guestEmbeddedServiceConfigId": "<guest-ESD-config-id>",
"embeddedServiceConfigId": "<auth-ESD-config-id>",
"enableForGuest": true
}Poll with via .
GET /services/data/v67.0/connect/self-service/site/status/{jobId}mcp__headless-360__dispatch_readonly- defaults to
siteType(Aura Experience Builder + Builder). PassAURAonly if the user explicitly asks for a Lightning Web Runtime site. Never create a Visualforce site.LWR - is required — it is the MIAW Embedded Service Deployment config ID for guest users.
guestEmbeddedServiceConfigId(authenticated users) is optional. If the user has no Embedded Service Deployment yet, have them create one first (Setup → Embedded Service Deployments), or use the MIAW/embedded-service setup skill.embeddedServiceConfigId - Optional branding: (logo) and
contentDocumentId(array ofbrandColors).{ "type": "action|link|border|text|pageBackground", "color": { "r": 0-255, "g": 0-255, "b": 0-255, "a": 0-1 } }
Response:
json
{
"success": true,
"siteName": "IT Support Portal",
"urlPathPrefix": "itsupport",
"siteUrl": "https://domain.my.site.com/itsupport",
"jobId": "708...",
"status": "Queued"
}On success, report — the portal creation started (Aura + Experience Builder); give the
name, framework (Aura), , and , and note it is provisioning in the background
(Network, CustomSite, ExperienceBundle metadata + the Embedded Service/MIAW deployment). Next: monitor
the job (see 'Background Job Monitoring'), then complete Step 3 (Activate → Add Members → Publish).
Success:jobIdstatusOn failure, report with the — see the "Common Errors" section for the causes
(missing/invalid , duplicate name/URL prefix, org lacks self-service
site-creation API access, missing ) and their resolutions.
Failure:{error}guestEmbeddedServiceConfigIdCustomizeApplication使用自助服务站点API。它通过部署CustomSite、Network和ExperienceBundle元数据创建Aura Experience Builder站点(带Builder选项),然后通过指定的嵌入式服务部署(ESD)配置ID将MIAW接入站点。这是IT服务管理/IT服务台/员工自助服务门户的正确路径。
API调用(通过):
mcp__headless-360__dispatchtext
method: "POST"
url: "/services/data/v67.0/connect/self-service/site"
body:
{
"siteName": "<portal-name>",
"siteType": "AURA",
"guestEmbeddedServiceConfigId": "<guest-ESD-config-id>",
"embeddedServiceConfigId": "<auth-ESD-config-id>",
"enableForGuest": true
}通过调用进行轮询。
mcp__headless-360__dispatch_readonlyGET /services/data/v67.0/connect/self-service/site/status/{jobId}- 默认为
siteType(Aura Experience Builder + Builder)。仅当用户明确要求Lightning Web Runtime站点时才传入AURA。绝不创建Visualforce站点。LWR - 为必填项——这是访客用户的MIAW嵌入式服务部署配置ID。
guestEmbeddedServiceConfigId(认证用户)为可选。若用户尚无嵌入式服务部署,请引导他们先创建(设置→嵌入式服务部署),或使用MIAW/嵌入式服务设置技能。embeddedServiceConfigId - 可选品牌设置:(Logo)和
contentDocumentId(brandColors数组)。{ "type": "action|link|border|text|pageBackground", "color": { "r": 0-255, "g": 0-255, "b": 0-255, "a": 0-1 } }
响应:
json
{
"success": true,
"siteName": "IT Support Portal",
"urlPathPrefix": "itsupport",
"siteUrl": "https://domain.my.site.com/itsupport",
"jobId": "708...",
"status": "Queued"
}成功时,报告——门户创建已启动(Aura + Experience Builder);提供名称、框架(Aura)、和,并说明正在后台配置(Network、CustomSite、ExperienceBundle元数据 + 嵌入式服务/MIAW部署)。下一步:监控作业(参见“后台作业监控”),然后完成步骤3(激活→添加成员→发布)。
Success:jobIdstatus失败时,报告并附上——参见“常见错误”部分了解原因(缺失/无效、名称/URL前缀重复、组织无自助服务站点创建API访问权限、缺失权限)及解决方法。
Failure:{error}guestEmbeddedServiceConfigIdCustomizeApplicationOption B: Partner Portal (PRM)
选项B:合作伙伴门户(PRM)
API Call (via ):
mcp__headless-360__dispatchtext
method: "POST"
url: "/services/data/v67.0/connect/prm/setup/sites"
body:
{
"siteName": "<name>",
"siteUrlPrefix": "<url-prefix>",
"siteDesc": "<description>",
"prmTemplate": "<template-name>"
}Synchronous — no job polling.
Response:
json
{
"networkId": "0DB..."
}On success, report — the partner portal was created; give the name, ,
, and . Next: find it at Setup → Digital Experiences → All Sites (by
Network ID), then complete Step 3 (Activate → Add Members → Publish).
Success:networkIdsiteUrlPrefixprmTemplateOn failure, report — see "Common Errors" (org lacks PRM/, invalid PRM
template name, duplicate name/URL prefix). PRM templates: Setup → Digital Experiences → Settings →
Partner Templates.
Failure:CommonPrmEnabledAPI调用(通过):
mcp__headless-360__dispatchtext
method: "POST"
url: "/services/data/v67.0/connect/prm/setup/sites"
body:
{
"siteName": "<name>",
"siteUrlPrefix": "<url-prefix>",
"siteDesc": "<description>",
"prmTemplate": "<template-name>"
}同步操作——无需作业轮询。
响应:
json
{
"networkId": "0DB..."
}成功时,报告——合作伙伴门户已创建;提供名称、、和。下一步:在设置→Digital Experiences→所有站点(通过Network ID)中找到该门户,然后完成步骤3(激活→添加成员→发布)。
Success:networkIdsiteUrlPrefixprmTemplate失败时,报告——参见“常见错误”(组织未启用PRM/、PRM模板名称无效、名称/URL前缀重复)。PRM模板位置:设置→Digital Experiences→设置→合作伙伴模板。
Failure:CommonPrmEnabledOption C: General Community
选项C:通用社区
First, discover valid templates (required — accepted strings vary by org edition/version), via :
templateNamemcp__headless-360__dispatch_readonlytext
method: "GET"
url: "/services/data/v67.0/connect/communities/templates"Response: . Use a returned verbatim. Prefer an Experience Builder template (Aura or LWR). Never use .
{ "templates": [ { "publisher": "Salesforce", "templateName": "Employee Portal" }, … ], "total": N }templateNameSalesforce Tabs + VisualforceAPI Call (via ):
mcp__headless-360__dispatchtext
method: "POST"
url: "/services/data/v67.0/connect/communities"
body:
{
"name": "<name>",
"urlPathPrefix": "<url-prefix>",
"description": "<description>",
"templateName": "Agentforce Employee Center"
}The body accepts only — omit unless you need template-specific config.
{name, description, templateName, templateParams, urlPathPrefix}templateParamsFor an employee service / ITSM / HR portal, prefer the template when the org's live template list includes it — it ships IT/HR ticketing, a self-service catalog, a knowledge base, and an Agentforce-ready experience. Fall back to (then ) for a plainer, non-Agentforce site. Other options by use case: (Aura knowledge/deflection), (Aura authenticated account self-service), (Aura PRM), or for a modern blank LWR site.
Agentforce Employee CenterEmployee PortalCustomer ServiceHelp CenterCustomer Account PortalPartner CentralBuild Your Own (LWR)Agentforce Employee Center is two layers. Thiscall provisions the site only. The embedded Agentforce conversational assistant is a separate step — create the internal employee agent from its shipped template (POST /connect/communities) viaEmployeeCopilot__AgentforceEmployeeAgent(PATCH /services/data/v67.0/headless/invoke/einstein/genai-agentbuilder/create-copilot-from-templateis required), then activate it and wire it to the site. This skill provisions the site and points the user to that step; full Agentforce setup is out of scope. SeecopilotContext.company.references/templates.md
Response:
json
{
"jobId": "08P...",
"message": "Your site is almost ready. To track the site creation status, query the BackgroundOperation object and enter the jobId as the Id.",
"name": "Customer Community"
}On success, report — community creation started; give the name, , and
. Next: monitor the job (see 'Background Job Monitoring'), then complete Step 3 (Activate →
Add Members → Publish).
Success:jobIdmessageOn failure, report — see "Common Errors" (invalid — run
and use a returned value verbatim; duplicate
name/URL prefix; missing Manage Communities permission).
Failure:templateNameGET /services/data/v67.0/connect/communities/templates首先,发现有效模板(必填——不同组织版本/edition接受的字符串不同),通过调用:
templateNamemcp__headless-360__dispatch_readonlytext
method: "GET"
url: "/services/data/v67.0/connect/communities/templates"响应:。直接使用返回的。优先选择Experience Builder模板(Aura或LWR)。绝不使用。
{ "templates": [ { "publisher": "Salesforce", "templateName": "Employee Portal" }, … ], "total": N }templateNameSalesforce Tabs + VisualforceAPI调用(通过):
mcp__headless-360__dispatchtext
method: "POST"
url: "/services/data/v67.0/connect/communities"
body:
{
"name": "<name>",
"urlPathPrefix": "<url-prefix>",
"description": "<description>",
"templateName": "Agentforce Employee Center"
}请求体仅接受——除非需要模板特定配置,否则省略。
{name, description, templateName, templateParams, urlPathPrefix}templateParams对于员工服务/IT服务管理/HR门户,当组织的可用模板列表包含****时优先选择该模板——它内置IT/HR工单系统、自助服务目录、知识库,且支持Agentforce体验。若没有该模板, fallback到(再到)创建无Agentforce的简洁站点。其他场景选项:(Aura知识库/问题分流)、(Aura认证账户自助服务)、(Aura PRM),或用于创建现代空白LWR站点。
Agentforce Employee CenterEmployee PortalCustomer ServiceHelp CenterCustomer Account PortalPartner CentralBuild Your Own (LWR)Agentforce Employee Center分为两层。 此调用仅配置站点部分。内置的Agentforce对话助手是单独步骤——通过POST /connect/communities(PATCH /services/data/v67.0/headless/invoke/einstein/genai-agentbuilder/create-copilot-from-template为必填项)从其内置模板(copilotContext.company)创建内部员工代理,然后激活并接入站点。本技能仅配置站点并引导用户完成后续步骤;完整Agentforce设置不在本技能范围内。参见EmployeeCopilot__AgentforceEmployeeAgent。references/templates.md
响应:
json
{
"jobId": "08P...",
"message": "Your site is almost ready. To track the site creation status, query the BackgroundOperation object and enter the jobId as the Id.",
"name": "Customer Community"
}成功时,报告——社区创建已启动;提供名称、和。下一步:监控作业(参见“后台作业监控”),然后完成步骤3(激活→添加成员→发布)。
Success:jobIdmessage失败时,报告——参见“常见错误”(无效——调用并直接使用返回值;名称/URL前缀重复;缺失管理社区权限)。
Failure:templateNameGET /services/data/v67.0/connect/communities/templatesStep 3: Make the Site Reachable — Activate, Add Members, Publish
步骤3:实现站点可访问——激活、添加成员、发布
Creation only provisions the site — it comes back , admin-only, with
unpublished pages, so its URL is not reachable yet (the #1 "my portal doesn't work" cause).
Complete three steps, in order: (1) Activate — deploy the metadata with
; (2) Add members — add the target profile(s) to
(membership is profile-based, not per user; e.g. — a
Profile, not a UserRole) and redeploy (combinable with step 1); (3) Publish —
, then poll the returned on
until . Then confirm and give the user the login URL
(), not the bare prefix.
UnderConstructionNetwork<status>Live</status>networkMemberGroupsUnified Employeesf community publish --name "<Site Name>"jobIdBackgroundOperationCompletestatus: Live.../<prefix>/loginTooling exception: activate/members use the Metadata API (deploy) and publish usesNetwork— there is no Connect API for these (sf community publishreturns 405). This is the one place the skill uses tools other than headless-360; Step 3 reads still go through headless-360.PATCH /connect/communities
Exact commands, XML, verification queries, and gotchas: .
references/post-creation-activate-publish.md创建操作仅完成站点配置——站点初始状态为,仅管理员可访问,页面未发布,因此其URL无法访问(这是“我的门户无法工作”的头号原因)。按顺序完成三个步骤:(1) 激活——部署的元数据;(2) 添加成员——将目标配置文件添加到(成员资格基于配置文件,而非单个用户;例如**——配置文件,而非用户角色)并重新部署(可与步骤1合并);(3) 发布——执行,然后轮询返回的对应的直到状态为。然后确认并向用户提供登录URL**(,而非裸前缀)。
UnderConstruction<status>Live</status>NetworknetworkMemberGroupsUnified Employeesf community publish --name "<Site Name>"jobIdBackgroundOperationCompletestatus: Live.../<prefix>/login工具例外: 激活/添加成员使用元数据API(部署),发布使用**Network**——这些操作无对应的Connect API(sf community publish返回405)。这是本技能唯一不使用headless-360的场景;步骤3的读取/验证仍通过headless-360执行。PATCH /connect/communities/<id>
具体命令、XML、验证查询及注意事项:。
references/post-creation-activate-publish.mdStep 4: Write the Portal Creation Report (always — final step)
步骤4:撰写门户创建报告(必须执行——最终步骤)
Always finish by writing a summarizing what was done — this is the skill's final,
non-optional action, whether the create call succeeded, is still provisioning, or failed. Write it to
the working/output directory as .
report.mdreport.mdThe report must:
- Start with the heading .
# Portal Creation Report - State the portal name, the API used (,
self-service/site, orcommunities) and why (e.g. "no guest ESD present → communities API"), the framework (Aura / LWR), and the template orprmchosen.siteType - Give the dispatched request (path + key body fields) and the response (/
jobId/networkId/siteUrl, or the error).status - List the remaining Step 3 work (Activate → Add Members → Publish) and, for employee-service sites, note that the embedded Agentforce agent is a separate follow-up step.
- End with the sentinel line, exactly:
Task completed: portal creation dispatched — see report.md
Copy the template at and fill in the portal-specific values.
assets/report-template.md无论创建调用成功、仍在配置还是失败,都必须以撰写总结操作作为最终步骤——这是本技能的强制最终操作。将报告写入工作/输出目录,命名为。
report.mdreport.md报告必须包含:
- 以标题开头。
# Portal Creation Report - 说明门户名称、使用的API(、
self-service/site或communities)及原因(例如“无访客ESD → 使用communities API”)、使用的框架(Aura / LWR)、选择的模板或prm。siteType - 提供调度请求(路径 + 关键请求体字段)和响应(/
jobId/networkId/siteUrl,或错误信息)。status - 列出步骤3剩余工作(激活→添加成员→发布),对于员工服务站点,需注明内置Agentforce代理是单独的后续步骤。
- 以以下固定语句结尾:
Task completed: portal creation dispatched — see report.md
复制中的模板并填入门户专属信息。
assets/report-template.mdTemplate Recommendations
模板推荐
All recommendations produce Experience Builder sites (Aura or LWR). Never recommend ("VF Template") — it is legacy and has no Builder.
Salesforce Tabs + Visualforce| Use Case | API | Framework | Template / |
|---|---|---|---|
| Employee service / ITSM / HR / help desk (richest; Agentforce-ready) | | Aura | |
| Employee service / help desk (MIAW at creation, guest ESD exists) | | Aura | |
| Employee service / help desk (plainer, no Agentforce) | | Aura | |
| Customer support / self-service community | | Aura | |
| Knowledge base / case deflection | | Aura | |
| Authenticated account self-service | | Aura | |
| Partner portal (with PRM) | | Aura | Org-specific PRM template |
| Partner portal / channel (no PRM) | | Aura | |
| Modern blank / headless-friendly site | | LWR | |
Modern recommendations:
- For employee service / ITSM / HR portals, prefer the Aura template via the communities API — it ships the fullest employee experience (ticketing, catalog, knowledge, Agentforce-ready). The conversational assistant is a separate agent step (
Agentforce Employee Center). Use the self-service site API (EmployeeCopilot__AgentforceEmployeeAgent) instead when the portal needs MIAW wired in at creation time and a guest Embedded Service Deployment exists; usesiteType: AURAfor a plainer, non-Agentforce site.Employee Portal - For customer communities, use the template (Aura, mobile-responsive) via the communities API.
Customer Service
See for complete template documentation.
references/templates.md所有推荐模板均生成Experience Builder站点(Aura或LWR)。绝不推荐(“VF模板”)——这是无Builder功能的传统站点。
Salesforce Tabs + Visualforce| 使用场景 | API | 框架 | 模板 / |
|---|---|---|---|
| 员工服务/IT服务管理/HR/服务台(功能最丰富;支持Agentforce) | | Aura | |
| 员工服务/服务台(创建时配置MIAW,存在访客ESD) | | Aura | |
| 员工服务/服务台(简洁版,无Agentforce) | | Aura | |
| 客户支持/自助服务社区 | | Aura | |
| 知识库/问题分流 | | Aura | |
| 认证账户自助服务 | | Aura | |
| 合作伙伴门户(带PRM) | | Aura | 组织专属PRM模板 |
| 合作伙伴门户/渠道(无PRM) | | Aura | |
| 现代空白/无头友好站点 | | LWR | |
现代推荐:
- 对于员工服务/IT服务管理/HR门户,优先通过社区API使用**** Aura模板——它提供最完整的员工体验(工单、目录、知识库、支持Agentforce)。对话助手是单独的代理步骤(
Agentforce Employee Center)。当门户需要在创建时接入MIAW且存在访客嵌入式服务部署时,改用自助服务站点API(EmployeeCopilot__AgentforceEmployeeAgent);若需要简洁的无Agentforce站点,使用siteType: AURA。Employee Portal - 对于客户社区,通过社区API使用****模板(Aura,移动端适配)。
Customer Service
完整模板文档请参见。
references/templates.mdBackground Job Monitoring
后台作业监控
Portal creation is asynchronous (except PRM which is synchronous). Poll through
.
mcp__headless-360__dispatch_readonlySelf-service site path — use the dedicated typed status route (preferred):
text
method: "GET"
url: "/services/data/v67.0/connect/self-service/site/status/{jobId}"Returns .
{success, siteName, urlPathPrefix, siteUrl, error, jobId, status}Communities path — query via the regular REST query endpoint,
not :
BackgroundOperation/tooling/querytext
method: "GET"
url: "/services/data/v67.0/query"
queryParams: { "q": "SELECT Id, Status FROM BackgroundOperation WHERE Id = '<jobId>'" }Tooling vs. regular query (verified gotcha):is not a valid Tooling API sObject through this dispatcher —BackgroundOperationwith that SOQL returnsGET /services/data/vXX.0/tooling/query. Use the plain400 INVALID_TYPE "sObject type 'BackgroundOperation' is not supported."endpoint instead; it succeeds with the same SOQL string./services/data/vXX.0/query
Column discipline: on, select onlyBackgroundOperationandId.Status,JobType, andCompletedDateare not columns on this object and returnNumErrors. Use the SOQL string above exactly.INVALID_FIELD
Job statuses:
- /
Queued— waiting to startScheduled - /
InProgress— executingRunning - — finished successfully
Complete - — failed (check the
Errorfield on the status route)error
门户创建为异步操作(PRM除外,为同步操作)。通过进行轮询。
mcp__headless-360__dispatch_readonly自助服务站点路径——使用专用的状态路由(首选):
text
method: "GET"
url: "/services/data/v67.0/connect/self-service/site/status/{jobId}"返回。
{success, siteName, urlPathPrefix, siteUrl, error, jobId, status}社区路径——通过常规REST查询端点查询,请勿使用:
BackgroundOperation/tooling/querytext
method: "GET"
url: "/services/data/v67.0/query"
queryParams: { "q": "SELECT Id, Status FROM BackgroundOperation WHERE Id = '<jobId>'" }工具查询 vs 常规查询(已验证注意事项): 通过该调度器,并非有效的Tooling API sObject——使用该SOQL调用BackgroundOperation会返回GET /services/data/vXX.0/tooling/query。改用普通的400 INVALID_TYPE "sObject type 'BackgroundOperation' is not supported."端点;使用相同的SOQL字符串即可成功。/services/data/vXX.0/query
字段规范: 在中,仅选择BackgroundOperation和Id。Status、JobType和CompletedDate并非该对象的字段,会返回NumErrors。请严格使用上述SOQL字符串。INVALID_FIELD
作业状态:
- /
Queued— 等待启动Scheduled - /
InProgress— 执行中Running - — 执行成功
Complete - — 执行失败(查看状态路由的
Error字段)error
Verification
验证
After creation completes:
- API (primary): lists all Experience Cloud sites. Find the new one and confirm
mcp__headless-360__dispatch_readonly(url: "/services/data/v67.0/connect/communities", method: "GET")(Experience Builder — Aura/LWR) and a non-nullsiteAsContainerEnabled: true, and thatbuilderUrlis nottemplateName.Salesforce Tabs + Visualforcemeans a legacy Visualforce site — the bug this skill exists to avoid.siteAsContainerEnabled: false - Setup UI (optional): Setup → Digital Experiences → All Sites. The Framework column should show Aura (or LWR) — not Visualforce — with a Builder workspace link.
- Test URL: Use from the response (portal will be inactive initially).
siteUrl
Note: Portal must be activated and published before external users can access it.
创建完成后:
- API(主要方式): 列出所有Experience Cloud站点。找到新站点并确认
mcp__headless-360__dispatch_readonly(url: "/services/data/v67.0/connect/communities", method: "GET")(Experience Builder — Aura/LWR)且siteAsContainerEnabled: true非空,同时builderUrl不是templateName。Salesforce Tabs + Visualforce表示传统Visualforce站点——这正是本技能要避免的问题。siteAsContainerEnabled: false - 设置UI(可选): 设置→Digital Experiences→所有站点。框架列应显示Aura(或LWR)——而非Visualforce——且带有Builder工作区链接。
- 测试URL: 使用响应中的(门户初始状态为未激活)。
siteUrl
注意: 门户必须激活并发布后,外部用户才能访问。
Rules / Constraints
规则/约束
| Constraint | Rationale |
|---|---|
| Portal creation is asynchronous | Deploys metadata and provisions resources in background |
| Site names must be unique | Each portal needs distinct name within org |
| URL prefixes must be unique | URL paths cannot conflict |
| URL prefixes must be alphanumeric | No hyphens, spaces, or special characters allowed |
| PRM requires PRM feature | Gated by licensing and org config |
| Created portals start inactive | Must manually activate/publish after creation |
| Paths must include the API version prefix | |
| 约束 | 原因 |
|---|---|
| 门户创建为异步操作 | 在后台部署元数据并配置资源 |
| 站点名称必须唯一 | 组织内每个门户需有唯一名称 |
| URL前缀必须唯一 | URL路径不能冲突 |
| URL前缀必须为字母数字 | 不允许连字符、空格或特殊字符 |
| PRM需要PRM功能 | 受许可和组织配置限制 |
| 创建的门户初始状态为未激活 | 创建后需手动激活/发布 |
| 路径必须包含API版本前缀 | |
Prerequisites by Type
按类型划分的前置条件
Employee Service / Self-Service:
员工服务/自助服务:
- permission
CustomizeApplication - Communities/Digital Experience enabled
- Org has self-service site-creation API access enabled
- A guest Embedded Service Deployment (MIAW) config exists (its ID is required); optionally an authenticated-user ESD config
- 拥有权限
CustomizeApplication - 已启用社区/Digital Experience
- 组织已开通自助服务站点创建API访问权限
- 存在访客嵌入式服务部署(MIAW)配置(其ID为必填项);可选存在认证用户ESD配置
Partner (PRM):
合作伙伴(PRM):
- Org has
CommonPrmEnabled - Portal creation permissions
- Valid PRM template name
- 组织已启用
CommonPrmEnabled - 拥有门户创建权限
- 有效的PRM模板名称
General Community:
通用社区:
- Manage Communities permission ()
ManageNetworks - Communities/Digital Experience enabled
- Valid template name
- 拥有管理社区权限()
ManageNetworks - 已启用社区/Digital Experience
- 有效的模板名称
Common Errors
常见错误
Invalid URL prefix:
URL前缀无效:
"The URL can only contain alphanumeric characters. Remove hyphens, spaces, or special characters (e.g., 'employeeservice' not 'employee-service') and try a different prefix."
"URL只能包含字母数字字符。移除连字符、空格或特殊字符(例如使用'employeeservice'而非'employee-service')并尝试其他前缀。"
Invalid template name (general community path):
模板名称无效(通用社区路径):
"The specified template does not exist.
Resolution:
- Run and use a returned
GET /services/data/v67.0/connect/communities/templatesverbatimtemplateName - Prefer an Experience Builder template: (employee service),
Agentforce Employee Center,Employee Portal,Customer Service,Help Center,Customer Account Portal,Partner Central,Build Your OwnBuild Your Own (LWR) - Template names are case-sensitive — match exactly
- Do NOT use ("VF Template") — it is a legacy Visualforce site with no Builder"
Salesforce Tabs + Visualforce
"指定的模板不存在。
解决方法:
- 调用并直接使用返回的
GET /services/data/v67.0/connect/communities/templatestemplateName - 优先选择Experience Builder模板:(员工服务)、
Agentforce Employee Center、Employee Portal、Customer Service、Help Center、Customer Account Portal、Partner Central、Build Your OwnBuild Your Own (LWR) - 模板名称区分大小写——需完全匹配
- 请勿使用(“VF模板”)——这是无Builder功能的传统Visualforce站点"
Salesforce Tabs + Visualforce
Missing guest Embedded Service config (self-service path):
缺失访客嵌入式服务配置(自助服务路径):
"The self-service site API requires a guest Embedded Service Deployment config ID.
Resolution:
- Create an Embedded Service Deployment (MIAW) at Setup → Embedded Service Deployments, or use the MIAW/embedded-service setup skill
- Pass its config ID as (and optionally
guestEmbeddedServiceConfigIdfor authenticated users)"embeddedServiceConfigId
"自助服务站点API需要访客嵌入式服务部署配置ID。
解决方法:
- 在设置→嵌入式服务部署创建嵌入式服务部署(MIAW),或使用MIAW/嵌入式服务设置技能
- 将其配置ID作为传入(可选传入
guestEmbeddedServiceConfigId用于认证用户)"embeddedServiceConfigId
PRM not enabled:
PRM未启用:
"This org doesn't have Partner Relationship Management (PRM) enabled.
Options:
- Contact Salesforce to enable PRM feature
- Create a general community with the template instead (via Communities API)"
Partner Central
"该组织未启用合作伙伴关系管理(PRM)功能。
选项:
- 联系Salesforce启用PRM功能
- 改用模板创建通用社区(通过社区API)"
Partner Central
Duplicate name/URL:
名称/URL重复:
"A portal with this name or URL prefix already exists (the communities API returns — ).
400 INVALID_INPUTEnter a different name. That one already exists.Check existing portals: and scan the / fields.
mcp__headless-360__dispatch_readonly(url: "/services/data/v67.0/connect/communities", method: "GET")nameurlPathPrefixChoose a different name or URL prefix."
"已存在同名或同URL前缀的门户(社区API返回——)。
400 INVALID_INPUTEnter a different name. That one already exists.检查现有门户: 调用并查看 / 字段。
mcp__headless-360__dispatch_readonly(url: "/services/data/v67.0/connect/communities", method: "GET")nameurlPathPrefix选择其他名称或URL前缀。"
Missing permissions:
权限缺失:
"You don't have permission to create portals.
Required permissions:
- Self-service portals:
CustomizeApplication - General communities: (Manage Communities)
ManageNetworks
Contact your Salesforce admin to request these permissions."
"你没有创建门户的权限。
所需权限:
- 自助服务门户:
CustomizeApplication - 通用社区:(管理社区)
ManageNetworks
联系你的Salesforce管理员申请这些权限。"
Route not found (missing version prefix):
路由未找到(缺失版本前缀):
" on a path that otherwise matches this skill's documentation. Confirm the includes the full prefix — / require it verbatim and won't add it for you. If a specific version 404s, try the version shown in a recent / result for that org."
400 ROUTE_NOT_FOUNDurl/services/data/vXX.0/...dispatchdispatch_readonlydiscoverdescribe"路径与本技能文档匹配,但返回。确认包含完整的前缀——/要求完整路径,不会自动添加。若特定版本返回404,尝试使用该组织最近/结果中显示的版本。"
400 ROUTE_NOT_FOUNDurl/services/data/vXX.0/...dispatchdispatch_readonlydiscoverdescribeRelated Operations
相关操作
After creation:
- Activate portal — Setup → Digital Experiences → All Sites → Activate
- Configure branding — Customize colors, logo, theme
- Add pages/components — Use Experience Builder
- Set up user access — Profiles, permission sets, sharing rules
- Publish portal — Make accessible to external users
Manage existing:
- List portals —
mcp__headless-360__dispatch_readonly(url: "/services/data/v67.0/connect/communities", method: "GET") - Update settings — Network Tooling API or Metadata API
- Deactivate — Via Setup UI
创建后:
- 激活门户——设置→Digital Experiences→所有站点→激活
- 配置品牌——自定义颜色、Logo、主题
- 添加页面/组件——使用Experience Builder
- 设置用户访问权限——配置文件、权限集、共享规则
- 发布门户——向外部用户开放访问
管理现有门户:
- 列出门户——
mcp__headless-360__dispatch_readonly(url: "/services/data/v67.0/connect/communities", method: "GET") - 更新设置——Network Tooling API或元数据API
- 停用——通过设置UI
Important Notes
重要说明
- Creation is asynchronous (except PRM) and only provisions — APIs return a job ID and the portal comes back , member-less, and unpublished, so its URL is not reachable until you complete Step 3 (Activate → Add Members → Publish; see
UnderConstruction).references/post-creation-activate-publish.md - URL prefix becomes the site path — (serve/login at
https://<domain>.my.site.com/<prefix>, not the bare prefix)..../<prefix>/login - Embedded Service / MIAW configs must pre-exist — This skill does not create Embedded Service Deployments. Create them separately at Setup → Embedded Service Deployments (or via the MIAW/embedded-service setup skill), then pass the config IDs to the self-service site API. For general communities, MIAW is added post-creation via an Embedded Service component in Experience Builder.
- Template names are case-sensitive — Verify available templates in your org before attempting creation.
- discover/describe may not resolve a specific Connect API operation by id — the headless-360 corpus indexes many operations as multi-step SORs rather than single endpoints, and some standard Connect API writes (e.g. ) are not individually indexed. Do not conclude the capability is missing; dispatch the well-known, versioned Connect API path directly (documented in this skill).
POST /connect/communities
- 创建为异步操作(PRM除外)且仅完成配置——API返回作业ID,门户初始状态为,无成员且页面未发布,因此其URL无法访问,直到完成步骤3(激活→添加成员→发布;参见
UnderConstruction)。references/post-creation-activate-publish.md - URL前缀成为站点路径——(登录地址为
https://<domain>.my.site.com/<prefix>,而非裸前缀)。.../<prefix>/login - 嵌入式服务/MIAW配置必须预先存在——本技能不创建嵌入式服务部署。需单独在设置→嵌入式服务部署创建(或通过MIAW/嵌入式服务设置技能),然后将配置ID传入自助服务站点API。对于通用社区,MIAW需在创建后通过Experience Builder中的嵌入式服务组件添加。
- 模板名称区分大小写——创建前请验证组织中的可用模板。
- discover/describe可能无法通过id解析特定Connect API操作——headless-360语料库将许多操作索引为多步骤SOR而非单个端点,部分标准Connect API写入操作(例如)未单独索引。请勿判定该功能不存在;直接调度本技能中记录的已知带版本号的Connect API路径。
POST /connect/communities
Reference Documentation
参考文档
- — Read every session. Exact
references/mcp-invocation.mdcall shapes, the version-prefix requirement, response envelope, job monitoring,mcp__headless-360__*column/endpoint discipline, and gotchas.BackgroundOperation - — Available templates, template parameters, selection guide.
references/templates.md - — Step 3 (activate, add members, publish) to make the site reachable: the Metadata-API +
references/post-creation-activate-publish.mdpaths, the 405-on-PATCH gotcha,sf community publishcolumn discipline, and the login-URL note.NetworkMemberGroup - — Step 4
assets/report-template.mdtemplate to copy (heading, required fields, sentinel).report.md
- — 每次会话必看。
references/mcp-invocation.md的具体调用格式、版本前缀要求、响应包、作业监控、mcp__headless-360__*字段/端点规范及注意事项。BackgroundOperation - — 可用模板、模板参数、选择指南。
references/templates.md - — 步骤3(激活、添加成员、发布)实现站点可访问的方法:元数据API +
references/post-creation-activate-publish.md路径、PATCH返回405的注意事项、sf community publish字段规范、登录URL说明。NetworkMemberGroup - — 步骤4的
assets/report-template.md模板(标题、必填字段、固定结尾语句)。report.md
API Type Classification
API类型分类
Site creation is dispatched through / (never project-codey or raw HTTP). All paths include the prefix. Post-creation (Step 3) is the one exception: activating the Network and adding members use the Metadata API (), and publishing uses — there is no Connect API for these (a returns 405). Reads/verification for Step 3 still go through headless-360. Creation paths:
mcp__headless-360__dispatchmcp__headless-360__dispatch_readonly/services/data/vXX.0sf project deploy start --metadata Network:...sf community publishPATCH /connect/communities/<id>- Self-service portal: Connect API — asynchronous (poll
POST /services/data/vXX.0/connect/self-service/site)GET /services/data/vXX.0/connect/self-service/site/status/{jobId} - PRM portal: Connect API — synchronous
POST /services/data/vXX.0/connect/prm/setup/sites - General community: Connect API — asynchronous (poll
POST /services/data/vXX.0/connect/communitiesviaBackgroundOperation, notGET /services/data/vXX.0/query)/tooling/query
站点创建通过 / 调度(绝不使用project-codey或原生HTTP)。所有路径均包含前缀。创建后(步骤3)是唯一例外: 激活Network和添加成员使用元数据API(),发布使用****——这些操作无对应的Connect API(返回405)。步骤3的读取/验证仍通过headless-360执行。创建路径:
mcp__headless-360__dispatchmcp__headless-360__dispatch_readonly/services/data/vXX.0sf project deploy start --metadata Network:...sf community publishPATCH /connect/communities/<id>- 自助服务门户: Connect API — 异步(轮询
POST /services/data/vXX.0/connect/self-service/site)GET /services/data/vXX.0/connect/self-service/site/status/{jobId} - PRM门户: Connect API — 同步
POST /services/data/vXX.0/connect/prm/setup/sites - 通用社区: Connect API — 异步(通过
POST /services/data/vXX.0/connect/communities轮询GET /services/data/vXX.0/query,而非BackgroundOperation)/tooling/query