Using custom metadata to provide flexibility in a managed package

We previously shared the details of PROVAIL’s supported employment managed package. That app needed flexibility to support different program models. Here’s how this was built into the package.

Managed packages are Salesforce’s method of installing and distributing custom applications. Salesforce managed packages lock in certain elements, which makes it challenging to provide dynamic support for individual organizations’ needs. For example, the range of service types and rollups needed by supported employment agencies using this app varies widely. It’s not possible to build in every potential service type into the managed package.

So how do you support these dynamic needs in a managed package? Salesforce custom metadata to the rescue! Custom metadata allows Salesforce administrators to configure their own service types that the managed package then uses to support the billing requirements of an individual organization.

PROVAIL’s managed package includes a custom metadata type for Service Types. It specifies the fields needed when adding a new Service Type:

New service types are easily added by the Salesforce administrator by defining these fields:

The package then does the rest behind the scenes. It references the admin-configured custom metadata records, allowing employment counselors to track time against these service types and rolling up data for these custom service types.

Interested in learning more? Read our post on custom metadata, watch Beth Breisnes’ session from Dreamforce ‘17 Develop for Changing Requirements with Custom Metadata, or dive into the Custom Metadata Types Trailhead.