1

We are about to launch our first Managed Package in the AppExchange and we've determined that seat based licencing will be the best pricing model for our Package.

What is unclear from the ISVForce and LMA documentation is how the seat based pricing will work on the Salesforce side. Ie, how do we make sure that people with a licence can do all the operations that are required and that if users do not have a seat allocated to them that the experience isn't awful and is correctly controlled.

Example: If we have a LWC provided and the admin adds that to a standard Lightning Record Page (say Account). How will that display for a user with an allocated Seat vs non-allocated Seat?

Also, how will a Salesforce administrator assign a Seat to a user from the subscriber side?

I did find FeatureManagement but that feels like an unrelated function...

1 Answer 1

5

I did find FeatureManagement but that feels like an unrelated function...

You're right, FeatureManagement isn't what you're looking for.

What is unclear from the ISVForce and LMA documentation is how the seat based pricing will work on the Salesforce side. Ie, how do we make sure that people with a licence can do all the operations that are required and that if users do not have a seat allocated to them that the experience isn't awful and is correctly controlled.

For the most part, the platform enforces these rules automatically. The exceptions are mostly automations (triggers, etc), which always run; this code should use UserInfo.isCurrentUserLicensedForPackage if they want to restrict functionality at this level.

Example: If we have a LWC provided and the admin adds that to a standard Lightning Record Page (say Account). How will that display for a user with an allocated Seat vs non-allocated Seat?

As far as LWC goes, I'm pretty sure that the component simply won't render (it'll be a blank area) for users without a license, and/or wire methods will fail to execute as the underlying Apex or custom objects won't be available, depending on the context. I do recall that things you put in App Builder don't appear to unlicensed user; the page is simply rendered as if it were filtered out.

Also, how will a Salesforce administrator assign a Seat to a user from the subscriber side?

An Administrator can assign Seats by going to the User Detail Page and assigning the license on the related list for installed apps. This feature only appears in Production orgs, not Sandboxes, Developer Editions, or other non-paid orgs; all apps are always enabled for "evaluation purposes" in these types of orgs. See the UserPackageLicense object for more information. This can also be done via code or Flows by an Administrator or developer.

4
  • Thanks @sfdcfox, I did find that isCurrentUserLicensedForPackage method after posting and it looks very relevant. Perfect answer as always :)
    – Mattisdada
    Commented Jul 1, 2020 at 3:10
  • How would custom object visibility work? Would user requires a licence to see a namespaced custom object?
    – Mattisdada
    Commented Jul 1, 2020 at 3:17
  • 1
    @Mattisdada Yes, custom objects belonging to the package will not be visible without a license, even if they are given CRUD permissions via profile or permission set.
    – sfdcfox
    Commented Jul 1, 2020 at 5:28
  • Perfect, thanks :)
    – Mattisdada
    Commented Jul 1, 2020 at 5:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .