This repository contains sample code and instructions for test driving the Partner Licensing Platform (PLP) using both first-generation packaging (1GP) and second-generation packaging (2GP).
To start using this demo, you must first...
- Request, and be granted, access to the Partner Licensing Platform developer preview.
- Ensure that your local environment supports Git-based development with SFDX.
- Clone this repository to your local machine.
- Authorize the Salesforce CLI to your PLP-enabled Dev Hub.
- Update the
namespace
value insfdx-project.json
- Decide between 1GP and 2GP for your demo app
You'll need between 10 and 45 minutes to complete the "Getting Started" steps, mostly depending on whether you have Git and the Salesforce CLI already installed on your local machine.
All AppExchange partners in good standing are eligible to participate in the Partner Licensing Platform (PLP) developer preview. To request access, you must...
- Join the Partner Licensing Platform - Dev Preview group in the Partner Community.
- Review the Onboarding Guide and follow the pre-activation instructions.
- Request activation of PLP features.
Acceptance to the dev preview and activation of PLP features is required before using this demo.
While waiting for activation, you can proceed to the next step of ensuring your local environment supports Git and SFDX.
Both Git and the Salesforce CLI must be installed and properly configured on your local machine.
- If you need to install Git, see Git Guides - Install Git
- If you need to install the Salesforce CLI, see the Salesforce CLI Setup Guide
- Open your terminal/CLI program.
- Clone the
plp-demo-app
repository. - Navigate to the root of the
plp-demo-app
folder.
# Clone the plp-demo-app repository
git clone https://github.com/sfdx-isv/plp-demo-app.git
# Navigate to the root of the demo-app folder
cd plp-demo-app
Authorize the Salesforce CLI to access a PLP-enabled Developer Hub using the following command.
- As part of the PLP dev preview onboarding process you were asked to create a Dev Hub org.
- You must authorize the Salesforce CLI on your local machine to access that specific org.
sfdx force:auth:web:login -a DevHub:PLP-Dev-Preview
- Ensure the working directory of your terminal/CLI is
plp-demo-app
before executing this command. - If your PLP-enabled Dev Hub has a different alias, use it instead of
DevHub:PLP-Dev-Preview
.- Remember, the Dev Hub you specify here must be activated for the PLP developer preview.
- If you specifiy a Dev Hub that has not been activated for the PLP developer preview, you must run this command again with an appropriate Dev Hub or your demo app will not work.
# Make sure your current working directory is plp-demo-app!
sfdx config:set defaultdevhubusername=DevHub:PLP-Dev-Preview
- Open the
sfdx-project.json
file in theplp-demo-app
directory using a text/source editor (e.g. VS Code). - Go to LINE 12 and replace
plpdp_??????
with the namespace from the Partner Developer Edition org that you created for this developer preview.- Your namespace MUST begin with
plpdp_
.
- Your namespace MUST begin with
- Make sure that your namespace is linked to your PLP-enabled Dev Hub.
- See Linking a Namespace to a Dev Hub Org for detailed instructions.
- This is required for both 1GP and 2GP demos.
- Save
sfdx-project.json
.
The final step in getting started with the PLP demo app is deciding whether you want to test drive the features of the Partner Licensing Platform using 1GP or 2GP.
Using second-generation packaging (2GP) is strongly recommended. It's much easier to follow along with the demo steps using 2GP, even if you've never used 2GP before.
- To experience the demo with 2GP, go to the PLP 2GP Demo README.
- To experience the demo with 1GP, go to the PLP 1GP Demo README.
Please follow the steps in the either the 2GP or 1GP Demo README to complete your PLP demo experience.