Step-by-Step Guide: Building and Publishing a Salesforce App on AppExchange
Salesforce Tips & Tricks

Step-by-Step Guide: Building and Publishing a Salesforce App on AppExchange

26 Aug 2025 0 Comments 0 Likes

Step-by-Step Guide: Building and Publishing a Salesforce App on AppExchange

1. Define DevHub Org

A DevHub is the Salesforce org that allows you to create and manage scratch orgs and second-generation packages (2GP). It acts as the central hub for your Salesforce app development lifecycle.

๐Ÿ‘‰ Know more about DevHub

Steps to enable DevHub:

  • Go to Setup → Search for Dev Hub.



  • Enable Dev Hub and Unpackaged Metadata Tracking.

2. Create Scratch Org

A scratch org is a temporary, source-driven Salesforce org for development and testing.

๐Ÿ‘‰ Know more about Scratch Orgs

Steps:

  • Authenticate with DevHub: sf auth:web:login -d -a DevHub



  • Create org: sf org create scratch --definition-file config/project-scratch-def.json --no-namespace --duration-days 30



  • Create Password for Scratch Org: sf force:user:password:generate –targetusername "Username"

 

๐Ÿ’ก Looking for expert guidance in packaging and publishing your app? ๐Ÿ‘‰ Hire AppExchange Developers

3. Create Beta Version Package

Beta packages are test versions of your app.

Steps:

  • Retrieve all the components using Package XML file.



  • Create package: sf force:package:create --name Kitaracloud-Partner --description "Kitaracloud Partner" --path force-app --packagetype Unlocked --targetdevhubusername DevHub



  • Create beta version: sf force:package:beta:version:create --package "Kitaracloud Partner" --installationkeybypass --wait 20 --codecoverage --targetdevhubusername DevHub

4. Run Force.com Code Scanner

The Force.com Code Scanner ensures code quality and security.
Link: Force.com Code Scanner portal

5. Run PMD Code Scan

PMD identifies bad practices and performance issues.

Steps:

  • Install PMD.
  • Run: sf plugins install @salesforce/sfdx-scanner
  • 1st command: sf scanner:run --format=csv --outfile=CodeAnalyzerGeneral.csv --target="./" --category="Security"
  • 2nd command: sf scanner:run:dfa --format=csv --outfile=CodeAnalyzerDFA.csv --target="./" --projectdir="./" --category="Security"
  • Review and fix issues.

6. Promote Package to Managed Version

Managed packages are required for AppExchange listing.

Steps:

  • Promote beta: sf force:package:version:promote -p "04tXXXXXXXXXXXX"
  • Share managed package link for validation.

โšก Need expert help with Salesforce setup, integration, or end-to-end rollout?
๐Ÿ‘‰ Check out our Implementation Services
๐Ÿ‘‰ Salesforce Development Services

7. Get Security Review Passed from Salesforce

Salesforce requires apps to pass a security review before listing.

Tips:

  • Follow Salesforce ISV Security Guide.
  • Avoid storing sensitive data in logs.
  • Implement CRUD/FLS checks.

8. List Product on AppExchange

After passing security review, create a listing on AppExchange.

 

๐Ÿš€ Want to extend your apps with communities and portals? ๐Ÿ‘‰ Explore our Salesforce Experience Cloud Services

Steps:

  • Login to Partner Community.
  • Go to Publishing → Listings.
  • Add product details, pricing, screenshots, and package link.
  • Submit for Salesforce approval.

 

๐Ÿ’ก Need help building and publishing your Salesforce app? ๐Ÿ‘‰ Reach out to us

๐Ÿ’ก Ready to build and launch your Salesforce app?
๐Ÿ‘‰ Explore our AppExchange Services and AppExchange Development to get started.

 

Leave Comments