salesforce-metadata-mcp 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.3.0] - 2026-05-28
4
+
5
+ ### New Tools — 30 Additions Across 8 Categories
6
+
7
+ #### OmniStudio — FlexCards (4 new)
8
+ - `sf_create_flexcard` — Create an OmniStudio FlexCard (OmniUiCard) with data source, fields, actions, and states
9
+ - `sf_update_flexcard` — Update an existing FlexCard definition
10
+ - `sf_activate_flexcard` — Activate a FlexCard so it is visible on Lightning pages and Experience Cloud sites
11
+ - `sf_get_flexcard` — Retrieve a FlexCard's full configuration
12
+
13
+ #### OmniStudio — OmniScripts (4 new)
14
+ - `sf_create_omniscript` — Create an OmniScript guided interaction flow (Type/SubType/Language)
15
+ - `sf_update_omniscript` — Update an OmniScript's metadata properties
16
+ - `sf_activate_omniscript` — Activate an OmniScript for use in FlexCards and Experience Cloud
17
+ - `sf_get_omniscript` — Retrieve an OmniScript's configuration
18
+
19
+ #### OmniStudio — DataRaptors (2 new)
20
+ - `sf_create_dataraptor` — Create a DataRaptor interface (Extract, Transform, or Load) with field mappings
21
+ - `sf_get_dataraptor` — Retrieve a DataRaptor's configuration and mappings
22
+
23
+ #### OmniStudio — Integration Procedures (4 new)
24
+ - `sf_create_integration_procedure` — Create an Integration Procedure (server-side OmniScript orchestration)
25
+ - `sf_update_integration_procedure` — Update an Integration Procedure's metadata
26
+ - `sf_get_integration_procedure` — Retrieve an Integration Procedure's configuration
27
+ - `sf_activate_integration_procedure` — Activate an Integration Procedure
28
+
29
+ #### OmniStudio — Calculation Matrix & Procedure (2 new)
30
+ - `sf_create_calculation_matrix` — Create a Calculation Matrix for rule-based lookups and decision tables
31
+ - `sf_create_calculation_procedure` — Create a Calculation Procedure orchestrating multi-step calculations
32
+
33
+ #### OmniChannel — Service Channels & Routing (6 new)
34
+ - `sf_create_service_channel` — Create an OmniChannel Service Channel (Case, Chat, Messaging, Voice, Email, Custom)
35
+ - `sf_create_routing_configuration` — Create a Routing Configuration (LeastActive, MostAvailable, ExternalRouting)
36
+ - `sf_create_queue_routing_config` — Link a Routing Configuration to a Queue for OmniChannel routing
37
+ - `sf_create_presence_configuration` — Create a Presence Configuration (PresenceUserConfig) with channel assignments
38
+ - `sf_create_presence_status` — Create a Presence Status (Online, Busy, Offline) for agents
39
+ - `sf_assign_presence_status` — Grant Presence Status access to Profiles and Permission Sets
40
+
41
+ #### OmniChannel — Skills & Field Service (4 new)
42
+ - `sf_create_skill` — Create a Skill for skill-based routing or Field Service Lightning
43
+ - `sf_assign_skill_to_agent` — Assign a Skill to a service agent (creates ServiceResource if needed)
44
+ - `sf_create_service_territory` — Create a Field Service Service Territory with optional operating hours
45
+ - `sf_create_work_type` — Create a Field Service Work Type with duration, block times, and skill requirements
46
+
47
+ #### Messaging, Chat & Voice (4 new)
48
+ - `sf_create_messaging_channel` — Create a Messaging Channel (SMS, WhatsApp, Facebook, Apple Messages, etc.)
49
+ - `sf_create_chat_button` — Create a Live Chat button for embedding on websites
50
+ - `sf_create_embedded_service` — Create an Embedded Service deployment bundling Chat or Messaging for websites
51
+ - `sf_create_bot_routing` — Configure Einstein Bot escalation to a human agent queue via BotVersion transfer dialog
52
+
53
+ ### Bug Fixes
54
+ - Fixed `SetExperienceSiteBrandingSchema` — parameters now correctly match the `setExperienceSiteBranding` service function (`brandingSetName`, `label`, `properties[]` instead of individual color fields)
55
+
56
+ ### CI/CD
57
+ - Added `.github/workflows/ci.yml` — build and module load validation on every push/PR
58
+ - Added `.github/workflows/publish.yml` — automated npm publish on `v*` tag push
59
+ - Added `.github/workflows/sf-release-monitor.yml` — opens a release review issue 3× per year (Feb, Jun, Oct)
60
+ - Added `.github/workflows/api-version-bump.yml` — auto PR to bump API version on Salesforce release dates
61
+ - Added `.github/ISSUE_TEMPLATE/sf-release-review.md` — structured checklist for Salesforce release reviews
62
+
63
+ ---
64
+
3
65
  ## [2.2.0] - 2026-05-28
4
66
 
5
67
  ### New Tools — 47 Additions Across 10 Categories
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # salesforce-metadata-mcp
2
2
 
3
- [![Version](https://img.shields.io/badge/version-2.2.0-blue.svg)](https://npmjs.com/package/salesforce-metadata-mcp)
3
+ [![Version](https://img.shields.io/badge/version-2.3.0-blue.svg)](https://npmjs.com/package/salesforce-metadata-mcp)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
5
  [![MCP Compatible](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io)
6
6
 
7
- **The most comprehensive Salesforce MCP server.** 110+ tools for building, configuring, and automating Salesforce orgs directly from Claude or any MCP client — covering metadata, Apex, LWC, Agentforce agents, Experience Cloud, bulk data, users, reports, security, and more.
7
+ **The most comprehensive Salesforce MCP server.** 140+ tools for building, configuring, and automating Salesforce orgs directly from Claude or any MCP client — covering metadata, Apex, LWC, Agentforce agents, OmniStudio, OmniChannel, Experience Cloud, Field Service, Messaging, bulk data, users, reports, security, and more.
8
8
 
9
9
  ---
10
10
 
@@ -46,6 +46,23 @@ See [SETUP.md](SETUP.md) for all authentication methods and detailed setup instr
46
46
 
47
47
  ---
48
48
 
49
+ ## What's New in v2.3.0
50
+
51
+ 30 new tools across 8 categories:
52
+
53
+ - **OmniStudio — FlexCards** — Create, update, activate, and get FlexCards (OmniUiCard)
54
+ - **OmniStudio — OmniScripts** — Create, update, activate, and get OmniScripts
55
+ - **OmniStudio — DataRaptors** — Create Extract/Transform/Load DataRaptor interfaces
56
+ - **OmniStudio — Integration Procedures** — Create, update, activate, and get Integration Procedures
57
+ - **OmniStudio — Calculation Matrix & Procedure** — Create decision tables and multi-step calculation procedures
58
+ - **OmniChannel — Service Channels & Routing** — Service Channels, Routing Configurations, Queue links, Presence Configurations and Statuses
59
+ - **OmniChannel — Skills & Field Service** — Create skills, assign to agents, create Service Territories and Work Types
60
+ - **Messaging, Chat & Voice** — Messaging Channels (SMS/WhatsApp/etc.), Live Chat Buttons, Embedded Service deployments, Bot escalation routing
61
+
62
+ See [CHANGELOG.md](CHANGELOG.md) for the full release notes.
63
+
64
+ ---
65
+
49
66
  ## What's New in v2.2.0
50
67
 
51
68
  47 new tools across 10 categories:
@@ -65,7 +82,7 @@ See [CHANGELOG.md](CHANGELOG.md) for the full release notes.
65
82
 
66
83
  ---
67
84
 
68
- ## Tools (110+)
85
+ ## Tools (140+)
69
86
 
70
87
  ### Objects & Fields
71
88
  | Tool | Description |
@@ -233,6 +250,44 @@ See [CHANGELOG.md](CHANGELOG.md) for the full release notes.
233
250
  | `sf_retrieve_metadata` | Retrieve metadata from the org |
234
251
  | `sf_list_metadata` | List all components of a metadata type |
235
252
 
253
+ ### OmniStudio
254
+ | Tool | Description |
255
+ |------|-------------|
256
+ | `sf_create_flexcard` | Create an OmniStudio FlexCard with data source, fields, and actions |
257
+ | `sf_update_flexcard` | Update an existing FlexCard |
258
+ | `sf_activate_flexcard` | Activate a FlexCard |
259
+ | `sf_get_flexcard` | Get FlexCard configuration |
260
+ | `sf_create_omniscript` | Create an OmniScript guided interaction flow |
261
+ | `sf_update_omniscript` | Update an OmniScript |
262
+ | `sf_activate_omniscript` | Activate an OmniScript |
263
+ | `sf_get_omniscript` | Get OmniScript configuration |
264
+ | `sf_create_dataraptor` | Create a DataRaptor interface (Extract/Transform/Load) |
265
+ | `sf_get_dataraptor` | Get DataRaptor configuration |
266
+ | `sf_create_integration_procedure` | Create an Integration Procedure |
267
+ | `sf_update_integration_procedure` | Update an Integration Procedure |
268
+ | `sf_get_integration_procedure` | Get Integration Procedure configuration |
269
+ | `sf_activate_integration_procedure` | Activate an Integration Procedure |
270
+ | `sf_create_calculation_matrix` | Create a Calculation Matrix for rule-based lookups |
271
+ | `sf_create_calculation_procedure` | Create a Calculation Procedure with multi-step logic |
272
+
273
+ ### OmniChannel & Field Service
274
+ | Tool | Description |
275
+ |------|-------------|
276
+ | `sf_create_service_channel` | Create an OmniChannel Service Channel |
277
+ | `sf_create_routing_configuration` | Create a Routing Configuration |
278
+ | `sf_create_queue_routing_config` | Link a Routing Configuration to a Queue |
279
+ | `sf_create_presence_configuration` | Create a Presence Configuration for agents |
280
+ | `sf_create_presence_status` | Create a Presence Status |
281
+ | `sf_assign_presence_status` | Assign Presence Status to Profiles/Permission Sets |
282
+ | `sf_create_skill` | Create a Skill for routing or Field Service |
283
+ | `sf_assign_skill_to_agent` | Assign a Skill to a service agent |
284
+ | `sf_create_service_territory` | Create a Field Service Service Territory |
285
+ | `sf_create_work_type` | Create a Field Service Work Type |
286
+ | `sf_create_messaging_channel` | Create a Messaging Channel (SMS, WhatsApp, etc.) |
287
+ | `sf_create_chat_button` | Create a Live Chat Button |
288
+ | `sf_create_embedded_service` | Create an Embedded Service deployment |
289
+ | `sf_create_bot_routing` | Configure bot escalation to a human agent queue |
290
+
236
291
  ### MCP Server Management
237
292
  | Tool | Description |
238
293
  |------|-------------|
@@ -289,6 +344,21 @@ See [CHANGELOG.md](CHANGELOG.md) for the full release notes.
289
344
 
290
345
  ---
291
346
 
347
+ ## CI/CD & Maintenance
348
+
349
+ This repository includes GitHub Actions workflows for automated maintenance:
350
+
351
+ | Workflow | Trigger | Action |
352
+ |----------|---------|--------|
353
+ | `ci.yml` | Push / PR | Build and verify module loads |
354
+ | `publish.yml` | Push tag `v*` | Publish to npm with provenance |
355
+ | `sf-release-monitor.yml` | Feb 1, Jun 1, Oct 1 | Opens a Salesforce release review issue |
356
+ | `api-version-bump.yml` | Feb 1, Jun 1, Oct 1 | Creates a PR to bump the API version |
357
+
358
+ To publish a new version: bump the version in `package.json`, update `CHANGELOG.md`, then push a `vX.Y.Z` tag. The publish workflow handles the rest.
359
+
360
+ ---
361
+
292
362
  ## License
293
363
 
294
364
  MIT
package/dist/index.js CHANGED
@@ -6,14 +6,14 @@ import { createServer } from "http";
6
6
  import { registerTools } from "./tools/index.js";
7
7
  const server = new McpServer({
8
8
  name: "salesforce-metadata-mcp",
9
- version: "2.1.0",
9
+ version: "2.3.0",
10
10
  });
11
11
  registerTools(server);
12
12
  // ─── Transport: stdio ─────────────────────────────────────────────────────────
13
13
  async function runStdio() {
14
14
  const transport = new StdioServerTransport();
15
15
  await server.connect(transport);
16
- console.error("Salesforce Metadata MCP server v2.2.0 running on stdio");
16
+ console.error("Salesforce Metadata MCP server v2.3.0 running on stdio");
17
17
  }
18
18
  // ─── Transport: HTTP ──────────────────────────────────────────────────────────
19
19
  function readBody(req) {
@@ -38,7 +38,7 @@ async function runHTTP() {
38
38
  const url = req.url ?? "/";
39
39
  if (url === "/health" && req.method === "GET") {
40
40
  res.writeHead(200, { "Content-Type": "application/json" });
41
- res.end(JSON.stringify({ status: "ok", server: "salesforce-metadata-mcp", version: "2.1.0" }));
41
+ res.end(JSON.stringify({ status: "ok", server: "salesforce-metadata-mcp", version: "2.3.0"}));
42
42
  return;
43
43
  }
44
44
  if (url === "/mcp" && req.method === "POST") {
@@ -64,7 +64,7 @@ async function runHTTP() {
64
64
  res.end(JSON.stringify({ error: "Not found" }));
65
65
  });
66
66
  httpServer.listen(port, () => {
67
- console.error(`Salesforce Metadata MCP server v2.2.0 running on http://localhost:${port}/mcp`);
67
+ console.error(`Salesforce Metadata MCP server v2.3.0 running on http://localhost:${port}/mcp`);
68
68
  });
69
69
  }
70
70
  // ─── Entry point ──────────────────────────────────────────────────────────────
@@ -1407,10 +1407,264 @@ export const CreateExperienceSiteMemberSchema = z.object({
1407
1407
  }).strict();
1408
1408
  export const SetExperienceSiteBrandingSchema = z.object({
1409
1409
  siteName: z.string().min(1).describe("Experience Cloud site API name"),
1410
- primaryColor: z.string().optional().describe("Primary brand color as hex, e.g. '#0176D3'"),
1411
- secondaryColor: z.string().optional().describe("Secondary brand color as hex"),
1412
- backgroundColor: z.string().optional().describe("Page background color as hex"),
1413
- headerBackgroundColor: z.string().optional().describe("Header background color as hex"),
1414
- logoUrl: z.string().url().optional().describe("Logo image URL"),
1410
+ brandingSetName: z.string().min(1).describe("API name for the BrandingSet metadata component"),
1411
+ label: z.string().optional().describe("Human-readable label for the branding set"),
1412
+ properties: z.array(z.object({
1413
+ name: z.string().min(1).describe("Branding token name, e.g. 'brandingDesignTokenPrimaryColor'"),
1414
+ value: z.string().min(1).describe("Token value, e.g. '#0070D2'"),
1415
+ })).optional().describe("Branding property name/value pairs"),
1416
+ }).strict();
1417
+ // ─── OMNISTUDIO (v2.3.0) ──────────────────────────────────────────────────────
1418
+ const OmniCardFieldSchema = z.object({ fieldName: z.string().min(1), label: z.string().min(1), type: z.string().default("Text") });
1419
+ const OmniCardActionSchema = z.object({ label: z.string().min(1), type: z.enum(["omniscript","url","flow","navigation"]).default("navigation"), target: z.string().min(1) });
1420
+ const OmniCardStateConditionSchema = z.object({ field: z.string().min(1), operator: z.string().default("=="), value: z.string() });
1421
+ const OmniCardStateSchema = z.object({ name: z.string().min(1), conditionType: z.enum(["ALL","ANY","CUSTOM"]).default("ALL"), conditions: z.array(OmniCardStateConditionSchema).optional() });
1422
+ export const CreateFlexCardSchema = z.object({
1423
+ cardName: z.string().min(1).max(80).describe("API name of the FlexCard (OmniUiCard)"),
1424
+ label: z.string().min(1).max(255).describe("Human-readable label"),
1425
+ objectApiName: z.string().optional().describe("Primary SObject, e.g. 'Account'"),
1426
+ dataSourceType: z.enum(["SOQL","DataRaptor","Integration Procedure","Apex","None"]).default("SOQL"),
1427
+ dataSourceName: z.string().optional().describe("SOQL query, DataRaptor name, or Integration Procedure name"),
1428
+ fields: z.array(OmniCardFieldSchema).optional().describe("Fields to display on the card"),
1429
+ actions: z.array(OmniCardActionSchema).optional().describe("Card actions"),
1430
+ states: z.array(OmniCardStateSchema).optional().describe("Conditional states"),
1431
+ description: z.string().optional(),
1432
+ }).strict();
1433
+ export const UpdateFlexCardSchema = z.object({
1434
+ cardName: z.string().min(1).max(80).describe("API name of the FlexCard to update"),
1435
+ label: z.string().optional(),
1436
+ dataSourceType: z.enum(["SOQL","DataRaptor","Integration Procedure","Apex","None"]).optional(),
1437
+ dataSourceName: z.string().optional(),
1438
+ fields: z.array(OmniCardFieldSchema).optional(),
1439
+ actions: z.array(OmniCardActionSchema).optional(),
1440
+ states: z.array(OmniCardStateSchema).optional(),
1441
+ description: z.string().optional(),
1442
+ }).strict();
1443
+ export const ActivateFlexCardSchema = z.object({
1444
+ cardName: z.string().min(1).max(80).describe("API name of the FlexCard to activate"),
1445
+ }).strict();
1446
+ export const GetFlexCardSchema = z.object({
1447
+ cardName: z.string().min(1).max(80).describe("API name of the FlexCard to retrieve"),
1448
+ }).strict();
1449
+ const OmniElementSchema = z.object({
1450
+ name: z.string().min(1),
1451
+ type: z.enum(["Text","Input","Select","Radio","Checkbox","Step","Group","TypeAhead","Formula","RemoteAction","DataRaptor","IntegrationProcedure","Disclosure","Navigation","Block"]),
1452
+ label: z.string().min(1),
1453
+ properties: z.record(z.unknown()).optional().describe("Element-specific configuration properties"),
1454
+ });
1455
+ export const CreateOmniScriptSchema = z.object({
1456
+ scriptName: z.string().min(1).max(80).describe("API name identifier portion (used in fullName as Type_SubType_Language)"),
1457
+ label: z.string().min(1).max(255),
1458
+ type: z.string().min(1).describe("OmniScript type, e.g. 'Account', 'Claims'"),
1459
+ subType: z.string().min(1).describe("OmniScript sub-type, e.g. 'Create', 'Edit'"),
1460
+ language: z.string().default("English").describe("Language label, default English"),
1461
+ isLwcEnabled: z.boolean().default(true).describe("Use LWC runtime (recommended for new scripts)"),
1462
+ isOmniScriptEmbeddable: z.boolean().default(false).describe("Allow embedding in OmniStudio cards"),
1463
+ elements: z.array(OmniElementSchema).optional().describe("Script elements; complex structures are set via the OmniScript designer"),
1464
+ description: z.string().optional(),
1465
+ }).strict();
1466
+ export const UpdateOmniScriptSchema = z.object({
1467
+ type: z.string().min(1).describe("OmniScript type"),
1468
+ subType: z.string().min(1).describe("OmniScript sub-type"),
1469
+ language: z.string().default("English"),
1470
+ description: z.string().optional(),
1471
+ isLwcEnabled: z.boolean().optional(),
1472
+ isOmniScriptEmbeddable: z.boolean().optional(),
1473
+ }).strict();
1474
+ export const ActivateOmniScriptSchema = z.object({
1475
+ type: z.string().min(1).describe("OmniScript type"),
1476
+ subType: z.string().min(1).describe("OmniScript sub-type"),
1477
+ language: z.string().default("English"),
1478
+ }).strict();
1479
+ export const GetOmniScriptSchema = z.object({
1480
+ type: z.string().min(1).describe("OmniScript type"),
1481
+ subType: z.string().min(1).describe("OmniScript sub-type"),
1482
+ language: z.string().default("English"),
1483
+ }).strict();
1484
+ const DataRaptorFieldMappingSchema = z.object({
1485
+ sourceField: z.string().min(1).describe("Source field path, e.g. 'Account.Name' or JSONPath '$.Name'"),
1486
+ targetField: z.string().min(1).describe("Target field or JSON key"),
1487
+ dataType: z.enum(["String","Number","Boolean","Date","Object","Array"]).default("String"),
1488
+ formula: z.string().optional().describe("Optional formula or transformation expression"),
1489
+ });
1490
+ export const CreateDataRaptorSchema = z.object({
1491
+ dataRaptorName: z.string().min(1).max(80).describe("API name of the DataRaptor"),
1492
+ label: z.string().min(1).max(255),
1493
+ interfaceType: z.enum(["Extract","Transform","Load"]).describe("DataRaptor type: Extract reads from SF, Transform maps data, Load writes to SF"),
1494
+ objectApiName: z.string().optional().describe("Primary SObject for Extract or Load (e.g. 'Account')"),
1495
+ fields: z.array(DataRaptorFieldMappingSchema).optional().describe("Field mappings"),
1496
+ filterCriteria: z.string().optional().describe("SOQL WHERE clause for Extract, e.g. 'Id = :recordId'"),
1497
+ description: z.string().optional(),
1498
+ }).strict();
1499
+ export const GetDataRaptorSchema = z.object({
1500
+ dataRaptorName: z.string().min(1).max(80).describe("API name of the DataRaptor to retrieve"),
1501
+ }).strict();
1502
+ const IPElementSchema = z.object({
1503
+ name: z.string().min(1),
1504
+ type: z.enum(["DataRaptor","HTTPAction","Response","Loop","Conditional","SetValues","ExceptionBlock","Matrix","OmniScript","Aggregate"]),
1505
+ properties: z.record(z.unknown()).optional().describe("Element configuration (DataRaptor name, HTTP method/endpoint, etc.)"),
1506
+ inputMap: z.record(z.string()).optional().describe("Input parameter mappings {targetKey: 'sourceExpression'}"),
1507
+ outputMap: z.record(z.string()).optional().describe("Output parameter mappings {sourceKey: 'targetPath'}"),
1508
+ });
1509
+ export const CreateIntegrationProcedureSchema = z.object({
1510
+ procedureName: z.string().min(1).max(80).describe("Type portion of procedure key, e.g. 'Account'"),
1511
+ subType: z.string().min(1).describe("Sub-type portion, e.g. 'GetDetails' — fullName = type_subType"),
1512
+ label: z.string().min(1).max(255),
1513
+ elements: z.array(IPElementSchema).optional().describe("Procedure elements (DataRaptor, HTTP calls, conditionals)"),
1514
+ isActive: z.boolean().default(false).describe("Activate immediately after creation"),
1515
+ description: z.string().optional(),
1516
+ }).strict();
1517
+ export const UpdateIntegrationProcedureSchema = z.object({
1518
+ procedureName: z.string().min(1).max(80).describe("Type portion of procedure key"),
1519
+ subType: z.string().min(1),
1520
+ description: z.string().optional(),
1521
+ isActive: z.boolean().optional(),
1522
+ }).strict();
1523
+ export const GetIntegrationProcedureSchema = z.object({
1524
+ procedureName: z.string().min(1).max(80),
1525
+ subType: z.string().min(1),
1526
+ }).strict();
1527
+ export const ActivateIntegrationProcedureSchema = z.object({
1528
+ procedureName: z.string().min(1).max(80),
1529
+ subType: z.string().min(1),
1530
+ }).strict();
1531
+ const CalcVariableSchema = z.object({ name: z.string().min(1), dataType: z.enum(["String","Number","Boolean","Date"]).default("String") });
1532
+ export const CreateCalculationMatrixSchema = z.object({
1533
+ matrixName: z.string().min(1).max(80).describe("API name of the Calculation Matrix"),
1534
+ label: z.string().min(1).max(255),
1535
+ inputVariables: z.array(CalcVariableSchema).min(1).describe("Input column definitions"),
1536
+ outputVariables: z.array(CalcVariableSchema).min(1).describe("Output column definitions"),
1537
+ rows: z.array(z.record(z.string())).optional().describe("Matrix rows: array of {inputVarName: value, ..., outputVarName: value}"),
1538
+ description: z.string().optional(),
1539
+ }).strict();
1540
+ const CalcStepSchema = z.object({
1541
+ name: z.string().min(1),
1542
+ type: z.enum(["Matrix","Expression","Loop","Condition"]).default("Expression"),
1543
+ matrixName: z.string().optional().describe("For Matrix steps: CalculationMatrix API name"),
1544
+ expression: z.string().optional().describe("For Expression steps: formula string"),
1545
+ inputMap: z.record(z.string()).optional(),
1546
+ outputMap: z.record(z.string()).optional(),
1547
+ });
1548
+ export const CreateCalculationProcedureSchema = z.object({
1549
+ procedureName: z.string().min(1).max(80).describe("API name of the Calculation Procedure"),
1550
+ label: z.string().min(1).max(255),
1551
+ steps: z.array(CalcStepSchema).optional().describe("Procedure steps"),
1552
+ description: z.string().optional(),
1553
+ }).strict();
1554
+ // ─── OMNICHANNEL (v2.3.0) ────────────────────────────────────────────────────
1555
+ export const CreateServiceChannelSchema = z.object({
1556
+ channelName: z.string().min(1).max(80).describe("API name / DeveloperName of the Service Channel"),
1557
+ label: z.string().min(1).max(255),
1558
+ channelType: z.enum(["Case","Chat","Messaging","Voice","Email","SocialPost","Custom"]).default("Case"),
1559
+ relatedObjectApiName: z.string().optional().describe("SObject routed via this channel, default 'Case'"),
1560
+ capacity: z.number().int().min(1).max(100).default(1).describe("Capacity weight for this channel"),
1561
+ }).strict();
1562
+ export const CreateRoutingConfigurationSchema = z.object({
1563
+ configName: z.string().min(1).max(80).describe("API name of the RoutingConfiguration"),
1564
+ label: z.string().min(1).max(255),
1565
+ routingModel: z.enum(["LeastActive","MostAvailable","ExternalRouting"]).default("LeastActive"),
1566
+ capacity: z.number().min(0).max(100).default(100).describe("Capacity percentage or item count"),
1567
+ priority: z.number().int().min(1).default(1).describe("Routing priority (lower number = higher priority)"),
1568
+ unitType: z.enum(["Percentage","Items"]).default("Percentage"),
1569
+ pushTimeout: z.number().int().min(0).optional().describe("Seconds before push routing times out (0 = no timeout)"),
1570
+ description: z.string().optional(),
1571
+ }).strict();
1572
+ export const CreateQueueRoutingConfigSchema = z.object({
1573
+ queueDeveloperName: z.string().min(1).max(80).describe("DeveloperName of the existing queue"),
1574
+ routingConfigName: z.string().min(1).max(80).describe("API name of the RoutingConfiguration to link"),
1575
+ }).strict();
1576
+ export const CreatePresenceConfigurationSchema = z.object({
1577
+ configName: z.string().min(1).max(80).describe("API name of the PresenceUserConfig"),
1578
+ label: z.string().min(1).max(255),
1579
+ capacity: z.number().int().min(1).max(100).default(10).describe("Maximum concurrent work items per agent"),
1580
+ serviceChannels: z.array(z.object({ channelName: z.string().min(1), capacity: z.number().int().min(1).optional() })).optional(),
1581
+ allowAgentsToChangeStatus: z.boolean().default(true),
1582
+ description: z.string().optional(),
1583
+ }).strict();
1584
+ export const CreatePresenceStatusSchema = z.object({
1585
+ statusName: z.string().min(1).max(80).describe("API name / DeveloperName of the Presence Status"),
1586
+ label: z.string().min(1).max(255),
1587
+ statusType: z.enum(["Online","Busy","Offline"]).default("Online"),
1588
+ serviceChannels: z.array(z.string()).optional().describe("ServiceChannel API names to associate"),
1589
+ }).strict();
1590
+ export const AssignPresenceStatusSchema = z.object({
1591
+ statusName: z.string().min(1).max(80).describe("API name of the ServicePresenceStatus"),
1592
+ profiles: z.array(z.string()).optional().describe("Profile API names to grant access"),
1593
+ permissionSets: z.array(z.string()).optional().describe("Permission Set API names to grant access"),
1594
+ }).strict();
1595
+ export const CreateSkillSchema = z.object({
1596
+ skillName: z.string().min(1).max(80).describe("DeveloperName / API name of the skill"),
1597
+ label: z.string().min(1).max(255),
1598
+ description: z.string().optional(),
1599
+ }).strict();
1600
+ export const AssignSkillToAgentSchema = z.object({
1601
+ skillName: z.string().min(1).max(80).describe("Skill DeveloperName"),
1602
+ username: z.string().min(1).describe("Salesforce username of the service agent"),
1603
+ skillLevel: z.number().min(0).max(10).default(5).describe("Proficiency level 0 (novice) to 10 (expert)"),
1604
+ }).strict();
1605
+ export const CreateServiceTerritorySchema = z.object({
1606
+ territoryName: z.string().min(1).max(80).describe("Name of the Service Territory"),
1607
+ label: z.string().min(1).max(255),
1608
+ isActive: z.boolean().default(true),
1609
+ operatingHoursName: z.string().optional().describe("Name of the OperatingHours record to link"),
1610
+ street: z.string().optional(),
1611
+ city: z.string().optional(),
1612
+ state: z.string().optional(),
1613
+ country: z.string().optional(),
1614
+ postalCode: z.string().optional(),
1615
+ }).strict();
1616
+ export const CreateWorkTypeSchema = z.object({
1617
+ workTypeName: z.string().min(1).max(80).describe("Name of the Work Type"),
1618
+ label: z.string().min(1).max(255).describe("Display label (used as Name field)"),
1619
+ estimatedDuration: z.number().min(1).describe("Estimated work duration value"),
1620
+ durationType: z.enum(["Minutes","Hours"]).default("Minutes"),
1621
+ blockTimeBeforeWork: z.number().min(0).default(0).describe("Buffer time before work in minutes"),
1622
+ blockTimeAfterWork: z.number().min(0).default(0).describe("Buffer time after work in minutes"),
1623
+ skillRequirements: z.array(z.string()).optional().describe("Required Skill DeveloperNames"),
1624
+ description: z.string().optional(),
1625
+ }).strict();
1626
+ export const CreateMessagingChannelSchema = z.object({
1627
+ channelName: z.string().min(1).max(80).describe("API name / MasterLabel for the Messaging Channel"),
1628
+ label: z.string().min(1).max(255),
1629
+ channelType: z.enum(["SMS","WhatsApp","Facebook","AppleMessages","GoogleBusinessMessages","LINE","Voice"]),
1630
+ phoneNumber: z.string().optional().describe("Phone number for SMS/WhatsApp channels"),
1631
+ pageId: z.string().optional().describe("Facebook Page ID for Facebook Messenger"),
1632
+ routingType: z.enum(["Queue","Bot","None"]).default("Queue"),
1633
+ queueName: z.string().optional().describe("Queue DeveloperName to route work items to"),
1634
+ botName: z.string().optional().describe("Bot API name for bot-first routing"),
1635
+ description: z.string().optional(),
1636
+ }).strict();
1637
+ export const CreateChatButtonSchema = z.object({
1638
+ buttonName: z.string().min(1).max(80).describe("API name / DeveloperName of the chat button"),
1639
+ label: z.string().min(1).max(255),
1640
+ routingType: z.enum(["Queue","Bot"]).default("Queue"),
1641
+ queueName: z.string().optional().describe("Queue DeveloperName for queue-based routing"),
1642
+ botName: z.string().optional().describe("Bot name for bot-first routing"),
1643
+ windowLanguage: z.string().default("en").describe("Chat window language code, e.g. 'en', 'fr', 'de'"),
1644
+ inviteRenderer: z.string().optional().describe("Custom invite Visualforce page/LWC component name"),
1645
+ customAgentName: z.string().optional().describe("Agent display name shown in chat window"),
1646
+ optionsHasTimeoutAlert: z.boolean().default(false),
1647
+ description: z.string().optional(),
1648
+ }).strict();
1649
+ export const CreateEmbeddedServiceSchema = z.object({
1650
+ deploymentName: z.string().min(1).max(80).describe("API name of the Embedded Service deployment"),
1651
+ label: z.string().min(1).max(255),
1652
+ site: z.string().min(1).describe("Experience Cloud site name or 'none' for non-community deployment"),
1653
+ channelType: z.enum(["LiveAgent","MessagingChannel"]).default("LiveAgent"),
1654
+ chatButtonName: z.string().optional().describe("LiveChatButton API name (for LiveAgent)"),
1655
+ messagingChannelName: z.string().optional().describe("MessagingChannel API name (for MessagingChannel)"),
1656
+ primaryColor: z.string().optional().describe("Primary brand color hex, e.g. '#0070D2'"),
1657
+ secondaryColor: z.string().optional().describe("Secondary color hex"),
1658
+ fontName: z.string().optional().describe("Font family name, e.g. 'Salesforce Sans'"),
1659
+ description: z.string().optional(),
1660
+ }).strict();
1661
+ export const CreateBotRoutingSchema = z.object({
1662
+ botName: z.string().min(1).max(80).describe("Einstein Bot API name (DeveloperName of the BotVersion parent)"),
1663
+ transferToQueueName: z.string().min(1).describe("Queue DeveloperName to transfer conversation to"),
1664
+ transferMessage: z.string().optional().describe("Message shown to customer when transferring to agent"),
1665
+ escalationConditions: z.array(z.object({
1666
+ trigger: z.enum(["agentRequested","unrecognized","maxErrorCount","custom"]).describe("Trigger condition for escalation"),
1667
+ action: z.enum(["TransferToQueue","EndChat","SetVariable"]).default("TransferToQueue"),
1668
+ })).optional().describe("Conditions that trigger transfer to human agent"),
1415
1669
  }).strict();
1416
1670
  //# sourceMappingURL=index.js.map