Planning poker is a consensus-based, gamified technique for estimating user stories in Scrum. This app allows you to utilize this technique for your planning and is completely built on Salesforce.
This Planning Poker app offers 2 custom apps on Salesforce: The Host App and the Player App. Both of these apps can only be accessed by licensed users on Salesforce.
You can optionally also install the guest version of the player app on Heroku to allow players without Salesforce Licenses to paricipate. You'll need a free Heroku account to set it up. A free account lets you run the game with a small group of players. If you run the game with a larger group, consider upgrading to a Hobby Dyno.
- Choose your own User Story Source Before starting a game, you can select any Salesforce object to be the source of the list of user stories, and save the consensus (Story points) directly to the user story records.
- Use pre-defined card sets or create your own This app comes with pre-defined card sets like Fibonacci and multiples of two. You can also create your own custom card sets.
- Hidden Cards All player's responses are hidden until the timer runs out or until the host chooses to reveal them.
- Host Controls The host has options to show a timer, hide or reveal cards, reset votes and more. The host can also play the game if they choose to.
- The Host App and Player App on Salesforce are built using Lightning Web Components.
- The app relies on Application Events, Platform Events and Push Topics to publish game state changes.
- The Lightning web components use the empApi and Lightning Message service to send and receive these events.
- A combination of Salesforce data and HTML 5 Local Storage is used to maintain game state across page refreshes.
- The Guest Player App is built using Lightning Web Components Open Source and uses Node.js as its backend.
- It communicates with Salesforce using Custom Apex REST APIs.
- It uses the OAuth JWT Bearer flow to connect with Salesforce.
- The Node.js server uses Server Sent Events to deliver notifications to the HTML client.
-
Click the button below to install on Developer Edition, Trailhead Playgroud or Production orgs
-
Click the button below to install on Sandboxes or Scratch Orgs
- Once the installation is successful, Open the Developer Console and go to Debug -> Execute Anonymous Window.
- Paste the following code, and click Execute
planningpokersf.PlanningPokerPostInstallScript.insertPushTopics();
- To make a Salesforce user the host of a game, assign the
Planning Poker Host
permission set to them. - Assign the
Planning Poker Player
permission set to any users who want to participate as players.
- Set up your Salesforce DX environment (see this Trailhead project for guided steps):
- Install Salesforce CLI
- Enable Dev Hub on a Salesforce org. You can do that on a free Developer Edition.
- Authenticate with your Dev Hub org and provide it with an alias (myhuborg in the command below):
sfdx force:auth:web:login -d -a myhuborg
- Open a Terminal and clone the git repository:
git clone https://github.com/adityanaag3/planning-poker-salesforce.git cd planning-poker-salesforce
Tip: you can also download the files from the website if you don't want to install git. - Run the installation script. The script deploys the Planning Poker App on a scratch org with a
planningpoker
alias.MacOS or Linux
sh scripts/setup/orgInit.sh
Windows
scripts/setup/orgInit.bat
Once the script completes, it will open your new scratch org in a browser tab. If you close the tab or get disconnected, run this command to reopen the orgsfdx force:org:open -u planningpoker
- To make a Salesforce user the host of a game, assign the
Planning Poker Host
permission set to them. The above installations script automatically assigns this permission set to the user who runs the script. - Assign the
Planning Poker Player
permission set to any users who want to participate as players.
Guests are players without Salesforce Licenses. Here are a few additional steps you need to follow
- Create a self signed certificate using the command
openssl req -nodes -new -x509 -keyout private.pem -out server.cert
- Create a Connected App in Salesforce with the below configuration
- Select Enable OAuth Settings
- Use
http://localhost:3001
as the Callback URL - Select Use digital signatures
- Upload the Certificate generated in the previous step
- Select
api
andrefresh_token, offline_access
in OAuth Scopes
- Click on Manage and then click Edit Policies
- Select Admin approved users are pre authorized in Permitted Users and Save
- Select Planning Poker Player in the list of permission sets for the policy
- Deploy to Heroku using the button below
-
Set the enviroment variables as follows
Variable Description SF_CONSUMER_KEY Consumer Key of the Connected App SF_USERNAME Username of the integration user who has been assigned the Planning Poker Player permission set. SF_LOGIN_URL The login URL of your Salesforce org:
https://test.salesforce.com/
for scratch orgs and sandboxes
https://login.salesforce.com/
for Developer Edition and productionPRIVATE_KEY Contents of the private.pem file generated from the certificate creation step SF_NAMESPACE Use planningpokersf
if you have installed the host app using the packages listed here. Else, use the namespace from sfdx-project.json file. - Update the
Heroku App URL
record in the Custom Metadata TypeGame Settings
with the Heroku App's URL generated in the previous step. - Optionally checkout the source code for the app here to make modifications or test locally.
- Create your own Card sets (if needed) by creating new records in the Card Set custom metadata type.
- Enter the card values separated by a comma. Optionally you can add
?
andPass
. - Navigate to the Planning Poker Host App, and click on the Games tab.
- Create a new Game by entering a name and optional description
- In the "Game Data Sources" section on the Game detail page, select the source of your user stories. If you don't have an existing object where you store the user stories, you can use the "Backlog Item" object that is provided in this app. Here are the values you need to enter if you choose the "Backlog Item" object
- Name Field: User Story
- Description Field: Notes
- Consensus Stored In? : Consensus
- List View: All
- To start hosting the app, navigate to the Host Planning Poker Tab
- Select a Game, and click Launch
- Share the Game Pin shown with the players and Wait for them to join.
- Once they have joined, click on Start.
- When the cards are hidden, Players who havent voted are shown in gray color. Whenever a player gives a response, the card's color changes. Once the cards are revealed, the responses are shown.
- The Host Controls has the following buttons
- Save Consensus to save the consensus
- Next Story naviagtes to the next story from the list, and also refreshes the players screen with this story.
- Reset Cards deletes all the responses for the current story and forces the players to resubmit their vote.
- End Game ends the current game for the host and all participants. Once a game ends, it cannot be started again.
- Navigate to the Play Planning Poker app.
- Enter the Game Key that the host gives you.
- Once a user story is shown, click on a Card to cast your vote.
- Once the host navigates to the next story, your screen refreshes automatically. If not, refresh your screen.
- Navigate to the unique Game URL shared by the host.
- Enter your name.
- Once a user story is shown, click on a Card to cast your vote.
- Once the host navigates to the next story, your screen refreshes automatically. If not, refresh your screen.
- Additional LWC Tests
If you want to build the project from sources and contribute, run npm install
to install the project build tools.