Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Manifest File entry
How-to guide

Build and use a Manifest File

Manifest files can be hand-written, generated by the Salesforce CLI, or produced by CI/CD pipelines. Most modern workflows use the CLI to generate them.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 21, 2026

Manifest files can be hand-written, generated by the Salesforce CLI, or produced by CI/CD pipelines. Most modern workflows use the CLI to generate them.

  1. Generate the manifest from a source folder

    Run sf project generate manifest --source-dir force-app/main/default. The CLI scans the source and produces a package.xml.

  2. Or hand-write the package.xml

    Create the file with the required XML structure: <Package xmlns=...><types><name>ApexClass</name><members>MyClass</members></types><version>60.0</version></Package>.

  3. Retrieve metadata using the manifest

    Run sf project retrieve start -x manifest/package.xml -o my-org. The CLI pulls every component listed in the manifest.

  4. Deploy using the manifest

    Run sf project deploy start -x manifest/package.xml -o my-org. The CLI deploys the listed components.

  5. Add destructiveChanges.xml for deletions

    Create destructiveChanges.xml alongside package.xml with the components to delete. The CLI includes both in the deployment.

  6. Integrate with CI/CD

    Set up the pipeline (Copado, AutoRabit, GitHub Actions) to generate manifests from git diffs and run deployments automatically.

Mandatory fields
apiVersionrequired

The Salesforce API version the manifest targets.

types blocksrequired

Per metadata type with name and member list.

destructiveChanges.xml (optional)required

For deletions in the same deployment.

Salesforce CLIrequired

The tool that consumes the manifest.

Gotchas
  • apiVersion mismatches cause deploy failures. Match the manifest version to the target org''s supported API version.
  • Wildcards behave differently for retrieve vs. deploy. Wildcards are fine for retrieval; production deploys usually require explicit member lists.
  • destructiveChanges.xml deletions run after adds and updates. The order matters for some metadata dependencies.
  • Some metadata types are not supported by Metadata API. Check the Metadata Coverage Report before assuming a type can be manifested.

See the full Manifest File entry

Manifest File includes the definition, worked example, deep dive, related terms, and a quiz.