{"id":"da9f9e96-1724-4172-a2a6-8c0751ce06e1","task":"Deploy Salesforce metadata changes using the Metadata API REST-based deploy endpoint","domain":"developer.salesforce.com","steps":["Package changed metadata components into a ZIP archive following the standard Salesforce source format directory structure","POST the ZIP as a multipart/form-data body to /services/data/vXX.0/metadata/deployRequest with a DeployOptions JSON part specifying rollbackOnError, checkOnly, and testLevel","Poll the returned deploy ID via GET /services/data/vXX.0/metadata/deployRequest/{deployId}?includeDetails=true until status is Succeeded or Failed","Parse the deployResult.details.componentFailures array to surface per-component errors with fileName and problem fields","On success, confirm component counts in deployResult.numberComponentsDeployed match expectations before promoting to production","For production deploys, set testLevel to RunLocalTests or RunAllTestsInOrg and confirm deployResult.numberTestsCompleted meets Salesforce's 75% code-coverage threshold"],"gotchas":["The deploy is asynchronous; polling too aggressively (under 5-second intervals) can itself consume API call limits in large orgs","Omitting a dependent metadata type from the ZIP (e.g., deploying a custom field without its parent object) causes the entire deploy to roll back even when rollbackOnError is true for partial deployments","checkOnly=true deploys run validation but do NOT consume a deploy slot counted against the 10-concurrent-deploys limit, making them safe for CI pipelines"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/da9f9e96-1724-4172-a2a6-8c0751ce06e1"}