4

I'm thinking of leveraging the Salesforce FMA and Feature Management toggles to allow AppExchange app:

  • Finer-grained user permissions
  • Silent/Hidden feature releases
  • A/B testing

When looking at the specs many doubts or questions come up. Maybe you are already using FMA and can share some insights or best-practices here:

  1. Max. 25 Parameter / package: What if I have close to 100 features I want to activate more fine grained?
  2. When do I use FMA Parameters and when Custom Permissions?
  3. What is the process for enabling a Feature for a specific user (license)? The Customer asks for it and I enable it in the LMA/FMA or by using Subscribe-LMO requests?
  4. Will extensive in code checks if a user has a certain feature or custom permission degrade CPU performance? And what can I do to minimize that risk? Are there patterns like caches?
  5. Is there public code or metadata to show how to switch between features in a non-intrusive way?

2 Answers 2

4

1.Max. 25 Parameter / package: What if I have close to 100 features i want to activate more fine grained?

You can leverage integer type feature flag to get around the limits easily. for examplesay, 000 - feature x, 001 - feature y, 010 - feature z and so on. With integer type there is really no limit.

2.When do I use FMA Parameters and when Custom Permissions?

Custom Permissions cannot be hidden and a subscriber org can change them at will. While in FMA allows you to send protected feature flags to subscriber org where only the package vendor can use the LMA to control it access.

3.What is the process for enabling a Feature for a specific user (license)? The Customer asks for it and I enable it in the LMA/FMA or by using Subscribe-LMO requests?

The document describes the process. In nutshell yes the LMA is where you will enable/ disable the features.There is whole lifecycle described here

The best part is by using FMA (direction of flow is set from subscriber to LMA) you can collect metrics from customer orgs (Please do let your subscriber if you are doing so might have legal implications)

4.Will extensive in code checks if a user has a certain feature or custom permission degrade CPU performance? And what can I do to minimize that risk? Are there patterns like caches?

Just like any other thing in apex you will use if or switch that will have some impact on performance. Not aware of any caching thats built in for that. But to set the parameters you have FeatureManagement class and methods.

4
  • You are suggesting that the FMA limit is not actually 25 features but that you cannot use an Integer past 25? While this may work technically is it not possible that an app does not pass Sec Review or gets flagged down the road as going way past a stated limit? I'd love to use this approach if knew this not a potentiality down the road.
    – ddeve
    Apr 13, 2020 at 14:40
  • @ddeve The number of feature flags you can have is 25, thats a limit. However what you use in a flag with integer is upto you. You can assign feature with an integer value and have various number of combinations with integers. Hope that makes sense Apr 13, 2020 at 14:49
  • @MohithShrivastava - The answer to use different values for Integer Feature Parameter is somewhat confusing. If an ISV dedicate a specific Integer value to a Feature, then it still seems to be able to able to control 1 feature via that value. Or you mean we can have multiple Feature Parameters defined on Licenses in LMA for different integer values (considering ISV need to enable all 3 features (x, y, z) from your example)
    – VarunC
    Jan 18, 2021 at 14:26
  • 1
    Feature 1 - 000, Feature 2 - 001, Feature 3 - 010 and so on! The binary number represents a feature! With three digit as binary you can have 8 combinations or 8 features! Hope that clarifies! Jan 18, 2021 at 14:31
0

In the Winter '23 (Oct 2022) release, the default number of Feature Parameters available has increased from 25 to 200:

https://help.salesforce.com/s/articleView?id=release-notes.rn_packaging_feature_parameters.htm&type=5&release=240

The default limit on feature parameters has increased from 25 to 200. Use feature parameters to activate pilot features, track activation metrics, or make features available for a limited time.

Where: This change applies to new and existing first- and second-generation managed packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.