Knowing how you will manage metadata is the next pillar of the Salesforce Center of Excellence. Here are three many considerations.

1. Source Code Repository

When you have a small org, it’s OK to start building metadata in a single instance, say a Development (DEV) sandbox. Then it’s usually promoted to a Quality Assurance (QA) sandbox, perhaps a User Acceptance Testing (UAT) sandbox, and then Production (PROD). One of these sandboxes, usually PROD, is considered to be the master (the source of truth).

As the org grows, this approach is not sustainable. Instead, all metadata should be hosted in a source code repository. There are numerous benefits, including

  • You can track and manage the changes made to the codebase
  • You can easily deploy the codebase to a sandbox
  • You can roll back to previous versions, if necessary
  • You can collaborate more easily with multiple developers

Some common examples are GitHub, BitBucket, and Azure DevOps Services.

2. Branching Management

Once again, for small orgs, this isn’t really a needed consideration, but it definitely is for larger ones.

Identifying a master branch with proper pull requests, when to apply a branch to a sandbox, and when to refresh a sandbox with a branch are all important questions to be answered. Considering the sandboxes above, the following branch names work well:

  • Master
  • Production
  • UAT
  • QA
  • DEV
  • Hotfix (to be merged back into Master after deployed)

Common tools that help manage branching are Jenkins, CircleCI, Salesforce DevOps, and MS Azure Pipeline.

3. Documentation   

Usually an afterthought (if a thought at all), documentation is important for you to remember why decisions were made. Further, the more you document, the easier it will be for future developers to remember why certains decisions were made months down the road. After all, it’s recommended to develop as though you won’t always support the project forever.

Out of the box, you can add a description or comments to custom fields, automation, and apex code. To take documentation up a considerable notch, consider elements.cloud.

The takeaway
A well-planning branching management strategy ensures the code is reliable, maintainable, and scalable.

Category:
Salesforce
Tags: