Salesforce Packaging Guide
Salesforce Packaging Guide
@salesforcedocs
Last updated: May 6, 2021
© Copyright 2000–2021 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of salesforce.com, inc.,
as are other names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS
Why aren’t leads and licenses being created in the LMA? . . . . . . . . . . . . . . . . . . . . . 302
What happens when I decrease the number of available licenses below the current
number of licensed users? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
APPENDICES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
GLOSSARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
CHAPTER 1 Welcome to the ISVforce Guide
In this chapter ... Hello, partner! Welcome to the ISVforce Guide. Learn to plan, build, distribute, market, sell, and support
solutions that run on the Salesforce platform. Get your feet wet with the quick start tutorials. Then, dive
• Resources for in for a close look at the concepts, procedures, tools, and resources you need to successfully navigate
Partners the stages of the solution lifecycle.
• Roles in the Solution
Lifecycle
• How to Sign Up for
Test Environments
1
Welcome to the ISVforce Guide Resources for Partners
2
Welcome to the ISVforce Guide How to Sign Up for Test Environments
Note: If you’re a new Salesforce user, log in to the organization that you received when you signed up for the Partner Program.
The Environment Hub is enabled in this organization by default. If you’re an existing Salesforce user and are using a different
organization to manage development, log a case in the Partner Community to enable the Environment Hub.
1. Log in to the organization where Environment Hub is enabled.
2. Select the Environment Hub tab, then click Create Organization.
3. In the Purpose drop-down list, select Test/Demo.
4. In the Edition drop-down list, choose the edition you want to test against.
5. Fill in the remaining required fields. Optionally, set up My Domain.
6. Agree to the terms and then click Create.
7. You'll receive an email that will prompt you to log in and change your password. Click the link, change your password, and create
a password question and answer.
3
CHAPTER 2 ISVforce Quick Start
In this chapter ... Get ready to build and sell solutions on AppExchange by completing short tutorials.
• Tutorial #1: Sign Up Note: Some features in this quick start are available only to eligible Salesforce partners. For more
for AppExchange information on the Partner Program, including eligibility requirements, visit
• Tutorial #2: https://partners.salesforce.com.
Developing Your App
• Tutorial #3:
Publishing and
Tell Me More
Licensing
If you're new to app development, or if you’re a smell-the-roses type, review these resources before you
• Tutorial #4: Updating
get started.
Your App
• For an introduction to the Salesforce platform, complete the Admin Beginner, Admin Intermediate,
and Developer Beginner trails.
• For Salesforce developer documentation and other resources, visit Salesforce Developers at
https://developer.salesforce.com.
• For a list of useful terms, see the Glossary on page 362.
4
ISVforce Quick Start Tutorial #1: Sign Up for AppExchange
Note: The signup process varies according to the region or country. Follow the instructions presented.
Note: If you’re a new Salesforce user, log in to the organization that you received when you signed up for the Partner Program.
The Environment Hub is enabled in this organization by default. If you’re an existing Salesforce user and are using a different
organization to manage development, log a case in the Partner Community to enable the Environment Hub.
1. Log in to the organization where the Environment Hub is enabled, usually your partner business org.
2. Click the Environment Hub tab, and then click Create Organization.
3. In the Purpose drop-down list, select Development. For simplicity, we refer to this as your dev org.
4. Fill in the required fields. Optionally, set up My Domain.
5. Agree to the terms and then click Create.
6. In the Purpose drop-down list, select Test/Demo and Partner Enterprise for the org edition. This process creates a test org, where
you test the app or component that your are developing.
7. Shortly, you’ll receive emails that prompt you to log in and change your password for your dev and test orgs.
5
ISVforce Quick Start Step 3: Get a Business Org
Tell Me More...
The Environment Hub has several types of test orgs available, because different editions of Salesforce have different features. If you plan
to distribute your app or component to a particular edition, you want to test your offering and make sure that it works there. Although
that’s beyond the scope of this quick start. For more information, see Architectural Considerations for Group and Professional Editions
on page 71.
Note: It can take 24–48 hours for your case to be closed. You can check the status of your case at any time under the Support
tab of the Partner Community.
5. You’ll receive an email prompting you to log in and change your password. Do that, and then bookmark the page.
Sign-up Summary
In this first tutorial, you signed up for the Partner Program and all the organizations you need to develop, test, and sell your offering.
Let’s review what you signed up for and the purpose of each.
Partner Program
The Partner Program gives you access to the Partner Community, where you can get help and training information, log cases for
support issues, and collaborate with other partners. You also get access to the Environment Hub, which lets you create and manage
new test and development orgs.
Partner Developer Edition
Also known as your dev org, this is where you develop your offering and eventually package it for distribution.
Test Organization
Also know as your test org, this is where you install and test your offering.
Partner Business Organization
This is where you license and manage your offering.
6
ISVforce Quick Start Tutorial #2: Developing Your App
6. Click Save.
Now you'll associate the page with a tab.
1. In the sidebar menu, enter Tabs in the Quick Find box, then select Tabs.
2. In the Visualforce Tabs list, click New.
3. In the New Visualforce Tab wizard, click the drop-down box and select the Hello World page you just created.
4. For the Tab Label, enter Hello.
5. Click the Tab Style field and choose any icon to represent your tab.
6. Click Next, then Next again, and Save on the final page.
Now you'll create a new app that contains your tab and page.
1. In the sidebar menu, enter Apps in the Quick Find box, then select Apps.
2. Click New.
3. In the App Label field enter Hello World and then click Next and Next again on the following page.
7
ISVforce Quick Start Step 2: Package Your App
4. On the Choose the Tabs page, scroll to the bottom of the Available Tabs list, find your Hello tab, and add it to the Selected Tabs list.
Click Next.
5. Select the Visible checkbox to make this app visible to all profiles and then click Save.
Tell Me More....
If it seems like you just created a page within a container, within another container, you did. And you're about to put all of that in another
container! What's with all these containers and what do they do?
• A tab is a container for things you want to display on the same page, such as a chart, a table, or the Visualforce page your created.
• An app is a container for tabs that appear next to each other. When you create an app, it's available in the app picker in the upper
right hand corner of the screen.
• A package is a container for things you upload to the AppExchange. Usually a package contains an app your customers can install
in their org, but you can also upload packages that extend existing apps. You haven't created a package yet, you'll do that in the
next step.
Tell Me More....
When you clicked Add to Package, did you notice that your Hello tab and Greeting page were automatically added to the package?
When you create a package, the framework automatically detects dependent components and adds them to the package.
8
ISVforce Quick Start Step 4: Upload a Beta
Tell Me More....
Within the underlying code, your namespace is prepended to all components that are packaged from your dev org. This allows your
package and its contents to be distinguished from those of other developers, and ensures your exclusive control of all packaged
components.
Tell Me More....
The purpose of a beta is for testing only. Therefore, a beta can only be installed in a test org, Developer Edition, or sandbox (more on
that later). Next you'll install the beta in the test org you created in Step 2: Create a Development and Test Environment.
2. On the login page, enter the Username and Password of your test org.
3. On the Package Installation Details page, click Continue.
4. Click Next.
5. On the Security Level page, Grant access to all users and click Next.
6. Click Install.
7. Once the installation completes, you can select your app from the app picker in the upper right corner.
9
ISVforce Quick Start Development Summary
8. You should see your Hello tab, and the greeting text on your page.
At this point you would normally test the application and make sure it works as designed. Your app installs easily and displays what you
want, so let's move on.
Tell Me More....
Beta packages can also be installed in sandboxes. A sandbox is a replica of your customer's org that allows them to develop, test, or
install apps, and verify the changes they want to commit. None of the orgs you've signed up for in this workbook have a sandbox, but
if you have a sandbox in another org and want to install your app in it, you must replace the initial portion of the Installation URL with
http://test.salesforce.com.
Development Summary
Congratulations, you just completed an essential part of the software development lifecycle! Further changes to your app will follow
the same procedure:
1. Modify the existing app in your dev org.
2. Package the app.
3. Upload as a beta package.
4. Install the beta in a test org.
5. Test the installed app.
10
ISVforce Quick Start Tutorial #3: Publishing and Licensing
11
ISVforce Quick Start Step 3: Complete the AppExchange Listing
3. Read and agree to the terms and conditions, and then click I Agree.
4. The first question asks if you’ve already listed on the AppExchange. You did that in Tutorial 1, Step 4: Edit Your Publisher Profile on
page 6, so select Yes and click Continue.
5. Click Link New Organization.
6. You’re prompted for your username and password. Enter the values for your development org.
7. Click the Publishing tab.
8. Click New Listing.
9. Enter a listing title, such as Hello World App by <your name>. Adding your name helps ensure that your listing title is
unique.
10. Choose App, and then click Save & Next to open the AppExchange publishing console.
11. On the Text tab, fill in the required fields, and then click Save & Next again.
Tell Me More...
Don’t be concerned with making your listing perfect, because it’s not public yet, and you can change the listing at any time.
12
ISVforce Quick Start Publishing and Licensing Summary
Note: This feature is available to eligible partners. For more information on the Partner Program, including eligibility requirements,
visit www.salesforce.com/partners.
1. If you haven’t done so already, log in to the Partner Community.
2. On the Publishing page, click the Packages tab.
3. Find the package that you want to link, and then click Manage Licenses.
4. Click Register.
5. Enter the login credentials of your partner business org, and then click Submit.
6. For the default license type, choose free trial.
7. Enter a trial length in days.
8. For the number of seats, choose the site-wide license.
9. Click Save.
It can take up to 30 minutes for your app to be connected to the LMA. Take a break; you’ve earned it!
13
ISVforce Quick Start Step 2: Developing a Patch
1. From Setup, enter Packages in the Quick Find box, then select Packages.
2. Click the name of your managed package.
3. On the Patch Organization tab, click New.
4. Select the package version that you want to create a patch for in the Patching Major Release dropdown. The release type must be
Managed - Released.
5. Enter a username for a login to your patch org.
6. Enter an email address associated with your login.
7. Click Save.
Note: If you ever lose your login information, click Reset on the package detail page under Patch Development Organizations
to reset the login to your patch development org.
If the main development org from which you created the patch org has My Domain enabled, the patch org also has My Domain enabled.
The name of the patch development org’s custom subdomain is randomly generated.
In a moment you receive an email with your login credentials. After you log in and change your password, proceed to the next step.
Tell Me More
Development in a patch development org is restricted.
• You can’t add package components.
• You can’t delete existing package components.
• API and dynamic Apex access controls can’t change for the package.
• No deprecation of any Apex code.
• You can’t add new Apex class relationships, such as extends.
• You can’t add Apex access modifiers, such as virtual or global.
• You can’t add new web services.
• You can’t add feature dependencies.
5. Click Save.
6. To see the output, click the Hello tab and you'll notice that today's time and date are displayed.
14
ISVforce Quick Start Step 3: Uploading the Patch
Tell Me More....
The !NOW function returns the date in a standard format. There are many more built-in functions and ways to format the output. For
more information, see the Visualforce Developer's Guide.
15
ISVforce Quick Start Updating Your App Summary
2. In the upper right corner, click Developing Hello World, version 1.0.
Tell Me More....
Beta versions aren't eligible for push upgrades. You must uninstall a beta and then install a new one.
You can also exclude specific subscriber orgs from the push upgrade by entering the org IDs, separated by a comma, in the Push Upgrade
Exclusion List.
16
CHAPTER 3 Grow Your AppExchange Business
Track your company’s growth throughout the partner journey with the AppExchange Partner Trailblazer
Score. Get a comprehensive view of your contributions across three pillars: customer success, innovation,
and engagement. Explore detailed metrics within each pillar to see your company’s progress as a
Salesforce partner.
SEE ALSO:
Salesforce AppExchange Partner Program
17
CHAPTER 4 Design and Build Your Solution
In this chapter ... Discover the architectural concepts that influence AppExchange solution design. Learn how to plan,
build, and package your solution for customers.
• Create a Secure
Solution
• Overview of
Packages
• Components
Available in
Managed Packages
• About API and
Dynamic Apex
Access in Packages
• Architectural
Considerations for
Group and
Professional Editions
• Connected Apps
• Environment Hub
• Developer Hub
• Notifications for
Package Errors
18
Design and Build Your Solution Create a Secure Solution
Note: In the checklist, composite submission refers to any solution that involves a third-party, non-Salesforce endpoint, system,
or API.
19
Design and Build Your Solution Overview of Packages
Aim to follow development practices and security guidelines that conform as closely as possible to the OWASP Secure Coding Practices
- Quick Reference Guide.
SEE ALSO:
Secure Coding Guide
AppExchange Security Review Trailhead module
Secure Coding Guide
OWASP site
OWASP Top Ten
OWASP Secure Coding Practices-Quick Reference Guide
Overview of Packages
A package is a container for something as small as an individual component or as large as a set of related apps. After creating a package,
you can distribute it to other Salesforce users and organizations, including those outside your company.
Packages come in two forms—unmanaged and managed:
Unmanaged packages
Unmanaged packages are typically used to distribute open-source projects or application templates to provide developers with the
basic building blocks for an application. Once the components are installed from an unmanaged package, the components can be
edited in the organization they are installed in. The developer who created and uploaded the unmanaged package has no control
over the installed components, and can't change or upgrade them. Unmanaged packages should not be used to migrate components
from a sandbox to production organization. Instead, use Change Sets.
As a best practice, install an unmanaged package only if the org used to upload the package still exists. If that org is deleted, you
may not be able to install the unmanaged package.
Managed packages
Note: Salesforce has two ways that you can build managed packages, first-generation packaging (1GP) and second-generation
packaging (2GP). This guide describes 1GP. For new solutions, use 2GP as described in the Second-Generation Managed
Packages section of the Salesforce DX Developer Guide.
Managed packages are typically used by Salesforce partners to distribute and sell applications to customers. These packages must
be created from a Developer Edition organization. Using the AppExchange and the License Management Application (LMA),
developers can sell and manage user-based licenses to the app. Managed packages are also fully upgradeable. To ensure seamless
upgrades, certain destructive changes, like removing objects or fields, can not be performed.
Managed packages also offer the following benefits:
• Intellectual property protection for Apex
• Built-in versioning support for API accessible components
• The ability to branch and patch a previous version
• The ability to seamlessly push patch updates to subscribers
• Unique naming of all components to ensure conflict-free installs
Packages consist of one or more Salesforce components, which, in turn, consist of one or more attributes. Components and their attributes
behave differently in managed and unmanaged packages.
The following definitions illustrate these concepts:
20
Design and Build Your Solution Planning the Release of Managed Packages
Components
A component is one constituent part of a package. It defines an item, such as a custom object or a custom field. You can combine
components in a package to produce powerful features or applications. In an unmanaged package, components are not upgradeable.
In a managed package, some components can be upgraded while others can’t.
Attributes
An attribute is a field on a component, such as the name of an email template or the Allow Reports checkbox on a custom
object. On a non-upgradeable component in either an unmanaged or managed package, attributes are editable by both the developer
(the one who created the package) and the subscriber (the one who installed the package). On an upgradeable component in a
managed package, some attributes can be edited by the developer, some can be edited by the subscriber, and some are locked,
meaning they can’t be edited by either the developer or subscriber.
State Description
Unmanaged The package has not been converted into a managed package or the component has
not been added to a managed package. Note that a component that is “Managed - Beta”
can become “Unmanaged” if it is removed from a managed package. All packages are
unmanaged unless otherwise indicated by one of the managed icons below.
Managed - Beta The package or component was created in the current Salesforce organization and is
managed, but it is not released because of one of these reasons:
• It has not been uploaded.
• It has been uploaded with Managed - Beta option selected. This option prevents
it from being published, publicly available on AppExchange. The developer can still
edit any component but the installer may not be able to depending on which
components were packaged.
Note: Don’t install a Managed - Beta package over a Managed - Released package.
If you do, the package is no longer upgradeable and your only option is to uninstall
and reinstall it.
21
Design and Build Your Solution Create a Package
State Description
Managed - Released The package or component was created in the current Salesforce organization and is
managed. It is also uploaded with the Managed - Released option selected,
indicating that it can be published on AppExchange and is publicly available. Note that
once you have moved a package to this state, some properties of the components are
no longer editable for both the developer and installer.
This type of release is considered a major release.
Patch If you need to provide a minor upgrade to a managed package, consider creating a patch
instead of a new major release. A patch enables a developer to change the functionality
of existing components in a managed package. Subscribers experience no visible changes
to the package.
This type of release is considered a patch release.
Managed - Installed The package or component was installed from another Salesforce organization but is
managed.
A developer can refine the functionality in a managed package over time, uploading and releasing new versions as the requirements
evolve. This might involve redesigning some of the components in the managed package. Developers can delete some, but not all,
types of components in a Managed - Released package when upgrading it. For details, see Delete Components in Managed Packages
on page 344.
Create a Package
Packages are containers for distributing custom functionality between Salesforce orgs. Create a
EDITIONS
package to upload your app or Lightning component to the AppExchange or to deploy changes
between orgs. Available in: Salesforce
Tip: Before you begin, determine if you want to create and upload a managed or unmanaged Classic (not available in all
orgs) and Lightning
package.
Experience
1. From Setup, enter Packages in the Quick Find box, then select Packages.
Available in: Developer
2. Click New. Edition
3. Enter a name for your package. You can use a different name than what appears on Package uploads and
AppExchange. installs are available in
4. From the dropdown menu, select the default language of all component labels in the package. Group, Professional,
Enterprise, Performance,
5. Optionally, choose a custom link from the Configure Custom Link field to display
Unlimited, and Developer
configuration information to installers of your app. You can select a predefined custom link to Editions
a URL or s-control that you have created for your home page layouts; see the Configure Option
on page 64. The custom link displays as a Configure link within Salesforce on the Salesforce
AppExchange Downloads page and app detail page of the installer's organization. USER PERMISSIONS
6. Optionally, in the Notify on Apex Error field, enter the username of the person to
To create packages:
notify if an uncaught exception occurs in the Apex code. If you do not specify a username, all
• Create AppExchange
uncaught exceptions generate an email notification that is sent to Salesforce. This option is Packages
only available for managed packages. For more information, see Handling Apex Exceptions in
Managed Packages.
22
Design and Build Your Solution Developing and Distributing Unmanaged Packages
Note: Apex can only be packaged from Developer, Enterprise, Unlimited, and Performance Edition organizations.
7. Optionally, in the Notify on Packaging Error field, enter the email address of the person who receives an email notification
if an error occurs when a subscriber’s attempt to install, upgrade, or uninstall a packaged app fails. This field appears only if packaging
error notifications are enabled. To enable notifications, contact your Salesforce representative.
8. Optionally, enter a description that describes the package. You can change this description before you upload it to AppExchange.
9. Optionally, specify a post install script. You can run an Apex script in the subscriber organization after the package is installed or
upgraded. For more information, see Running Apex on Package Install/Upgrade.
10. Optionally, specify an uninstall script. You can run an Apex script in the subscriber organization after the package is uninstalled. For
more information, see Running Apex on Package Uninstall.
11. Click Save.
SEE ALSO:
Components Available in Unmanaged Packages
Note: Some components cannot be added to Managed - Released packages. For a list of packageable components, see
Components Available in Managed Packages on page 24. If you add S-Controls and documents, keep in mind that their
combined size must be less than 10 MB. Also, S-controls cannot be added to packages with restricted API access.
23
Design and Build Your Solution Install Notifications for Unauthorized Managed Packages
Note: Some related components are automatically included in the package even though they might not display in the Package
Components list. For example, when you add a custom object to a package, its custom fields, page layouts, and relationships
with standard objects are automatically included. For a complete list of components, see Components Automatically Added
to Packages on page 41.
3. Click Upload.
You will receive an email that includes an installation link when your package has been uploaded successfully. Wait a few moments
before clicking the installation link or distributing it to others, as it might take a few minutes for it to become active.
The notification appears when customers configure the package installation settings (1). Before customers install the package, they must
confirm that they understand that the package isn’t authorized for distribution (2).
The notification displays when a managed package:
• Has never been through security review or is under review
• Didn’t pass the security review
• Isn’t authorized by the AppExchange Partner Program for another reason
If the AppExchange Partner Program approves the package, it’s authorized for distribution, and the notification is removed. When you
publish a new version of the package, it’s automatically authorized for distribution.
For information about the AppExchange Partner Program and its requirements, visit the Salesforce Partner Community.
24
Design and Build Your Solution Components Available in Managed Packages
Upgradeable
Some components are updated to a newer version when a package is upgraded.
• No: The component isn’t upgraded.
• Yes: The component is upgraded.
Subscriber Deletable
A subscriber or installer of a package can delete the component.
• No: The subscriber can’t delete the component.
• Yes: The subscriber can delete the component.
Developer Deletable
A developer can delete some components after the package is uploaded as Managed - Released. Deleted components aren’t removed
from Salesforce during a package upgrade. The Protectable attribute contains more details on deleting components.
• No: The developer can’t delete a Managed - Released component.
• Yes: The developer can delete a Managed - Released component.
Protectable
Developers can mark certain components as protected. Protected components can’t be linked to or referenced by components
created in a subscriber org. A developer can delete a protected component in a future release without worrying about failing
installations. However, once a component is marked as unprotected and is released globally, the developer can’t delete it. When
the subscriber upgrades to a version of the package where the component is deleted, the component is removed from Salesforce.
• No: The component can’t be marked protected.
• Yes: The component can be marked protected.
IP Protection
Certain components automatically include intellectual property protection, such as obfuscating Apex code. The exceptions are Apex
methods declared as global, meaning that the subscriber can view the method signatures. Users on AppExchange can view information
in the components that you package and publish. Use caution when adding your code to a custom s-control, formula, Visualforce
page, or any other component that you can’t hide in your app.
• No: The component doesn’t support intellectual property protection.
• Yes: The component supports intellectual property protection.
Analytics No No No No No
Application
Analytics No No No No No
Dashboard
Analytics Dataset No No No No No
Analytics Dataset No No No No No
Metadata
Analytics Lens No No No No No
25
Design and Build Your Solution Components Available in Managed Packages
1
Requires a Service Cloud license.
26
Design and Build Your Solution Components Available in Managed Packages
27
Design and Build Your Solution Components Available in Managed Packages
Platform Cache No No No No No
Platform Event No No No No No
Channel
Platform Event No No No No No
Channel Member
28
Design and Build Your Solution Components Available in Managed Packages
Embedded Service No No No No No
Deployment62
Translation Yes No No No No
1
When you remove a connected app that is a component of a package, the app remains available until you update the package. But if
you delete the connected app, it’s permanently deleted. Any version of the package that contains the deleted connected app is invalidated
and can’t be installed. You can update a version of the package that doesn’t contain the connected app as a component. Never delete
a connected app that Salesforce distributes, such as the Salesforce app.
2
If you remove this component type from a new version of your package, the administrator of the subscriber org can delete the
component when a subscriber upgrades.
3
If the ability to remove components is enabled for your packaging org, you can delete these component types, even if they are in a
Managed - Released package.
4
If you remove a public Visualforce component from a new version of your package, the component is removed from the subscriber’s
org upon upgrade. If the Visualforce component is global, it remains in the subscriber org until the administrator deletes it.
2
Requires a Service Cloud license.
29
Design and Build Your Solution Components Available in Unmanaged Packages
5
Package developers must add named credential components to the External Services registration package. A subscriber can also create
a named credential in Salesforce. However, the subscriber must use the same name as the named credential specified in the External
Services registration that references it. Create named credentials manually or with Apex. Be sure to add the named credential to a package
so that subscriber orgs can install it. When a subscriber org installs a named credential, it can use the Apex callouts generated by the
External Services registration process.
6
The Salesforce site object isn’t packageable. Make sure that the destination org has a site with the same developer name as the site in
the source org where the package is created.
7
The combined size of S-Controls and documents must be less than 10 MB.
8
When a developer removes an Aura or Lightning web component from a package, the component remains in a subscriber’s org after
they install the upgraded package. The administrator of the subscriber’s org can delete the component, if desired. This behavior is the
same for a Lightning web component or an Aura component with a public or global access value.
9
You can only delete connections that are in an unprovisioned state.
Component Attributes and Behaviors
Only some attributes of a component are upgradeable. Many components also behave differently or include other restrictions in a
managed package. Consider these behaviors when designing your package.
If you register your namespace after you referenced a flow in a Visualforce page or Apex code, don’t forget to add the namespace
to the flow name. Otherwise, the package will fail to install.
Deleting Visualforce Pages and Global Visualforce Components
Before deleting Visualforce pages or global Visualforce components from your package, remove all references to public Apex classes
and public Visualforce components. After removing the references, upgrade your subscribers to an interim package version before
you delete the page or global component.
Deleting Lightning Components
We recommend a two-stage process to package developers when you’re deleting an Aura component with global access or a
Lightning web component with an isExposed value of true. This process ensures that a global component that you delete
from the package has no dependencies on the other items in the package.
SEE ALSO:
Editing Components and Attributes After Installation
Components Automatically Added to Packages
Delete Components from First-Generation Managed Packages
30
Design and Build Your Solution Components Available in Unmanaged Packages
• Implicitly: The component is automatically added to the package when another dependent component, usually a custom
object, is added.
Automatic Renaming
Salesforce can resolve naming conflicts automatically on install.
• No: If a naming conflict occurs the install is blocked.
• Yes: If a naming conflict occurs Salesforce can optionally change the name of the component being installed.
Application Explicitly No
31
Design and Build Your Solution Components Available in Unmanaged Packages
S-Control* Explicitly No
(10 MB limit)
Tab Explicitly No
Translation Explicitly No
32
Design and Build Your Solution Editing Components and Attributes After Installation
*
The combined size of S-Controls and documents must be less than 10 MB.
SEE ALSO:
Components Automatically Added to Packages
33
Design and Build Your Solution Editing Components and Attributes After Installation
Application • Show in Lightning • All attributes, except App • App Name (SalesforceClassic
Experience (SalesforceClassic Name and Show in only)
only) Lightning Experience • Developer Name (Lightning
• Selected Items (Lightning (Salesforce Classic only) Experience only)
Experience only) • All attributes, except
• Utility Bar (Lightning Developer Name, Selected
Experience only) Items, and Utility Bar
(Lightning Experience only)
• Development Status
• Enable Divisions
• Grant Access Using
Hierarchy
• Search Layouts
34
Design and Build Your Solution Editing Components and Attributes After Installation
Custom Field • Auto-Number Display • Chatter Feed Tracking • Child Relationship Name
Format • Help Text • Data Type
• Decimal Places • Mask Type • External ID
• Description • Mask Character • Field Name
• Default Value • Sharing Setting • Roll-Up Summary Field
• Field Label • Sort Picklist Values • Roll-Up Summary Object
• Formula • Track Field History • Roll-Up Summary Type
• Length • Unique
• Lookup Filter
• Related List Label
• Required
• Roll-Up Summary Filter
Criteria
• Development Status
• Enable Divisions
• Enhanced Lookup
• Grant Access Using
Hierarchy
35
Design and Build Your Solution Editing Components and Attributes After Installation
Custom Report Type • All attributes except • Development Status • Report Type Name
Development Status and
Report Type Name
Email Template (Classic) • All attributes except Email • Email Template Name
Template Name
36
Design and Build Your Solution Editing Components and Attributes After Installation
• Description
• Label
• Markup
• Description
• Label
• Markup
• Description
• Label
37
Design and Build Your Solution Editing Components and Attributes After Installation
• Description
• Label
• Markup
• Description
• Label
• Markup
38
Design and Build Your Solution Editing Components and Attributes After Installation
Remote Site Setting All attributes except Remote Site • Remote Site Name
Name
39
Design and Build Your Solution Editing Components and Attributes After Installation
40
Design and Build Your Solution Components Automatically Added to Packages
When you add this component These components are automatically added
Action Action target object (if it’s a custom object), action target field, action record type, predefined
field values, action layout; and any custom fields that the action layout or predefined values
refer to on the target object
Apex class Custom fields, custom objects, and other explicitly referenced Apex classes, and anything
else that the Apex class references directly
Note: If an Apex class references a custom label, and that label has translations, you
must explicitly package the individual languages desired for those translations to be
included.
Apex trigger Custom fields, custom objects, and any explicitly referenced Apex classes, and anything else
that the Apex trigger references directly
Custom app Custom tabs (including web tabs), documents (stored as images on the tab), documents
folder, asset files
Custom home page layouts Custom home page components on the layout
Custom settings Apex sharing reasons, Apex sharing recalculations, Apex triggers, custom fields, list views,
page layouts, record types, validation rules, or custom buttons or links.
Custom object Custom fields, validation rules, page layouts, list views, custom buttons, custom links, record
types, Apex sharing reasons, Apex sharing recalculations, and Apex triggers
Note:
• Apex sharing reasons are unavailable in extensions.
• When packaged and installed, only public list views from an app are installed. If a
custom object has any custom list views that you want to include in your package,
ensure that the list view is accessible by all users.
41
Design and Build Your Solution Components Automatically Added to Packages
When you add this component These components are automatically added
Custom object (as an external object) External data source, custom fields, page layouts, list views, custom buttons, and custom links
Note:
• When packaged and installed, only public list views from an app are installed. If
an external object has any custom list views that you want to include in your
package, ensure that the list view is accessible by all users.
• In managed and unmanaged packages, external objects are included in the custom
object component.
Custom tab Custom objects (including all of its components), s-controls, and Visualforce pages
Dashboard Folders, reports (including all of its components), s-controls, and Visualforce pages
Document Folder
42
Design and Build Your Solution Components Automatically Added to Packages
When you add this component These components are automatically added
Field set Any referenced fields
Lightning page All Lightning resources referenced by the page, such as record types, actions, custom
components, events, and interfaces. Custom fields, custom objects, list views, page layouts,
Visualforce pages, and Apex classes referenced by the components on the page.
Flow Custom objects, custom fields, Apex classes, and Visualforce pages
Lightning application All Lightning resources referenced by the application, such as components, events, and
interfaces. Custom fields, custom objects, list views, page layouts, and Apex classes referenced
by the application.
Lightning component All Lightning resources referenced by the component, such as nested components, events,
and interfaces. Custom fields, custom objects, list views, page layouts, and Apex classes
referenced by the component.
Lightning event Custom fields, custom objects, list views, and page layouts
Lightning interface Custom fields, custom objects, list views, and page layouts
Lightning web component All Lightning web component resources referenced by the component, such as nested
components and modules. Custom fields, custom objects, list views, page layouts, and Apex
classes referenced by the component.
Page layout Actions, custom buttons, custom links, s-controls, and Visualforce pages
Permission set Any custom permissions, external data sources, Visualforce pages, record types, and Apex
classes that are assigned in the permission set
Report Folder, custom fields, custom objects, custom report types, and custom s-controls
Translation Translated terms for the selected language on any component in the package
Visualforce pages Apex classes that are used as custom controllers, Visualforce custom components, and
referenced field sets
Workflow rule All associated workflow alerts, field updates, outbound messages, and tasks; also, if the
workflow rule is designed for a custom object, the custom object is automatically included
Note: Some package components, such as validation rules or record types, don’t appear in the list of package components, but
are included and install with the other components.
43
Design and Build Your Solution Special Behavior of Components in Packages
Note:
• For more information on the properties of each component in packages, see the packaged components properties table.
• For more information on the attributes of each component in packages, see the component attributes table.
• Component names must be unique within an org. To ensure that your component names don’t conflict with those in an
installer’s org, use a managed package so that all your component names contain your namespace prefix.
Tip: To prevent naming conflicts, Salesforce recommends using managed packages for all packages that contain Apex to
ensure that all Apex objects contain your namespace prefix. For example, if an Apex class is called MyHelloWorld and
your org’s namespace is OneTruCode, the class is referenced as OneTruCode.MyHelloWorld.
Keep the following considerations in mind when including Apex in your package.
• Managed packages receive a unique namespace. This namespace is prepended to your class names, methods, variables, and so
on, which helps prevent duplicate names in the installer’s org.
• In a single transaction, you can only reference 10 unique namespaces. For example, suppose that you have an object that executes
a class in a managed package when the object is updated. Then that class updates a second object, which in turn executes a
different class in a different package. Even though the first package didn’t access the second package directly, the access occurs
in the same transaction. It’s therefore included in the number of namespaces accessed in a single transaction.
• If you’re exposing any methods as Web services, include detailed documentation so that subscribers can write external code
that calls your Web service.
• If an Apex class references a custom label and that label has translations, explicitly package the individual languages desired to
include those translations in the package.
• If you reference a custom object’s sharing object (such as MyCustomObject__share) in Apex, you add a sharing model dependency
to your package. Set the default org-wide access level for the custom object to Private so other orgs can install your package
successfully.
• The code contained in an Apex class, trigger, or Visualforce component that’s part of a managed package is obfuscated and
can’t be viewed in an installing org. The only exceptions are methods declared as global. You can view global method signatures
in an installing org. In addition, License Management Org users with the View and Debug Managed Apex permission can view
their packages’ obfuscated Apex classes when logged in to subscriber orgs via the Subscriber Support Console.
• You can use the deprecated annotation in Apex to identify global methods, classes, exceptions, enums, interfaces, and
variables that can’t be referenced in later releases of a managed package. So you can refactor code in managed packages as the
requirements evolve. After you upload another package version as Managed - Released, new subscribers that install the latest
package version can’t see the deprecated elements, while the elements continue to function for existing subscribers and API
integrations.
• Any Apex contained in an unmanaged package that explicitly references a namespace can’t be uploaded.
• Apex code that refers to Data Categories can’t be uploaded.
44
Design and Build Your Solution Special Behavior of Components in Packages
• Before deleting Visualforce pages or global Visualforce components from your package, remove all references to public Apex
classes and public Visualforce components. After removing the references, upgrade your subscribers to an interim package
version before you delete the page or global component.
Apex Sharing Reasons
Apex sharing reasons can be added directly to a package, but are only available for custom objects.
Connected Apps
• Connected apps can be added to managed packages, only. Connected apps are not supported for unmanaged packages.
• Subscribers or installers of a package can’t delete a connected app by itself; they can only uninstall its package. A developer can
delete a connected app after a package is uploaded as Managed - Released. The connected app is deleted in the subscriber’s
org during a package upgrade.
• To publish updates for a connected app that’s part of a managed package, you typically push a new managed package version
and upgrade subscriber orgs to the new version. But if you update a connected app’s PIN Protect settings, it’s not necessary to
push a new managed package upgrade. After saving changes to PIN Protect settings, these updates are automatically published
to subscriber orgs.
• The following connected app settings can’t be updated with managed package patches.
– Mobile App settings
– Push messaging, including Apple, Android, and Windows push notifications
– Canvas App settings
– SAML settings
To update these settings, publish a new package version.
• If you push upgrade a package containing a connected app whose OAuth scope or IP ranges have changed from the previous
version, the upgrade fails. This security feature blocks unauthorized users from gaining broad access to a customer org by
upgrading an installed package. A customer can still perform a pull upgrade of the same package. This upgrade is allowed
because it’s with the customer’s knowledge and consent.
• You can add an existing connected app (one created before Summer ’13) to a managed package. You can also combine new
and existing connected apps in the same managed package.
• For connected apps created before Summer ’13, the existing install URL is valid until you package and upload a new version.
After you upload a new version of the package with an updated connected app, the install URL no longer works.
Custom Console
A package that has a custom console component can only be installed in an org with the Service Cloud license or Sales Console
permission enabled.
Custom Fields
• Developers can add required and universally required custom fields to managed packages as long as they have default values.
• Auto-number type fields and required fields can’t be added after the object is uploaded in a Managed - Released package.
• Subscriber orgs can’t install roll-up summary fields that summarize detail fields set to protected.
Custom Labels
If a label is translated, the language must be explicitly included in the package for the translations to be included in the package.
Subscribers can override the default translation for a custom label.
Custom Metadata Types
Second-generation managed packages (2GP) include the fields and records for custom metadata types that you add. You can’t add
fields directly to an existing package after the package version is promoted. If you create multiple packages that share a namespace,
then layouts and records can be in separate packagesCustom fields on the custom metadata type must be in the same package.
45
Design and Build Your Solution Special Behavior of Components in Packages
You can add fields to a custom metadata type by publishing an extension to the existing package, creating an entity relationship
field, and mapping the field to the custom metadata type in your extension. See Add Custom Metadata Type Fields to Existing
Packages.
Custom Objects
• If a developer enables the Allow Reports or Allow Activities attributes on a packaged custom object, the
subscriber’s org also has these features enabled during an upgrade. After it’s enabled in a Managed - Released package, the
developer and the subscriber can’t disable these attributes.
• Standard button and link overrides are also packageable.
• In your extension package, if you want to access history information for custom objects contained in the base package, work
with the base package owner to:
1. Enable history tracking in the release org of the base package.
2. Upload a new version of the base package.
3. Install the new version of the base package in the release org of the extension package to access the history tracking info.
As a best practice, don’t enable history tracking for custom objects contained in the base package directly in the extension
package’s release org. Doing so can result in an error when you install the package and when you create patch orgs for the
extension package.
Custom Permissions
If you deploy a change set with a custom permission that includes a connected app, the connected app must already be installed
in the destination org.
Custom Report Types
A developer can edit a custom report type in a managed package after it’s released, and can add new fields. Subscribers automatically
receive these changes when they install a new version of the managed package. However, developers can’t remove objects from
the report type after the package is released. If you delete a field in a custom report type that’s part of a managed package, and the
deleted field is part of bucketing or used in grouping, an error message appears.
Custom Settings
• If a custom setting is contained in a managed package, and the Visibility is specified as Protected, the custom setting
isn’t contained in the list of components for the package on the subscriber’s org. All data for the custom setting is hidden from
the subscriber.
Custom Tabs
• The tab style for a custom tab must be unique within your app. However, it doesn’t have to be unique within the org where it’s
installed. A custom tab style doesn’t conflict with an existing custom tab in the installer’s environment.
• To provide custom tab names in different languages, from Setup, in the Quick Find box, enter Rename Tabs and Labels,
then select Rename Tabs and Labels.
• Subscribers can’t edit custom tabs in a managed package.
Customer Portal and Partner Portal
Packages referring to Customer Portal or partner portal fields are supported. The subscriber installing the package must have the
respective portal enabled to install the package.
Dashboard Components
Developers of managed packages must consider the implications of introducing dashboard components that reference reports
released in a previous version of the package. If the subscriber deleted the report or moved the report to a personal folder, the
dashboard component referencing the report is dropped during the installation. Also, if the subscriber has modified the report, the
report results can impact what displays in the dashboard component. As a best practice, release a dashboard and the related reports
in the same version.
46
Design and Build Your Solution Special Behavior of Components in Packages
Divisions
• When divisions are enabled on a custom object in a package, the subscribing org must have the divisions feature enabled to
install the package.
• Setting the division filter on a report doesn’t cause a dependency. The setting is dropped when installed into the subscriber’s
org.
• Summarizing by the object’s division field—for example, Account Division—in a report causes a dependency.
• If the object’s division field in a report is included as a column, and the subscriber’s org doesn’t support divisions on the object,
the column is dropped during installation.
• If you install a custom report type that includes an object’s division field as a column, that column is dropped if the org doesn’t
support divisions.
Email Templates (Lightning)
Create managed packages using the first-generation packaging tool.
These packaging considerations apply to Lightning email templates, including email templates created in Email Template Builder.
• An email template created in Email Template Builder that contains inline images with references to Salesforce Files can’t be
added to packages or change sets.
• For email templates created in Email Template Builder before the Spring ’21 release, attachments aren’t automatically added to
the package. Open and resave these templates to turn the attachments into content assets, which are then automatically added
to the package.
• For merge fields based on custom fields that are used in the Recipients prefix (for leads and contacts), we add references to
those merge fields. If the custom field is renamed, the reference in the template isn’t updated. Edit the custom merge field to
use the new field name and update the reference.
Note: An email template created in Email Template Builder can’t be edited after it’s downloaded. To edit the template, clone
it.
External Data Sources
• After installing an external data source from a managed or unmanaged package, the subscriber must reauthenticate to the
external system.
– For password authentication, the subscriber must reenter the password in the external data source definition.
– For OAuth, the subscriber must update the callback URL in the client configuration for the authentication provider, then
reauthenticate by selecting Start Authentication Flow on Save on the external data source.
• Certificates aren’t packageable. If you package an external data source that specifies a certificate, make sure that the subscriber
org has a valid certificate with the same name.
External Objects
• In managed and unmanaged packages, external objects are included in the custom object component.
• Include External Change Data Tracking components in a managed package by selecting your test from the Apex Class Component
Type list. The trigger, test, external data source, external object, and other related assets are brought into the package for
distribution.
47
Design and Build Your Solution Special Behavior of Components in Packages
Field Dependencies
• Developers and subscribers can add, change, or remove field dependencies.
• If the developer adds a field dependency, it’s added during installation unless the subscriber has already specified a dependency
for the same field.
• If a developer removes a dependency, this change isn’t reflected in the subscriber’s org during an upgrade.
• If the developer introduces a new picklist value mapping between the dependent and controlling fields, the mapping is added
during an upgrade.
• If a developer removes a picklist value mapping, the change isn’t reflected in the subscriber’s org during an upgrade.
Field Sets
Field sets in installed packages perform different merge behaviors during a package upgrade:
Adds a field The new field is placed at the end of the upgraded field set in
whichever column it was added to.
Changes a field from Available for the Field Set or In the Field The field is removed from the upgraded field set.
Set to Unavailable
Changes a field from In the Field Set to Available for the Field The change isn’t reflected in the upgraded field set.
Set (or vice versa)
Note: Subscribers aren’t notified of changes to their installed field sets. The developer must notify users ——of changes to
released field sets through the package release es or other documentation. Merging has the potential to remove fields in your
field set.
When a field set is installed, a subscriber can add or remove any field.
Flows
• When you upload a package or package version, the active flow version is included. If the flow has no active version, the latest
version is packaged.
• To update a managed package with a different flow version, activate that version and upload the package again. Or deactivate
all versions of the flow, make sure the latest flow version is the one to distribute, and then upload the package.
• In a development org, you can’t delete a flow or flow version after you upload it to a released or beta managed package.
• You can’t delete flows from Managed - Beta package installations in development org.
• You can’t delete a flow from an installed package. To remove a packaged flow from your org, deactivate it and then uninstall
the package.
• If you have multiple versions of a flow installed from multiple unmanaged packages, you can’t remove only one version by
uninstalling its package. Uninstalling a package—managed or unmanaged—that contains a single version of the flow removes
the entire flow, including all versions.
• You can’t include flows in package patches.
• An active flow in a package is active after it’s installed. The previous active version of the flow in the destination org is deactivated
in favor of the newly installed version. Any in-progress flows based on the now-deactivated version continue to run without
interruption but reflect the previous version of the flow.
48
Design and Build Your Solution Special Behavior of Components in Packages
• Upgrading a managed package in your org installs a new flow version only if there’s a newer flow version from the developer.
After several upgrades, you can end up with multiple flow versions.
• If you install a managed package that contains multiple flow versions in a fresh destination org, only the latest flow version is
deployed.
• If you install a flow from an unmanaged package that has the same name but a different version number as a flow in your org,
the newly installed flow becomes the latest version of the existing flow. However, if the packaged flow has the same name and
version number as a flow already in your org, the package install fails. You can’t overwrite a flow.
• Flow Builder can’t open flows that are installed from managed packages, unless they’re templates.
• You can’t create a package that contains flows invoked by both managed and unmanaged package pages. As a workaround,
create two packages, one for each type of component. For example, suppose that you want to package a customizable flow
invoked by a managed package page. Create one unmanaged package with the flow that users can customize. Then create
another managed package with the Visualforce page referencing the flow (including namespace) from the first package.
• When you translate a flow from a managed package, the flow’s Master Definition Name doesn’t appear on the Translate page
or the Override page. To update the translation for the Master Definition Name, edit the flow label and then update the translation
from the Translate page.
• If any of the following elements are used in a flow, packageable components that they reference aren’t included in the package
automatically. To deploy the package successfully, manually add those referenced components to the package.
– Post to Chatter
– Send Email
– Submit for Approval
• If a flow references a Lightning component that depends on a CSP Trusted Site, the trusted site isn’t included in the package or
change set automatically.
Folders
• Components that Salesforce stores in folders, such as documents, can’t be added to packages when stored in personal and
unfiled folders. Put documents, reports, and other components that Salesforce stores in folders in one of your publicly accessible
folders.
• Components such as documents, email templates, reports, or dashboards are stored in new folders in the installer’s org using
the publisher’s folder names. Give these folders names that indicate they’re part of the package.
• If a new report, dashboard, document, or email template is installed during an upgrade, and the folder containing the component
was deleted by the subscriber, the folder is re-created. Any components in the folder that were previously deleted aren’t restored.
• The name of a component contained in a folder must be unique across all folders of the same component type, excluding
personal folders. Components contained in a personal folder must be unique within the personal folder only.
Home Page Components
When you package a custom home page layout, all the custom home page components included on the page layout are automatically
added. Standard components such as Messages & Alerts aren’t included in the package and don’t overwrite the installer’s Messages
& Alerts. To include a message in your custom home page layout, create an HTML Area type custom Home tab component containing
your message. From Setup, in the Quick Find box, enter Home Page Components, then select Home Page Components.
Then add the message to your custom home page layout.
Home Page Layouts
After they’re installed, your custom home page layouts are listed with all the subscriber’s home page layouts. Distinguish them by
including the name of your app in the page layout name.
Inbound Network Connections
• Packaged connections are installed as unprovisioned. Alert subscribers about how to provision connections after package
installation.
49
Design and Build Your Solution Special Behavior of Components in Packages
• If a developer changes the Region of a packaged connection that is subscriber-provisioned, the upgrade fails for the subscriber.
Alert subscribers about tearing down the connection before updating the Region field. As a best practice, avoid changing the
Region of a packaged connection unless necessary.
List Views
List views associated with queues can’t be included in a package or unlocked package.
Multi-Currency
• If a subscriber installs a report or custom report type that includes an object’s currency field as a column, that column is dropped
if the subscriber’s org isn’t enabled for multiple currencies.
• Referencing an object’s currency field in a report’s criteria—for example, Account Currency—causes a dependency.
• Summarizing by an object’s currency field in a report causes a dependency.
• Using a currency designation in a report criteria value—for example, “Annual Revenue equals GBP 100”—doesn’t cause a
dependency. The report generates an error when run in the installers org if it doesn’t support the currency.
• If an object’s currency field in a report is included as a column and the subscriber’s org isn’t enabled for multiple currencies, that
column is dropped during installation.
• If a subscriber installs a custom report type that includes an object’s currency field as a column, that column is dropped if the
org isn’t enabled for multiple currencies.
Named Credentials
• After installing a named credential from a managed or unmanaged package, the subscriber must reauthenticate to the external
system.
– For password authentication, the subscriber reenters the password in the named credential definition.
– For OAuth, the subscriber updates the callback URL in the client configuration for the authentication provider and then
reauthenticates by selecting Start Authentication Flow on Save on the named credential.
• Named credentials aren’t automatically added to packages. If you package an external data source or Apex code that specifies
a named credential as a callout endpoint, add the named credential to the package. Alternatively, make sure that the subscriber
org has a valid named credential with the same name.
If you have multiple orgs, you can create a named credential with the same name but with a different endpoint URL in each org.
You can then package and deploy—on all the orgs—one callout definition that references the shared name of those named
credentials. For example, the named credential in each org can have a different endpoint URL to accommodate differences in
development and production environments. If an Apex callout specifies the shared name of those named credentials, the Apex
class that defines the callout can be packaged and deployed on all those orgs without programmatically checking the environment.
• Certificates aren’t packageable. If you package a named credential that specifies a certificate, make sure that the subscriber org
has a valid certificate with the same name.
Outbound Network Connections
• Packaged connections are installed as unprovisioned. Alert subscribers about how to provision connections after package
installation.
• If a developer changes the Region or Service Name of a packaged connection that is subscriber-provisioned, the upgrade fails
for the subscriber. Alert subscribers about tearing down the connection before you update the Region or Service Name fields.
As a best practice, avoid changing the Region or Service Name of a packaged connection unless necessary.
• If you package a Named Credential that references an Outbound Network Connection, the referenced Outbound Network
Connection component is automatically added to the package.
Page Layouts
The page layout of the person uploading a package is the layout used for Group and Professional Edition orgs and becomes the
default page layout for Enterprise, Unlimited, Performance, and Developer Edition orgs.
50
Design and Build Your Solution Special Behavior of Components in Packages
Package page layouts alongside complimentary record types if the layout is being installed on an existing object. Otherwise, manually
apply the installed page layouts to profiles.
If a page layout and a record type are created as a result of installing a package, the uploading user’s page layout assignment for
that record type is assigned to that record type for all profiles in the subscriber org, unless a profile is mapped during an install or
upgrade.
Picklist Values
• When explicitly referencing a picklist value in code, keep in mind that picklist values for custom fields can be renamed, added,
edited, or deleted by subscribers. Carefully consider this possibility when explicitly referencing a picklist value in code.
• Picklist field values can be added or deleted in the developer’s organization.
• Changes to standard picklists can’t be packaged and deployed to subscriber orgs and picklist values deleted by the developer
are still available in the subscriber’s org. If there are differences between the package and the target org, or if there are
dependencies on new values from features such as PathAssistant, the deploy fails. To change values in subscriber orgs, you must
manually add or modify the values in the target subscriber org.
• Updating picklist values in unlocked packages isn’t supported. Manually add or modify the values in the target subscriber org.
• Package upgrades retain dependent picklist values that are saved in a managed custom field.
• Global value sets can be added to developer and subscriber orgs. Global value sets have the following behavior during a package
upgrade:
– Label and API names for field values don’t change in subscriber orgs.
– New field values aren’t added to the subscriber orgs.
– Active and inactive value settings in subscriber orgs don’t change.
– Default values in subscriber orgs don’t change.
– Global value set label names change if the package upgrade includes a global value set label change.
Record Types
• If record types are included in the package, the subscriber’s org must support record types to install the package.
• When a new picklist value is installed, it’s associated with all installed record types according to the mappings specified by the
developer. A subscriber can change this association.
• Referencing an object’s record type field in a report’s criteria—for example, Account Record Type—causes a dependency.
• Summarizing by an object’s record type field in a report’s criteria—for example, Account Record Type—causes a
dependency.
• If an object’s record type field is included as a column in a report, and the subscriber’s org isn’t using record types on the object
or doesn’t support record types, the column is dropped during installation.
• If you install a custom report type that includes an object’s record type field as a column, that column is dropped if the org
doesn’t support record types or the object doesn’t have record types defined.
Reporting Snapshots
Developers of managed packages must consider the implications of introducing reporting snapshots that reference reports released
in a previous version of the package. If the subscriber deleted the report or moved the report to a personal folder, the reporting
snapshot referencing the report isn’t installed, even though the Package Installation page indicates that it will be. Also, if the subscriber
has modified the report, the report can return results impacting the information displayed by the reporting snapshot. As a best
practice, the developer releases the reporting snapshot and the related reports in the same version.
Because the subscriber selects the running use, some reporting snapshot field mappings could become invalid if the running user
doesn’t have access to source or target fields.
51
Design and Build Your Solution Special Behavior of Components in Packages
Reports
If a report includes elements that can’t be packaged, those elements are dropped or downgraded, or the package upload fails. For
example:
• Hierarchy drill-downs are dropped from activity and opportunities reports.
• Filters on unpackageable fields are automatically dropped (for example, in filters on standard object record types).
• Package upload fails if a report includes filter logic on an unpackageable field (for example, in filters on standard object record
types).
• Lookup values on the Select Campaign field of standard campaign reports are dropped.
• Reports are dropped from packages if they’ve been moved to a private folder or to the Unfiled Public Reports folder.
• When a package is installed into an org that doesn’t have Chart Analytics 2.0:
– Combination charts are downgraded instead of dropped. For example, a combination vertical column chart with a line added
is downgraded to a simple vertical column chart. A combination bar chart with more bars is downgraded to a simple bar
chart.
– Unsupported chart types, such as donut and funnel, are dropped.
S-Controls
Only s-controls in unmanaged packages created before January 2010 can be installed by subscribers.
S-controls have been deprecated and are superseded by Visualforce pages.
Translation Workbench
• If you’ve enabled the translation workbench and added a language to your package, any associated translated values are
automatically packaged for the appropriate components in your package. Make sure that you have provided translations for all
possible components.
• An installer of your package can see which languages are supported on the package detail page. The installer doesn’t need to
enable anything to have the packaged language translations appear. The only reasons installers might want to enable the
translation workbench are to change translations for unmanaged components after installation, override custom label translations
in a managed package, or translate into more languages.
• If you’re designing a package extension, you can include translations for the extension components but not translations for
components in the base package.
Validation Rules
For custom objects that are packaged, any associated validation rules are implicitly packaged as well.
Analytics
Analytics components include Analytics applications, dashboards, dataflows, datasets, lenses, recipes, and user XMD. As you package
Analytics components, keep these tips and best practices in mind.
• Analytics unmanaged packages, as opposed to managed packages, are considered a developer-only feature and aren’t supported
for general-purpose distribution. While Analytics unmanaged packages work as expected within the constraints of Salesforce
unmanaged packages, they aren’t subject to as much testing as managed packages. Unmanaged packages come without many
of the safeguards of managed packages, and are intended for developers familiar with their limitations. Also refer to the relevant
topic in the ISV Guide.
• Before a recipe is available for packaging, you must create a dataset with the recipe. The related dataflow must be added to the
package along with the recipe for deployment to succeed.
• Analytics Admin permissions are required to create a package but not for deployment, which requires only Salesforce admin
permissions.
52
Design and Build Your Solution Special Behavior of Components in Packages
• There’s no spidering between datasets and dataflows, meaning there’s no dependency following. When packaging both, they
must be added manually. If they aren’t, an error appears during deployment. The same is true for change sets—when packaging
both datasets and dataflows, add them manually.
• When you package a data flow, source and security predicates aren’t included in the package.
• Because views are user-specific, they aren’t included when you package the dashboard.
• If you migrate dashboards manually using JSON copy and paste, any conditional formatting, widget-specific number formats,
and measure labels on blended queries are lost. To retain these formats and labels in the migrated dashboard, include the
Analytics Dataset Metadata component type when packaging your change set.
• The Winter ’18 release contains a beta version of Apex steps, which lets developers include custom Apex functionality in a
dashboard to access Salesforce platform features that aren’t inherently supported in Analytics. If you include dashboards in a
package, Apex steps aren’t included—migrate Apex classes separately.
• Before the Spring ’17 release, images didn’t render when deploying a dashboard that used an image widget that referenced
image files not available on the target org. There were two workarounds: Manually upload the images, or add a folder containing
the images to the package. As of the Spring ’17 release, images are packaged with the dashboard, and references between
dashboards are maintained. You can’t delete a dashboard that is referenced in a link. Either re-create the image, or link the
widgets in the dashboard in the source org. Then repackage or fix the link issues in the target org.
• Take care when packaging dataflows. Invalid schema overrides and unsupported or illegal parameters are removed. For example,
Type = dim is no longer supported. Use Type = text instead. Comments in JSON are removed. Nodes can appear in
a different order.
Workflow
• Salesforce prevents you from uploading workflow alerts that have a public group, partner user, or role recipient. Change the
recipient to a user before uploading your app. During installation, Salesforce replaces that user with the user installing the app,
and the installer can customize it as necessary.
• Salesforce prevents you from uploading workflow field updates that change an Owner field to a queue. Change the updated
field value to a user before uploading your app. During installation, Salesforce replaces that user with the user installing the app,
and the installer can customize it as necessary.
• Salesforce prevents you from uploading workflow rules, field updates, and outbound messages that reference a record type on
a standard or managed-installed object.
• Salesforce prevents you from uploading workflow tasks that are assigned to a role. Change the Assigned To field to a user
before uploading your app. During installation, Salesforce replaces that user with the user installing the app, and the installer
can customize it as necessary.
• You can package workflow rules and associated workflow actions, such as email alerts and field updates. However, any time-based
triggers aren’t included in the package. Notify your installers to set up any time-based triggers that are essential to your app.
Flow triggers aren’t packageable. The pilot program for flow trigger workflow actions is closed. If you've already enabled the
pilot in your org, you can continue to create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use
Flow Builder to create a record-triggered flow, or use Process Builder to launch a flow from a process.
53
Design and Build Your Solution Special Behavior of Components in Packages
• On install, all workflow rules newly created in the installed or upgraded package, have the same activation status as in the
uploaded package.
Note: The New Order Save Behavior release update affects all package types: unlocked, unmanaged, first-generation managed
package (1GP), and second-generation managed package (2GP).
After you verify that your package works with the new order save behavior and that all your packages associated with your Dev Hub org
work with the new order save behavior, you can either enable the release update in your Dev Hub org or wait for it to be auto-enabled
in Summer ’22. We recommend supporting both the new and old order save behavior during the Release Update window.
The scenarios in the table take effect in Winter ’21 and continue through the release update window in Summer ’22.
Table 1: Success and Failure Scenarios for Packages and Order Save Behavior
Package Uses Subscriber Org Has Enabled New Subscriber Org Has Enabled Old
Order Save Behavior Order Save Behavior
New Order Save Behavior SUCCEED FAIL
Package upgrades and installations of major If the subscriber org and the package are
and minor package versions succeed. All specifying different order save behaviors,
package types succeed in this condition. package upgrades and installations are
FAIL blocked.
54
Design and Build Your Solution Special Behavior of Components in Packages
Package Uses Subscriber Org Has Enabled New Subscriber Org Has Enabled Old
Order Save Behavior Order Save Behavior
of packages. All other patch upgrades
for 1GP packages are successful.
3. To indicate that your package is compatible with both new and old order save conditions, from Setup, in the Quick Find box, enter
Package. Select the package that you tested and select Upload.
4. Locate the Package Requirements section and disable New Order Save Behavior.
When this setting is disabled and the release update is enabled, subscriber orgs using either the new or old order save behavior can
install your package.
55
Design and Build Your Solution Protected Components
}
}
}
Protected Components
Developers can mark certain components as protected. Protected components can’t be linked to or referenced by components created
in a subscriber org. A developer can delete a protected component in a future release without worrying about failing installations.
However, once a component is marked as unprotected and is released globally, the developer can’t delete it.
The developer can mark the following components as protected in managed packages.
• Custom labels
• Custom links (for Home page only)
• Custom metadata types
• Custom permissions
• Custom settings
• Workflow alerts
• Workflow field updates
• Workflow outbound messages
• Workflow tasks
• Workflow flow triggers
The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue to
create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use Flow Builder to create a record-triggered
flow, or use Process Builder to launch a flow from a process.
56
Design and Build Your Solution Set Up a Platform Cache Partition with Provider Free Capacity
Note: If a Platform Cache partition is already part of your managed package, you can choose to edit the existing partition and
allocate the Provider Free capacity to it.
Create a partition from the Platform Cache page and then set it up to use the Provider Free capacity
1. From Setup, in the Quick Find box, enter Platform Cache, and then select Platform Cache.
As the Provider Free capacity is automatically enabled in all Developer edition orgs, the Org’s Capacity Breakdown donut chart shows
the Provider Free capacity.
Note: If the managed package is not AppExchange-certified and security-reviewed, the Provider Free capacity resets to zero and
will not be allocated to the installed Platform Cache partition.
When a Platform Cache partition with Provider Free capacity is installed in a subscriber org, the Provider Free capacity allocated is
non-editable. The provider free capacity of one installed partition can’t be used for any other partition.
Tip: After you install a Platform Cache partition with Provider Free capacity, you can edit the partition and make additional
allocations from the available platform cache capacity of the org.
57
Design and Build Your Solution Understanding Dependencies
Understanding Dependencies
Package dependencies are created when one component references another component,
EDITIONS
permission, or preference that is required for the component to be valid. Lightning Platform tracks
certain dependencies, including: Available in: Salesforce
• Organizational dependencies, such as whether multicurrency or campaigns are enabled Classic (not available in all
orgs)
• Component-specific dependencies, such as whether particular record types or divisions exist
• References to both standard and custom objects or fields AppExchange packages
and Visualforce are
Packages, Apex classes, Apex triggers, Visualforce components, and Visualforce pages can have
available in: Group,
dependencies on components within an organization. These dependencies are recorded on the
Professional, Enterprise,
Show Dependencies page. Performance, Unlimited,
Dependencies are important for packaging because any dependency in a component of a package and Developer Editions
is considered a dependency of the package as a whole.
Apex available in:
Note: An installer’s organization must meet all dependency requirements listed on the Show Enterprise, Performance,
Dependencies page or else the installation will fail. For example, the installer's organization Unlimited, and Developer
must have divisions enabled to install a package that references divisions. Editions
Dependencies are important for Apex classes or triggers. Any component on which a class or trigger
depends must be included with the class or trigger when the code is deployed or packaged. USER PERMISSIONS
In addition to dependencies, the operational scope is also displayed on the Show Dependencies To upload packages:
page. The operational scope is a table that lists any data manipulation language (DML) operations • Upload AppExchange
(such as insert or merge) that Apex executes on a specified object. The operational scope Packages
can be used when installing an application to determine the full extent of the application’s database To view Visualforce
operations. dependencies:
To view the dependencies and operational scope for a package, Apex class, Apex trigger, or • Developer Mode
Visualforce page:
1. Navigate to the appropriate component from Setup:
• For packages, enter Packages in the Quick Find box, then select Packages.
• For Apex classes, enter Apex Classes in the Quick Find box, then select Apex Classes.
• For Apex triggers, from the management settings for the appropriate object, go to Triggers.
• For Visualforce pages, enter Visualforce Pages in the Quick Find box, then select Visualforce Pages.
58
Design and Build Your Solution Metadata Access in Apex Code
For example, if a Visualforce page includes a reference to a multicurrency field, such as {!contract.ISO_code}, that Visualforce
page has a dependency on multicurrency. If a package contains this Visualforce page, it also has a dependency on multicurrency. Any
organization that wants to install this package must have multicurrency enabled.
59
Design and Build Your Solution About Permission Sets and Profile Settings
Can they be upgraded in managed Yes. Profile settings are applied to existing
packages? profiles in the subscriber’s org on install or
upgrade. Only permissions related to new
components created as part of the install or
upgrade are applied.
Can subscribers edit them? Subscribers can edit permission sets in Yes.
unmanaged packages, but not in managed
packages.
Can you clone or create them? Yes. However, if a subscriber clones a Yes. Subscribers can clone any profile that
permission set or creates one that’s based includes permissions and settings related
on a packaged permission set, it isn’t to packaged components.
updated in subsequent upgrades. Only the
permission sets included in a package are
upgraded.
Do they include standard object No. Also, you can’t include object No.
permissions? permissions for a custom object in a
master-detail relationship where the master
is a standard object.
Are they included in the installation wizard? No. Subscribers must assign permission sets Yes. Profile settings are applied to existing
after installation. profiles in the subscriber’s org on install or
upgrade. Only permissions related to new
components created as part of the install or
upgrade are applied.
What are the user license requirements? A permission set is only installed if the None. In a subscriber org, the installation
subscriber org has at least one user license overrides the profile settings, not their user
that matches the permission set. For licenses.
example, permission sets with the Salesforce
Platform user license aren’t installed in an
org that has no Salesforce Platform user
60
Design and Build Your Solution Permission Set Groups
How are they assigned to users? Subscribers must assign packaged Profile settings are applied to existing
permission sets after installing the package. profiles.
Best Practices
• Use permission sets in addition to packaged profiles so your subscribers can easily add new permissions for existing app users.
• If users need access to apps, standard tabs, page layouts, and record types, don't use permission sets as the sole permission-granting
model for your app.
• Create packaged permission sets that grant access to the custom components in a package, but not standard Salesforce components.
Important: You can't include object permissions for standard objects in managed packages. During package installation, all
object permissions for standard objects are ignored, and aren't installed in the org.
Also:
• You can’t add permission sets constrained by a permission set license to managed or unmanaged packages.
• You can only package permissions for metadata that’s included in your package.
SEE ALSO:
Create a Permission Set Group
Permission Set Groups Considerations
61
Design and Build Your Solution Protecting Your Intellectual Property
Consider these tips when creating custom profiles for apps you want to publish.
• Give each custom profile a name that identifies the profile as belonging to the app. For example, if you’re creating a Human Resources
app named “HR2GO,” a good profile name would be “HR2GO Approving Manager.”
• If your custom profiles have a hierarchy, use a name that indicates the profile’s location in the hierarchy. For example, name a
senior-level manager’s profile “HR2GO Level 2 Approving Manager.”
• Avoid custom profile names that can be interpreted differently in other organizations. For example, the profile name “HR2GO Level
2 Approving Manager” is open to less interpretation than “Sr. Manager.”
• Provide a meaningful description for each profile. The description displays to the user installing your app.
Alternatively, you can use permission sets to maintain control of permission settings through the upgrade process. Permission sets
contain a subset of profile access settings, including object permissions, field permissions, Apex class access, and Visualforce page access.
These permissions are the same as those available on profiles. You can add a permission set as a component in a package.
Note: In packages, assigned apps and tab settings aren’t included in permission set components.
62
Design and Build Your Solution Matching the Salesforce Look and Feel
• When you upload the package, deselect the Chatter required checkbox (this is automatically selected if you have an Apex reference
to Chatter).
Note: If the Chatter required checkbox can't be deselected, then some component in the package has a special requirement
for Chatter. This can happen, for example, if you package a custom report type that relies on Chatter. If the Chatter-required
checkbox can't be disabled, then the package can only be installed in organizations that have Chatter enabled.
The following example tries to post to feeds and get a user's feed. If Chatter is not enabled in the organization, the code catches the
REQUIRED_FEATURE_MISSING exception. Note that this is an incomplete code example and does not run.
}
}
}
63
Design and Build Your Solution Maintaining My Domain and Visualforce URLs
with a Visualforce page, your new page takes on the style of the associated object’s standard tab in Salesforce. For more information,
see Using Salesforce Styles in the Visualforce Developer's Guide.
64
Design and Build Your Solution About API and Dynamic Apex Access in Packages
Custom Help
You can provide custom help for your custom object records and custom fields.
• The developer of an AppExchange package can restrict API access for a package before uploading Available in: Contact
it to Salesforce AppExchange. Once restricted, the package components receive Apex and API Manager, Group,
sessions that are restricted to the custom objects in the package. The developer can also enable Professional, Enterprise,
access to specific standard objects, and any custom objects in other packages that this package Performance, Unlimited,
depends on. and Developer Editions
• The installer of a package can accept or reject package access privileges when installing the
package to his or her organization.
• After installation, an administrator can change Apex and API access for a package at any time. The installer can also enable access
on additional objects such as custom objects created in the installer’s organization or objects installed by unrelated packages.
There are two possible options for the API Access setting:
• The default Unrestricted, which gives the package components the same API access to standard objects as the user who is
logged in when the component sends a request to the API. Apex runs in system mode. Unrestricted access gives Apex read access
to all standard and custom objects.
• Restricted, which allows the administrator to select which standard objects the components in the package can access. Further,
the components in restricted packages can only access custom objects in the current package if the user has the object permissions
that provide access to them.
65
Design and Build Your Solution About API and Dynamic Apex Access in Packages
– Manage Billing
– Manage Call Centers
– Manage Categories
– Manage Custom Report Types
– Manage Dashboards
– Manage Letterheads
– Manage Package Licenses
– Manage Public Documents
– Manage Public List Views
– Manage Public Reports
– Manage Public Templates
– Manage Users
– Transfer Record
– Use Team Reassignment Wizards
– View Setup and Configuration
– Weekly Export Data
• If Read, Create, Edit, and Delete access are not selected in the API access setting for objects, users do not have access to
those objects from the package components, even if the user has the “Modify All Data” and “View All Data” permissions.
• A package with Restricted API access can’t create new users.
• Salesforce denies access to Web service and executeanonymous requests from an AppExchange package that has
Restricted access.
The following considerations also apply to API access in packages:
• Workflow rules and Apex triggers fire regardless of API access in a package.
• If a component is in more than one package in an organization, API access is unrestricted for that component in all packages in the
organization regardless of the access setting.
• If Salesforce introduces a new standard object after you select restricted access for a package, access to the new standard object is
not granted by default. You must modify the restricted access setting to include the new standard object.
• When you upgrade a package, changes to the API access are ignored even if the developer specified them. This ensures that the
administrator installing the upgrade has full control. Installers should carefully examine the changes in package access in each
upgrade during installation and note all acceptable changes. Then, because those changes are ignored, the administrator should
manually apply any acceptable changes after installing an upgrade.
• S-controls are served by Salesforce and rendered inline in Salesforce. Because of this tight integration, there are several means by
which an s-control in an installed package could escalate its privileges to the user’s full privileges. In order to protect the security of
organizations that install packages, s-controls have the following limitations:
– For packages you are developing (that is, not installed from AppExchange), you can only add s-controls to packages with the
default Unrestricted API access. Once a package has an s-control, you cannot enable Restricted API access.
– For packages you have installed, you can enable access restrictions even if the package contains s-controls. However, access
restrictions provide only limited protection for s-controls. Salesforce recommends that you understand the JavaScript in an
s-control before relying on access restriction for s-control security.
– If an installed package has Restricted API access, upgrades will be successful only if the upgraded version does not contain
any s-controls. If s-controls are present in the upgraded version, you must change the currently installed package to
Unrestricted API access.
66
Design and Build Your Solution Manage API and Dynamic Apex Access in Packages
Accepting or Rejecting API and Dynamic Apex Access Privileges During Installation
To accept or reject the API and dynamic Apex access privileges for a package you are installing:
67
Design and Build Your Solution Configuring Default Package Versions for API Calls
68
Design and Build Your Solution About the Partner WSDL
custom objects or fields. It is loosely typed, which means that calls operate on name-value pairs of field names and values instead of
specific data types.
You must associate the enterprise WSDL with specific package versions to maintain existing behavior for clients. There are options for
setting the package version bindings for an API call from client applications using either the enterprise or partner WSDL. The package
version information for API calls issued from a client application based on the enterprise WSDL is determined by the first match in the
following settings.
1. The PackageVersionHeader SOAP header.
2. The SOAP endpoint contains a URL with a format of serverName/services/Soap/c/api_version/ID where
api_version is the version of the API, such as 52.0, and ID encodes your package version selections when the enterprise WSDL
was generated.
3. The default enterprise package version settings.
The partner WSDL is more flexible as it is used for integration with multiple organizations. If you choose the Not Specified option for a
package version when configuring the default partner package versions, the behavior is defined by the latest installed package version.
This means that behavior of package components, such as an Apex trigger, could change when a package is upgraded and that change
would immediately impact the integration. Subscribers may want to select a specific version for an installed package for all partner API
calls from client applications to ensure that subsequent installations of package versions do not affect their existing integrations.
The package version information for partner API calls is determined by the first match in the following settings.
1. The PackageVersionHeader SOAP header.
2. An API call from a Visualforce page uses the package versions set for the Visualforce page.
3. The default partner package version settings.
To configure default package versions for API calls:
1. From Setup, enter API in the Quick Find box, then select API.
2. Click Configure Enterprise Package Version Settings or Configure Partner Package Version Settings. These links are only
available if you have at least one managed package installed in your organization.
3. Select a Package Version for each of your installed managed packages. If you are unsure which package version to select,
you should leave the default selection.
4. Click Save.
Note: Installing a new version of a package in your organization does not affect the current default settings.
69
Design and Build Your Solution Generating an Enterprise WSDL with Managed Packages
70
Design and Build Your Solution Architectural Considerations for Group and Professional
Editions
• use the Lightning Platform API to transfer data in and out of Salesforce.
• use an Apex class that contains a Web service method.
Before any Visualforce page, Apex callout, or JavaScript code using XmlHttpRequest in an s-control or custom button can call an external
site, that site must be registered in the Remote Site Settings page, or the call fails. For information on registering components, see
Configure Remote Site Settings.
Warning: Do not store usernames and passwords within any external service.
Note: Group and Performance Editions are no longer sold. For a comparison chart of editions and their features, see the Salesforce
Pricing and Editions page.
If you plan to sell your app to existing Salesforce customers, it’s important to understand the differences between these editions because
they will affect the design of your app. It’s convenient to think about them in clusters, GE/PE and EE/UE/PXE, as the editions in each
cluster have similar functionality. For example, you might only want to support EE/UE/PXE if your app requires certain objects and features
71
Design and Build Your Solution Features in Group and Professional Editions
that aren't available in GE/PE. Also, instead of a single solution that supports all editions, you can have a tiered offering. This would consist
of a basic solution for GE/PE and an advanced one for EE/UE/PXE customers that takes advantage of the additional features.
EE/UE/PXE have the most robust functionality. They support Lightning Platform platform licenses in addition to Salesforce CRM licenses. If
your app doesn’t require Salesforce CRM features (such as Leads, Opportunities, Cases, etc.), Lightning Platform platform licenses
provide you with the most flexibility in deploying your app to users who might not normally be Salesforce users. Your app is still subject
to the edition limits and packaging rules.
GE/PE don't contain all of the functionality that you can build in a Developer Edition (DE). Therefore, an application developed in your
DE organization might not install in a GE/PE organization. If you’re designing an application to work specifically in GE/PE, you must be
aware of how these editions differ.
There are a number of other considerations to keep in mind when deciding whether to support these editions. Lightning Platform
platform licenses cannot be provisioned in GE/PE organizations. This means that only existing Salesforce CRM users can use your app. There
are some features that aren't available in GE/PE. There are several special permissions available to eligible partner apps that overcome
these limitations.
See the following sections for available features, limits, and other design considerations.
• Features in Group and Professional Editions
• Limits for Group and Professional Editions
• Access Control in Group and Professional Editions
• Using Apex in Group and Professional Editions
• API Access in Group and Professional Editions
• Designing Your App to Support Multiple Editions
• Sample Design Scenarios
Campaigns No Yes
Ideas No Yes
Products No Yes
Solutions No Yes
72
Design and Build Your Solution Limits for Group and Professional Editions
Sites No No
Note:
• All listed features are available in DE.
• As a partner, workflows within your application run in a Professional Edition org. However, customers can’t create their own
workflows. They must purchase the feature directly from Salesforce.
• A client ID allows your app to use the API for integration to composite apps. For more information, see Using Apex in Group
and Professional Editions and API Access in Group and Professional Editions.
73
Design and Build Your Solution API Access in Group and Professional Editions
You must be an eligible partner with salesforce.com and your app has to pass the security review. The appropriate permissions will
automatically be enabled after you pass the security review.
Here are some important considerations for using Apex in GE/PE.
• GE/PE customers can’t create or modify Apex in your app; they can only run the existing Apex.
• Your Apex code should not depend on features and functionality that exist only in DE, EE, UE, or PXE, or your app will fail to install.
• Make sure to use REST if you plan to expose an Apex method as a Web service. Apex classes that have been exposed as a SOAP Web
service can’t be invoked from an external web app in GE/PE.
• Using Apex to make Web service callouts is allowed in GE/PE. For instance, if you’re planning to make a Web service callout to an
external Web service, as long as the managed package is authorized, these classes will function in GE/PE.
Apex methods exposed as Web services (REST) Yes, with connected app consumer allowlisting
Bulk API No
74
Design and Build Your Solution Designing Your App to Support Multiple Editions
Note: We strongly recommend that you do this in an organization you will continue using for a long time, such as the one
where you build your managed package or your Trialforce management organization (TMO).
2. Enter the information requested and click Save. Saving your app gives you the Consumer Key and Consumer Secret the app uses
to communicate with Salesforce.
3. Submit a case from the Partner Community and provide your DE Org ID and the credentials for your connected app.
We’ll evaluate your request and enable the appropriate permission. Once this is done, you’ll receive a case notification from us. Please
wait 24 hours to make sure the permission is completely activated. Your client_id (or Consumer Key) and client_secret (or Consumer
Secret) will be checked against the information you submit via the case during the OAuth authentication. If it matches, the system will
allow you to communicate with GE/PE.
Note:
• This permission is intended solely for REST API. It does not enable your application to use SOAP API, Bulk API, Metadata API,
etc. for GE/PE.
• This permission is applied only to your application. We do not turn on the API in the GE/PE organization.
75
Design and Build Your Solution Designing Your App to Support Multiple Editions
base package. The extension package adds more features supported in Enterprise, Unlimited, and Performance Editions. For example,
you have a warehouse application that tracks inventory and an extension to this app includes workflow (which isn't available in Group).
Your Group and Professional Edition customers can install the base warehouse application, while your other customers install the base
package and then the extension package with workflow components.
Using extension packages enables you to avoid multiple code sets and to upsell your customers. Upgrading a customer only requires
installing the extension package.
Here is the process for creating an extension package.
1. Create your base-managed package that uses features supported by Group and Professional Editions.
2. Install your base-managed package in a separate Developer Edition org.
3. In this org, create your extension package that includes more functionality supported in Group and Professional Editions. You can
reference the base-managed package to avoid duplicating functionality. Any component that references the base-managed package
automatically triggers this package to be an extension package.
Since your extension package depends on your base package, it’s important to spend time designing your app and the interfaces between
the packages. For example, if the extension package calls an Apex class in the base package, you must make sure that the desired Apex
class is made global.
It’s also important to consider the entire application life cycle. For example, If you want to add new features, include them in the
appropriate package. Ensure that updates to the base package do not break the extension package.
Note: To access history information for custom objects in your extension package, work with the base package owner to enable
history tracking in the org for the base package. Enabling history tracking in a base package can result in an error when you install
the package and create patch orgs for the extension package.
76
Design and Build Your Solution Sample Design Scenarios for Group and Professional Editions
Make sure that Apex, workflows, etc. in your package do not contain any strongly-typed reference to a feature that isn't supported by
GE/PE. This can include adding a custom field on an unsupported standard object, such as Campaigns, or making an Apex reference to
features like multi-currency or territory management. When you reference a feature in your package not supported by GE/PE, this package
dependency will cause the installation to fail.
Instead, if you use dynamic Apex to first check if these features are available before referencing them, you can install your managed
package in GE/PE. The important piece to consider is you must code your Dynamic Apex in a way that can support both use cases. This
ensures that if your customer doesn’t have a specific feature or object, your app will still function.
Connected Apps
A connected app is a framework that enables an external application to integrate with Salesforce using APIs and standard protocols,
such as SAML, OAuth, and OpenID Connect. Connected apps use these protocols to authenticate, authorize, and provide single sign-on
(SSO) for external apps. The external apps that are integrated with Salesforce can run on the customer success platform, other platforms,
devices, or SaaS subscriptions. For example, when you log in to your Salesforce mobile app and see your data from your Salesforce org,
you’re using a connected app.
77
Design and Build Your Solution Environment Hub
By capturing metadata about an external app, a connected app tells Salesforce which authentication protocol—SAML, OAuth, and
OpenID Connect—the external app uses, and where the external app runs. Salesforce can then grant the external app access to its data,
and attach policies that define access restrictions, such as when the app’s access expires. Salesforce can also audit connected app usage.
To learn more about how to use, configure, and manage connected apps, see the following topics in Salesforce Help:
• Connected App Use Cases
• Create a Connected App
• Edit a Connected App
• Manage Access to a Connected App
More Resources
Here are some additional resources to help you navigate connected apps:
• Salesforce Help: Connected Apps
• Salesforce Help: Authorize Apps with OAuth
• Trailhead: Build Integrations Using Connected Apps
Environment Hub
The Environment Hub lets you connect, create, view, and log in to Salesforce orgs from one location.
EDITIONS
If your company has multiple environments for development, testing, and trials, the Environment
Hub lets you streamline your approach to org management. Available in: both Salesforce
From the Environment Hub, you can: Classic (not available in all
orgs) and Lightning
• Connect existing orgs to the hub with automatic discovery of related orgs.
Experience
• Create standard and partner edition orgs for development, testing, and trials.
Available in: Enterprise,
• View and filter hub members according to criteria that you choose, like edition, creation date,
Performance, and
instance, origin, and SSO status.
Unlimited Editions
• Create single sign-on (SSO) user mappings for easy login access to hub members.
Each hub member org corresponds to an EnvironmentHubMember object. EnvironmentHubMember
is a standard object, similar to Accounts or Contacts, so you can use the platform to extend or modify the Environment Hub
programmatically. For example, you can create custom fields, set up workflow rules, or define user mappings and enable SSO using the
API for any hub member org.
78
Design and Build Your Solution Get Started with the Environment Hub
a. From Setup, enter Profiles in the Quick Find box, then select Profiles.
b. Create a profile, or edit an existing one.
c. Edit the profile’s settings.
Connected App Access Unless advised by Salesforce, don’t adjust settings in this
section of the profile.
Service Provider Access If you enable single sign-on (SSO) in a member org, new entries
appear in this section of the profile. Entries appear in the format
Service Provider [Organization ID], where Organization ID is the
ID of the member org. Users who don’t have access to the
service provider sometimes see this message when attempting
79
Design and Build Your Solution Get Started with the Environment Hub
Standard Object Permissions Grant object permissions based on the level of access required
by the Environment Hub user.
Hub Members object:
• “Read”—View existing Hub Member records.
• “Create”—This permission has no impact on the ability to
create Hub Member records. That’s because record creation
is handled either by connecting an existing org or creating
an org from the Environment Hub.
• “Edit”—Edit fields on existing Hub Member records.
• “Delete”—Disconnect an org from the Environment Hub
and delete its corresponding Hub Member record and
Service Provider record (if SSO was enabled for the
member).
• “View All”—Read all Hub Member records, regardless of
who created them.
• “Modify All”—Read, edit, and delete all Hub Member
records, regardless of who created them.
Hub Invitations object:
• If you enable the “Connect Organization to Environment
Hub” permission, enable “Create”, “Read”, “Update, and
“Delete” for Hub Invitations.
Signup Request object:
• If you enable the “Manage Environment Hub” permission,
enable “Create” and “Read” for Signup Requests to allow
users to create orgs. Optionally, enable “Delete” to allow
users to remove orgs from the hub.
d. Select Save.
80
Design and Build Your Solution Manage Orgs in the Environment Hub
To set up My Domain:
• Customize Application
To define a My Domain
name:
• Customize Application
AND
Modify All Data
81
Design and Build Your Solution Manage Orgs in the Environment Hub
Note: You can't connect a sandbox org to the Environment Hub directly. If you want to connect a sandbox, first connect the org
used to create the sandbox to the Environment Hub. Then, refresh the sandbox org. The refresh automatically adds it as a hub
member.
1. Log in to the Environment Hub, and then select Connect Org.
2. Enter the admin username for the org that you want to connect and, optionally, a short description. A description makes it easier to
find the org later, especially if your hub has many members.
3. By default, single sign-on (SSO) is enabled for the org you connected. To disable SSO, deselect Auto-enable SSO for this org.
4. Select Connect Org again.
5. In the pop-up window, enter the org’s admin username and password. If you don’t see the pop-up, temporarily disable your browser’s
ad blocking software and try again.
6. Select Log In, and then select Allow.
To disconnect an org, locate the listing for the org, and select Remove from the dropdown menu on the far right.
Orgs removed from the Environment Hub aren’t deleted, so you can still access the org after you remove it.
Test/Demo Trial versions of standard Salesforce orgs for testing and demos. These orgs are similar to the ones
customers create at www.salesforce.com/trial. When you create a Test/Demo org, you can specify a
Trialforce template if you want the org to include your customizations.
82
Design and Build Your Solution Single Sign-on in the Environment Hub
3. Enter the required information for the org type you selected.
4. Read the Master Subscription Agreement, and then select the checkbox.
5. Select Create.
When your org is ready, you receive an email confirmation, and the org appears in your list of hub members.
Federation ID Match users who have the same Federation ID in both the
Environment Hub and a member org.
User Name Formula Match users in the Environment Hub and a member org
according to a formula that you define.
If you specify multiple SSO methods, they’re evaluated in this order: (1) Mapped Users, (2) Federation ID, and (3) User Name Formula.
The first method that results in a match is used to log in the user, and the other methods are ignored. If a matching user can’t be identified,
the Environment Hub directs the user to the standard Salesforce login page.
Note: SSO doesn’t work for newly added users or for user mappings defined in a sandbox org. Only add users, edit user information,
or define SSO user mappings in the parent org for the sandbox.
83
Design and Build Your Solution Single Sign-on in the Environment Hub
Method Steps
SSO Method 2 - Federation Select the checkbox.
ID
SSO Method 3 - User Name Select the checkbox, and then define a formula. For
Formula example, to match the first part of the username (the
84
Design and Build Your Solution Environment Hub Best Practices
Method Steps
part before the “@” sign) with an explicit domain name, enter:
LEFT($User.Username, FIND("@", $User.Username))
& ("mydev.org")
3. Select Save.
• Because each member org is a standard object (of type EnvironmentHubMember), you can
modify its behavior or access it programmatically. For example, you can create custom fields, set up workflow rules, or define user
mappings and enable single sign-on using the API for any member org.
• Decide on a strategy for enabling SSO access based on your company’s security requirements. Then choose the SSO method (explicit
mapping, Federation ID, or custom formula) that meets your needs.
• SSO doesn’t work for newly added users or for user mappings defined in a sandbox org. Only add users, edit user information, or
define SSO user mappings in the parent org for the sandbox.
• The Environment Hub connected app is for internal use only. Don’t enable it for any profiles. Unless advised by Salesforce, don’t
delete the connected app or adjust its settings.
85
Design and Build Your Solution Environment Hub FAQ
Can I use the Environment Hub in Lightning Experience? Available in: both Salesforce
Classic (not available in all
Where do I install the Environment Hub?
orgs) and Lightning
Is My Domain required to use the Environment Hub? Experience
No, My Domain isn’t required. But if you don’t set up My Domain, you can’t connect existing
Available in: Enterprise,
orgs to the Environment Hub or use single sign-on to log in to member orgs. Salesforce
Performance, Unlimited,
recommends setting up My Domain when you configure the Environment Hub.
and Developer Editions
Can I install the Environment Hub in more than one org?
Can I enable the Environment Hub in a sandbox org?
What kinds of orgs can I create in the Environment Hub?
How is locale determined for the orgs I create in the Environment Hub?
Are the orgs that I create in the Environment Hub the same as the ones I created in the Partner Portal?
Can an org be a member of multiple Environment Hubs?
Can I disable the Environment Hub?
Note: My Domain subdomains are not available for Trialforce Source Organizations created from an Environment Hub that’s also
a Trialforce Management Organization.
86
Design and Build Your Solution Environment Hub FAQ
Partner Group Edition Robust testing and customer demos 1 year, unless you request an extension
Partner Enterprise Edition Robust testing and customer demos 1 year, unless you request an extension
Partner Professional Edition Robust testing and customer demos 1 year, unless you request an extension
Trialforce Source Org Creating Trialforce templates 1 year, unless you request an extension
Consulting Partner Edition Customer demos 1 year, unless you request an extension
How is locale determined for the orgs I create in the Environment Hub?
Your Salesforce user locale determines the default locale of orgs that you create. For example, if your user locale is set to English
(United Kingdom), that is the default locale for the orgs you create. In this way, the orgs you create are already customized for
the regions where they reside.
Are the orgs that I create in the Environment Hub the same as the ones I created in
the Partner Portal?
Yes, the orgs are identical to the ones that you created in the Partner Portal. The Environment Hub uses the same templates, so the orgs
come with the same customizations, such as higher limits and more licenses. You can also use the Environment Hub to create the same
Group, Professional, and Enterprise Edition orgs that customers use. That way, you can test your app against realistic customer
implementations.
87
Design and Build Your Solution Considerations for the Environment Hub in Lightning
Experience
Developer Hub
The Developer Hub (Dev Hub) lets you create and manage scratch orgs. The scratch org is a
EDITIONS
source-driven and disposable deployment of Salesforce code and metadata, made for developers
and automation. A scratch org is fully configurable, allowing developers to emulate different Available in: Lightning
Salesforce editions with different features and preferences. Scratch orgs are a central feature of Experience
Salesforce DX, an open developer experience for developing and managing Salesforce apps across
their entire lifecycle. Available in:
Developer,Enterprise,
To work with scratch orgs, you must first enable the Developer Hub (Dev Hub) in your production Performance, and
or business org. You then use the Salesforce command-line interface (CLI) to create scratch orgs. Unlimited Editions
Note: Use the Dev Hub to manage scratch orgs. Continue using the Environment Hub to
manage other types of orgs, including production and trial orgs.
SEE ALSO:
Salesforce CLI Setup Guide
Salesforce DX Developer Guide
88
Design and Build Your Solution Scratch Org Allocations for Partners
Summit Tier
• 300 active
• 600 daily
Crest Tier
• 150 active
• 300 daily
Ridge Tier
• 80 active
• 160 daily
Base Tier
• 40 active
• 80 daily
Partner Trials
• 20 active
• 40 daily
89
Design and Build Your Solution Enable Dev Hub Features in Your Org
Note: You can’t enable Dev Hub in a sandbox. Scratch orgs available in:
Developer, Enterprise,
Consider these factors if you select a trial or Developer Edition org as your Dev Hub. Group, and Professional
Editions
• You can create up to six scratch orgs and package versions per day, with a maximum of three
active scratch orgs.
• Trial orgs expire on their expiration date.
• Developer Edition orgs that are inactive for 365 days are deactivated.
• You can define a namespace in a Developer Edition org that isn’t your Dev Hub, and you can enable Dev Hub in a Developer Edition
org that doesn’t contain a namespace.
• If you plan to create package versions or run continuous integration jobs, it’s better to use a production or business org as your Dev
Hub because of higher scratch org and package version limits. Package versions are associated with your Dev Hub org. When a trial
or Developer Edition org expires, you lose access to the package versions.
Note: Partner trial orgs signed up from the partner community have different scratch org limits. See Scratch Org Allocations for
Partners. Partners can create partner edition scratch orgs: Partner Developer, Partner Enterprise, Partner Group, and Partner
Professional. This feature is available only if creating scratch orgs from a Dev Hub in a partner business org. See Supported Scratch
Org Editions for Partners in the ISVforce Guide for details.
The Dev Hub org instance determines where scratch orgs are created.
• Scratch orgs created from a Dev Hub org in Government Cloud are created on a Government Cloud instance.
• Scratch orgs created from a Dev Hub org in Public Cloud are created on a Public Cloud instance.
To enable Dev Hub in an org:
1. Log in as System Administrator to your Developer Edition, trial, or production org (for customers), or your business org (for ISVs).
2. From Setup, enter Dev Hub in the Quick Find box and select Dev Hub.
If you don't see Dev Hub in the Setup menu, make sure that your org is one of the supported editions.
90
Design and Build Your Solution Free Limited Access License
If your org has Developer licenses, you can add users with the Developer profile and assign them the provided Developer permission
set. Alternatively, you can add users with the Standard User or System Administrator profiles. For a standard user, you must create a
permission set with the required Salesforce DX permissions. We recommend that you avoid adding users as system administrators unless
their work requires that level of authority and not just Dev Hub org access.
SEE ALSO:
Salesforce Help: User Licenses
Important: Contact your Salesforce account executive to request the Free Limited Access License.
To use Org Shape for Scratch Orgs or Scratch Org Snapshots (pilot), be sure to assign the Salesforce or Salesforce Platform user
license. This license isn’t supported at this time.
To give full access to the Dev Hub org, create a permission set that contains these permissions.
• Object Settings > Scratch Org Info > Read, Create, and Delete
• Object Settings > Active Scratch Org > Read and Delete
• Object Settings > Namespace Registry > Read (to use a linked namespace in a scratch org)
For more information, see Add Salesforce DX Users. Salesforce administrators can upgrade a Salesforce Limited Access - Free license to
a standard Salesforce license at any time.
Note: This license doesn’t provide access to some Salesforce CLI commands, such as force:limits:api:display.
Contact your Salesforce admin for API limits information.
3. To delete an active scratch org from the Active Scratch Org list view, choose Delete from the dropdown.
Deleting an active scratch org does not delete the request (ScratchOrgInfo) that created it, but it does free up a scratch org so that
it doesn’t count against your allocations.
4. To view the requests that created the scratch orgs, select Scratch Org Info from the App Launcher.
91
Design and Build Your Solution Link a Namespace to a Dev Hub Org
To view more details about a request, click the link in the Number column. The details of a scratch org request include whether it's
active, expired, or deleted.
5. To delete the request that was used to create a scratch org, choose Delete from the dropdown.
Deleting the request (ScratchOrgInfo) also deletes the active scratch org.
Important: Choose namespaces carefully. If you’re trying out this feature or need a namespace for testing purposes, choose
a disposable namespace. Don’t choose a namespace that you want to use in the future for a production org or some other
real use case. Once you associate a namespace with an org, you can't change it or reuse it.
1. Log in to your Dev Hub org as the System Administrator or as a user with the Salesforce DX Namespace Registry permissions.
Tip: Make sure your browser allows pop-ups from your Dev Hub org.
2. (Required) If you have not already done so, define and deploy a My Domain name.
Production orgs created in Winter ’21 and later have a My Domain by default. For information on setting up and deploying a My
Domain, see My Domain in Salesforce Help.
Tip: Why do you need a My Domain? A My Domain adds a subdomain to your Salesforce org URL so that it’s unique. As part
of the Namespace Registry linking process, you’ll be logging into two distinct orgs simultaneously (your Dev Hub org and your
Developer Edition org), and your browser can’t reliably distinguish between the two without a My Domain.
You receive an email when your domain name is ready for testing. It can take a few minutes.
5. Log in to the Developer Edition org in which your namespace is registered using the org's System Administrator's credentials.
You cannot link orgs without a namespace, sandboxes, scratch orgs, patch orgs, and branch orgs to the Namespace Registry.
To view all the namespaces linked to the Namespace Registry, select the All Namespace Registries view.
92
Design and Build Your Solution Notifications for Package Errors
• Partner Developer
• Partner Enterprise
• Partner Group
• Partner Professional
Indicate the partner edition in the scratch org definition file.
"edition": "Partner Enterprise",
If you attempt to create a partner scratch org and see this error, confirm that you’re using an active partner business org. Contact the
Partner Community for further assistance.
ERROR: You don't have permission to create Partner Edition organizations.
To enable this functionality, please log a case in the Partner Community.
License limits for partner scratch orgs are similar to partner edition orgs created in Environment Hub. Get the details on the Partner
Community.
Error Message: 00DD00000007uJp: VALIDATION_FAILED [DB 0710 DE1 Pkg1 1.2: A required package
is missing: Package "DB 0710 DE1 Pkg1", Version 1.2 or later must be installed first.]
Date/Time of Occurrence = Mon Jul 13 18:51:20 GMT 2015
93
Design and Build Your Solution Set the Notification Email Address
94
CHAPTER 5 Package and Test Your Solution
In this chapter ... Learn how to package, upload, and install a beta version of your solution as part an iterative development
approach. After your beta is up and running, learn how to test, fix, extend, and uninstall the solution.
• About Managed
Packages
• Installing a Package
• Uninstalling a
Package
• Installing Managed
Packages Using the
API
• Resolving Apex Test
Failures
• Running Apex on
Package
Install/Upgrade
• Running Apex on
Package Uninstall
• Publishing Extensions
to Managed
Packages
95
Package and Test Your Solution About Managed Packages
96
Package and Test Your Solution Configure Your Developer Settings
1. From Setup, enter Packages in the Quick Find box, then select Packages. Available in: Developer
Edition
2. Click Edit.
Package uploads and
Note: This button doesn’t appear if you’ve already configured your developer settings. installs are available in
Group, Professional,
3. Review the selections necessary to configure developer settings, and click Continue. Enterprise, Performance,
4. Register a namespace prefix. Unlimited, and Developer
Editions
5. Choose the package you want to convert to a managed package. If you do not yet have a
package to convert, leave this selection blank and update it later.
6. Click Review My Selections. USER PERMISSIONS
7. Click Save. To configure developer
settings:
Tip: You may want to specify a License Management Organization (LMO) for your managed
• Customize Application
package; to find out more, go to http://sites.force.com/appexchange/publisherHome.
To create packages:
• Create AppExchange
Packages
To upload packages:
• Upload AppExchange
Packages
97
Package and Test Your Solution Specifying a License Management Organization
Warning: S-controls stored in the s-control library or the Documents tab that do not use the Lightning Platform API still function
properly after you register a namespace prefix. However, s-controls stored outside of your organization or s-controls that use the
Lightning Platform API to call Salesforce may require some fine-tuning. For more information, see S-control in the Object Reference.
Your namespace prefix must:
• Begin with a letter
• Contain one to 15 alphanumeric characters
• Not contain two consecutive underscores
For example, myNp123 and my_np are valid namespaces, but 123Company and my__np aren’t.
To register a namespace prefix:
1. From Setup, enter Packages in the Quick Find box and select Package Manager or Packages, depending on your Setup menu.
2. In the Developer Settings panel, click Edit.
Note: This button doesn’t appear if you’ve already configured your developer settings.
3. Review the selections that are required for configuring developer settings, and then click Continue.
4. Enter the namespace prefix you want to register.
5. Click Check Availability to determine if the namespace prefix is already in use.
6. If the namespace prefix that you entered isn’t available, repeat the previous two steps.
7. Click Review My Selections.
8. Click Save.
98
Package and Test Your Solution Creating and Uploading a Beta Package
• Beta packages are not upgradeable. Because developers can still edit the components of a beta package, the Managed - Released
version might not be compatible with the beta package installed. Uninstall the beta package and install a new beta package or
released version. For more information, see Uninstalling a Package on page 109 and Installing a Package on page 106.
2. Optionally, change the API access privileges. By default, API access is set to Unrestricted, but you can change this setting to
further restrict API access of the components in the package.
3. Add the necessary components for your app.
a. Click Add Components.
b. From the drop-down list, choose the type of component.
c. Select the components you want to add.
Note: Some components cannot be added to Managed - Released packages. For a list of packageable components, see
Components Available in Managed Packages on page 24. If you add S-Controls and documents, keep in mind that their
combined size must be less than 10 MB. Also, S-controls cannot be added to packages with restricted API access.
99
Package and Test Your Solution Creating and Uploading a Beta Package
e. Repeat these steps until you have added all the components you want in your package.
Note: Some related components are automatically included in the package even though they might not display in the Package
Components list. For example, when you add a custom object to a package, its custom fields, page layouts, and relationships
with standard objects are automatically included. For a complete list of components, see Components Automatically Added
to Packages on page 41.
4. Optionally, click View Dependencies and review a list of components that rely on other components, permissions, or preferences
within the package. For more information on dependencies, see About Dependencies on page 58. Click Done to return to the
Package detail page.
5. Click Upload.
6. On the Upload Package page, do the following:
a. Enter a Version Name, such as Spring 11 — Beta.
b. Enter a Version Number, such as 1.0. All beta packages use the same version number until you upload a Managed -
Released package.
c. Select a Release Type of Managed - Beta.
Note: Beta packages can only be installed in Developer Edition, sandbox, or test organizations requested through the
Environment Hub, and thus can't be pushed to customer organizations.
d. Optionally, enter and confirm a password to share the package privately with anyone who has the password. Don't enter a
password if you want to make the package available to anyone on AppExchange and share your package publicly.
e. Salesforce automatically selects the requirements it finds. In addition, select any other required components from the Package
Requirements and Object Requirements sections to notify installers of any requirements for this package.
f. Click Upload.
You will receive an email that includes an installation link when your package has been uploaded successfully.
100
Package and Test Your Solution Create and Upload a Managed Package
101
Package and Test Your Solution Create and Upload a Managed Package
i. Optionally, specify a post install script. This is an Apex script that runs in the subscriber organization after the package is installed
or upgraded. For more information, see Running Apex on Package Install/Upgrade on page 111.
j. Optionally, specify an uninstall script. This is an Apex script that runs in the subscriber organization after the package is uninstalled.
For more information, see Running Apex on Package Uninstall on page 115.
k. On the right side of the screen, select the Managed checkbox.
l. Click Save.
2. Optionally, change the API access privileges. By default, API access is set to Unrestricted, but you can change this setting to
further restrict API access of the components in the package.
3. Add the necessary components for your app.
a. Click Add Components.
b. From the drop-down list, choose the type of component.
c. Select the components you want to add.
Note: Some components cannot be added to Managed - Released packages. For a list of packageable components, see
Components Available in Managed Packages on page 24. If you add S-Controls and documents, keep in mind that their
combined size must be less than 10 MB. Also, S-controls cannot be added to packages with restricted API access.
Note: Some related components are automatically included in the package even though they might not display in the Package
Components list. For example, when you add a custom object to a package, its custom fields, page layouts, and relationships
with standard objects are automatically included. For a complete list of components, see Components Automatically Added
to Packages on page 41.
4. Optionally, click View Dependencies and review a list of components that rely on other components, permissions, or preferences
within the package. For more information on dependencies, see About Dependencies on page 58. Click Done to return to the
Package detail page.
5. Click Upload.
6. On the Upload Package page, do the following:
a. Enter a Version Name, such as Spring 12. The version name is the marketing name for a specific release of a package
and allows you to create a more descriptive title for the version than just a number.
b. Enter a Version Number, such as 1.0. For more information on versions, see Update Your Solution on page 337.
c. Select a Release Type of Managed - Released.
d. Change the Description, if necessary.
e. Optionally, specify a link to post install instructions for the package. Click URL or Visualforce page and enter the details in the
text field that appears. This link will be displayed on the Package Details page after installation.
Note: As a best practice, point to an external URL, so you can update the information independently of the package.
f. Optionally, enter and confirm a password to share the package privately with anyone who has the password. Don't enter a
password if you want to make the package available to anyone on AppExchange and share your package publicly.
g. Salesforce automatically selects the requirements it finds. In addition, select any other required components from the Package
Requirements and Object Requirements sections to notify installers of any requirements for this package.
102
Package and Test Your Solution View Package Details
h. Click Upload.
Note: You cannot deprecate the most recent version of a managed package.
When you deprecate a package, remember to remove it from AppExchange as well. See “Removing Apps from AppExchange”
in the AppExchange online help.
You receive an email that includes an installation link when your package has been uploaded successfully.
Note:
• When using the install URL, the old installer is displayed by default. You can customize the installation behavior by modifying
the installation URL you provide your customers.
– To access the new installer, append the text &newui=1 to the installation URL.
– To access the new installer with the "All Users" option selected by default, append the additional text &p1=full to the
installation URL.
• If you uploaded from your Salesforce production org, notify installers who want to install it in a sandbox org to replace the
“login.salesforce.com” portion of the installation URL with “test.salesforce.com.”
103
Package and Test Your Solution View Package Details
Attribute Description
API Access The type of access that the API and dynamic Apex that package
components have. The default setting is Unrestricted, which
means that all package components that access the API have the
same access as the user who is logged in. Click Enable Restrictions
or Disable Restrictions to change the API and dynamic Apex
access permissions for a package.
Created By The name of the developer that created this package, including
the date and time.
Language The language used for the labels on components. The default value
is your user language.
Last Modified By The name of the last user to modify this package, including the
date and time.
Notify on Apex Error The username of the person who should receive an email
notification if an exception occurs in Apex that is not caught by
the code. If you don’t specify a username, all uncaught exceptions
generate an email notification that is sent to Salesforce. This is only
available for managed packages.
Notify on Packaging Error The email address of the person who receives an email notification
if an error occurs when a subscriber’s attempt to install, upgrade,
or uninstall a packaged app fails. This field appears only if packaging
error notifications are enabled. To enable notifications, contact
your Salesforce representative.
Push Upgrade Exclusion List A comma-separated list of org IDs to exclude when you push a
package upgrade to subscribers.
Post Install Script The Apex code that runs after this package is installed or upgraded.
For more information, see Running Apex on Package
Install/Upgrade on page 111.
Uninstall Script The Apex code that runs after this package is uninstalled. For more
information, see Running Apex on Package Uninstall on page 115.
104
Package and Test Your Solution View Package Details
Note: Some related components are automatically included in the package even though they might not display in the Package
Components list. For example, when you add a custom object to a package, its custom fields, page layouts, and relationships with
standard objects are automatically included. For a complete list of components Salesforce automatically includes, see Components
Automatically Added on page 41.
Package components frequently depend on other components that aren’t always added to the package explicitly. Each time you change
a package, Salesforce checks for dependencies and displays the components as package members. Package Manager automatically
checks for dependencies and shows the component relationship to the package in the Include By column of the Package Details.
When your package contains 1,000 or more components, you can decide when to refresh the components list in the Package Details
and avoid a long wait while this page loads. The components list refreshes automatically for packages with less than 1,000 components.
Click Refresh Components if the package has new or changed components and wait for the list to refresh.
Click View Dependencies to review a list of components that rely on other components, permissions, or preferences within the package.
An entity might include such things as an s-control, a standard or custom field, or an organization-wide setting like multicurrency. Your
package cannot be installed unless the installer has the listed components enabled or installed. For more information on dependencies,
see Understanding Dependencies on page 58. Click Back to Package to return to the Package detail page.
Click View Deleted Components to see which components were deleted from the package across all its versions.
Note: Push Upgrades is available for patches and major upgrades. Registered ISV partners can request Push Major Upgrade
functionality by logging a case in the Partner Community.
The versions table displays the following package attributes (in alphabetical order):
Attribute Description
Action Lists the actions you can perform on the package. The possible
actions are:
• Deprecate: Deprecates a package version.
105
Package and Test Your Solution Installing a Package
Attribute Description
• Beta: The package is Managed - Beta.
• Deprecated: The package version is deprecated.
Version Name The version name for this package version. The version name is
the marketing name for a specific release of a package. It is more
descriptive than the Version Number.
Version Number The version number for the latest installed package version. The
format is majorNumber.minorNumber.patchNumber,
such as 2.1.3. The version number represents a release of a package.
The Version Name is a more descriptive name for the release.
The patchNumber is generated only when you create a patch.
If there is no patchNumber, it is assumed to be zero (0).
Attribute Description
Action Lists the actions you can perform on a patch development
organization. The possible actions are:
• Login: Log in to your patch development organization.
• Reset: Emails a new temporary password for your patch
development organization.
Patching Major Release The package version number that you are patching.
Installing a Package
During the development and testing cycle, you might need to periodically install and uninstall packages before you install the next beta.
Follow these steps to install a package.
Pre-Installation
1. In a browser, type in the installation URL you received when you uploaded the package.
2. Enter your username and password for the Salesforce organization in which you want to install the package, and then click Log In.
3. If the package is password-protected, enter the password you received from the publisher.
106
Package and Test Your Solution Installing a Package
Default Installation
Click Install. You’ll see a message that describes the progress and a confirmation message after the installation is complete.
Custom Installation
Follow these steps if you need to modify the default settings, as an administrator.
1. Choose one or more of these options, as appropriate.
• Click View Components. You’ll see an overlay with a list of components in the package. For managed packages, the screen
also contains a list of connected apps (trusted applications that are granted access to a user's Salesforce data after the user and
the application are verified). Review the list to confirm that the components and any connected apps shown are acceptable,
and then close the overlay.
Note: Some package items, such as validation rules, record types, or custom settings might not appear in the Package
Components list but are included in the package and installed with the other items. If there are no items in the Package
Components list, the package might contain only minor changes.
• If the package contains a remote site setting, you must approve access to websites outside of Salesforce. The dialog box lists all
the websites that the package communicates with. We recommend that a website uses SSL (secure sockets layer) for transmitting
data. After you verify that the websites are safe, select Yes, grant access to these third-party websites and click Continue,
or click Cancel to cancel the installation of the package.
Warning: By installing remote site settings, you’re allowing the package to transmit data to and from a third-party website.
Before using the package, contact the publisher to understand what data is transmitted and how it's used. If you have an
internal security contact, ask the contact to review the application so that you understand its impact before use.
• Click API Access. You’ll see an overlay with a list of the API access settings that package components have been granted. Review
the settings to verify they’re acceptable, and then close the overlay to return to the installer screen.
• In Enterprise, Performance, Unlimited, and Developer Editions, choose one of the following security options.
Note: Depending on the type of installation, you might not see this option. For example, in Group and Professional
Editions, or if the package doesn’t contain a custom object, Salesforce skips this option, which gives all users full access.
Install for Admins Only
Specifies the following settings on the installing administrator’s profile and any profile with the "Customize Application"
permission.
– Object permissions—“Read,” “Create,” “Edit,” “Delete,” “View All,” and “Modify All” enabled
– Field-level security—set to visible and editable for all fields
– Apex classes—enabled
– Visualforce pages—enabled
– App settings—enabled
– Tab settings—determined by the package creator
– Page layout settings—determined by the package creator
– Record Type settings—determined by the package creator
After installation, if you have Enterprise, Performance, Unlimited, or Developer Edition, set the appropriate user and object
permissions on custom profiles as needed.
Install for All Users
Specifies the following settings on all internal custom profiles.
107
Package and Test Your Solution Installing a Package
Note: The Customer Portal User, Customer Portal Manager, High Volume Customer Portal, Authenticated Website,
Partner User, and standard profiles receive no access.
Install for Specific Profiles...
Enables you to choose the usage access for all custom profiles in your organization. You can set each profile to have full
access or no access for the new package and all its components.
– Full Access—Specifies the following settings for each profile.
• Object permissions—“Read,” “Create,” “Edit,” “Delete,” “View All,” and “Modify All” enabled
• Field-level security—set to visible and editable for all fields
• Apex classes—enabled
• Visualforce pages—enabled
• App settings—enabled
• Tab settings—determined by the package creator
• Page layout settings—determined by the package creator
• Record Type settings—determined by the package creator
– No Access—Specifies the same settings as Full Access, except all object permissions are disabled.
You might see other options if the publisher has included settings for custom profiles. You can incorporate the settings of
the publisher’s custom profiles into your profiles without affecting your settings. Choose the name of the profile settings in
the drop-down list next to the profile that you need to apply them to. The current settings in that profile remain intact.
Alternatively, click Set All next to an access level to give this setting to all user profiles.
2. Click Install. You’ll see a message that describes the progress and a confirmation message after the installation is complete.
Post-Installation Steps
If the package includes post-installation instructions, they’re displayed after the installation is completed. Review and follow the instructions
provided. In addition, before you deploy the package to your users, make any necessary changes for your implementation. Depending
on the contents of the package, you might need to perform some of the following customization steps.
• If the package includes permission sets, assign the included permission sets to your users who need them. In managed packages,
you can't make changes to permission sets that are included in the package, but subsequent upgrades happen automatically. If you
clone a permission set that comes with a managed package or create your own, you can make changes to the permission set, but
subsequent upgrades won't affect it.
• If you’re re-installing a package and need to re-import the package data by using the export file that you received after uninstalling,
see Importing Package Data.
• If you installed a managed package, click Manage Licenses to assign licenses to users.
108
Package and Test Your Solution Component Availability After Deployment
Note: You can’t assign licenses in Lightning Experience. If you need to assign a license, switch to Salesforce Classic.
• Configure components in the package as required. For more information, see Configuring Installed Packages.
Uninstalling a Package
1. From Setup, enter Installed Packages in the Quick Find box, then select Installed Packages.
2. Click Uninstall next to the package that you want to remove.
3. Select Yes, I want to uninstall and click Uninstall.
4. After an uninstall, Salesforce automatically creates an export file containing the package data, associated notes, and any attachments.
When the uninstall is complete, Salesforce sends an email containing a link to the export file to the user performing the uninstall.
The export file and related notes and attachments are listed below the list of installed packages. We recommend storing the file
elsewhere because it’s available for only two days after the uninstall completes, then it's deleted from the server.
Tip: If you reinstall the package later and want to reimport the package data, see Importing Package Data.
• You can’t uninstall a package that removes all active business and person account record types. Activate at least one other business
or person account record type, and try again.
109
Package and Test Your Solution Installing Managed Packages Using the API
• You can’t uninstall a package if a background job is updating a field added by the package, such as an update to a roll-up summary
field. Wait until the background job finishes, and try again.
• Uninstall export files contain custom app data for your package, excluding some components, such as documents and formula field
values.
• For some package types, you can also uninstall them with the Salesforce command-line interface (CLI).
Note: You can’t deploy a package along with other metadata types. Hence, InstalledPackage must be the only metadata
type specified in the manifest file.
The following is a typical project manifest (package.xml) for installing a package. The manifest must not contain a fullName or
namespacePrefix element.
The package is specified in a file called MyNamespace.installedPackage, where MyNamespace is the namespace prefix of
the package. The file must be in a directory called installedPackages, and its contents must have this format.
<?xml version="1.0" encoding="UTF-8"?>
<InstalledPackage xmlns="http://soap.sforce.com/2006/04/metadata">
<versionNumber>1.0</versionNumber>
<password>optional_password</password>
</InstalledPackage>
InstalledPackage in API version 43.0 and later must include the activateRSS field set to either of these values.
true
Keep the isActive state of any Remote Site Settings(RSS) or Content Security Policies(CSP) in the package.
false
Override the isActive state of any RSS or CSP in the package and set it to false.
The default value is false.
110
Package and Test Your Solution Resolving Apex Test Failures
Note: Regardless of what activateRSS is set to, a retrieve of InstalledPackage always returns <activateRSS
xsi:nil=”true”/>. Therefore, before you deploy a package, inspect the information you have retrieved from
InstalledPackage and set activateRSS to the desired value.
To uninstall a package, deploy this destructiveChanges.xml manifest file in addition to the package.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>MyNamespace</members>
<name>InstalledPackage</name>
</types>
</Package>
Retrieving an InstalledPackage, using the retrieve() call creates an XML representation of the package installed in an
organization. If the installed package has a password, the password isn’t retrieved. Deploying the retrieved file in a different organization
installs the package in that organization.
For more information on the deploy() and retrieve() commands, see the Metadata API Developer’s Guide.
111
Package and Test Your Solution How does a Post Install Script Work?
Note: You can’t run a post install script in a new trial organization provisioned using Trialforce. The script only runs when a
subscriber installs your package in an existing organization.
The onInstall method takes a context object as its argument, which provides the following information.
• The org ID of the organization in which the installation takes place.
• The user ID of the user who initiated the installation.
• The version number of the previously installed package (specified using the Version class). This is always a three-part number,
such as 1.2.0.
• Whether the installation is an upgrade.
• Whether the installation is a push.
The context argument is an object whose type is the InstallContext interface. This interface is automatically implemented by
the system. The following definition of the InstallContext interface shows the methods you can call on the context argument.
global interface InstallContext {
ID organizationId();
ID installerId();
Boolean isUpgrade();
Boolean isPush();
Version previousVersion();
}
112
Package and Test Your Solution Example of a Post Install Script
The System class contains two methods that you can use to specify conditional logic, so different package versions exhibit different
behavior.
• System.requestVersion: Returns a two-part version that contains the major and minor version numbers of a package. Using
this method, you can determine the version of an installed instance of your package from which the calling code is referencing your
package. Based on the version that the calling code has, you can customize the behavior of your package code.
• System.runAs(System.Version): Changes the current package version to the package version specified in the argument.
When a subscriber has installed multiple versions of your package and writes code that references Apex classes or triggers in your
package, they must select the version they are referencing. You can execute different code paths in your package’s Apex code based on
the version setting of the calling Apex code making the reference. You can determine the calling code’s package version setting by
calling the System.requestVersion method in the package code.
• If the previous version is 1.0, the script creates a new instance of Survey called “Upgrading from Version 1.0”.
113
Package and Test Your Solution Example of a Post Install Script
• If the package is an upgrade, the script creates a new instance of Survey called “Sample Survey during Upgrade”.
• If the upgrade is being pushed, the script creates a new instance of Survey called “Sample Survey during Push”.
global class PostInstallClass implements InstallHandler {
global void onInstall(InstallContext context) {
if(context.previousVersion() == null) {
Account a = new Account(name='Newco');
insert(a);
You can test a post install script using the new testInstall method of the Test class. This method takes the following arguments.
• A class that implements the InstallHandler interface.
• A Version object that specifies the version number of the existing package.
• An optional Boolean value that is true if the installation is a push. The default is false.
This sample shows how to test a post install script implemented in the PostInstallClass Apex class.
@isTest
static void testInstallScript() {
PostInstallClass postinstall = new PostInstallClass();
Test.testInstall(postinstall, null);
Test.testInstall(postinstall, new Version(1,0), true);
List<Account> a = [Select id, name from Account where name ='Newco'];
114
Package and Test Your Solution Specifying a Post Install Script
The onUninstall method takes a context object as its argument, which provides the following information.
• The org ID of the organization in which the uninstall takes place.
• The user ID of the user who initiated the uninstall.
115
Package and Test Your Solution Example of an Uninstall Script
The context argument is an object whose type is the UninstallContext interface. This interface is automatically implemented
by the system. The following definition of the UninstallContext interface shows the methods you can call on the context
argument.
global interface UninstallContext {
ID organizationId();
ID uninstallerId();
}
You can test an uninstall script using the testUninstall method of the Test class. This method takes as its argument a class
that implements the UninstallHandler interface.
This sample shows how to test an uninstall script implemented in the UninstallClass Apex class.
@isTest
static void testUninstallScript() {
Id UninstallerId = UserInfo.getUserId();
List<FeedItem> feedPostsBefore =
[SELECT Id FROM FeedItem WHERE parentId=:UninstallerId AND CreatedDate=TODAY];
Test.testUninstall(new UninstallClass());
List<FeedItem> feedPostsAfter =
[SELECT Id FROM FeedItem WHERE parentId=:UninstallerId AND CreatedDate=TODAY];
System.assertEquals(feedPostsBefore.size() + 1, feedPostsAfter.size(),
'Post to uninstaller failed.');
}
116
Package and Test Your Solution Specifying an Uninstall Script
Note: Packages cannot be upgraded to Managed - Beta if they are used within the same organization as an extension.
117
CHAPTER 6 Pass the AppExchange Security Review
In this chapter ... At Salesforce, nothing is more important than the trust of our customers. Trust requires security. To
distribute a solution on AppExchange, it must pass our comprehensive security review. Learn how to
• AppExchange prepare for and pass the security review.
Security Review
• How Does
AppExchange
Security Review
Work?
• Partner Security
Portal
• Test Your Entire
Solution
• False Positives
• Security Review
Resources
118
Pass the AppExchange Security Review AppExchange Security Review
Important: To ensure that upgraded solutions safeguard against the latest security vulnerabilities, Salesforce reserves the right
to conduct periodic re-reviews of solutions distributed on AppExchange.
View the security review process as enforcement mechanisms paired with personalized advice and tools. You have access to office hours
where you can directly connect with a security review team member to get guidance catered to your solution. And, the security review
team points you to security-scanning tools that help automate the process of vetting the security of your solution.
SEE ALSO:
Open Web Application Security Project (OWASP) Top Ten
Important: Every version of your managed package that you plan to list publicly on AppExchange must go through a security
review. The review for a new version of a package that passed a security review is automated, and typically only takes a few minutes.
119
Pass the AppExchange Security Review How Does AppExchange Security Review Work?
Tip: We strongly recommend that you test your code throughout the development lifecycle. If you defer testing and remediation,
you’re likely to encounter a larger accumulation of issues and greatly delay your time to market.
After you finish developing your solution, perform another round of manual testing and run the automated scanning tools that Product
Security requires. The type of scans that you’re required to run depends on the architecture of your solution.
On the Partner Security Portal, you can access the Source Code Scanner, which is also referred to as the Checkmarx scanner, and the
Chimera scanner. These two scanning tools meet the test requirements for many AppExchange solutions.
Before you submit your solution for review, address all security issues that you find with your manual testing and the scanning tools.
Either fix the code or document how flagged issues are false positives. A false positive is an issue that appears to pose a security risk but
does not.
120
Pass the AppExchange Security Review How Does AppExchange Security Review Work?
Test your solution before you submit it and you’re much more likely to pass the review the first time. Applicants who don’t test beforehand
rarely pass and must resubmit after addressing security vulnerabilities identified during a review. Resubmitting significantly delays the
solution publishing process.
Tip: You’re likely to have questions as you prepare for security review and at other points during or after a security review. To
discuss your concerns and get answers to your questions, visit the Partner Security Portal and schedule an office hours appointment.
For help with submitting your solution for review, schedule an appointment with the Security Review Operations team. To
troubleshoot issues in your solution that were identified during a review, make an appointment with the Product Security team.
Product Security tests your solution for the first time. 4–6 weeks
121
Pass the AppExchange Security Review Partner Security Portal
Address all detected security issues. Rerun the required automated scanning tools to generate reports for your revised solution. Then
resubmit your revised solution with the updated scan reports.
SEE ALSO:
Connect a Packaging Org to the Publishing Console
Create or Edit Your Provider Profile
Create or Edit Your AppExchange Listing
Add a Business Plan to an AppExchange Listing
Partner Security Portal
Partner Security Portal site
Lightning Ready for AppExchange Partners (ISV)
122
Pass the AppExchange Security Review Security Scanners on the Portal
3. Click Organizations.
4. Click Connect Org.
5. Enter the credentials that you use for your packaging org, and then log in.
6. Go to the Partner Security Portal.
7. Click Login.
Chimera External endpoints on domains • Checks for security vulnerabilities in external endpoints of a solution.
that you own
• Scans solutions from a Salesforce IP address.
• Doesn’t require a download.
123
Pass the AppExchange Security Review Office Hours Appointments on the Portal
• Isn’t usable with endpoints on domains that you don’t own because
it requires upload of a token to the root of the external server.
• If your solution connects to external endpoints that you don’t own,
use OWASP ZAP or Burp Suite instead of Chimera.
SEE ALSO:
Test Your Entire Solution
OWASP Zed Attack Proxy (ZAP)
Burp Suite
124
Pass the AppExchange Security Review Test Your Entire Solution
Testing Scope
Test all pieces of the solution that you submit for security review. Ensure that the solution architecture is secure, including endpoints
that aren’t hosted on the Salesforce platform. Your attention to all components and layers of your solution helps minimize the risk of
hackers or malware exploiting potential entry points.
The full scope of your solution is subject to security review testing. For example, we can perform penetration tests that attack your
Development Edition test org and attempt to access sensitive data or authenticate with false credentials.
To determine testing scope, use a follow-the-data approach. Wherever the customer or data goes is in scope. For example, your Salesforce
customer is required to log in to your company website, or data is synced to a third-party server. Test these pieces to ensure that they’re
securely transferring credentials and data.
When either of the following criteria is true, external endpoints are within the scope of the security review and a required part of your
security testing.
• The endpoint plays a role in authenticating the end user as part of buying, getting support for, or using your solution. This definition
includes a connected app that doesn’t require manual credential entry.
• Salesforce data is transferred to or from the endpoint.
Important: Before you perform security testing on external endpoints that you don’t own, complete two actions. First, obtain
any necessary permission to perform security testing from the third parties that own the external endpoints. Second, follow the
guidelines in Salesforce IP Addresses & Domains to Allow.
Tip: We strongly recommend that you run security scans on your code and any connected endpoints throughout the development
lifecycle. Run periodic scans and fix flagged issues as you go to prevent security vulnerabilities from piling up and creating more
work for you later.
On the Partner Security Portal, you can access two Salesforce-supported security scanners: the Source Code Scanner, also referred to as
the Checkmarx scanner, and the Chimera scanner. You can, and sometimes are required to, use scanners that aren’t on the Partner
Security Portal.
This table summarizes the automated security scanner tools that we require or recommend.
125
Pass the AppExchange Security Review Test Your Entire Solution
PMD Source Code Apex code • The PMD scanner is a free, open-source tool. No No
Analyzer
• This tool is an alternative to the Source Code Scanner for
solutions that contain Apex code.
• As you prepare your solution for security review, and as a
supplement to the Source Code scanner, run PMD scans
an unlimited number of times.
• PMD typically reports more false positives than Source
Code Scanner tool.
Salesforce CLI Apex, JavaScript, • The Salesforce CLI Scanner plug-in unifies multiple static No No
Scanner Plug-In Lightning, TypeScript, and scanning tools, ESLint, JavaScript, PMD, and Retire JS, into
Visualforce code one easy-to-install Salesforce CLI plug-in.
• You can install the CLI Scanner plug-in on a local
development machine or integrate it into a continuous
integration (CI) process.
• It includes customized rules to scan Lightning Web
Component Javascript.
• It doesn’t scan external endpoints.
• The CLI Scanner plug-in offers multiple output formats:
csv, html, json, and junit.
Chimera External endpoints on • Chimera checks external endpoints of a solution. Yes Yes
domains that you own
• Chimera scans solutions from a Salesforce IP address.
• This scanner doesn’t require a download.
• You can use Chimera with endpoints on domains that you
don’t own because it requires upload of a token to the
root of the external server.
• If your solution connects to external endpoints that you
don’t own, use OWASP ZAP or Burp Suite.
126
Pass the AppExchange Security Review False Positives
Burp Suite External endpoints • Salesforce doesn’t provision Burp Suite licenses for security Yes No
review. Purchase a license independently.
• Burp Suite requires a download.
SEE ALSO:
Security Scanners on the Portal
False Positives
PMD Source Code Analyzer Project Apex Rules
OWASP Zed Attack Proxy (ZAP)
Burp Suite
False Positives
As you navigate the AppExchange security review process, you're likely to encounter false positive issues with your solution. A false
positive occurs when a security-scanning tool or code reviewer flags code that appears to pose a security vulnerability but actually
doesn’t. Instead, the flagged vulnerability is nonexistent, nonexploitable, or not required to support a valid use case or functionality.
Improve your likelihood of passing an initial or follow-up security review by addressing false positives in your submission. Include a
document that explains why each flagged false positive doesn’t pose a security risk.
127
Pass the AppExchange Security Review Document Your Responses to False Positives
Scanner Scan Results Requiring Attention for Scan Results Not Requiring Attention
Security Review
Source Code Scanner (Checkmarx) All issues regardless of severity level that Issues labeled “Code Quality”
aren’t labeled “Code Quality”
ZAP and Burp Suite Issues categorized as high severity Action on low and medium severity issues
isn’t required, but investigation into whether
they pose a security threat is encouraged.
Chimera All issues regardless of severity level that Issues labeled “Informational/Other”
aren’t labeled “Informational/Other”
FLS Update Paths 18–24 Have been fixed and are valid.
FLS Update Paths 25, 26, and 30 Are against our custom object UsageLog__c
and not intended for user consumption.
They are never exposed to users directly.
128
Pass the AppExchange Security Review Example Responses to False Positives in a Security Review
Failure Report
Stored XSS Issue.page file: paths 1–3 reportIssueList is a list of objectID + ' ' +
integers. It poses no XSS risk.
Insecure Software Version moment.js No user input flows into moment parsing.
User input flows only to Salesforce Date
fields.
Insecure Storage of Sensitive Data UserConfig_c.object The apiKey__c field is encrypted before
setting with the encryption key, which is
stored in a protected custom setting.
Insecure Storage of Sensitive Data APIManagement_c.object We deprecated this custom setting, but it’s
impossible to delete custom setting
definitions from managed packages.
Insecure Storage of Sensitive Data AuthManager.cls The credentials in comments are only
example credentials. They do not
authenticate to any development or
production system.
129
Pass the AppExchange Security Review Security Review Resources
130
CHAPTER 7 Publish Your Solution on AppExchange
In this chapter ... You turned an idea into a solution and are ready to get it in front of customers. To publish your solution
on AppExchange, use the AppExchange publishing console. The publishing console is where you create
• What Is a listing for your solution, connect orgs, manage license settings, and view analytics for your published
AppExchange? listings.
• Business Plans for
AppExchange
Listings
• Submit a Due
Diligence and
Compliance
Certification
• Publish on
AppExchange
• How Does
AppExchange Search
Work?
• Email Notifications
• Collect AppExchange
Leads
• Analytics Reports for
Publishers
• Update the Package
in Your AppExchange
Listing
• AppExchange FAQ
131
Publish Your Solution on AppExchange What Is AppExchange?
What Is AppExchange?
AppExchange is the Salesforce marketplace, offering thousands of solutions and services that extend Salesforce. If you’re an ISV partner
or consultant, AppExchange helps customers discover your solution or service. If you’re a Salesforce admin or user, AppExchange helps
you find tools and talent to unleash your company’s productivity.
Section Purpose
Business Details (2) Share information about your company, the market for your product, and its target users. We use
this information to understand how your company fits into the Salesforce product ecosystem.
Product Architecture (3) Share technical information about your product, such as how it stores credentials, passwords, and
other sensitive data. We use this information to verify that your product follows Salesforce best
practices for architecture and design.
Compliance Certification (4) Share information about your company’s business practices. We use this information to verify that
you meet our standards for ethics and integrity.
Note: We ask you to provide compliance information only for paid AppExchange listings.
132
Publish Your Solution on AppExchange Submit a Due Diligence and Compliance Certification
After you finish your business plan, submit it for review. We contact you to discuss your partnership and then either approve the plan
or return it to you with comments. If your plan is returned, you can resubmit it when you’ve addressed our comments. To check the
status of your plan, go the Salesforce Approval section (5).
After your business plan is approved, we contact you with instructions for signing your partnership agreement. To check the status of
the agreement, go to the AppExchange Partner Agreement section (6). If you’re an existing partner, you’ve already signed an agreement,
so this section doesn’t display.
133
Publish Your Solution on AppExchange Publish on AppExchange
3. For Due Diligence & Compliance Certification, click a questionnaire section (2) to provide the related details.
4. After you've provided all the required information, submit your certification for review.
To check the status of the review (3), go to the Salesforce Approval section. If we approve your certification, you’re a step closer to
launching your Salesforce consulting practice. Approved practices get access to tools and features for consulting partners, such as the
ability to log completed implementation projects.
Publish on AppExchange
Learn how to publish your solution or consulting service listing on AppExchange.
134
Publish Your Solution on AppExchange Connect a Packaging Org to the Publishing Console
135
Publish Your Solution on AppExchange Add a Business Plan to an AppExchange Listing
App, Component, Data • Upload the package that contains your solution, or App, Component, Lightning Data, Salesforce
Set, Flow, or Bolt provide an installation link. Flow, or Lightning Bolt solutions, respectively
Security Review • Submit a solution for security review. All solution types
Text • Describe your offering. All solution types and consulting services
Trials • Set up a test drive or free trial so that customers can see All solution types
your offering in action.
Leads • Choose how Salesforce collects leads when customers All solution types
interact with the listing.
Pricing • Choose whether your offering is free or paid and provide All solution types
pricing information.
136
Publish Your Solution on AppExchange Make Your AppExchange Listing Effective
Note: If you’re an existing partner with another published paid listing, we already have your compliance information, so this
section is marked as complete.
137
Publish Your Solution on AppExchange Register Your Package and Choose License Settings
From your website If your app is a downloadable client or needs additional information
to be installed, this option is the best. After users click Get It Now
on your listing and agree to the terms and conditions, they are
directed to your website to complete the installation process. Make
sure that you’ve provided clear download instructions and
performed the required setup or configuration.
They should contact us to install it If your installation or selection process requires your assistance,
you must choose this option. After agreeing to terms and
conditions, the customer is told that you’ll be in touch shortly to
help with installation. Make sure that your company has the
resources to assist potential customers.
138
Publish Your Solution on AppExchange Complete the Security Review Cycle
During a security review, Product Security tests the required and optional parts of your solution. To determine testing scope, we typically
use a follow-the-data approach. Wherever the customer goes, we go. For example, to use your solution, your Salesforce customer needs
an account on your company website, or data is synced to a third-party server. Our review team tests these pieces to ensure that they're
securely transferring Salesforce credentials and data.
139
Publish Your Solution on AppExchange Complete the Security Review Cycle
Provide access to all environments, packages, and external components that your solution uses, including:
• External web applications or services.
• Client or mobile applications that are required or optional.
• All Apex and Visualforce that is included in your solution.
Note: Be sure that your submission is a Managed—Released package. We can’t accept an unmanaged or beta package.
If you’re not sure whether to include part of your solution, include it anyway. The review team doesn’t test parts that are out of scope,
but omitting a required part delays your review.
We like to see that you did your due diligence to ensure that your solution meets enterprise security standards. Include security scan
reports along with explanations of any false positives that appear in your test results.
We also ask for detailed solution user documentation and your company’s information security policies. We understand that providing
extensive documentation isn’t practicable for smaller or newer companies, so we factor in company size and maturity when reviewing
submitted documents.
To generate a checklist that is customized to your solution, use the Security Review Submission Requirements Checklist Builder in the
Salesforce Partner Community. Here’s the checklist for a Lightning Component.
The following table summarizes what to submit based on the scope of your architecture.
140
Publish Your Solution on AppExchange Complete the Security Review Cycle
Material for Salesforce Salesforce Solution with Solution with a API Only Marketing
Submission Native Native External Web Mobile Client Cloud App
Solution Solution with App or Service
Lightning
Components
Salesforce X X X X X
Developer Edition
org
Managed X X X X
package installed
a in Developer
Edition org
Checkmarx report X X X X
Zap or Chimera X X X X
scan report
False positives X X X X X X
documentation
(if applicable)
Solution X X X X X
documentation
Platform with X
installation link or
file
Credentials to X
Marketing Cloud
environment
Mobile Apps
For mobile app testing, provision the app for all the platforms that you plan to distribute on. For iOS, we accept a test flight or an ad hoc
deployment. For other platforms, we accept the app in a file, such as an Android Packaging (.apk) file.
Extension Packages
An extension package is a package that is an add-on to a solution or that integrates the functionality of two solutions. Before you can
publicly list an extension package on AppExchange, it and the solutions it extends must pass security review.
141
Publish Your Solution on AppExchange Complete the Security Review Cycle
If your extension package is an add-on to, or integrates with, base solutions that have passed the security review, submit only your
extension package for review. However, if the base solutions haven’t passed the security review, submit your extension package plus the
unreviewed solutions.
The security review submission requirements for an extension package are the same as for a solution that has a similar architecture. For
example, if you have an extension package with external callouts, attach separate web scan results for the packages with the callouts.
The Product Security team reviews the solution as a whole. Install a complete solution in the Development Edition org that you submit
with your security review. Include your extension package. Also install all base and dependent packages for the solutions that your
package extends or integrates. That’s required whether the base solutions have already passed the security review or not.
It’s important that the Salesforce security team reviews every extension package. Even small packages can introduce security vulnerabilities.
SEE ALSO:
False Positives
Security Review Requirements Checklist Builder
Follow-up review of a paid solution No extra fee—a limited number of • First-year listing fee paid at initial review
resubmitted after addressing issues follow-up reviews are included in the submission
detected in a previous security review security review fee paid at original
• $150 fee charged annually after first year
submission of solution
of listing
Periodic re-review of a previously approved, No extra fee—cost included in the security • First-year listing fee paid at initial review
listed, paid solution review fee paid at original submission of submission
solution
142
Publish Your Solution on AppExchange Complete the Security Review Cycle
When you submit your solution for an initial review, be prepared to pay the review and first-year listing fees. There are no fees for solutions
that you distribute for free on AppExchange.
When you submit a solution for a follow-up or re-review, you’re always prompted to confirm your credit card information. However,
you’re not always charged.
Often, the initial security review and annual listing fees include follow-up and periodic reviews. For example:
• You resubmit a solution that fixes security issues discovered in an initial review. Your resubmission exclusively fixes issues
discovered in an initial security review, and you fix the code in the existing package. We conduct a follow-up review. If you make
other revisions, such as functionality changes, we require that the revised solution go through an initial security review. That’s also
true if you spin up a new package for the revised code.
• You list a new version of a package that we previously approved.. You upload the new version to AppExchange and associate
it with your listing. To identify security vulnerabilities, we run a source code scan. This scan is included in the annual listing fee.
• You create a managed package to upgrade your offering. You develop the new version in a package that we previously
approved. The upgrade is automatically approved when you submit it for review. You can immediately associate the new version
to your listing. We review the new version 6 months to 2 years after the solution is listed, depending on potential risk of the solution.
The review is included in the initial security review fee.
143
Publish Your Solution on AppExchange Complete the Security Review Cycle
• Create your AppExchange solution listing in the Partner Community Publishing Console. If your solution includes a package, connect
your packaging org to the Publishing Console and upload the package.
• Configure a Developer Edition test environment with your solution installed. We use the environment to test your solution.
• Certify that your solution is Lightning Ready. All new solutions submitted for security review must be Lightning Ready.
1. Log in to the Salesforce Partner Community.
2. Navigate to the Business Plan tab of your solution listing in the Publishing Console.
3. Verify that your business plan is approved.
4. If your plan is approved, click the solution-type tab. The tab name corresponds to the type of solution you’re listing: App, Component,
Flow, and so on.
5. Provide solution details.
6. If your solution includes a package, click Select Package, then find and select the managed package version that you plan to list.
If you can’t find the package to associate with your listing, check that the packaging org is connected to the Publishing Console.
7. Save your changes.
8. On the Security Review tab, click Start Review. You’re guided through the options and settings that require your input, based on
the solution type.
9. On the Payment page, select an option for Pricing. Your selection must match the selection on the listing’s Pricing tab.
a. If you plan to sell your solution on AppExchange, select Paid and enter payment information. Solutions that require payment
later, such as free downloads, free installs, and pay-per-use are considered paid.
b. If you plan to distribute your solution for free, select Free. We don’t charge security review or annual listing fees for solutions
that are distributed for free on AppExchange.
Tip: Schedule a technical office hours appointment right when you receive your confirmation email. Visit the Partner Security
Portal and choose a date 4–6 weeks away. If your solution doesn’t pass, you have an appointment booked.
144
Publish Your Solution on AppExchange Complete the Security Review Cycle
With all this information in one place, getting post-submission updates has never been simpler.
Passed Progress and History Product Security finished the review, and
your solution passed. You can publicly list
and distribute your solution on
AppExchange.
145
Publish Your Solution on AppExchange Complete the Security Review Cycle
SEE ALSO:
Required Materials for Security Review Submission
Important: If the package ID and namespace don’t change, your resubmission qualifies for a follow-up review.
After you fix the solution, collect the materials necessary for us to complete a follow-up review. Rerun the required scanner tools on your
revised solution and generate updated scan reports. If you fixed issues in your managed package, provide updated Source Scanner
146
Publish Your Solution on AppExchange Complete the Security Review Cycle
results. If you fixed issues detected on an external endpoint, provide updated ZAP or Chimera scan reports. If applicable, document your
responses to false positives on page 128.
For more details about what to submit, see Required Materials for Security Review Submission on page 139.
The process to request a follow-up review depends on the scope of changes.
• New Package Version: You fixed code that runs on the Salesforce platform. Create and upload a new version of your managed
package to your AppExchange listing. Then start a review for the new version. If you also made changes external to the package,
include details with your submission.
• External Code or API-Only Solution: You only changed code that runs externally to Salesforce. Edit your existing security review
submission. Provide details about the changes. Log a security review case so that Product Security knows you’re resubmitting your
solution.
SEE ALSO:
Document Your Responses to False Positives
Required Materials for Security Review Submission
147
Publish Your Solution on AppExchange Complete the Security Review Cycle
11. Log a security review case in the Salesforce Partner Community. Include your package name, ID, and version in the comments.
Logging a case lets Product Security know that you’re resubmitting your solution.
If anything is missing from your submission, the security review team contacts you. When everything is in place, we send you an email
confirming that your solution is queued for review. A follow-up review lasts 2–3 weeks. You can expect to receive your report soon after
the review is completed.
6. Click Submitted.
7. If you’re prompted to continue, click Next. You’re guided through the options and settings that require your input. Update information
as needed.
8. On the payment page, if you’re resubmitting a paid solution, review your stored payment information. A limited number of follow-up
reviews are included in the security review fee paid with your initial submission. If you’re within the limit, you aren’t charged for the
follow-up review. If you have questions about reviews limits and security review fees, contact your Partner Account Manager or log
a support case in the Salesforce Partner Community.
9. Click Submit.
10. Log a security review case in the Salesforce Partner Community. Include your package name, ID, and version in the comments.
Logging a case lets Product Security know that you’re resubmitting your solution.
If anything is missing from your submission, the security review team contacts you on the open case. When everything is in place, we
send you an email confirming that your solution is queued for review. A follow-up review lasts 2–3 weeks. You can expect to receive
your report soon after the review is completed.
148
Publish Your Solution on AppExchange How Does AppExchange Search Work?
SEE ALSO:
How to Build a Perfect AppExchange Listing
Create or Edit Your AppExchange Listing
Periodic Re-Reviews
We conduct periodic re-reviews for all solutions listed on AppExchange. Re-reviews ensure that solutions continue to safeguard against
the latest security vulnerabilities.
When you upgrade a managed package version of a solution that passed security review, you don’t have to go through the full review
process again. Submit the upgrade for review and it’s automatically approved. You can immediately associate the new version to your
AppExchange listing.
The automated review isn’t the only security review of your upgraded solution. 6 months to 2 years after the solution is listed, we review
the new version. This periodic re-review includes automated and manual tests. The actual timing depends on the potential risk of the
solution.
To determine which listed solutions are due for re-review, we run risk-factor reports. If your solution shows significant change, it’s likely
that we conduct a re-review. When the time comes, we contact you to make arrangements. We also reserve the right to conduct random
security penetration tests on your solution throughout the year.
There’s no additional cost for re-reviews. These reviews are included in the security review fee paid at original submission of your solution.
If we find that your solution no longer meets our enterprise security standards, we notify you and provide a timeline to remedy the
issues. In extreme cases, we pull the AppExchange listing from public viewing. Before you can relist it for distribution, you must fix the
security issues and submit it for a follow-up review.
149
Publish Your Solution on AppExchange How Does AppExchange Search Work?
Keyword Relevance
Keyword relevance considers how closely customers’ search terms align with text on your listing. The more that the search terms
align with your listing text, the higher its keyword relevance. Title, tagline, and brief description text is weighted more heavily than
other listing text.
Example: A customer visits AppExchange to find an app for administering surveys. Their search includes the words feedback
and collection. AppExchange listings that include these words have a higher keyword relevance than listings that don’t.
Engagement
Engagement is informed by your listing’s popularity and considers customer activities like screenshot views, test drives, and installs.
We measure these activities daily and in aggregate over the past 30 days. The more customer activities that occur on your listing,
the higher its engagement.
Example: A customer visits AppExchange to find a document generation app. After performing a search, they visit two listings.
The first listing has only a few low-resolution screenshots, so the customer leaves without interacting. The second listing has
high-resolution screenshots, a video, and a free trial, and the customer interacts with each of them. In this scenario, the customer’s
behavior contributes to higher engagement for the second listing than the first.
Listing Experience
Listing experience considers other aspects of your listing that aren’t included in keyword relevance and engagement factors. Some
of these aspects relate to your Salesforce partnership, such as participation in the Pledge 1% program. Others relate to customers’
experiences with your solution, such as the number and quality of reviews on your listing or when your solution was last updated.
Example: A Salesforce partner lists a new telephony app on AppExchange. To promote awareness and installs, the partner
launches a marketing campaign. Then the partner sends follow-up emails to customers who installed the app. The email thanks
customers for trying the app and asks them to share their feedback on AppExchange. The number of reviews grows and listing
experience increases.
Machine Learning
Machine learning uses AI to improve the search experience on AppExchange. Like other search providers, we don’t share details
about our machine learning algorithm. But trust and customer success are central to the design of the algorithm. Trust means that
the algorithm continuously tunes search results to ensure authenticity. Customer success means that the algorithm makes inferences
about a customer’s search intent and prioritizes the results that are most likely to drive positive outcomes.
Example: A customer visits AppExchange and searches for a solution called Appy’s Maps. In the search results, a competing
solution appears alongside Appy’s Maps. This solution appears because some who searched for Appy’s Maps eventually installed
the competing solution. The machine learning algorithm considers this outcome positive and associates the competing solution
with Appy’s Maps.
150
Publish Your Solution on AppExchange How Does AppExchange Search Work?
Factor Tips
Keyword Relevance • Identify the business problems that your offering solves, then
select keywords for your listing. When you incorporate
keywords into your listing, focus on the title, tagline, and brief
description.
• Avoid keyword stuffing. If you pack your listing with too many
or unrelated keywords, it’s difficult for customers to understand
the value it provides. Plus, it negatively affects the machine
learning algorithms.
• Review the keywords that drive your listing activity by using
Marketplace Analytics visualizations. These visualizations help
you determine the keywords that are associated with the
highest number of tile, video, and demo views. To gauge
engagement, regularly review your analytics and improve your
offering.
Listing Experience • Monitor the feedback that your solution receives. Respond to
positive feedback with a thank you, and respond to negative
feedback with helpful tips and solutions. AppExchange doesn’t
edit published reviews, but your customers can edit them
based on their positive interactions with you.
• Keep your listing fresh. When you upload a new package and
release a new version, review your listing content. Make sure
to describe your current features and use the best-fit keywords.
• Keep up to date with Salesforce releases. Check that your
solution works with our latest technology and update your
listing accordingly.
151
Publish Your Solution on AppExchange Email Notifications
Maintaining a strong search position is a marathon, not a sprint. All search factors work together, and can change over time. Periodically
review your listing’s keywords, content, and analytics so that they contribute to machine learning. Make updates to those factors that
you control.
SEE ALSO:
Make Your AppExchange Listing Effective
Collect AppExchange Leads
How Do Customers Find My Listing?
Email Notifications
New Comment on Your The review author Sent only if someone other than the review author comments on the review
Review and if the author has opted to receive email notifications on their profile. If the
author replies to the notification, the reply is posted as a new comment on the
review.
Also Commented on the The people who Sent to people who have commented on a review, are not the review author or
Review commented on the the author of this comment, and have opted to receive email notifications on
review their profiles. At most, one email notification is sent to each commenter for each
new comment. If the person replies to the notification, the reply is posted as a
new comment on the review.
New Comment on the You, the provider Sent whenever someone writes a new comment on a review of your listing.
Review of Your Listing
152
Publish Your Solution on AppExchange Collect AppExchange Leads
SEE ALSO:
AppExchange Lead Events and Marketplace Analytics
Generate Leads from Your Website for Your Sales Teams
AppExchange Leads
When you enable lead collection for your AppExchange listing and a customer interacts with the listing, AppExchange records a lead.
If you enabled Web-to-Lead in your Salesforce org, AppExchange can also deliver the lead to that org. Some Web-to-Lead settings can
prevent leads from being delivered to your org.
You can collect leads when a customer:
• Installs your solution
• Takes a test drive
• Watches a demo or video
• Signs up for a free trial
• Clicks Learn More
Before you enable lead collection on your listings:
• Configure Web-to-Lead in the org where you want to receive leads.
• Disable Require reCaptcha verification in the org’s Web-to-Lead settings. If reCaptcha is enabled, no AppExchange leads are sent to
the org.
Set up lead collection on a per-listing basis. For each listing, enable the customer interactions that trigger lead collection. For each
interaction, also complete any required setup. For example, to collect leads when customers watch your demo, you must add a demo
video to your listing.
When a customer interacts with your listing and lead collection is enabled for that interaction, they’re prompted to fill out the AppExchange
lead sign-up form. Info collected from the form, combined with customer activity data, is shared as a lead.
Note: You can’t modify the lead form that customers are asked to fill out. To share ideas for improving the lead form, go to
IdeaExchange.
Regardless of your listing’s lead-collection settings, customers can still view your demo, take a test drive, click to learn more, and install
your solution.
153
Publish Your Solution on AppExchange Enable AppExchange Lead Collection
Action Details
IN The user clicked Get It Now on your listing and started the install process for your solution. This action includes
agreeing to the terms and conditions, and clicking the install button on the confirmation page.
Note: Sometimes users don't complete the installation, or they uninstall your solution later. To track package
installations, use the License Management Application (LMA).
DM The user clicked View Demo on your listing and watched some or all of your demo video.
Note: Listings that previously had Learn More buttons now have Get It Now buttons and receive lead source
codes with IN actions.
154
Publish Your Solution on AppExchange Troubleshoot AppExchange Leads
Action Details
TS The user clicked Get It Now on your listing and started a 30-day free trial of Salesforce and your solution. These users
can be existing Salesforce customers.
TD The user clicked Test Drive on your listing and tried your solution in a test org.
Let’s tweak our example to see how multiple installation leads can be created for the same package. First, a user clicks Get It Now, and
starts, but doesn’t complete the installation. AppExchange creates a lead with source code SFDC-IN|Simple Sample App.
Later, the same user purchases your solution and installs it via an installation URL. The LMA creates a second lead with source code
Package Installation. Same user. Same package. On the surface, the leads appear to be duplicates, but the lead source codes
show that they aren’t.
Learn more about LMA leads in How Does the License Management App Work on page 290?
Duplicate Leads
A duplicate lead is a lead that AppExchange already sent to your org for this user, listing, or action within the last 180 days.
Duplicate lead source codes always contain the string -dup- and use the format: SFDC-dup-XX|Listing Name. For example,
SFDC-dup-DM|Simple Sample App indicates a duplicate lead from a user who clicked View Demo on the Simple Sample
App listing.
155
Publish Your Solution on AppExchange Troubleshoot AppExchange Leads
Web-to-Lead reCaptcha
To receive AppExchange leads in your Salesforce org, disable Require reCaptcha Verification in your org’s Web-to-Lead settings. If
reCaptcha is enabled, AppExchange leads aren’t sent to your org.
156
Publish Your Solution on AppExchange Troubleshoot AppExchange Leads
Changing country/territory names doesn’t affect AppExchange lead creation, but changing integration values does. Don’t change
integration values. The country or territory sent in an AppExchange lead must match an integration value in your org. If there’s no match,
lead creation fails. The same issue occurs with state picklists.
To avoid state and country/territory picklist-related lead failures, you have two options. Use the standard picklist integration values, or
add duplicate states and countries/territories to your picklists.
Use Standard Picklist Integration Values
To implement this option, use the Salesforce standard state and country/territory picklists in your org, and leave the integration
values as-is. We recommend this option for most partners.
With this option, AppExchange leads propagate to your org with full state and country/territory names. The names match integration
values in the standard picklists.
Add Duplicate States and Countries/Territories to Your Picklists
Implement this option if you require two-letter state or country/territory abbreviations in your org. For example, you show abbreviations
in the user interface, or use them to integrate with other systems.
Add duplicate states and countries/territories to your picklists with different integration values. Set one value to the two-letter state
or country/territory abbreviation. Set the other value to the full state or country/territory name. Make only the two-letter abbreviation
picklist entries visible.
With this option, AppExchange leads propagate to your org with full state and country/territory names, which match the full name
integration values in your org. You also have two-letter integration values to use as needed.
SEE ALSO:
Standard Countries for Address Picklists
List of States and Countries Available from Data.com
Integration Values for State and Country Picklists
157
Publish Your Solution on AppExchange Analytics Reports for Publishers
Report Types
For app and component listings, the available reports are:
• Installs (Get It Now)
• Leads
• Resources & Promotions
• Test Drives, Demos & Screenshots
• Web Analytics
For a consulting partner listing, the available reports are:
• Leads
• Learn Mores, Videos & Screenshots
• Web Analytics
Report Attributes
All the reports share these common attributes.
Listing Name
The title of the listing shown at the top of every report.
Back to Publishing Home link
Returns you to the Publishing Home page.
Show Menu
Allows you to choose from one of the available reports. The reports are sorted alphabetically.
Date Range Menu
Allows you to choose the date range. Last 30 Days is selected by default.
Metrics
Report Metrics
Installs (Get It Now) Get it Now, Installs, Click-to-Install Ratio
Resources & Promotions Case Studies, Data Sheets, Promotions, Customer Testimonials,
Webinars, Customization Guides, Whitepapers
158
Publish Your Solution on AppExchange Update the Package in Your AppExchange Listing
Report Metrics
Learn Mores, Videos & Screenshots Learn Mores, Videos, Screenshots
Web Analytics Page Views, SEO Searches, Visits, Internal Searches, Unique Visitors
Line Graph
Shows one or more lines for each metric you’ve selected for display. Select the checkboxes beneath the graph for the metrics you
want to see. By default, all metrics are included in the graph. The reports show metrics over time grouped by created date. When
you click the graph, the date and selected metrics for that date display. Next to each metric, the number of items in the metric over
the selected date range displays regardless of whether you have chosen to include the graph of that metric.
Table
Each report includes a table. The first column on all reports is the Date, and the rest of the columns correspond to the metrics
associated with the report. The table shows 30 rows at a time. Click Next to see more data. By default, the table is sorted by date
from oldest to newest. Change the sort order by clicking the column headers. Clicking the selected sort column a second time sorts
the data in the opposite direction. The small triangle pointing up or down next to a column header indicates the sort direction and
marks that column as the sort column.
Note: We conduct periodic re-reviews of all solutions listed on AppExchange. If your solution shows significant change, we contact
you to arrange a review of the new version.
1. Upload the new version of your package to the Publishing Console.
2. Log in to the Salesforce Partner Community.
3. Click the Publishing tab.
4. Click the Packages tab. If you developed the new package in the same org as the previous version, the new package displays
automatically. If you developed the new package in a different org, first navigate to the Organizations tab and connect the org that
contains the package.
5. Find the new package, and then click Start Review.
6. If you’re prompted to continue, click Next. You’re guided through the options and settings that require your input. Update information
as needed.
7. Click Submit. If your solution passed the security review within the last year, the new version is auto-approved, and its status changes
to Passed. The status change can take up to 24 hours.
8. After your package is approved, navigate to the Listings tab and select the listing that you want to edit.
9. Click the solution-type tab. The tab name corresponds to the type of solution that you’re listing: App, Component, Flow, and so on.
10. Click Select Package, and then select the new package you want to associate with the listing.
11. Save your changes.
159
Publish Your Solution on AppExchange AppExchange FAQ
AppExchange FAQ
The following is a list of frequently asked questions about selling on the AppExchange.
• Can I add more industries?
• Do I need an APO to publish my app or component on the AppExchange?
• Can I change my company name?
• Can I create my app or component on a Salesforce sandbox and upload it to the AppExchange?
• Can I edit a review?
• Can I keep the same listing but change the package it provides?
• Can I Update My Solution with a New Version or Patch?
• How Do Customers Find My Listing?
• How do I edit a package after I’ve created a listing?
• How do I get an API token for my app?
• How do I increase my listing’s popularity?
• How do I offer a free trial of my app or component?
• How do I see listings that Salesforce removed?
• How do I upgrade my customers to a new version?
• What’s the difference between a free trial and test drive?
• Where can I share my ideas?
• Where can I write a review?
160
Publish Your Solution on AppExchange Can I create my app or component on a Salesforce sandbox
and upload it to the AppExchange?
Can I keep the same listing but change the package it provides?
Yes, you can change the packages that are linked to your listing. First, make sure that you’ve uploaded the new package and, if the listing
is public, that the package has passed the security review.
On the Publishing page in the Partner Community, navigate to the Packages tab and find the package associated with the listing that
you want to update. Click Edit Listing to open the publishing console. If you’re updating an app, you can add a package on the App
tab. If you’re updating a component, add it on the Component tab.
161
Publish Your Solution on AppExchange How do I edit a package after I’ve created a listing?
Sorting
Customers also sort results by rating, Salesforce edition, price, and other attributes. Search results ranked by rating are sorted first
by the number of stars and then by the number of reviews. For example, a listing with one review and five stars is ranked above a
listing with 20 four-star reviews.
Search Engines
Because AppExchange is a public website, search engines index your listing pages and return them in their search results. To improve
your ranking with external search providers, make sure that you cross reference your listing URL on your website, blog, Facebook,
and Twitter pages.
SEE ALSO:
How Does AppExchange Search Work?
Note: This feature is available to eligible partners. For more information on the Partner Program, including eligibility requirements,
visit www.salesforce.com/partners.
162
Publish Your Solution on AppExchange How do I offer a free trial of my app or component?
• Add images. One of the first things that visitors do is click the View Screenshots button. Many people don’t even look at a listing
that doesn’t have screenshots.
• Add resources that demonstrate how your app or component affects the customer’s bottom line. For example, if you have research
showing that a component helps support representatives resolve cases faster, include that information in a data sheet.
• Be up front with your pricing. If you don’t include pricing on your listing, people become disinterested quickly.
163
Publish Your Solution on AppExchange Where can I write a review?
Important: You cannot write a review for your own listing. Please review the Terms of Use for AppExchange for additional legal
information.
164
CHAPTER 8 Sell on AppExchange with Checkout
In this chapter ... Bring a modern online shopping experience to your AppExchange listing with Checkout. Transform your
Checkout data into insights and actions with the Checkout Management App (CMA).
• AppExchange
Checkout
• Checkout
Management App
165
Sell on AppExchange with Checkout AppExchange Checkout
AppExchange Checkout
Checkout is AppExchange's integrated payments platform. With Checkout, customers can buy your AppExchange solution directly from
your listing with a credit card or bank payment. Checkout is also ready to use with the License Management App (LMA) and the Checkout
Management App (CMA).
Note: AppExchange Checkout is available in English only to eligible Salesforce partners. For more information on the Partner
Program, including eligibility requirements, visit https://partners.salesforce.com.
Here's how Checkout makes it easier to sell a solution on AppExchange.
Automated licensing for your solution. Is ready to use with the License Management App.
When a customer purchases your solution using Checkout, a license record is
automatically provisioned in the LMA. If a customer upgrades, renews, or cancels
their subscription, Checkout updates the license.
Insights about your customers. Is ready to use with the Checkout Management App.
The CMA brings the power of Salesforce CRM to Checkout. Use the CMA's
dashboards to explore revenue, subscription status, and other key data. Send
customizable notifications to customers and team members for trial expirations,
declined payments, and other events.
Tip: Just getting started with Checkout? Head to Trailhead and earn the AppExchange Checkout badge.
166
Sell on AppExchange with Checkout How Is Revenue Shared in AppExchange Checkout?
Credit card You sell an app for $1,000 per user per year. If a customer buys 5 licenses with a credit card, here's
how revenue is shared.
• The overall transaction amount is $5,000 per year ($1,000 per user per year x 5 users).
• The amount shared with Salesforce is $750.00 per year (15% x $5,000 per year).
• The amount shared with Stripe is $0.30 (1 credit card transaction x 30 cents per transaction fee).
167
Sell on AppExchange with Checkout Payment Methods in AppExchange Checkout
One-time • Per User Once, at the time of purchase The Publishing Console on the
Salesforce Partner Community
• Per Company
To provide customers with the most flexibility, we recommend offering several payment options on a listing.
US bank account Checking, savings, or money market accounts • Payments can take up to 5 days to process.
from banks based in the United States.
• Your pricing plan in Stripe must be in US
Payments are processed using the Automated dollars (USD).
Clearing House (ACH) network.
• Customers must pay with a business bank
account. Checkout doesn’t support ACH
payments from personal bank accounts.
• Customers must have a US billing address.
European bank account Checking, savings, or money market accounts • Payments are processed immediately.
from banks based in the European Union.
• Your pricing plan in Stripe must be in euros
Payments are processed using the Single Euro (EUR).
Payment Area (SEPA) framework.
• Customers must have an EU billing address.
Note: Your business address in Stripe determines the type of bank transfers that you can accept. To accept ACH payments, your
company must be based in the United States. To accept SEPA payments, your company must be based in the European Union.
You can’t accept both ACH and SEPA payments.
168
Sell on AppExchange with Checkout Get Started with AppExchange Checkout
169
Sell on AppExchange with Checkout Get Started with AppExchange Checkout
Tip: Include the billing frequency, such as Annual, in your plan's nickname.
7. Select a currency.
Note: To let customers pay with US bank accounts, use US dollars (USD) for the plan. To let customers pay with European
bank accounts, use euros (EUR) for the plan.
Note: Your business address in Stripe determines the type of bank transfers that you can accept. To accept ACH payments, your
company must be based in the United States. To accept SEPA payments, your company must be based in the European Union.
You can’t accept both ACH and SEPA payments.
1. Go to the Stripe website.
2. Log in to your Stripe account.
3. Click Settings.
4. Under Payments and Payouts, click Payment methods.
5. Request ACH Credit Transfer (1) or SEPA Direct Debit (2) for your account.
170
Sell on AppExchange with Checkout Get Started with AppExchange Checkout
Your activation request is sent to Stripe for processing. You receive an email when your request is approved.
6. If you requested ACH Credit Transfer, verify that the activation succeeded.
a. Go to the Stripe website again.
b. Log in to your Stripe account.
c. Go to Stripe’s ACH Guide.
d. Click Enable ACH. If you don’t see an option to enable ACH, ACH Credit Transfer is already active for your account.
171
Sell on AppExchange with Checkout Get Started with AppExchange Checkout
6. Select payment plans (1) and adjust the display order (2).
Tip: You can offer multiple payment plans on a listing. For example, you can offer a one-time payment option and a monthly
subscription.
Note: Your billing address in Stripe determines the type of bank payments that you can accept. Before you enable bank
payments, verify that you activated ACH Credit Transfer (for US bank accounts) or SEPA Direct Debit (for European bank
accounts) in Stripe. You receive an email from Stripe when your account is ready to receive bank payments.
172
Sell on AppExchange with Checkout Get Started with AppExchange Checkout
8. Click Save.
SEE ALSO:
Create a Stripe Product and Pricing Plan for AppExchange Checkout
Enable Checkout on an AppExchange Listing
173
Sell on AppExchange with Checkout Support International Payments in AppExchange Checkout
Salesforce will contact you to arrange for payment of the security review fee.
5. Enter a VAT number and country. Use the same country that you provided to Stripe in your billing address.
6. Click Save.
If you manage Checkout data with the Checkout Management App, you can use the app to view information for VAT reporting.
174
Sell on AppExchange with Checkout Support International Payments in AppExchange Checkout
Initial Purchase
The initial purchase is your customer’s first Checkout transaction. In the initial purchase, the customer uses the Checkout wizard to select
a payment plan and method, provide billing and contact information, and confirm the payment. In regions that require SCA, the Checkout
wizard adds an identity verification step.
After the customer clicks Purchase (1), Checkout may prompt the customer to verify their identity. For example, the customer might
be asked to enter a verification code that’s sent to the mobile device associated with their payment method. This verification step uses
the 3D Secure 2 protocol and is managed by Checkout's payment partner, Stripe. After the customer verifies their identity, Stripe processes
the payment.
175
Sell on AppExchange with Checkout Support International Payments in AppExchange Checkout
Recurring Payments
Customers can also make recurring payments, either monthly or annually. In regions that require SCA, the first payment is the initial
purchase, and the customer may be asked to verify their identity to complete the transaction. Checkout attempts to process subsequent
payments with the billing details provided in the initial purchase, per the terms and conditions of the subscription. In regions that require
SCA, the customer’s bank or credit card issuer reviews the payment attempt and determines whether to request customer authorization.
If customer authorization is required, Stripe marks the payment as failed. The next time the customer logs in to AppExchange, Checkout
prompts the customer to authorize the payment (1). After the customer clicks Authorize (2), the customer verifies their identity using
the same process as the initial purchase. After the customer verifies their identity, Stripe processes the payment.
176
Sell on AppExchange with Checkout Support International Payments in AppExchange Checkout
SEE ALSO:
Manage AppExchange Checkout Subscription Payments That Require Customer Authorization
View AppExchange Checkout Subscription Payments That Require Customer Authorization
Authorize an AppExchange Checkout Subscription Payment
177
Sell on AppExchange with Checkout Support International Payments in AppExchange Checkout
4. Go to Manage payments that require 3D Secure, and then configure Subscription status (1).
Important: Don't enable the Customer emails setting. To authorize payments, customers must log in to AppExchange.
Filter Value
Status Incomplete
4. Click Done.
5. Click a payment to view details about the transaction.
178
Sell on AppExchange with Checkout Manage AppExchange Checkout Subscriptions
SEE ALSO:
View AppExchange Checkout Subscription Payments That Require Customer Authorization
179
Sell on AppExchange with Checkout AppExchange Checkout FAQs
180
Sell on AppExchange with Checkout AppExchange Checkout FAQs
Collect payment details: Best if your customers value: Best if your company:
Before installation A seamless purchase experience at the end of Prefers to manage trials in Stripe.
a trial.
After installation The ability to quickly try out your solution. Prefers to manage trials using the License
Management App (LMA).
181
Sell on AppExchange with Checkout AppExchange Checkout FAQs
SEE ALSO:
Create a Stripe Product and Pricing Plan for AppExchange Checkout
How does billing work when AppExchange Checkout customers add or remove
licenses during the current billing period?
If licenses are added or removed during the current billing period, Checkout charges the customer a prorated amount for the next billing
period.
182
Sell on AppExchange with Checkout AppExchange Checkout Considerations
183
Sell on AppExchange with Checkout Checkout Management App Best Practices
• Subscription status by month, so you can stay on top of trials, purchases, and renewals
You can customize the dashboard using standard Salesforce tools. For a detailed look at your data, view individual customer, subscription
plan, subscription, invoice, invoice item, and transaction records.
To save time communicating with stakeholders, the CMA can send email notifications for situations that you often encounter as a partner,
like renewal notices. Enable email notifications as needed (1) and then customize them to reflect your company’s identity (2). Not in the
mood to customize anything? No worries—the templates provide friendly and informative default content.
184
Sell on AppExchange with Checkout Checkout Management App Objects
• Install the CMA in a Salesforce org where the License Management App (LMA) is already installed. Usually, this is your partner business
org. If the LMA isn’t installed in your org, you can’t install the CMA.
• Don’t edit data in managed fields on the subscription plan, subscription, invoice, or transaction object records. The CMA syncs Stripe
data in a one-way, read-only manner, so changes that you make aren’t reflected in Stripe. To update subscription plan, subscription,
invoice, invoice item, or transaction data, use the Stripe dashboard or API.
• Review and customize notification templates before enabling them. By adding your logo and tailoring template content to reflect
your company’s identity, you set yourself apart from other offerings on the AppExchange. Customizing takes only a couple of minutes
and doesn’t require any coding.
SEE ALSO:
Modify a Notification Template in the Checkout Management App
185
Sell on AppExchange with Checkout Checkout Management App Objects
Subscription (2) Contains information about the customer’s history and usage of Child object of:
an offering. For example, when the subscription started. • Subscription plan
Parent object of:
• Invoice
186
Sell on AppExchange with Checkout Get Started with the Checkout Management App
• Transaction
Invoice (3) Contains billing and payment information for a subscription for a Child object of:
specific time period. For example, the total amount owed by the • Subscription
customer.
Sibling object of:
• Transaction
Invoice item (4) Contains information about a particular billing and payment event Child object of:
for a specific time period. For example, a one-time credit. Multiple • Invoice
invoice items can be associated with an invoice.
Transaction (5) Contains information about a customer payment attempt. For Child object of:
example, method of payment and whether it was successful. • Subscription
Sibling object of:
• Invoice
We haven’t listed it in the table, but there’s one more object to be aware of: customer. The customer object contains information about
the subscriber and draws from the other objects in the CMA, including subscription, invoice, and transaction.
The CMA automatically syncs new data from Stripe, updating object records as necessary. Just remember: syncing is one way and read
only, so changes that you make to object records aren’t reflected in Stripe. To update subscription plan, subscription, invoice, invoice
item, or transaction data, use the Stripe dashboard or API.
187
Sell on AppExchange with Checkout Get Started with the Checkout Management App
Note: Salesforce recommends granting access to admins only and assigning access to other users as needed after the app
is installed.
SEE ALSO:
Assign Access to the Checkout Management App
188
Sell on AppExchange with Checkout Get Started with the Checkout Management App
5. Set up data syncing by creating and configuring a site. After you set up data syncing, new Stripe data syncs to your org automatically.
a. Click Set Up Data Syncing.
b. Click Register a Force.com Domain, and then follow the setup instructions in the CMA.
c. Click Create a Force.com Site, and then follow the setup instructions in the CMA.
d. Click Configure Site Access, and then follow the setup instructions in the CMA.
e. Click Connect the Site to Stripe, and then follow the setup instructions in the CMA.
6. Import your Stripe data. If you haven’t sold an offering using AppExchange Checkout before, you don’t have any Stripe data, so you
can skip this step.
a. Click Import Existing Data.
b. Click Import Data.
Importing Stripe data can take awhile depending on how much data you have. Don’t use CMA reports or dashboards while data
is being imported.
c. After the import finishes, close the dialog to return to the setup wizard.
Tip: Before you enable a notification, review the default content we provide. That way, you know exactly what customers and
team members receive, and you can tailor it to reflect your company’s identity.
a. In the Configure Notification Settings section, click Do It.
b. Enable customer notifications as desired.
c. To add the email addresses of team members, click View/Edit, and then click Save.
d. Enable partner notifications as desired.
e. Go back to the setup wizard.
You’re all set! To update configuration details later, return to Checkout Setup.
SEE ALSO:
Sample Checkout Management App Customizations
189
Sell on AppExchange with Checkout Get Started with the Checkout Management App
SEE ALSO:
Use an Organization-Wide Address on a Notification
Include a Link in a Notification
190
Sell on AppExchange with Checkout Get Started with the Checkout Management App
Note: To change how long CMA logs are saved, edit the value configured in this step. Don’t add more values to CMALogSettings.
Field Value
Job Name CMA Log Cleanup
Frequency Specify a weekly or monthly interval—we recommend running the job at least once per week
End Date A future date—we recommend specifying a date that’s at least several years in the future
Preferred Start Time Any value—we recommend choosing a time when your org is not under heavy load
d. Click Save.
191
Sell on AppExchange with Checkout Sample Checkout Management App Customizations
192
Sell on AppExchange with Checkout Sample Checkout Management App Customizations
4. Click Save.
Note: The target attribute is set to blank, which opens the URL in a new page.
7. Click Save.
2. Open the App Launcher, and then click Checkout Management App. To create, edit, and delete
reports:
3. Click Dashboards, and then click CMA Dashboard. • Create and Customize
4. For the Revenue Per Month chart, click View Report. Reports
AND
5. From the Edit drop-down list, select Clone.
Report Builder
6. Specify field values as follows, and then click Create.
193
Sell on AppExchange with Checkout Update Settings in the Checkout Management App
7. Click Edit.
8. Add a filter to display revenue for a specific offering.
a. From the Add drop-down list, select Field Filter.
b. Enter filter criteria. To display revenue only for listings named Sample App, create the filter Listing Name equals
Sample App.
c. Click OK.
9. In the Preview section, from the Activation Date drop-down list, select Group Dates By > Calendar Year.
Now the report is set up to show annual revenue instead of revenue by month.
10. Click Save, and then click Run Report.
SEE ALSO:
Modify a Notification Template in the Checkout Management App
194
Sell on AppExchange with Checkout View Checkout Management App Logs
Change the Stripe Account Associated with the Checkout Management App
If you start managing subscriptions from another Stripe account, update your account settings in
USER PERMISSIONS
the Checkout Management App (CMA) to keep Stripe data in sync.
1. Log in to the org where the CMA is installed. To configure the Checkout
Management App:
2. Open the App Launcher, and then click Checkout Management App. • CMA Admin User
3. Click Checkout Setup.
4. In the Connect Stripe Account section, click Change.
5. Note: If you change or disconnect the current Stripe account, existing Stripe data in your org remains.
To associate a new Stripe account, click Change Stripe Account, and then enter a new live secret API key.
195
CHAPTER 9 Monitor Performance with Analytics for
AppExchange Partners
In this chapter ... Discover how customers find and interact with your AppExchange listing in the Marketplace Analytics
dashboard. Learn how subscribers use your package by exploring App Analytics data.
• Monitor Your
AppExchange
Performance with
Marketplace
Analytics
• AppExchange App
Analytics
196
Monitor Performance with Analytics for AppExchange Monitor Your AppExchange Performance with Marketplace
Partners Analytics
Note: Marketplace Analytics is available to eligible Salesforce partners. For more information on the Partner Program, including
eligibility requirements, visit https://partners.salesforce.com.
197
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
198
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Element Description
Activity Metric (1) Number of times that an event or interaction occurred during a time period. For values over 1,000,
the dashboard shows a rounded number. To view the exact number, hover over the metric.
Trend Indicator (2) Percentage change relative to a previous time period. A positive value represents a period-over-period
increase, and a negative value represents a period-over-period decrease.
The default time period is 30 days, but you can choose another fixed time period or define a custom one.
Example:
This summary of the example solution called Appy’s Maps shows that it received 98,000 tile views (3) in the past 7 days, which is
a 3.6% increase (4) compared to the previous 7-day period (5).
199
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Global Filters
Time Period (2) Select the time period that you want to explore.
You can select one of the fixed time periods, such as the last quarter, or you can define a custom
period. The time period’s start and end dates appear next to the filter.
Local Filters
Activity (4) Select the activity metrics to show in the visualization. • Activity Source Timeline
An activity metric tells you how often an event or interaction • Activity Sources
occurred on your AppExchange listing.
• Customer Engagement
• Top AppExchange Searches
200
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
201
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
To change traffic sources, activities, and time scale, adjust the local filters (1). The visualization’s y-axis resizes based on the traffic sources
and activities that you select. To resize the x-axis, change the View By filter. To see the exact value of a metric, hover over a line in the
chart (2).
If the visualization doesn’t display data, try filtering by different metrics, or change the time period.
Definitions
Here’s how we define the activity metrics.
Lead Events Lead events on your listing, which include demos, test drives, and Get It Now clicks or installs. A
customer who clicks Get It Now and installs your solution is counted as a single lead event.
202
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Tile Views Views of your listing tile. To qualify as a view, the entire tile must be visible in the customer's browser.
Includes any repeat views by the customer.
AppExchange Categories Activity by customers who reached your listing from one of AppExchange's Solutions by Type
categories.
AppExchange Sponsored Activity by customers who reached your listing from AppExchange's Sponsored Solutions section.
AppExchange Recommended Activity by customers who reached your listing from an AppExchange personalized recommendation.
Includes Recommended for You and Appy's Picks for You.
AppExchange Search Activity by customers who reached your listing from a search made using the AppExchange search
bar.
Google Activity by customers who reached your listing from a Google search or ad. Includes organic search
traffic and traffic from ads shown on the Google Search Network or Google Display Network.
Web Activity by customers who reached your listing from a web source that isn't affiliated with Facebook
or Google. Includes traffic from your company’s website.
Activity Sources
See how traffic sources contribute to an activity on your AppExchange listing. Metric values are summed over a time period. If you want
to see the number of activities during a specific day, week, month, or quarter, use the Activity Source Timeline instead.
203
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
To change activities, change the local filter (1). The percentage (2) within a chart segment represents the contribution of the traffic source
to the activity’s total. To see the exact value of a metric, hover over the chart segment (3).
If the visualization doesn’t display data, try filtering by different metrics, or change the time period.
Definitions
Here’s how we define the activity metrics.
Test Drives Test drive button clicks associated with the search term.
204
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
AppExchange Categories Activity by customers who reached your listing from one of AppExchange's Solutions by Type
categories.
AppExchange Sponsored Activity by customers who reached your listing from AppExchange's Sponsored Solutions section.
AppExchange Recommended Activity by customers who reached your listing from an AppExchange personalized recommendation.
Includes Recommended for You and Appy's Picks for You.
AppExchange Search Activity by customers who reached your listing from a search made using the AppExchange search
bar.
Google Activity by customers who reached your listing from a Google search or ad. Includes organic search
traffic and traffic from ads shown on the Google Search Network or Google Display Network.
Web Activity by customers who reached your listing from any web source that isn't affiliated with Facebook
or Google. Includes traffic from your company's website.
Customer Engagement
See how customers interact with your listing and its resources over time. Resources include screenshots, demos, test drives, and other
items that you’ve added to your listing in the Publishing Console.
205
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
To change activities and the time scale, change the filters (1). The visualization’s y-axis resizes based on the activities that you select. To
resize the x-axis, change the View By filter. To see the exact value of a metric, hover over a chart segment (2).
If the visualization doesn’t display data, try filtering by different metrics, or change the time period.
Definitions
Here’s how we define the activity metrics.
Get It Nows Clicks on your listing’s Get It Now button. Customers who click the button start the Get It Now
installation flow, but might not complete it.
Tile Hovers Hovers over your listing tile. To qualify as a hover, the customer must pause long enough over the
tile to display the listing detail popover. Includes repeat hovers by the customer.
Installs Installs of your solution initiated on AppExchange, your website, or from a code repository. For
AppExchange installs, we count the number of successful completions of the Get It Now installation
flow. Includes installs in production and sandbox orgs.
Lead Events Lead events on your listing, which include demos, test drives, and Get It Now clicks or installs. A
customer who clicks Get It Now and installs your solution is counted as a single lead event.
206
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Tile Views Views of your listing tile. To qualify as a view, the entire tile must be visible in the customer’s browser.
Includes repeat views by the customer.
Select the activities that you want to view (1). The search term (2) associated with the activities appears on the left of the chart. Activity
metric values appear on the right (3).
207
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Depending on your filter selections, some search terms might not be visible. To see all available search terms, position your pointer over
the visualization and scroll down.
If the visualization doesn’t display data, try filtering by different metrics, or change the time period.
Definitions
Here’s how we define the activity metrics.
Lead Events Lead events on your listing, which include demos, test drives, and Get It Now clicks or installs. A
customer who clicks Get It Now and installs your solution is counted as a single lead event.
Tile Hovers Hovers over your listing tile. To qualify as a hover, the customer must pause long enough over the
tile to display the listing detail popover. Includes any repeat hovers by the customer.
Tile Views Views of your listing tile. To qualify as a view, the entire tile must be visible in the customer's browser.
Includes any repeat views by the customer.
Visitors Unique listing visitors. If a customer visits your listing more than once in a 30-day period, only a single
visitor is counted.
View data by country or by US state or territory. To view data by country, select the World Map; to view data by US state or territory,
select the US Map (1). To change traffic sources or activities, adjust the local filters (2). Notice that the gradient displays the range of
values for the activity you select (3). To see detailed metrics for a selected area on the World Map, hover over a country. Or on the US
Map, hover over a state or territory.
If the visualization doesn’t display data, try filtering by different metrics.
208
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Definitions
Here’s how we define the activity metrics.
Lead Events Lead events on your listing, which include demos, test drives, and Get It Now clicks or installs. A
customer who clicks Get It Now and installs your solution is counted as a single lead event.
Tile Hovers Hovers over your listing tile. To qualify as a hover, the customer must pause long enough over the
tile to display the listing detail popover. The count includes repeat hovers by the customer.
Tile Views Views of your listing tile. To qualify as a view, the entire tile must be visible in the customer's browser.
Includes any repeat views by the customer.
AppExchange Categories Activity by customers who reached your listing from one of AppExchange's Solutions by Type
categories.
AppExchange Sponsored Activity by customers who reached your listing from AppExchange's Sponsored Solutions section.
AppExchange Recommended Activity by customers who reached your listing from an AppExchange personalized recommendation.
Includes Recommended for You and Appy's Picks for You.
AppExchange Search Activity by customers who reached your listing from a search made using the AppExchange search
bar.
Google Activity by customers who reached your listing from a Google search or ad. Includes organic search
traffic and traffic from ads shown on the Google Search Network or Google Display Network.
Web Activity by customers who reached your listing from a web source that isn't affiliated with Facebook
or Google. Includes traffic from your company’s website.
209
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Example: This example shows the header row and four rows of sample data. The following filters were applied.
• Global filter set to show data for the last 30 days.
• Local filters set to show visits by day for these traffic sources: AppExchange Featured and AppExchange Search.
Date,Source,Activity,Count of Activity
2019-01-01,AppExchange Featured,Visits,25
2019-01-01,AppExchange Search,Visits,50
2019-01-02,AppExchange Featured,Visits,30
2019-01-02,AppExchange Search,Visits,60
Example: This example shows the header row and 4 rows of sample data. The following filters were applied.
• Global filter set to show data for the last 30 days.
• Local filters set to show resource views by day.
Date,Activity,Count of Activity
2019-01-01,Customization Guide,10
2019-01-01,Datasheet,20
2019-01-02,Customization Guide,20
2019-01-02,Datasheet,40
Example: This example shows the header row and four rows of sample data. The following filters were applied.
• Global filter set to show data for the last 30 days.
• Local filter set to show visits.
Source,Activity,Count of Activity,Percentage of Total Activity,Rank
AppExchange Browse,Visits,500,20.41,1
AppExchange Categories,Visits,450,18.37,2
210
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
AppExchange Search,Visits,400,16.33,3
AppExchange Recommended,350,14.29,4
Note: For brevity, this sample shows only four traffic sources: AppExchange Browse, AppExchange Categories, AppExchange
Search, and AppExchanged Recommended. The file that you export from your dashboard provides all traffic sources.
Example: This example shows the header row and four rows of sample data. The following filters were applied.
• Global filter set to show data for the last 30 days.
• Local filters set to show the top search terms associated with visits and demos.
Search Term,Activity,Count of Activity
Geolocation,Visits,50
Geolocation,Demos,40
Maps,Visits,30
Maps,Demos,20
Domain Restriction An employee at your company watches A lead event is recorded. A lead isn’t
You filter leads from customers whose your listing’s demo video and uses a recorded. The lead
email address includes your company’s company email address when routing rule filters
domain. AppExchange asks for contact out the lead.
information.
211
Monitor Performance with Analytics for AppExchange Marketplace Analytics Dashboard
Partners
Duplicate Email Addresses A new customer goes to your listing and Three lead events are A lead is created
You filter leads associated with an email watches a video, takes a test drive, and recorded, one for each for the first activity
address that’s been captured in an installs your solution. For each activity, the activity. only. The others
existing lead. customer provides the same email are marked as
address. duplicates
In this scenario, Marketplace Analytics because they’re
records three lead events: one for each associated with
activity. In your org, the lead routing rule the same email
creates a lead for the first activity. The address.
others are marked as duplicates because
they’re associated with the same email
address.
Prohibit A prospect who prohibits A lead event is recorded. If custom lead routing rules
provider contact takes a test don’t filter out the lead, then a
drive of your solution. lead is created in your org. The
lead is flagged as contact
prohibited.
Customers can override their default Trailblazer.me contact preferences when interacting with AppExchange listings. AppExchange
recognizes when a customer interacts with your listing in a way that you chose to collect leads for. These customers are prompted to
fill out the AppExchange lead sign-up form.
212
Monitor Performance with Analytics for AppExchange Get Started with the Marketplace Analytics Dashboard
Partners
The form prepopulates with the customer’s contact info and preferences from their Trailblazer.me settings. On the form, the customer
can choose to allow or prohibit provider contact, effectively overriding the contact preference that they set in their Trailblazer.me profile.
SEE ALSO:
Collect AppExchange Leads
Troubleshoot AppExchange Leads
213
Monitor Performance with Analytics for AppExchange Get Started with the Marketplace Analytics Dashboard
Partners
214
Monitor Performance with Analytics for AppExchange Marketplace Analytics FAQs
Partners
Can I grant access to the Marketplace Analytics dashboard but not other publishing features?
What’s the earliest date that Marketplace Analytics data is available for?
Is aggregate data for all AppExchange listings available in Marketplace Analytics?
Is there a Marketplace Analytics API?
Why doesn’t data appear in my Marketplace Analytics activity summary or visualization?
Can I view my consulting service listing in the Marketplace Analytics dashboard?
How often is Marketplace Analytics data updated?
Can I switch to the classic version of the Marketplace Analytics dashboard?
Can I customize Marketplace Analytics visualizations?
Can I import data into the Marketplace Analytics dashboard?
Does Marketplace Analytics change how customers experience my listing?
Why doesn’t the sum of installs, demos, and test drives match the number of leads in Marketplace Analytics?
What’s the difference between a Get It Now click and an install?
Can I grant access to the Marketplace Analytics dashboard but not other publishing
features?
No. The Manage Listings permission provides access to all features in the Publishing Console. We suggest assigning this permission to
the people on your team who also manage your company’s AppExchange listing.
What’s the earliest date that Marketplace Analytics data is available for?
Marketplace Analytics data dates back to August 2019.
215
Monitor Performance with Analytics for AppExchange Marketplace Analytics FAQs
Partners
Why doesn’t the sum of installs, demos, and test drives match the number of leads
in Marketplace Analytics?
Typically, this happens when Web-to-Lead isn’t set up in your org or when Web-to-Lead isn’t configured correctly. To learn more about
Web-to-Lead, search for “Generate Leads from Your Website for Your Sales Teams” in Salesforce Help.
216
Monitor Performance with Analytics for AppExchange AppExchange App Analytics
Partners
Note: AppExchange App Analytics is subject to certain usage restrictions as described in the AppExchange Program Policies.
App Analytics is available for packages that have passed security review and are registered to a License Management App. Usage data
is provided as log files, month-based usage summaries, or subscriber snapshots. All usage data is available as downloadable
comma-separated value (.csv) files. To view the data in dashboard or visualization format, use Tableau CRM or a third-party analytics
tool.
In a 24-hour period, you can download a maximum 20 GB of AppExchange App Analytics data.
217
Monitor Performance with Analytics for AppExchange Request AppExchange App Analytics
Partners
Note: AppExchange App Analytics is subject to certain usage restrictions as described in the AppExchange Program Policies.
Note: AppExchange App Analytics is subject to certain usage restrictions as described in the AppExchange Program Policies.
1. Log into the License Management Org (LMO) that the package is registered to.
2. From the LMO, complete the required fields in the AppAnalyticsQueryRequest in SOAP API.
3. Retrieve the App Analytics Query Request object created in the API request. The DownloadURL field populates after the request
is completed.
4. Click the URL in the DownloadURL field in the App Analytics Query Request object, and download the .csv file.
218
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
219
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Data delivery to and arrival in our data lake also depends on factors that can affect a given instance, such as the health of the instance
or technical dependencies. Ordinarily you can expect all your org data to arrive in the data lake by 23:00 Coordinated Universal Time
(UTC) the day after it was recorded. However, occasionally, there can be delays.
Each AppExchange App Analytics data type is also compiled at different times:
Package Usage Summaries • Summaries use data collected for an For the March 2021 summary available on
entire month. April 1, 2021:
Package Log Files • Log files use data from the previous day. For the March 1, 2021 log file:
• Log files are generated nightly at • All records have precise timestamps
approximately 05:00 instance local associated with when that log event
time. occurred.
• All data normally arrives by March 2,
2021 23:00 UTC.
220
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
FileType FileCompression
.csv (default) • none (default when FileType is .csv)
• gzip
221
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Rerun that exact same query on March 3, 2021 18:00 UTC, but add the AvailableSince field set to the day and time you ran
your original query: 2021-03-02T18:00:00Z. This query is your ad hoc catch-up query. It retrieves any data newly added to the
data lake for March 2 since you ran your regular query:
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-01T00:00:00Z
EndTime=2021-03-02T00:00:00Z
DataType=PackageUsageLog
FileType=csv
FileCompression=gzip
AvailableSince=2021-03-02T18:00:00Z"
You can use catch-up queries in many different ways, which we discuss in more detail in the Recommendations section.
When creating catch-up queries, keep these considerations in mind.
• If StartTime is specified, the AvailableSince date must be later.
• If EndTime is specified, the AvailableSince date must be later.
• All queries must include StartTime or AvailableSince or both.
• AvailableSince must be earlier than now.
Note: What happens when you want to create an ad hoc catch-up query, but you forgot when you ran the original query? Use
Salesforce CLI and your original query’s sObjectID to look up the QuerySubmittedTime, like this: sfdx
force:data:record:get --sobjecttype AppAnalyticsQueryRequest --sobjectid
0XIXXXXXXXXXXXXXXX Set your ad hoc catch-up query AvailableSince value to equal the QuerySubmittedTime.
SEE ALSO:
Apache Parquet
Automate AppAnalytics - AWS Stack
222
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Recommendations
Your query strategy varies based on your business size and scope. Also, your query strategy must
EDITIONS
adapt as your business grows. To stay current, follow our App Analytics query recommendations
for small, medium, and large-sized partners. Available in: both Salesforce
Note: In the unlikely event of data delays, we regenerate data for log events that happened Classic and Lightning
Experience
up to 30 days in the past. To ensure that you consistently retrieve the most complete data,
we recommend that you schedule catch-up queries that look back 30 days. Available in: Enterprise,
Performance, Unlimited,
Small-Sized Partners and Developer Editions
Small-sized partners have manageable subscriber bases and one or two managed packages.
A small partner’s total daily usage data across all managed packages is 5 GB or less. Also, small
partner’s queries complete well under the 15-minute processing time limit.
Medium-Sized Partners
Medium-sized partners have bigger subscriber bases and about six managed packages. A medium-sized partner’s total daily usage
data across all managed packages is at or just over 20 GB. Also, this partner’s queries approach or hit the 15-minute processing time
limit.
Large-Sized Partners
Large partners have large subscriber bases and many managed packages. A large partner’s total daily usage data is more than 20
GB. Sometimes a large partner’s data from just one managed package is larger than the 20-GB daily limit. Also, large partners often
must create a smaller time range for each query to complete in under the 15-minute processing time limit.
Small-Sized Partners
Small-sized partners have manageable subscriber bases and one or two managed packages. A
EDITIONS
small partner’s total daily usage data across all managed packages is 5 GB or less. Also, small partner’s
queries complete well under the 15-minute processing time limit. Available in: both Salesforce
Given how manageable smaller partners’ data is, after you run your regular queries one time, we Classic and Lightning
recommend that you run a daily catch-up query as your main query. Sweep in all data for all your Experience
managed packages looking back 30 days.
Available in: Enterprise,
Performance, Unlimited,
Data Type How to Get Started How to Schedule and Developer Editions
Catch-Up Queries
Subscriber Snapshots An initial query to retrieve data • One daily catch-up query.
from when App Analytics was
• Set AvailableSince
enabled for your managed
to the day and time your
package.
last regular query ran.
• Set StartTime to 30
days ago.
• Omit EndTime.
• Each day, advance
StartTime and
AvailableSince by
1 day.
223
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Package Log Files An initial query to retrieve data from when • One daily catch-up query.
App Analytics was enabled for your
• Set AvailableSince to the day
managed package.
and time your last regular query ran.
• Set StartTime to 30 days ago.
• Omit EndTime.
• Each day, advance StartTime and
AvailableSince by 1 day.
Example: Most of your customers use your package on an NA or EU instance, so you run your queries at 18:00 UTC. You
have a couple customers on an AP instance, so you create catch-up queries to ensure that you capture data from around the world.
1. On March 31 at 18:00 UTC, run your regular queries.
Subscriber Snapshot
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "DataType=SubscriberSnapshot
FileType=csv
FileCompression=gzip
StartTime=2020-03-30T00:00:00Z
EndTime=2020-03-31T00:00:00Z"
224
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
--values "DataType=PackageUsageLog
FileType=csv
FileCompression=gzip
StartTime=2020-03-30T00:00:00Z
EndTime=2020-03-31T00:00:00Z"
3. On April 2 at 18:00 UTC, run the same catch-up queries, but advance the subscriber snapshot and package log file
AvailableSince and StartTime date by 1 day each. Advance the package usage summary AvailableSince
by 1 day.
Subscriber Snapshot Catch-Up Query
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "DataType=SubscriberSnapshot
FileType=csv
FileCompression=gzip
StartTime=2020-03-03T00:00:00Z
AvailableSince=2020-04-01T18:00:00Z"
225
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
FileType=csv
FileCompression=gzip
StartTime=2020-03-01T00:00:00Z
AvailableSince=2020-04-01T18:00:00Z"
Medium-Sized Partners
Medium-sized partners have bigger subscriber bases and about six managed packages. A
EDITIONS
medium-sized partner’s total daily usage data across all managed packages is at or just over 20 GB.
Also, this partner’s queries approach or hit the 15-minute processing time limit. Available in: both Salesforce
We recommend that after you run your regular queries one time, use catch-up queries as your main Classic and Lightning
queries for subscriber snapshots and package usage summaries. Use a combination of daily queries Experience
and catch-up queries for package log files.
Available in: Enterprise,
Performance, Unlimited,
Data Type How to Get Started How to Schedule and Developer Editions
Catch-Up Queries
Subscriber Snapshots An initial query to retrieve data • One daily query.
from when App Analytics was
• Set AvailableSince
enabled for your managed
to the day and time your
packages.
last regular query ran.
• Set StartTime to 30
days ago.
• Omit EndTime.
• Each day, advance
StartTime and
AvailableSince by
1 day.
Package Usage Summaries An initial query to retrieve data • One daily catch-up query.
from when App Analytics was
• Set AvailableSince
enabled for your managed
to the day and time your
packages.
last regular query ran.
• Set StartTime to the
first of the previous month.
• Omit EndTime.
226
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Package Log Files One regular daily query per package. • One daily catch-up query per package.
• Set AvailableSince to the day
and time your last regular query ran.
• Set StartTime to 30 days ago.
• Set EndTime equal to the
StartTime of your regular query.
• Each day, advance StartTime,
EndTime, and AvailableSince
by 1 day.
Example: Half of your customers use your package on an NA or EU instance, so you run your regular queries at 18:00 UTC.
The other half of your customers are on an AP instance, so you create catch-up queries to ensure that you capture data from around
the world.
1. On March 31 at 18:00 UTC, run your regular package log file queries for each of your packages.
Package 1
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-30T00:00:00Z
EndTime=2021-03-31T00:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=csv
FileCompression=gzip"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-30T00:00:00Z
EndTime=2021-03-31T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=csv
FileCompression=gzip"
2. On April 1 at 18:00 UTC onwards, run regular and catch-up package log file queries.
227
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
A. Regular Queries
Package 1
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-31T00:00:00Z
EndTime=2021-04-01T00:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=csv FileCompression=gzip"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-31T00:00:00Z
EndTime=2021-04-01T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=csv
FileCompression=gzip"
B. Catch-Up Queries
Package 1
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-01T00:00:00Z
EndTime=2021-03-31T00:00:00Z
AvailableSince=2021-03-31T18:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=csv
FileCompression=gzip"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=021-03-01T00:00:00Z
EndTime=2021-03-31T00:00:00Z
AvailableSince=2021-03-31T18:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=csv
FileCompression=gzip"
3. On April 2, repeat the same queries that you ran on April 1, but advance the queries by a day.
A. Regular Queries
228
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Package 1
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-04-01T00:00:00Z
EndTime=2021-04-02T00:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=csv
FileCompression=gzip"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-04-01T00:00:00Z
EndTime=2021-04-02T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=csv
FileCompression=gzip"
B. Catch-Up Queries
Package 1
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-02T00:00:00Z
EndTime=2021-04-01T00:00:00Z
AvailableSince=2021-04-01T18:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=csv
FileCompression=gzip"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2020-03-02T00:00:00Z
EndTime=2021-04-01T00:00:00Z
AvailableSince=2021-04-01T18:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=csv
FileCompression=gzip"
229
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Large-Sized Partners
Large partners have large subscriber bases and many managed packages. A large partner’s total
EDITIONS
daily usage data is more than 20 GB. Sometimes a large partner’s data from just one managed
package is larger than the 20-GB daily limit. Also, large partners often must create a smaller time Available in: both Salesforce
range for each query to complete in under the 15-minute processing time limit. Classic and Lightning
Large partners frequently create one query per managed package per 12, 6, or 1-hour increments Experience
throughout a 24-hour period. How frequently you schedule your queries really depends on your
Available in: Enterprise,
data volume. Performance, Unlimited,
We recommend that you use a combination of queries and multiple catch-up queries for all data and Developer Editions
types
Package Usage summaries One daily query per package. • One daily catch-up query per package.
• Set AvailableSince to the day
and time your last regular query ran.
• Set StartTime to the first of the
previous month.
• Omit EndTime.
• Each day, advance
AvailableSince by 1 day.
• Each month, advance StartTime to
the first of the previous month.
Package Log Files • To retrieve all your data, create multiple Create two levels of catch-up queries per
segmented daily, automated App day.
Analytics queries spread throughout the • Create one catch-up query per package
day. that sweeps data from 2 days ago.
• Break up your requests by managed • Create a second catch-up query that
package and by time increments sweeps data from 3 to 30 days ago.
throughout the day. • Each day, advance StartTime,
EndTime, and AvailableSince
by 1 day.
230
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Example: Your customers use your package on all Salesforce instances around the world, and your managed packages produce
significant amounts of data. You schedule queries to run at the same time, each covering a 12-hour period, and you create a layered
catch-up query plan to capture data from all instances.
In this example, we show two of your dozens of managed packages.
1. On March 31 at 18:00 UTC, run your regular package log file queries.
Package 1
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-30T00:00:00
EndTime=2021-03-30T12:00:00
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-30T12:00:00
EndTime=2021-03-31T00:00:00
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-30T00:00:00
EndTime=2021-03-30T12:00:00
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-30T12:00:00
EndTime=2021-03-31T00:00:00
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
2. On April 1 at 18:00 UTC, run your regular and catch-up package log file queries.
231
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Package 1
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-31T00:00:00Z
EndTime=2021-03-31T12:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-31T12:00:00Z
EndTime=2021-04-01T00:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-31T00:00:00Z
EndTime=2021-03-31T12:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-31T12:00:00Z
EndTime=2021-04-01T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
232
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-30T00:00:00Z
EndTime=2021-03-31T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy
AvailableSince=2020-03-31T18:00:00Z"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-01T00:00:00Z
EndTime=2021-03-30T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy
AvailableSince=2020-03-31T18:00:00Z"
3. On April 2 onwards, run your regular and your catch-up package log file queries, advancing the dates by 1 day.
233
Monitor Performance with Analytics for AppExchange AppExchange App Analytics Best Practices
Partners
FileType=parquet
FileCompression=snappy"
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-04-01T12:00:00Z
EndTime=2021-04-02T00:00:00Z
DataType=PackageUsageLog
PackageIds=0336XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-04-01T00:00:00Z
EndTime=2021-04-01T12:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-04-01T12:00:00Z
EndTime=2021-04-02T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-31T00:00:00Z
EndTime=2021-04-01T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
234
Monitor Performance with Analytics for AppExchange Package Usage Summaries
Partners
FileCompression=snappy
AvailableSince=2020-04-01T18:00:00Z"
Package 2
sfdx force:data:record:create
--sobjecttype AppAnalyticsQueryRequest
--values "StartTime=2021-03-02T00:00:00Z
EndTime=2021-03-31T00:00:00Z
DataType=PackageUsageLog
PackageIds=0337XXXXXXXXXX
FileType=parquet
FileCompression=snappy
AvailableSince=2020-04-01T18:00:00Z"
Note: AppExchange App Analytics is subject to certain usage restrictions as described in the AppExchange Program Policies.
AppExchange App Analytics tracks UI, API-based, Lightning-based, and Apex operations and logs each CRUD operation on components
and custom objects in packages. Events from sandbox, scratch, and trial orgs aren’t tracked in package usage summaries.
Partners and subscribers can access package usage data. Usage summaries become available at the beginning of the subsequent month.
For example, you can get the usage summary for May at the beginning of June.
235
Monitor Performance with Analytics for AppExchange Package Usage Summaries
Partners
• AppExchange Partners can request monthly usage summaries using the AppAnalyticsQueryRequest in SOAP API from the license
management org that owns the package.
• Subscribers can download usage summaries from Setup for any package that they installed that passed security review.
Note: In Summer ’20, we changed the names of the DataType enums in the AppAnalyticsQueryRequest.
Field Description
custom_entity The developer name of the component or custom object.
custom_entity_type The type of component or custom object that the user viewed or manipulated.
Examples:
• ApexClass
• ApexTrigger
• CustomObject
• LightningPage
• LightningComponent
• VisualforcePage
month The month that this usage summary applies to in YYYY-MM format. Example: 2019-03.
num_reads The number of records associated with the package that were read.
num_updates The number of records associated with the package that were updated.
num_views The count of times the component or page has been viewed.
236
Monitor Performance with Analytics for AppExchange Package Log Files
Partners
Field Description
user_id_token The hashed token representing the ID of the user who accessed the package. The token
persists over time, even if a user’s details change. The token also persists across any
packages that the user interacts with.
The user ID token starts with the prefix 005-. In compliance with privacy regulations, our
systems can’t access the actual user ID. Likewise, the hashed token can’t be linked to the
user ID.
user_type The user license category of the user accessing Salesforce services through the UI or API.
Examples:
• Guest
• Partner
• Standard
Note: AppExchange App Analytics is subject to certain usage restrictions as described in the AppExchange Program Policies.
Note: In Summer ’20 Salesforce changed the names of the DataType enums in the AppAnalyticsQueryRequest .
Field Description
api_type The type of API request.
Examples:
• E: SOAP Enterprise
• O: Old SOAP
• P: SOAP Partner
• X: XmlRPC
• REST: REST
237
Monitor Performance with Analytics for AppExchange Package Log Files
Partners
Field Description
api_version The version of the API that’s used. Example: 45.0.
cloned_from_organization_id The ID of the org from which this subscriber org was cloned. Applies to sandbox orgs
only. Example: 00Dxx0000000000
custom_entity_type The type of component or custom object that the user viewed or manipulated.
Examples:
• ApexClass
• ApexTrigger
• CustomObject
• LightningComponent
• LightningPage
• VisualforcePage
238
Monitor Performance with Analytics for AppExchange Package Log Files
Partners
Field Description
login_key The hashed string that ties together all events in a given user’s login session. The session
starts with a login event and ends with either a logout event or the session expiring. All
log lines with the same login key occurred during the same user login session.
num_soql_queries The number of SOQL queries completed during the executed Apex event.
organization_country_code The ISO-3166 two-character country code corresponding to the subscriber org’s address
at the time of sign-up.
Examples:
• US
239
Monitor Performance with Analytics for AppExchange Package Log Files
Partners
Field Description
• CA
• FR
organization_edition The name of the Salesforce edition the subscriber org is using.
Examples:
• Developer Edition
• Enterprise Edition
• Unlimited Edition
organization_language_locale The 2–5 character code that represents the language and locale ISO-639 code of the
subscriber org. This code controls the language for the labels displayed in an application.
Examples:
• de-DE
• en-US
• fr-CA
240
Monitor Performance with Analytics for AppExchange Package Log Files
Partners
Field Description
• Production
• Sandbox
page_app_name The internal name of the Lightning application that the user accessed from the App
Launcher.
Examples:
• LightningSales
• Chatter
page_context The context of the Lightning page where the event occurred. Example:
clients:cardContainer.
page_url The relative URL of the top-level Lightning Experience or Salesforce mobile app page that
the user accessed. The page can contain one or more Lightning components. Multiple
record IDs can be associated with page_url. Example:
/sObject/0064100000JXITSASS/view
parent_ui_element The parent scope of the Lightning page element where the event occurred. Example:
ChatterFeed.
prevpage_url The relative URL of the previous Lightning Experience or Salesforce mobile app page that
the user opened. Example: /sObject/0064100000
quiddity The type of outer execution associated with the executed Apex event.
Examples:
• A: QueryLocator Batch Apex
• B: Bulk API and Bulk API 2.0
• BA: Batch Apex
• C: Scheduled Apex
• E: Inbound Email Service
• F: Future
• H: Apex REST
• I: Invocable Action
• K: Quick Action
• L: Lightning
• M: Remote Action
241
Monitor Performance with Analytics for AppExchange Package Log Files
Partners
Field Description
• Q: Queuable
• R: Synchronous Uncategorized
• S: Serial Batch Apex
• TA: Tests Async
• TD: Tests Deployment
• TS: Tests Synchronous
• V: Visualforce
• W: SOAP Webservices
• X: Execute Anonymous
referrer_uri The referring URI from the HTTP request. URIs are redacted in the following ways:
• Query strings are removed.
• User IDs display as hashed tokens.
• Subscriber-created URIs, such as VisualForce pages, are removed.
related_list A section of a record or other detail page that lists items related to that record.
Examples:
• Open Activities
• Stage History
request_id The ID of the HTTP request made to the server by the browser. If multiple log lines have
the same request ID, they all occurred as part of the same user interaction.
request_status The status of the HTTP request for the page or action that accesses a component or
custom object in a package.
Examples:
• A = Auth Error
• F = Failure
• N = 404 error
• R = Redirect
• S = Success
• U = Undefined
session_key The HTTP session ID for the HTTP request to access a component or custom object in a
package. The session ID is hashed.
242
Monitor Performance with Analytics for AppExchange Package Log Files
Partners
Field Description
target_ui_element The Lightning target page element where the event occurred.
Examples:
• label body truncate
• tabitem-link
ui_event_sequence_num An auto-incremented sequence number of the current Lightning event since the session
started.
ui_event_source The user action on the Lightning record or records. This value indicates whether the user’s
action was on a single record or multiple records. For example, read indicates that one
record was read, such as on a record detail page. In contrast, reads indicates that
multiple records were read, such as in a list view.
Examples:
• click
• create
• delete
• hover
• read
• update
url The redacted URL of the request to access a component or custom object in a package.
URLs are redacted in the following ways.
• Query strings are removed.
• User IDs display as hashed tokens.
• Subscriber-created URIs, such as VisualForce pages, are removed.
For Lightning-based URLs, only /aura is displayed. For Visualforce-based URLs that aren’t
pages owned by the managed package, either /apex or /apexrest is displayed.
user_agent The browser and operating system of the device used to make the request.
Examples:
• Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15
(KHTML, like Gecko) CriOS/69.0.3497.105 Mobile/15E148 Safari/605.1
• Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36
243
Monitor Performance with Analytics for AppExchange Subscriber Snapshots
Partners
Field Description
user_country_code The default ISO-3166 two-character country code of the user.
Examples:
• CA
• FR
• US
user_id_token The hashed token representing the ID of the user who accessed the package. The ID
persists, even if a user’s details change. The token also persists across any packages that
the user interacts with.
The user ID token starts with the prefix 005-. In compliance with privacy regulations, our
systems can’t access the actual user ID. Likewise, the hashed token can’t be linked to the
user ID.
user_type The user license category of the user accessing Salesforce services through the UI or API.
Examples:
• Guest
• Partner
• Standard
Subscriber Snapshots
Subscriber snapshots provide a point-in-time summary of your subscribers’ activity. Use subscriber snapshots to see usage trends by
org and package over time.
Note: AppExchange App Analytics is subject to certain usage restrictions as described in the AppExchange Program Policies.
AppExchange App Analytics takes a daily snapshot of org, package, and custom entity data. Snapshots are captured daily at 00:00 UTC
and become available for download immediately thereafter. You request a date and time, or range of dates and times, and you receive
one snapshot per valid date and time requested. For example, if on April 7, 2020 you request a date and time range of
StartTime=2020-04-04T00:00:00Z EndTime=2020-04-06T23:59:59Z, you receive three snapshots, one for each
completed day.
Note: Starting in Summer '20 we changed the names of the DataType enums in the AppAnalyticsQueryRequest.
Field Description
custom_entity The developer name of the component or custom object.
Examples:
• Amount
• Travel_Expense
244
Monitor Performance with Analytics for AppExchange Test Custom Integrations
Partners
Field Description
date The subscriber snapshot date requested, in YYYY-MM-DDT00:00:00Z format. Each
point-in-time snapshot is captured at 00:00 UTC on the date specified. Example:
2020-04-04T00:00:00Z
organization_edition The name of the Salesforce edition the subscriber org is using.
Examples:
• Developer Edition
• Enterprise Edition
• Unlimited Edition
record_count Total records for the custom entity in that org on the specified snapshot date.
245
Monitor Performance with Analytics for AppExchange Test Custom Integrations
Partners
Large Data Set 033xx00SIMlarge Contains a large amount of data for two
org IDs (00Dxx00SIM00foo and
00Dxx00SIM00bar). For use only with
package usage log queries. Requesting a
single day successfully results in
downloadable data. Requesting a full
month results in an error of more data than
can be processed.
Empty Data Set Use any other 15-character package ID Contains no data. For use with all query
prefixed with 033xx00SIM. types. Use one of these package IDs to
Examples: return an empty data set.
• 033xx00SIMempty
• 033xx00SIM44444
5. Download the .csv file containing sample usage data from the DownloadURL field in the App Analytics Query Request object.
Important: When simulation mode is enabled, you can only access our sample usage data. Disable simulation mode to access
your production data.
246
CHAPTER 10 Manage Orders
In this chapter ... Create, manage, and submit orders to the Partner Operations team with the Channel Order App (COA).
If you’re an OEM partner, you can use the COA to provision Salesforce licenses and for revenue sharing.
• Channel Order App If you’re an ISVforce partner, you can use the COA for revenue sharing.
• Set Up the Channel
The COA is pre-installed in your Partner Business Org, but before you use it, you must complete the
Order App
training offered by the Partner Operations team. Acquire your Partner Business Org, pass the solution
• Upgrade the security review, and then sign up for COA training.
Channel Order App
To sign up, log a case in the Partner Community. For the case topic, select Channel Order Application
• Manage Orders in
(COA), and then select Create a Case.
the Channel Order
App Note: Submit orders based on the sales and licensing of your solutions to customers, as required
• Channel Order Apex by your partner agreement.
API
247
Manage Orders Channel Order App
Tip: If you’re a new AppExchange partner, stop by Trailhead and earn the Channel Order App Basics badge before you get started
with the COA. You’ll learn how order submission fits into the partnership experience and have an opportunity to test your knowledge.
Name Description
Customer Contains details about a customer who’s purchased your product, such as the billing address and
Salesforce org ID.
248
Manage Orders Channel Order App Objects
Name Description
When you create an initial order in the order submission wizard, the COA creates a customer record
using the customer information that you provide.
Partner Product Catalog Contains a product in your catalog that you can sell to customers. For example, more API calls or an
increase in storage in the customer’s org.
Salesforce configures the products in your catalog based on your partnership agreement. During
setup, you import your catalog to the COA. Unless permitted by your agreement, you can’t edit your
product catalog.
Partner Contract Terms Contains the contract terms that apply to a product. For example, the default length of a contract
and how often a customer is billed.
Salesforce configures contract terms based on your partnership agreement. During setup, you import
the terms to the COA. Unless permitted by your agreement, you can’t edit your contract terms.
Service Order Contains information about an order that you’re submitting to Salesforce. For example, the date the
customer signed the Salesforce agreement.
When you create an order in the order submission wizard, the COA creates a service order
automatically.
Service Order Detail Contains deal-specific information about a product line item on an order. For example, the number
of licenses the customer is buying and the price per license.
When you add products to an order in the order submission wizard, the COA configures service order
details automatically. You can’t access service order detail records directly unless you submit orders
with the Channel Order Apex API.
249
Manage Orders Order Types
Name Description
Customer Order Product History Contains deal-specific information about an active product on an order, along with the corresponding
customer details.
After Salesforce activates or provisions an order, we create a customer order product history record
for each product on the order. These records become part of the customer’s order history, which
includes all active products associated with the customer. You can’t access customer order product
history records directly. To see a customer’s order history, open the customer record in the COA and
go the Products related list.
Service Order Log Stores information about the performance of the COA for debugging purposes.
Salesforce uses service order logs to troubleshoot issues with the COA. Unless you receive instructions
from us, don’t modify the service order logs in your org.
Order Types
When you create an order in the Channel Order App (COA), you choose an order type that tells Salesforce how to process the products
on the order. Learn how to select the correct type based on your customer’s needs.
Note: Your agreement with Salesforce determines the order types available to you. You might not be able to submit every order
type.
Order type reflects the stage of your relationship with the customer: beginning, middle, or end. Order type also determines when we
activate or provision the order for the customer.
Add On Middle Add products or increase the number of The service start date you specify on the order.
licenses on a customer contract.
Upgrade Middle Increase the quantity and price of licenses The service start date you specify on the order.
mid-contract, or upgrade a customer to a
higher-priced product mid-contract.
Reduction Middle Remove products, or decrease the number of The customer’s contract renewal date.
licenses on a customer contract. Notify Salesforce of the reduction according to
the terms of your partnership agreement,
250
Manage Orders Order Status
Renewal Middle Renew a contract that isn’t set to auto-renew, The customer’s contract renewal date.
or change the price of existing products on
contract renewal.
Cancellation End End a contract with a customer and cancel all The customer’s contract renewal date.
products. A cancellation order permanently Notify Salesforce of the cancellation according
removes your products from the customer’s to the terms of your partnership agreement,
org. usually at least 30 days before a contract
renews. You can’t submit a cancellation order
within 5 days of a contract renewal date.
Order Status
After you create an order in the Channel Order App (COA), Salesforce assigns an order status to help you track progress and, if needed,
resolve issues. Order status also determines the actions you can perform on an order, like editing or cloning.
Here’s how we assign order status.
Received Salesforce receives your order, but hasn’t started processing it.
You have 2 hours from the time Salesforce receives the order to recall it and edit products, license quantities,
and pricing.
Activated Salesforce has processed your order and is ready to invoice you for revenue sharing.
This status applies to:
• ISVforce orders that don’t provision licenses in a customer’s org
• Processed OEM orders that have a future start date
• All OEM and ISVforce cancellation and reduction orders
Provisioned Salesforce has processed your order, provisioned licenses in the customer’s org, and is ready to invoice you
for revenue sharing.
This status applies only to OEM orders that provision licenses in the customer’s org.
251
Manage Orders Channel Order App Permission Sets
Order status determines what you can do with the order. Here are the actions that you can perform for each order status.
Possible Actions
Order Status Edit Recall Delete Submit Clone
Draft * * * *
Received * * *
In Process *
Activated *
Provisioned *
Error *
COA Admin User Create and manage customers. Team members who administer the COA and whose
role includes these tasks:
Submit, edit, recall, and clone orders, and delete order
drafts. • Setting up the COA
• Assigning access to the COA
Configure whether orders are sent to Salesforce or a
test environment. • Building custom integrations using COA objects
Modify COA custom objects. • Serving as the context user for the COA email
service
252
Manage Orders Set Up the Channel Order App
253
Manage Orders Assign Permission Sets to Channel Order App Users
9. Review the API access requirements for the package, and click Next.
10. Grant access to package contents, and click Next.
Note: Salesforce recommends granting access only to admins and assigning access to other users as needed after the app
is installed.
4. Specify values for the following fields. Leave the other fields as is.
Field Value
Email Service Name SFDC Service Order
254
Manage Orders Connect the Channel Order App to Salesforce
Field Value
Email Service Name SFDC_Service_Order
7. For Accept Email From, remove the autopopulated email address. This field must be blank. Otherwise, the email service can’t
connect to Salesforce.
8. Click Save. Salesforce generates a unique address for the email service (1), which the COA uses to sync your product data.
9. Confirm that the COA Admin User permission set is assigned to the email service’s context user. If the context user doesn’t have this
permission set, assign it to them.
Tip: Before you configure your connection, make sure that you have credentials for your To import product data:
COA production connection. These credentials are unique to your company and are provided • COA Admin User
to you by Salesforce. If you don’t have credentials, log a case in the Partner Community.
1. Log in to the org where the COA is installed.
2. Open the App Launcher.
255
Manage Orders Display Customers in the Channel Order App
5. Click Save.
The COA imports your product catalog and contract terms.
Field Value
Object Customer
5. Click Next.
6. Select the user profiles for which the tab is available, and click Next.
7. Add the tab to the Partner Order custom app.
8. Click Save.
256
Manage Orders Upgrade the Channel Order App
257
Manage Orders Upgrade the Channel Order App
1. Assign Permission Sets to Channel Order App Users Available in: both Salesforce
If you’re upgrading to Channel Order App (COA) v2 and later, assign permission sets to give Classic and Lightning
team members access to the app. Assign the COA User permission set to users who submit Experience
and manage customer orders. Assign the COA Admin User permission to users who need full Available in: Enterprise,
access to the app’s objects and features, including the ability to set up a connection to Salesforce. Performance, and
2. Display Customers in the Channel Order App Unlimited Editions
If you’re upgrading to Channel Order App (COA) v2 and later, create a custom tab to display
customer information in the app.
3. Display Service Orders in the Channel Order App
If you’re upgrading to Channel Order App (COA) v2 and later, remove the existing Orders tab and replace it with the new Service
Orders tab.
4. Update Page Layouts in the Channel Order App
If you’re upgrading to Channel Order App (COA) v2 and later, assign updated page layouts to the customer, service order, partner
contract terms, and partner product catalog objects.
5. Refresh the Channel Order App’s Connection to Salesforce
If you’re upgrading the Channel Order App (COA) to v2 or later, refresh your production connection to Salesforce. After your connection
refreshes, you can submit orders to Salesforce.
258
Manage Orders Upgrade the Channel Order App
2. From Setup, enter Users in the Quick Find box, then click Users.
3. Select a user.
4. In the Permission Set Assignments related list, click Edit Assignments.
5. Select the COA User or COA Admin User permission set, and click Add.
6. Click Save.
Field Value
Object Customer
5. Click Next.
6. Select the user profiles for which the tab is available, and click Next.
7. Add the tab to the Partner Order custom app.
8. Click Save.
259
Manage Orders Field Mapping in Channel Order App v2 and Later
4. Repeat these steps for service order, partner contract terms, and partner product catalog. These
objects use the following page layout names.
260
Manage Orders Field Mapping in Channel Order App v2 and Later
Fields
Old Field (Retired) New Field Notes
Application__c None Field retired. This field doesn’t populate with
data for orders created in COA v2 and later.
261
Manage Orders Manage Orders in the Channel Order App
Submit an Order
Submit an order to Salesforce when a customer purchases new products or requests changes to a
USER PERMISSIONS
subscription. If you’re ordering products for a new customer, verify that you have the customer’s
Salesforce org ID before you create the order. To submit orders:
1. Log in to the org where the COA is installed. • COA User
OR
2. Open the App Launcher, and click Partner Order.
COA Admin User
3. On the Service Orders tab, click New to open the order submission wizard.
4. Choose New customer to create an initial order. Otherwise, choose Existing customer and
select an order type.
Tip: If a customer is buying your product for the first time, create an initial order.
5. Specify customer details (1), contract type (2), and the terms and conditions (3), and then click Next.
262
Manage Orders Submit an Order
7. Adjust the license quantities and, optionally, pricing, and then click Next.
263
Manage Orders Edit an Order
8. Enter the service and order dates (1), and then review and accept the terms and conditions (2).
Edit an Order
You can edit the product, quantity, and pricing details of an order within 2 hours of submitting it
USER PERMISSIONS
to Salesforce. After 2 hours, the order is processed and can’t be edited. To change customer details
or order type, you must recall the order and create a new one. To edit orders:
1. Log in to the org where the COA is installed. • COA User
OR
2. Open the App Launcher, and click Partner Order.
COA Admin User
3. On the Service Orders tab, find the order you want to edit.
If you can’t find the order, verify that you selected the correct list view.
264
Manage Orders Clone an Order
4.
Click ( ) and select Edit.
5. Update the order’s products, quantities, and pricing details, and then click Resubmit.
Clone an Order
When creating an order that’s similar to one you’ve submitted previously, you can save time by
USER PERMISSIONS
cloning the original order.
1. Log in to the org where the COA is installed. To clone orders:
• COA User
2. Open the App Launcher, and click Partner Order.
OR
3. On the Service Orders tab, find the order you want to clone.
COA Admin User
If you can’t find the order, verify that you selected the correct list view.
Recall an Order
If you don’t want Salesforce to process an order you’ve submitted, recall it. After you recall an order,
USER PERMISSIONS
it becomes read-only, and you can’t edit or resubmit it. You can recall an order within 2 hours of
submitting it to Salesforce. To recall orders:
1. Log in to the org where the COA is installed. • COA User
OR
2. Open the App Launcher, and click Partner Order.
COA Admin User
3. On the Service Orders tab, find the order that you want to recall.
If you can’t find the order, verify that you selected the correct list view.
4.
Click ( ) and select Delete.
5. Click Delete again to confirm.
265
Manage Orders Fix Errors on Returned Orders
4. Click the order, and go to Error Comment to see details about the error.
5. Click Clone Order.
6. Apply the requested changes, and then click Submit.
If you have trouble resolving the errors, log a case in the Partner Community.
CHANNEL_ORDERS Namespace
The CHANNEL_ORDERS namespace provides classes for submitting orders to Salesforce Partner Operations. After you send an
order, you can use other classes in the namespace to edit, recall, or clone the order.
Service Order
Represents an order that you’re submitting to Salesforce Partner Operations for processing and activation.
Service Order Detail
Represents an instance of a product on a service order.
Partner Order Submit API
(No longer supported and available only in version 1.39 and earlier of the Channel Order App.) Send orders to Salesforce immediately
or asynchronously using the Partner Order Submit API.
CHANNEL_ORDERS Namespace
The CHANNEL_ORDERS namespace provides classes for submitting orders to Salesforce Partner Operations. After you send an order,
you can use other classes in the namespace to edit, recall, or clone the order.
To use CHANNEL_ORDERS namespace classes, you must have Channel Order App v2 or later installed in your Salesforce org. For
information on how to invoke methods defined in managed packages, refer to the Apex Developer Guide.
The following classes are in the CHANNEL_ORDERS namespace.
COA_ServiceOrderSubmit Class
Submit orders to Salesforce Partner Operations for processing and activation.
COA_ServiceOrderEdit Class
Edit orders that you’ve submitted to Salesforce Partner Operations.
266
Manage Orders CHANNEL_ORDERS Namespace
COA_ServiceOrderRecall Class
Recall orders that you’ve submitted to Salesforce Partner Operations.
COA_ServiceOrderClone Class
Clone an existing order in the org where the Channel Order App (COA) is installed.
COA_ServiceOrderSubmit Class
Submit orders to Salesforce Partner Operations for processing and activation.
Namespace
CHANNEL_ORDERS
Usage
The COA_ServiceOrderSubmit class contains a single @InvocableMethod for submitting orders to Salesforce Partner Operations.
When invoking a method defined in this class, include the CHANNEL_ORDERS namespace prefix:
CHANNEL_ORDERS.class.method(args)
For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.
Example
This example receives a list of service orders, submits them, and returns a list of outputs from the submit operation.
Note: For brevity, the methods invoked in this example omit the CHANNEL_ORDERS namespace prefix. If you use this code
in your implementation, you must include the namespace prefix.
public static void submitOrders(List<Service_Order__c> serviceOrders){
List<COA_ServiceOrderSubmit.COA_ServiceOrderSubmitInput> serviceOrderSubmitInput = new
List<COA_ServiceOrderSubmit.COA_ServiceOrderSubmitInput>();
List<COA_ServiceOrderSubmit.COA_ServiceOrderSubmitOutput> serviceOrderSubmitOutputs =
COA_ServiceOrderSubmit.submit(serviceOrderSubmitInput);
for(COA_ServiceOrderSubmit.COA_ServiceOrderSubmitOutput serviceOrderSubmitOutput:
serviceOrderSubmitOutputs){
System.debug('Service Order Id: '+serviceOrderSubmitOutput.serviceOrderId);
System.debug('Success?: '+serviceOrderSubmitOutput.isSuccess);
System.debug('Response Messages: '+serviceOrderSubmitOutput.responseMessages);
}
}
267
Manage Orders CHANNEL_ORDERS Namespace
Order Status
When you submit a draft order using the COA_ServiceOrderSubmit class, the response tells you if the operation succeeded. The response
doesn’t set the status of the related service order record, so the Service_Order_Status__c field remains Draft. If you build
an implementation to set the status of submitted orders, we suggest the following logic: if the response includes a success code, set
the order status to Received. Otherwise, set the status to Error. For orders with errors, you can store notes from Salesforce Partner
Operations in the Error_Comment__c field.
COA_ServiceOrderSubmit Methods
COA_ServiceOrderSubmitInput Class
Wrapper class for input parameters passed to the submit operation.
COA_ServiceOrderSubmitOutput Class
Wrapper class for output parameters returned from the submit operation.
COA_ServiceOrderSubmit Methods
The following are methods for COA_ServiceOrderSubmit.
submit(serviceOrderSubmitInput)
Provides an entry point for submitting orders to Salesforce Partner Operations.
submit(serviceOrderSubmitInput)
Provides an entry point for submitting orders to Salesforce Partner Operations.
Signature
global static List<COA_ServiceOrderSubmit.COA_ServiceOrderSubmitOutput>
submit(List<COA_ServiceOrderSubmit.COA_ServiceOrderSubmitInput> serviceOrderSubmitInput)
Parameters
serviceOrderSubmitInput
Type: List<COA_ServiceOrderSubmit.COA_ServiceOrderSubmitInput>
List of wrapper classes to pass as input for the submit operation
Return Value
Type: List<COA_ServiceOrderSubmit.COA_ServiceOrderSubmitOutput>
COA_ServiceOrderSubmitInput Class
Wrapper class for input parameters passed to the submit operation.
Namespace
CHANNEL_ORDERS
268
Manage Orders CHANNEL_ORDERS Namespace
COA_ServiceOrderSubmitInput Properties
COA_ServiceOrderSubmitInput Properties
The following are properties for COA_ServiceOrderSubmitInput.
serviceOrderId
Specifies the ID of the order you are submitting. This field is required.
serviceOrderId
Specifies the ID of the order you are submitting. This field is required.
Signature
global Id serviceOrderId;
Property Value
Type: Id
COA_ServiceOrderSubmitOutput Class
Wrapper class for output parameters returned from the submit operation.
Namespace
CHANNEL_ORDERS
COA_ServiceOrderSubmitOutput Properties
COA_ServiceOrderSubmitOutput Properties
The following are properties for COA__ServiceOrderSubmitOutput.
isSuccess
Indicates the success of the submit operation. If true, the order was successfully submitted.
responseMessages
Holds response messages generated by the submit operation.
serviceOrderId
References the order ID passed in by the submit operation.
isSuccess
Indicates the success of the submit operation. If true, the order was successfully submitted.
269
Manage Orders CHANNEL_ORDERS Namespace
Signature
global Boolean isSuccess;
Property Value
Type: Boolean
responseMessages
Holds response messages generated by the submit operation.
Signature
global List<String> responseMessages;
Property Value
Type: List<String>
serviceOrderId
References the order ID passed in by the submit operation.
Signature
global Id serviceOrderId;
Property Value
Type: Id
COA_ServiceOrderEdit Class
Edit orders that you’ve submitted to Salesforce Partner Operations.
Namespace
CHANNEL_ORDERS
Usage
The COA_ServiceOrderEdit class contains a single @InvocableMethod for editing orders that have been submitted to Salesforce
Partner Operations but haven’t been processed. When invoking a method defined in this class, include the CHANNEL_ORDERS
namespace prefix:
CHANNEL_ORDERS.class.method(args)
For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.
270
Manage Orders CHANNEL_ORDERS Namespace
Example
This example receives a list of service orders that have been edited, submits them, and returns a list of outputs from the edit operation.
Note: For brevity, the methods invoked in this example omit the CHANNEL_ORDERS namespace prefix. If you use this code
in your implementation, you must include the namespace prefix.
public static void editOrders(List<Service_Order__c> serviceOrders){
List<COA_ServiceOrderEdit.COA_ServiceOrderEditInput> serviceOrderEditInput = new
List<COA_ServiceOrderEdit.COA_ServiceOrderEditInput>();
List<COA_ServiceOrderEdit.COA_ServiceOrderEditOutput> serviceOrderEditOutputs =
COA_ServiceOrderEdit.edit(serviceOrderEditInput);
for(COA_ServiceOrderEdit.COA_ServiceOrderEditOutput serviceOrderEditOutput:
serviceOrderEditOutputs){
System.debug('Service Order Id: '+serviceOrderEditOutput.serviceOrderId);
System.debug('Success?: '+serviceOrderEditOutput.isSuccess);
System.debug('Response Messages: '+serviceOrderEditOutput.responseMessages);
}
}
COA_ServiceOrderEdit Methods
COA_ServiceOrderEditInput Class
Wrapper class for input parameters passed to the edit operation.
COA_ServiceOrderEditOutput Class
Wrapper class for output parameters returned from the edit operation.
COA_ServiceOrderEdit Methods
The following are methods for COA_ServiceOrderEdit.
edit(serviceOrderEditInput)
Provides an entry point to edit orders that you’ve submitted to Salesforce Partner Operations. You can edit only orders that haven’t
been processed.
edit(serviceOrderEditInput)
Provides an entry point to edit orders that you’ve submitted to Salesforce Partner Operations. You can edit only orders that haven’t been
processed.
271
Manage Orders CHANNEL_ORDERS Namespace
Signature
global static List<COA_ServiceOrderEdit.COA_ServiceOrderEditOutput>
edit(List<COA_ServiceOrderEdit.COA_ServiceOrderEditInput> serviceOrderEditInput)
Parameters
serviceOrderEditInput
Type: List<COA_ServiceOrderEdit.COA_ServiceOrderEditInput>
List of wrapper classes to pass as input for the edit operation
Return Value
Type: List<COA_ServiceOrderEdit.COA_ServiceOrderEditOutput>
COA_ServiceOrderEditInput Class
Wrapper class for input parameters passed to the edit operation.
Namespace
CHANNEL_ORDERS
COA_ServiceOrderEditInput Properties
COA_ServiceOrderEditInput Properties
The following are properties for COA_ServiceOrderEditInput.
serviceOrderId
Specifies the ID of the order you are editing. This field is required.
serviceOrderId
Specifies the ID of the order you are editing. This field is required.
Signature
global Id serviceOrderId;
Property Value
Type: Id
COA_ServiceOrderEditOutput Class
Wrapper class for output parameters returned from the edit operation.
272
Manage Orders CHANNEL_ORDERS Namespace
Namespace
CHANNEL_ORDERS
COA_ServiceOrderEditOutput Properties
COA_ServiceOrderEditOutput Properties
The following are properties for COA_ServiceOrderEditOutput.
isSuccess
Indicates the success of the edit operation. If true, the order was successfully edited.
responseMessages
Holds response messages generated by the edit operation.
serviceOrderId
References the order ID passed in by the edit operation.
isSuccess
Indicates the success of the edit operation. If true, the order was successfully edited.
Signature
global Boolean isSuccess;
Property Value
Type: Boolean
responseMessages
Holds response messages generated by the edit operation.
Signature
global List<String> responseMessages;
Property Value
Type: List<String>
serviceOrderId
References the order ID passed in by the edit operation.
Signature
global Id serviceOrderId;
273
Manage Orders CHANNEL_ORDERS Namespace
Property Value
Type: Id
COA_ServiceOrderRecall Class
Recall orders that you’ve submitted to Salesforce Partner Operations.
Namespace
CHANNEL_ORDERS
Usage
The COA_ServiceOrderRecall class contains a single @InvocableMethod for recalling orders that have been submitted to Salesforce
Partner Operations but haven’t yet been processed. When you recall an order, it’s removed from the processing queue and isn’t activated.
When invoking a method defined in this class, include the CHANNEL_ORDERS namespace prefix:
CHANNEL_ORDERS.class.method(args)
For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.
Example
This example receives a list of service orders, recalls them, and returns a list of outputs from the recall operation.
Note: For brevity, the methods invoked in this example omit the CHANNEL_ORDERS namespace prefix. If you use this code
in your implementation, you must include the namespace prefix.
public static void recallOrders(List<Service_Order__c> serviceOrders){
List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput> serviceOrderRecallInput
= new List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput>();
List<COA_ServiceOrderRecall.COA_ServiceOrderRecallOutput> serviceOrderRecallOutputs
= COA_ServiceOrderRecall.recall(serviceOrderRecallInput);
for(COA_ServiceOrderRecall.COA_ServiceOrderRecallOutput serviceOrderRecallOutput:
serviceOrderRecallOutputs){
System.debug('Service Order Id: '+serviceOrderRecallOutput.serviceOrderId);
System.debug('Success?: '+serviceOrderRecallOutput.isSuccess);
System.debug('Response Messages: '+serviceOrderRecallOutput.responseMessages);
}
}
COA_ServiceOrderRecall Methods
274
Manage Orders CHANNEL_ORDERS Namespace
COA_ServiceOrderRecallInput Class
Wrapper class for input parameters passed to the recall operation.
COA_ServiceOrderRecallOutput Class
Wrapper class for output parameters returned from the recall operation.
COA_ServiceOrderRecall Methods
The following are methods for COA_ServiceOrderRecall.
recall(serviceOrderRecallInput)
Provides an entry point to recall orders that you’ve submitted to Salesforce Partner Operations. You can recall only orders that haven’t
been processed.
recall(serviceOrderRecallInput)
Provides an entry point to recall orders that you’ve submitted to Salesforce Partner Operations. You can recall only orders that haven’t
been processed.
Signature
global static List<COA_ServiceOrderRecall.COA_ServiceOrderRecallOutput>
recall(List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput> serviceOrderRecallInput)
Parameters
serviceOrderRecallInput
Type: List<COA_ServiceOrderRecall.COA_ServiceOrderRecallInput>
List of wrapper classes to pass as input for the recall operation
Return Value
Type: List<COA__ServiceOrderRecall.COA__ServiceOrderRecallOutput>
COA_ServiceOrderRecallInput Class
Wrapper class for input parameters passed to the recall operation.
Namespace
CHANNEL_ORDERS
COA_ServiceOrderRecallInput Properties
COA_ServiceOrderRecallInput Properties
The following are properties for COA_ServiceOrderRecallInput.
275
Manage Orders CHANNEL_ORDERS Namespace
serviceOrderId
Specifies the ID of the order you are recalling. This field is required.
serviceOrderId
Specifies the ID of the order you are recalling. This field is required.
Signature
global Id serviceOrderId;
Property Value
Type: Id
COA_ServiceOrderRecallOutput Class
Wrapper class for output parameters returned from the recall operation.
Namespace
CHANNEL_ORDERS
COA_ServiceOrderRecallOutput Properties
COA_ServiceOrderRecallOutput Properties
The following are properties for COA_ServiceOrderRecallOutput.
isSuccess
Indicates the success of the recall operation. If true, the order was successfully recalled.
responseMessages
Holds response messages generated by the recall operation.
serviceOrderId
References the order ID passed in by the recall operation.
isSuccess
Indicates the success of the recall operation. If true, the order was successfully recalled.
Signature
global Boolean isSuccess;
Property Value
Type: Boolean
276
Manage Orders CHANNEL_ORDERS Namespace
responseMessages
Holds response messages generated by the recall operation.
Signature
global List<String> responseMessages;
Property Value
Type: List<String>
serviceOrderId
References the order ID passed in by the recall operation.
Signature
global Id serviceOrderId;
Property Value
Type: Id
COA_ServiceOrderClone Class
Clone an existing order in the org where the Channel Order App (COA) is installed.
Note: Only fields that you have permission to create are cloned. DML errors can occur if you don’t have sufficient privileges.
Namespace
CHANNEL_ORDERS
Usage
The COA_ServiceOrderClone class contains a single @InvocableMethod to clone orders and, optionally, associated line items.
When invoking a method defined in this class, include the CHANNEL_ORDERS namespace prefix:
CHANNEL_ORDERS.class.method(args)
For details about namespace prefixes or the @InvocableMethod annotation, see the Apex Developer Guide.
Example
This example receives a list of service orders, clones them, and returns a list of outputs from the clone operation.
Note: For brevity, the methods invoked in this example omit the CHANNEL_ORDERS namespace prefix. If you use this code
in your implementation, you must include the namespace prefix.
public static void cloneOrders(List<Service_Order__c> serviceOrders){
List<COA_ServiceOrderClone.COA_ServiceOrderCloneInput> serviceOrderCloneInput =
277
Manage Orders CHANNEL_ORDERS Namespace
new List<COA_ServiceOrderClone.COA_ServiceOrderCloneInput>();
List<COA_ServiceOrderClone.COA_ServiceOrderCloneOutput> serviceOrderCloneOutputs
= COA_ServiceOrderClone.clone(serviceOrderCloneInput);
//Further processing of serviceOrderCloneOutputs
}
COA_ServiceOrderClone Methods
COA_ServiceOrderCloneInput Class
Wrapper class for input parameters passed to the clone operation.
COA_ServiceOrderCloneOutput Class
Wrapper class for output parameters returned from the clone operation.
COA_ServiceOrderClone Methods
The following are methods for COA_ServiceOrderClone.
clone(serviceOrderCloneInput)
Provides an entry point to clone orders in your org and, optionally, associated line items.
clone(serviceOrderCloneInput)
Provides an entry point to clone orders in your org and, optionally, associated line items.
Signature
global static List<COA_ServiceOrderClone.COA_ServiceOrderCloneOutput>
edit(List<COA_ServiceOrderClone.COA_ServiceOrderCloneInput> serviceOrderCloneInput)
Parameters
serviceOrderCloneInput
Type: List<COA_ServiceOrderClone.COA_ServiceOrderCloneInput>
List of wrapper classes to pass as input for the clone operation
Return Value
Type: List<COA__ServiceOrderClone.COA__ServiceOrderCloneOutput>
278
Manage Orders CHANNEL_ORDERS Namespace
COA_ServiceOrderCloneInput Class
Wrapper class for input parameters passed to the clone operation.
Namespace
CHANNEL_ORDERS
COA_ServiceOrderCloneInput Properties
COA_ServiceOrderCloneInput Properties
The following are properties for COA_ServiceOrderCloneInput.
serviceOrderId
Specifies the ID of the order you are cloning. This field is required.
cloneProducts
Indicates whether to clone the original order’s line items. If true, the line items are cloned. This field is required.
serviceOrderId
Specifies the ID of the order you are cloning. This field is required.
Signature
global Id serviceOrderId;
Property Value
Type: Id
cloneProducts
Indicates whether to clone the original order’s line items. If true, the line items are cloned. This field is required.
Signature
global Boolean cloneProducts;
Property Value
Type: Boolean
COA_ServiceOrderCloneOutput Class
Wrapper class for output parameters returned from the clone operation.
Namespace
CHANNEL_ORDERS
279
Manage Orders CHANNEL_ORDERS Namespace
COA_ServiceOrderCloneOutput Properties
COA_ServiceOrderCloneOutput Properties
The following are properties for COA__ServiceOrderClone.COA__ServiceOrderCloneOutput.
isSuccess
Indicates the success of the clone operation. If true, the order was successfully recalled.
responseMessages
Holds response messages generated by the clone operation.
originalServiceOrderId
Specifies the ID of the original order that you cloned.
cloneServiceOrderId
Specifies the ID of the newly created clone order.
isSuccess
Indicates the success of the clone operation. If true, the order was successfully recalled.
Signature
global Boolean isSuccess;
Property Value
Type: Boolean
responseMessages
Holds response messages generated by the clone operation.
Signature
global List<String> responseMessages;
Property Value
Type: List<String>
originalServiceOrderId
Specifies the ID of the original order that you cloned.
Signature
global Id originalServiceOrderId;
280
Manage Orders Service Order
Property Value
Type: Id
cloneServiceOrderId
Specifies the ID of the newly created clone order.
Signature
global Id cloneServiceOrderId;
Property Value
Type: Id
Service Order
Represents an order that you’re submitting to Salesforce Partner Operations for processing and activation.
Note: Field names are prefixed with CHANNEL_ORDERS__ unless otherwise noted.
When you submit an order with the Channel Order App API, include the following fields.
Fields
Field Details
Label Type
Created with New COA boolean
Name Properties
Created_with_new_COA__c Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates that you’re using the latest version of the Channel Order App (COA). To
ensure that your order is processed, check this field.
Label Type
Contract reference
Name Properties
Partner_Contract_Rules__c Create, Filter, Group, Nillable, Sort, Update
Description
Lookup to the related contract terms record. This field is required.
Label Type
Customer Name reference
Name Properties
Customer__c Create, Filter, Group, Nillable, Sort, Update
281
Manage Orders Service Order
Field Details
Description
Lookup to a customer record. Specify an existing customer record. You can’t populate
customer details using the API. This field is required.
Label Type
Date Partner Received Customer Order date
Name Properties
Date_Partner_Received_Customer_Order__c Create, Filter, Group, Nillable, Sort, Update
Description
Date you received the order from the customer. This field is required.
Label Type
Date Customer Accepted SFDC Service date
Agreement Properties
Name Create, Filter, Group, Nillable, Sort, Update
Date_Customer_Accepted_SFDC_Svc_Agrmnt__c Description
Date the customer accepted the Salesforce service agreement. This field is required
for OEM contracts.
Label Type
Error Comment textarea
Name Properties
Error_Comment__c Create, Nillable, Sort, Update
Description
Stores comments or instructions from Salesforce Partner Operations when a submitted
order can’t be processed.
Label Type
I Certify a Corresponding Order is Rec’d picklist
Name Properties
I_certify__c Create, Filter, Group, Nillable, Sort, Update
Description
Confirmation that the order was received. Possible values are Yes and No. This field
is required.
Label Type
Order Type picklist
Name Properties
Order_Type__c Create, Filter, Group, Nillable, Sort, Update
Description
The type of order that you’re submitting for processing and activation. Possible values
are Initial, Add-On, Reduction, Cancellation Order, Upgrade
282
Manage Orders Service Order Detail
Field Details
- Partner App, and Upgrade - Org Edition. Specify Upgrade -
Partner App for a renewal order. Specify Upgrade - Org Edition for
an upgrade order. This field is required.
Label Type
Service Order Status picklist
Name Properties
Service_Order_Status__c Create, Defaulted on create, Filter, Group, Nillable, Sort, Update
Description
Status of the order. Possible values are Draft, Submitted, Received, In
Process, Error, Activated, and Provisioned. You can submit only
orders with a status of Draft.
Label Type
Service Start Date date
Name Properties
Service_Start_Date__c Create, Filter, Group, Sort, Update
Description
Date to activate or provision the customer’s order. You can specify today’s date or a
date in the future. This field is required.
Note: Field names are prefixed with CHANNEL_ORDERS__ unless otherwise noted.
When you submit an order with the Channel Order App API, include the following fields.
Fields
Field Name Details
Label Type
App string
Name Properties
Application__c Create, Filter, Group, Nillable, Sort
Description
Name of the app associated with the product.
Label Type
Billing Frequency double
283
Manage Orders Service Order Detail
Name Properties
pc_Billing_Frequency__c Create, Filter, Nillable, Sort, Update
Description
How often the customer is billed per year. This value must match your Salesforce contract,
unless you’ve been granted override permissions.
Label Type
Cancellation Terms (days) double
Name Properties
pc_Cancellation_Terms__c Create, Filter, Nillable, Sort, Update
Description
Number of days the customer has to cancel the contract. This value must match your
Salesforce contract, unless you’ve been granted override permissions.
Label Type
Contract Auto Renew picklist
Name Properties
pc_Contract_Auto_Renew__c Create, Filter, Group, Nillable, Sort, Update
Description
Whether the contract automatically renews at the end of the term. Possible values are Yes
and No. This value must match your Salesforce contract, unless you’ve been granted override
permissions.
Label Type
Contract Length double
Name Properties
pc_Contract_Length__c Create, Filter, Nillable, Sort, Update
Description
Length of the contract in months. This value must match your Salesforce contract, unless
you’ve been granted override permissions.
Label Type
Currency string
Name Properties
Currency__c Filter, Nillable, Sort
Description
The default contract currency from the contract terms associated with this order. Read-only.
Label Type
Customer Price double
Name Properties
Customer_Price_Per_Month__c Create, Filter, Nillable, Sort, Update
284
Manage Orders Service Order Detail
Description
Price per unit per month. This field is required for PNR products.
Label Type
Fixed Price double
Name Properties
pc_Fixed_Price__c Create, Filter, Nillable, Sort, Update
Description
Fixed price of the product at the time the order was created. This field must be explicitly set
when using the API.
Label Type
Partner Contract Term reference
Name Properties
pc_Partner_Contract_Term__c Create, Filter, Group, Nillable, Sort, Update
Description
Lookup to the related contract terms record.
Label Type
PNR % double
Name Properties
pc_PNR__c Create, Filter, Nillable, Sort, Update
Description
Percent net revenue of the product at the time the order was created. This field must be
explicitly set when using the API.
Label Type
Pricing picklist
Name Properties
pc_Pricing_Type__c Create, Filter, Group, Nillable, Sort, Update
Description
Pricing model of the product. Possible values are Fixed and PNR. This field must be
explicitly set when using the API.
Label Type
Product reference
Name Properties
Product_Name__c Create, Filter, Group, Nillable, Sort, Update
Description
Lookup to the related product catalog record.
285
Manage Orders Partner Order Submit API
Label Type
Product ID string
Name Properties
pc_Product_ID__c Create, Filter, Group, Nillable, Sort, Update
Description
ID of the product. This field must be explicitly set when using the API.
Label Type
Renewal Terms (months) double
Name Properties
pc_Renewal_Terms__c Create, Filter, Nillable, Sort, Update
Description
Renewal term in months. This value must match your Salesforce contract, unless you’ve been
granted override permissions.
Label Type
Service Order reference
Name Properties
Partner_Order__c Create, Filter, Group, Sort
Description
Lookup to the related service order record.
Label Type
SFDC Invoice Description string
Name Properties
Product_Line_Description__c Create, Filter, Group, Nillable, Sort, Update
Description
Contains additional invoice details for the product or order. This field is optional.
Label Type
Total Quantity double
Name Properties
Quantity__c Create, Filter, Nillable, Sort, Update
Description
Number of product catalogs on the service order.
286
Manage Orders Partner Order Submit API
Important: In Channel Order App (COA) v2.0 and later, the Channel Order Apex API replaces the Partner Order Submit API. If you
have any existing integrations with the Partner Order Submit API, migrate them to the Channel Order Apex API.
Syntax
channel_orders.ServiceOrderProcessor.sendOrder()
channel_orders.ServiceOrderProcessor.sendOrderAsync()
Note: When you submit an order using sendOrder or sendOrderAsync, include an order ID or set of order IDs as the
argument. For example, channel_orders.ServiceOrderProcessor.sendOrder(orderId).
Usage
Use sendOrderAsync when you want to create or update multiple orders and send them in the same transaction. See the example
in this section for more details.
Methods
The ServiceOrderProcessor object supports the following methods.
287
Manage Orders Partner Order Submit API
//Batch call
Id batchInstanceId = Database.executeBatch(new COABatchClass(), 1);
288
CHAPTER 11 Manage Licenses
In this chapter ... Learn how to use the License Management App (LMA) to manage leads and licenses for your
AppExchange solutions, and how to provide administrative support for your customers.
• License
Management App
• Get Started with the
License
Management App
• Manage Leads and
Licenses for Your
Offering
• Troubleshoot the
License
Management App
• License
Management App
FAQ
289
Manage Licenses License Management App
290
Manage Licenses How Does the License Management App Work?
[2] Your package version is associated with the LMA, and default license values You (ISV partner) The Partner Community
are set.
[3] Your offering is installed as part of a purchase or trial. Customer or prospect Any compatible org
[4] A lead record is created with the customer’s name, company, and email address. The LMA Your business org
[4] License records are created according to the default values you specified. The LMA Your business org
The customer’s org
[5] The lead record is converted to account and contact records. You (ISV partner) Your business org
[6] Account and contact records are associated with the license record. The LMA Your business org
LMA Packages
In the LMA, packages refer to managed packages that have been uploaded to the AppExchange for distribution. Packages can have
one or more versions, and each package version can have multiple licenses. Package version has a master-detail relationship with
a package. The package object is the root object for all information in the LMA.
LMA Licenses
Licenses give you control over how many users in the customer’s org can access your offering and for how long. Licenses are unique
to the LMA, and each license has a direct relationship with a lead. Licenses have lookup relationships with leads and package versions.
SEE ALSO:
AppExchange Lead Source Codes
291
Manage Licenses How Does the License Management App Work?
LMA Packages
In the LMA, packages refer to managed packages that have been uploaded to the AppExchange for distribution. Packages can have one
or more versions, and each package version can have multiple licenses. Package version has a master-detail relationship with a package.
The package object is the root object for all information in the LMA.
In the LMA, from Packages, select a package name to view its details, including information about the org where you developed it. In
the Package Version related list, you can see all the uploaded and registered package versions on the AppExchange
Important: Don’t edit, delete, clone, or create packages, package versions, or licenses. These records are automatically created
and contain important information for tracking the licenses and packages in the License Management App. They can’t be repopulated.
Package Details
A package contains the following information.
Field Description
Created By Defaults to the License Manager.
Developer Name The name of the org where you developed the package.
Developer Org ID The 18-character ID of the org where you developed the package.
Last Modified By The name of the last user to modify this record, along with the date and time it was updated.
Latest Version The most recent uploaded and registered version of the package. You enter this information
when uploading the package.
Lead Manager The owner of leads created when customers install your package. Lead Manager is
blank when the package record is created. If you don’t assign a lead manager, the License
Management App owns the lead.
Package ID The 18-character GUID (Globally Unique ID) that identifies the package.
Package Name The name you specified when you created the package.
Release Date The date you uploaded this package to the AppExchange.
Field Description
Beta Indicates an early version of a managed package for testing by your customers. You specify
beta status when you upload the package to the AppExchange
Last Modified By The name of the last user to modify this record, along with the date and time it was updated.
292
Manage Licenses How Does the License Management App Work?
Field Description
Package Version Name The name you specified when you created the package.
Release Date The date you uploaded this package to the AppExchange.
LMA Licenses
Licenses give you control over how many users in the customer’s org can access your offering and for how long. Licenses are unique to
the LMA, and each license has a direct relationship with a lead. Licenses have lookup relationships with leads and package versions.
In the LMA, from Licenses, select a license record to view details including status, package version, owner, and install date.
Important: Don’t edit, delete, clone, or create packages, package versions, or licenses. These records are automatically created
and contain important information for tracking the licenses and packages in the License Management App. They can’t be repopulated.
License Details
A license contains the following information.
Field Description
Account The account for a converted lead.
Expiration Date Displays the expiration date or Does not expire if the license does not expire. The
default is Does not expire.
Information Current As Of The last time Salesforce retrieved information about the installer’s org.
Install Date The date the customer installed this package version.
Last Modified By The name of the last user to modify this record, along with the date and time it was updated.
Lead The lead that the LMA created when the app was installed. A lead represents the user who
owns the license.
If you convert the lead into an opportunity, the lead name is retained but the lead record
no longer exists. If you click the link, a page states that the lead has been converted.
License Name A number that represents an instance of a license. The number is incremented by one for
each new license.
Licensed Seats Displays the number of licenses or Site License. The default is Site License.
License Status Indicates the type of license. Available values are Trial, Active, Suspended, and Uninstalled.
293
Manage Licenses Integrate the License Management App into Your Business
Processes
Field Description
Org Edition The edition of the installer’s org.
Org Expiration Date If the installer is using a trial org, the date when the trial expires.
Org Status The status of the installer’s org. Possible values include Trial, Active, or Free.
Owner Always the License Management App. Don’t change this value.
Package Version Links to the package version that is the parent of this license.
Sandbox Indicates whether the license is for a package installed in a sandbox org.
Used Licenses Displays the number of users who have a license to the package.
This field is blank if:
• A customer uninstalled the package.
• Licensed Seats is set to Site License.
Limits
You can allocate up to 99,000,000 seats per subscriber license.
294
Manage Licenses Best Practices for the License Management App
295
Manage Licenses Install the License Management App
2. Log in to the org where you want to install the LMA, and then select the installation URL.
3. Choose which users can access the LMA, and then select Install.
4. Confirm that you have installed the LMA by opening the app launcher in Lightning Experience or app menu in Salesforce Classic. If
the installation was successful, License Management App appears in the list of available apps.
You associate a managed package with the LMA only once. After a package is associated, the new versions that you create are automatically
linked to the LMA.
296
Manage Licenses Configure the License Management App
Licenses Most users in your org don’t need any permissions. Users who view licenses need the “Read”
permission. Users who modify license records need “Read” and “Edit” permissions.
Packages Only users who assign the lead manager need “Edit” permission. Other users have either “Read”
permission or no permissions.
Package Versions All users have “Read” permission or no permissions, because they don’t need to create, modify, or
delete these records.
Licenses Your settings depend on how you want to manage these fields for different users in your org.
4. To use the Modify License Visualforce page, override the Edit control on the license record.
5. Add related lists.
• Add the Licenses related list to the appropriate Lead page layouts. License managers can use this list to view the licenses
associated with a particular lead.
• Add the Licenses related list to the appropriate Account page layouts. Users can view this list and identify the licenses associated
with a particular account.
• Add the Licenses related list to the appropriate Contact page layouts. Users can view this list and identify the licenses associated
with a particular contact.
297
Manage Licenses Manage Leads and Licenses for Your Offering
Field Description
Expiration Enter the last day that the customer can access your offering, or select Does not expire
if the license doesn’t expire.
Seats Enter the number of licensed seats, or select Site License to make your offering
available to all users in the customer’s org. You can allocate up to 99,000,000 seats.
298
Manage Licenses Change the Lead Manager in the License Management App
Field Description
Note: When your offering is uninstalled, its status is set to Uninstalled, and the
license can’t be edited.
4. Select Save.
2. Select Edit, and then locate a user. Make sure that you’re selecting someone who has permission Edit
to access license records in the LMA.
3. Select Save.
299
Manage Licenses Move the License Management App to Another Salesforce
Org
300
Manage Licenses Proxy User Has Deactivated Message
Is the LMA compatible with Lightning Experience? Available in: both Salesforce
Classic and Lightning
Can I install the LMA in a non-production Salesforce org?
Experience
Why can’t I see the Modify License button on my license records?
Available in: Enterprise,
A customer installed my package before I associated it with the LMA. How can I manage the Performance, Unlimited,
license record? and Developer Editions
Can I automate the assignment of licenses to users in the subscriber org?
Why aren’t leads and licenses being created in the LMA?
What happens when I decrease the number of available licenses below the current number of licensed users?
301
Manage Licenses Is the LMA compatible with Lightning Experience?
302
CHAPTER 12 Manage Features
In this chapter ... Take the License Management App (LMA) a step further by extending it with the Feature Management
App (FMA). The FMA is generally available as of mid-October 2017.
• Feature Parameter
Metadata Types and
Here at Salesforce, we sometimes run pilot programs, like the one we ran when we introduced Feature
Custom Objects Management. Sometimes we dark-launch features to see how they work in production before sharing
them with you. Sometimes we make features available to select orgs for limited-time trials. And sometimes
• Set Up Feature
we want to track activation metrics for those features.
Parameters
• Reference Feature With feature parameters, we’re extending this previously secret functionality to you, our Partner Ohana.
Parameters to Drive Install the FMA in your License Management Org (LMO). The FMA extends the License Management
App Behavior and App, and like the LMA, it’s distributed as a managed package.
Track Activation To try out Feature Management in a sample Salesforce DX project, clone our Project Force App on GitHub.
Metrics
• Hide Custom Objects
and Custom
Permissions in Your
Subscribers’ Orgs
• Best Practices for
Feature
Management
• Considerations for
Feature
Management
303
Manage Features Feature Parameter Metadata Types and Custom Objects
304
Manage Features Set Up Feature Parameters
3. When the package is installed in a subscriber org, one FeatureParameter__c record for each feature parameter is created
in the LMO, unless the records already exist.
4. During package installation in a subscriber org, junction object records are created in the LMO and in the subscriber’s org. For each
feature parameter, a record of a junction object is created in each org to associate the feature parameter with the license for the
subscriber org. A junction object is a custom object with two master-detail relationships. In this case, the relationships are with
FeatureParameter__c and License__c. The junction objects are of type FeatureParameterBoolean__c,
FeatureParameterDate__c, or FeatureParameterInteger__c. The records store the value of their associated
feature parameter for the subscriber org. Initially, their Value__c field is populated with the defaultValue from the packaging
org. Their values in the LMO and in the subscriber org are linked.
5. The ISV uses the junction objects to override the feature parameters’ default values or to collect data. Depending on the value of
each feature parameter’s DataFlowDirection__c field, data flows to the subscriber org (from the LMO) or to the LMO (from
the subscriber org). That data is stored in the junction object records.
SEE ALSO:
GitHub: Project Force App (sample Salesforce DX project for Feature Management)
Install and Set Up the Feature Management App in Your License Management Org
Install the FMA in your LMO. Then add the Feature Parameters tab to your default view, and adjust your page layout for licenses to
display related lists for your feature parameters.
Create Feature Parameters in Your Packaging Org
Create a feature parameter in your packaging org, and set its type, default value, and data flow direction.
Add Feature Parameters to Your Managed Package
After you’ve created some feature parameters, you can add them to a managed package as components and reference them in your
code. Feature parameters aren’t available in unmanaged packages.
305
Manage Features Create Feature Parameters in Your Packaging Org
c. In the Related Lists section of the License Page Layout Editor, add these lists.
• Feature Parameter Booleans
• Feature Parameter Dates
• Feature Parameter Integers
306
Manage Features Reference Feature Parameters to Drive App Behavior and
Track Activation Metrics
SEE ALSO:
Feature Parameter Metadata Types and Custom Objects
307
Manage Features Track Preferences and Activation Metrics with
Subscriber-to-LMO Feature Parameters
SEE ALSO:
Apex Developer Guide: FeatureManagement Class
Warning: The Value__c field on subscriber-to-LMO feature parameters is editable in your LMO. But don’t change it. The
changes don’t propagate to your subscriber’s org, so your values will be out of sync.
SEE ALSO:
Apex Developer Guide: FeatureManagement Class
308
Manage Features Hide Custom Objects and Custom Permissions in Your
Subscribers’ Orgs
Warning: For custom permissions, you can toggle the protected value indefinitely. However, after you’ve released unprotected
objects to subscribers, you can’t set the visibility to Protected. Be sure to protect custom objects that you want to hide before
you release the first package version that contains them.
To hide custom permissions in released packages:
• System.FeatureManagement.changeProtection('YourCustomPermissionName',
'CustomPermission', 'Protected');
To unhide custom permissions and custom objects in released packages:
• System.FeatureManagement.changeProtection('YourCustomPermissionName',
'CustomPermission', 'Unprotected');
• System.FeatureManagement.changeProtection('YourCustomObjectName__c', 'CustomObject',
'Unprotected');
SEE ALSO:
Apex Developer Guide: FeatureManagement Class
• Create subscriber-to-LMO feature parameters to manage activation metrics. Set these feature parameters’ values in subscriber orgs
using the Apex code in your managed package. For example, use subscriber-to-LMO feature parameters to track the number of
e-signatures consumed or to check whether a customer has activated enhanced reporting.
309
Manage Features Considerations for Feature Management
310
CHAPTER 13 Provide a Free Trial of Your Solution
In this chapter ... Maximize customer adoption by offering free trials of your solution on AppExchange. Explore the types
of trials available and determine the best type for your solution.
• Why Use Trialforce?
• Trialforce Note: This feature is available to eligible partners. For more information on the Partner Program,
including eligibility requirements, visit https://partners.salesforce.com.
• Set Up Trialforce
• Provide a Free Trial
on the AppExchange
• Provide Free Trials on
Your Website
• Update Your Trial
• Trialforce Best
Practices
• Trialforce FAQ
311
Provide a Free Trial of Your Solution Why Use Trialforce?
Trialforce
A Trialforce setup has several parts: the Trialforce management organization, Trialforce source organizations, and Trialforce templates.
Before you set up Trialforce, learn how these parts work together to deliver a trial of your AppExchange solution.
Trialforce Management Organization (TMO)
The TMO is the starting point for setting up Trialforce and the central location for managing Trialforce after it’s set up. You must log
a case in the Salesforce Partner Community to request a TMO. The two tasks you perform in the TMO are:
• Create Trialforce source organizations.
• Define templates for custom branding.
Trialforce Source Organization (TSO)
You use the TSO to create a template for the trial orgs received by your customers. You create the TSO from your TMO. The tasks
you perform in a TSO are:
• Install your offering, along with any sample data.
• Configure the TSO to be exactly as you want your customers to experience it.
• Specify branding by choosing from the templates you previously created in the TMO.
• Create a Trialforce template, which becomes the basis for all trial orgs.
Trialforce Template
The template is a snapshot or exact copy of your TSO at a specific instance in time. You create it from a TSO after you’ve installed
your offering and made configuration changes. You specify a Trialforce template when you generate a trial org using the SignupRequest
API and when you create a demo org from the Environment Hub. The template defines the trial org that is provisioned each time a
customer signs up for a trial of your offering.
312
Provide a Free Trial of Your Solution Trialforce
313
Provide a Free Trial of Your Solution Set Up Trialforce
Set Up Trialforce
After you’ve built your offering and passed the AppExchange security review, follow these steps to
EDITIONS
set up Trialforce.
Note: To enable Trialforce, you must first sign the ISVforce/OEM agreement. Available in: Salesforce
Classic
1. Create your managed package.
Available in: Developer
2. Configure a License Management Organization (LMO) to manage customers’ access to apps Edition
and components. If you’re an existing Salesforce user, install the License Management Application
(LMA) in your CRM organization (Enterprise Edition is required). If you’re new to the Partner
Program, the LMA is preinstalled in your partner business org.
USER PERMISSIONS
3. Link a version with the LMO and set the license defaults. This step ensures that each time a To manage Trialforce:
prospect creates a trial, the LMO receives a new lead and license record. • Customize Application
4. Request a Trialforce Management Organization (TMO).
5. Optionally, create a customized branded login page and branded emails in your TMO.
6. Create a Trialforce Source Organization (TSO) from your TMO.
7. Install your managed package in the TSO, and customize it as you want your prospects to experience it. You can apply custom
branding, load sample data, create custom profiles, and so on.
8. Create a new Trialforce template from the TSO.
9. Link the Trialforce template to the AppExchange.
10. Submit the Trialforce template for security review and get it approved.
You can now use this template to create free trials. For more information, see:
• Providing a free trial on AppExchange
• Providing a free trial on your website
• Providing a free trial using the API
Note: When you link a package with an LMO, that package’s leads and licenses must be permanently managed out of the LMO.
You can’t migrate licenses to another organization.
1. Log in to the Partner Community.
2. On the Publishing page, click the Packages tab.
3. Find the package that you want to link, and click Manage Licenses.
4. Click Register.
5. Enter the login credentials for your LMO, and click Submit.
6. Select whether your default license is a free trial or active.
7. Enter the license length in number of days. If your license is free or doesn’t expire, select License does not expire.
314
Provide a Free Trial of Your Solution Request a Trialforce Management Org
8. Enter the number of seats associated with your default license, or select License is site-wide to offer the license to all users in the
installer’s organization.
9. Click Save.
To verify that you linked the package successfully, log in to the LMO and click the Package Versions tab. After you link a package to
your LMO, all versions of that package are associated.
Note: To configure branding, you must be logged in to a Trialforce Management Organization (TMO). To get your TMO, log a
case in the Partner Community. Branding is not available for Trialforce Source Orgs created in the Environment Hub.
315
Provide a Free Trial of Your Solution Setting Up Custom Branding for Trialforce
6. Click Save.
7. If you're ready to make these emails available to your Trialforce Source Organization (TSO), click Publish. Otherwise your changes
are saved and you can publish later.
To assign a branded email set to your TSO:
1. From Setup, enter Source Organizations in the Quick Find box, then select Source Organizations.
2. Click Edit next to your TSO.
3. Select the email set.
4. Click Save.
5. Click Login if you want to see your branded login page in action.
5. Check the availability of the domain and then accept the terms of use.
6. Click Save and Launch Editor.
7. Use the Login Brand Editor to change how your login page looks. For additional help using the editor, click Help for this Page.
316
Provide a Free Trial of Your Solution Create a Trialforce Source Organization
Note: If you create a TSO from a TMO, it’s always an Enterprise Edition. To create a Professional USER PERMISSIONS
Edition TSO, create the TSO from the Environment Hub.
1. Log in to your TMO. To manage Trialforce:
• Customize Application
2. From Setup, enter Source Organizations in the Quick Find box, then select
Source Organizations.
3. Click New.
4. Enter a new username and email address for the administrator account.
5. Enter a name for the TSO. Optionally, specify the custom branding by choosing a branded email set or login site.
6. Click Create.
You can also create a TSO from the Environment Hub. When you use the Environment Hub, you can create an Enterprise Edition TSO or
a Professional Edition TSO.
1. Log in to the Environment Hub.
2. Click Create Org.
3. Keep the default, Purpose as Trialforce.
4. Keep the default for Create Using, Standard Edition.
5. Select Professional TSO or Enterprise TSO.
6. Enter the org name.
7. (Optional) Enter a unique name for your My Domain.
8. Enter a username and email address for the admin account.
9. Enter a name for the TSO.
10. Acknowledge that you’ve read the Master Subscription Agreement.
11. Click Create.
The TSO now appears in the Environment Hub.
You receive an email with the login details for your TSO. You can then log in to the TSO and install your package, along with sample
data and configurations. Optionally, you can also create:
• Custom profiles
• New users
317
Provide a Free Trial of Your Solution Create a Trialforce Template
• Sample records
The goal is to configure the TSO exactly as you want your customers to experience it. You can then create a Trialforce template, which
is a snapshot of your TSO at a specific point in time.
SEE ALSO:
How do I configure who can use Lightning Experience in my trial org?
Create a Trialforce Template
5. Click Save.
6. (Optional) If you created a private template, enter the org ID of the orgs that can sign up using this template, then click Save.
You can enter up to 51 org IDs, each on a separate line.
You receive an email with the ID of the new template after it’s generated. Submit the template for review before you can use it to sign
up trial organizations. Remember to generate a new template each time you make updates to your TSO so that your trials always reflect
the most recent state.
Each template has a status with one of the following values.
318
Provide a Free Trial of Your Solution Link a Trialforce Template to the AppExchange
In Progress
When a template is first created, it always has this status. It then moves to either Success or Error status.
Success
The template can be used to create trial organizations.
Error
The template cannot be used because something has gone wrong and debugging is required.
Deleted
The template is no longer available for use. Deleted templates are removed during system updates.
Note: You can only request a review on a Trialforce template that has at least one package installed. You must own or license
the installed packages in the template and it should have already passed the security review.
1. Log in to the Partner Community.
2. On the Publishing page, click the Trial Templates tab.
3. Next to the template that you want reviewed, click Start Review.
You receive an email confirmation after you initiate the review and another email when the review is completed. The review is free for
partners and typically takes 2–3 days.
319
Provide a Free Trial of Your Solution Provide a Free Trial on the AppExchange Using Trialforce
• Using Trialforce
• By configuring a test drive
• By installing your app or component into an existing organization
Note: You must be an eligible partner to provide free trials. For more information on the Partner Program, including eligibility
requirements, visit www.salesforce.com/partners.
1. Create a Trialforce template with your offering installed and configured as you want your prospects to experience it. For details, see
Setting up Trialforce.
2. Submit the Trialforce template for security review. This review is free and takes less time than the initial review of your app or
component.
3. Link the Trialforce template to your AppExchange listing.
a. Log in to the Partner Community.
b. On the Publishing page, click the Listings tab.
c. Find the listing where you want to offer a trial, and click it to open the AppExchange publishing console.
d. Click the Trials tab, and select Offer a free trial organization.
e. Follow the on-screen prompts to add a trial template to the listing.
4. Click Save.
Now, when customers visit your listing, they can start a free trial with your offering preinstalled, even if they don’t have a Salesforce
account. If they decide to start a trial, we collect their contact information and ask them to agree to your terms and conditions and our
MSA. After they provide this information, prospects receive an email prompting them to log in to a trial organization.
Note: Salesforce doesn’t support test drive orgs created outside of the Publishing Console. However, if you create a test drive
using another method and your customers experience login issues, try setting profile-level IP login ranges from 0.0.0.0 to
255.255.255.255. For more information, see Restrict Login IP Ranges in the Enhanced Profile User Interface.
1. Log in to the Salesforce Partner Community.
2. Click Publishing.
3. Click Listings and then select the product for which you want to offer a test drive.
4. On the Trials tab, select Offer a Test Drive.
5. Click Create Test Drive.
6. Give the test drive a customer-friendly name, and associate a package.
7. Click Submit. Salesforce creates an org and emails you login credentials for the admin and evaluation users.
320
Provide a Free Trial of Your Solution Provide a Free Trial on the AppExchange When Your Offering
Is Installed
8. Log in to the test drive org as the admin user and add sample data.
9. Log out of the org and then log in again as the evaluation user to set a password.
10. In the Publishing Console, go to the Trials tab and click Connect Organization.
11. Enter the login credentials for the evaluation user and then click Submit.
To ensure the test drive user is granted read-only access, enter credentials for the evaluation user. Don’t enter admin credentials as
this gives the user read-write access.
Tip: Enable the SignupRequest API in your business org. Then, you can easily integrate sign-up data with your existing business
processes. For example, create a workflow rule to convert sign-up requests into leads and run reports to track the number of
sign-ups in a given period.
1. Check to see if the SignupRequest API is enabled in your business org.
a. Log in to your business org.
b. From Setup, enter Object Manager in the Quick Find box, then click Object Manager.
c. Verify that the Signup Request object appears. If you don’t see this object, log a case to enable the SignupRequest API.
321
Provide a Free Trial of Your Solution Choose a Sign-Up Form Hosting Option
322
Provide a Free Trial of Your Solution Create Sign-Ups Using the API
SEE ALSO:
Provide Free Trials on Your Website
SignupRequest API
Make it Easy for Your Customers to Provision Trials Part 1
Make it Easy for Your Customers to Provision Trials Part 2
Web Form Replacement Code in Nodejs and React
Demo App to Create Trial Orgs Using the SignupRequest API
323
Provide a Free Trial of Your Solution Trialforce Best Practices
• Have a Trialforce Source Organization (TSO) where you can upload the new package version. You can reuse the TSO that you used
to create your original Trialforce template, or use a new one. If you use a new TSO, be sure to link it to AppExchange.
Then complete the following steps.
1. Install your updated managed package or extension package into your TSO.
2. Make any other desired changes in the TSO, such as loading sample data or changing custom branding.
3. Create a Trialforce template for your trial.
4. Submit the template for review.
5. Get the template approved for SignupRequest API use.
a. Log in to the Salesforce Partner Community.
b. Click Support.
c. Click New Case.
d. Hover over the AppExchange (ISV) App Setup & Management > Trialforce category.
e. Click Create a Case.
f. Provide a case subject, and select a severity level.
g. For Subtopic, select Signup API Feature Request.
h. For Description provide the TSO ID, the new Trialforce template ID, and the org to use for creating sign ups.
i. Click Submit Case.
Trialforce FAQ
This section contains a list of frequently asked questions about Trialforce.
• How do I upgrade my trial with a new version of my offering?
• Can I distribute my app or component using both Trialforce and the AppExchange?
• How are trials different from Trialforce?
• Is it possible to install another app in a trial organization?
324
Provide a Free Trial of Your Solution How do I upgrade my trial with a new version of my offering?
325
Provide a Free Trial of Your Solution How do I configure who can use Lightning Experience in my
trial org?
You can disable Lightning Experience in a new Trialforce Source org so that new users default to Salesforce Classic.
1. From Setup, enter Lightning in the Quick Find box, then select Lightning Experience.
2. On the Turn It On tab in the Migration Assistant, click the button to switch it to Disabled.
326
CHAPTER 14 Support Your AppExchange Customers
In this chapter ... After you publish a solution on AppExchange, you’re responsible for the end user support. Even when
you’ve built the best solution the world has ever seen, customers need your help from time to time.
• Subscriber Support Learn about the tools that you can use to attend to your customers’ needs, grow your business, and
Console affirm your reputation on AppExchange.
• Usage Metrics
Note: When customers contact Salesforce Customer Support with questions about your solution,
we direct them to your AppExchange listing. Make sure the contact information on your listing is
accurate and complete.
327
Support Your AppExchange Customers Subscriber Support Console
Note: This feature is available to eligible Salesforce partners. For more information on the Partner Program, including eligibility
requirements, please visit us at www.salesforce.com/partners.
Note: Unless the org preference Administrators Can Log in as Any User is enabled, access is granted for a limited amount of
time, and the subscriber can revoke access at any time. Any changes you make while logged in as a subscriber are logged in the
audit trail.
328
Support Your AppExchange Customers Log In to Subscriber Orgs
Note: Some subscribers also require MFA in addition to the MFA required for the LMO. Ask your subscriber if their org requires
MFA to log in.
In this second MFA scenario, your login attempt sends an MFA notification to your subscriber, and your login is blocked until your
subscriber responds to the notification. To ensure your subscriber is available to respond to the MFA notification, consider
coordinating a specific login time.
Best Practices
• Create an audit trial that indicates when and why a subscriber org login has occurred. You can create an audit trail by logging a case
in your LMO before each subscriber org login.
• When you access a subscriber org, you’re logged out of your LMO (License Management Organization). You can set up a my domain
so that you aren’t automatically logged out of your LMO when you log in to a subscriber org. To set up a My Domain subdomain,
from Setup, enter My Domain in the Quick Find box, then select My Domain.
• Be careful to allow only trusted support and engineering personnel to log in to a subscriber’s org. Since this feature can include full
read/write access to customer data and configurations, it’s vital to your reputation to preserve their security.
• Control who has access by giving the Log in to Subscriber Org user permission to specific support personnel, via a profile or permission
set.
329
Support Your AppExchange Customers Troubleshooting in Subscriber Organizations
SEE ALSO:
Salesforce Help: Open the Developer Console
Usage Metrics
Note: Usage Metrics is scheduled for retirement in all Salesforce orgs as of the Winter ’22 EDITIONS
Release. Switch now to AppExchange App Analytics, which also provides usage data about
how subscribers interact with your AppExchange solutions. You can use these details to Available in: Professional,
identify attrition risks, inform feature development decisions, and improve user experience. Enterprise, Performance,
To enable AppExchange App Analytics on your security-reviewed managed packages, follow Unlimited, and Developer
the instructions in Request AppExchange App Analytics. Editions
You can collect detailed usage metrics from each organization in which your managed package is
installed. By analyzing this information, you can gain valuable insights into the utilization and
performance of your app across your entire customer base. For example, you can identify:
• The features most and least used — this can help you prioritize your development efforts when planning the next version of your
app.
• The customers using your app most intensively — these are your most valuable customers.
• The customers whose usage of your app is minimal or declining — these are the customers most at risk of attrition.
You can collect the following daily metrics on two types of components in a managed package.
330
Support Your AppExchange Customers Setting up Usage Metrics
• Custom objects — the total number of records existing per organization in each custom object. This enables you to track how the
usage of that custom object is growing with time in any subscriber organization, which is a reliable indicator of how much it's being
utilized
• Visualforce pages — the number of times per organization each Visualforce page was accessed, the number of unique users who
accessed it, and the average loading time (in milliseconds). By comparing the metrics for different Visualforce pages, you can
determine the relative popularity of different parts of your app in a specific customer organization, as well as trends across all
customers.
The custom objects data is a snapshot that reflects the state of the organization at the time the database was sampled, while the
Visualforce data covers usage over a 24-hour period.
The usage metrics data for all production organizations in a given instance is merged and written into a text file, in a specified format,
once a day. Currently, no data is collected on packages installed in sandbox organizations or on managed beta packages.
This feature is intended for API access only. You must write a custom process to collect the metrics data from the reporting organization,
and export it to a system of your choice for analysis. This gives you the maximum flexibility to monitor and analyze the usage trends
most relevant for your app.
Your customers’ consent is not required for usage data to be collected, and there’s no way for them to opt out. This ensures you receive
complete data for your entire customer base. Allowing some users to be excluded would skew the results, making the data less useful.
Note: If any of your customers have concerns about privacy, reassure them any data collected is limited to usage statistics. No
customer data is ever exposed to the ISV under any circumstances. This is consistent with salesforce.com’s emphasis on trust as a
core value.
Note: To see the number of Salesforce instances currently in use, visit trust.salesforce.com.
331
Support Your AppExchange Customers MetricsDataFile
The usage data for each day and instance is stored as a text file, encoded in Base 64, in the MetricsDataFile field of the record.
Other fields in the record identify these properties.
• Namespace prefix of the package
• Salesforce instance
• Start time and date of data collection
• End time and date of data collection
• Size of the data file in bytes
• Type of data, which is either CustomObject or Visualforce
The custom objects data is a snapshot that reflects the state of the organization at the time the database was sampled, while the
Visualforce data covers usage over a 24-hour period.
The custom object count is a snapshot captured once each day. Here’s a section of a sample data file for custom objects. It shows there
were 3500 and 1500 records in the Alpha and Beta custom objects, respectively, in the specified customer organization on the
specified day.
"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","Alpha", "3500"
"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","Beta", "1500"
In a record for Visualforce pages, each row of the text file contains usage data in the following order.
• Organization ID
• Organization name
• Organization edition
• Organization status
• Package version number
• Name of the Visualforce page
• Number of times the page was accessed
• Number of unique users who accessed the page
• Average loading time of the page, in milliseconds
The Visualforce counts for each organization measure the number of times the page was viewed in the duration between the start and
end times. Here’s a section of a sample data file for Visualforce pages.
"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f1","1","1","66.0"
"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f2","1","1","128.0"
"00Dxx0000001gbk","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f3","1","1","107.0"
"00Dxx0000001gbf","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f1","5","1","73.6"
"00Dxx0000001gbf","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f2","1","1","72.0"
"00Dxx0000001gbf","org1","Enterprise Edition","TRIAL","1.0","/apex/gm12__f3","7","1","50.8"
You must write a custom process to query the reporting organization to collect the metrics data, and export it to a system of your choice
for analysis. This gives you the maximum flexibility to monitor and analyze the usage trends most relevant for your app.
MetricsDataFile
Represents a data file containing usage metrics on all installations of a managed package in a Salesforce instance.
332
Support Your AppExchange Customers MetricsDataFile
Supported Calls
query(), delete()
Fields
Field Name Details
MetricsDataFile Type
base64
Properties
Filter, Query, Sort
Description
A text file containing the usage data encoded in Base 64.
MetricsDataFileContentType Type
string
Properties
Filter, Query, Sort
Description
The format of the data file. Currently, the only allowed value is text/csv.
MetricsDataFileLength Type
int
Properties
Filter, Query, Sort
Description
The size of the data file in bytes.
MetricsRunDate Type
dateTime
Properties
Filter, Query, Sort
Description
The date when the usage metrics collection job was run.
MetricsEndDate Type
dateTime
Properties
Filter, Query, Sort
Description
The end time and date for the data collection.
333
Support Your AppExchange Customers MetricsDataFile
MetricsType Type
picklist
Properties
Filter, Query, Sort
Description
The type of data being collected. The possible values are CustomObject and
Visualforce.
NamespacePrefix Type
string
Properties
Filter, Query, Sort
Description
The namespace prefix of the package for which data is being collected.
SendingInstance Type
string
Properties
Filter, Query, Sort
Description
The server instance from which this data was collected, for example, “na8.”
Usage
Use this object to access customer usage metrics for a managed package. Each record contains one day’s data, on either custom objects
or Visualforce pages, for all organizations in a Salesforce instance that have the package installed. The following data is collected each
day.
• Custom objects — the number of records stored in each custom object.
• Visualforce pages — the number of times each Visualforce page was accessed, the number of unique users who accessed it, and
the average loading time (in milliseconds).
334
Support Your AppExchange Customers Usage Metrics Visualization
The Usage Metrics Visualization app showing data for the top five Visualforce pages.
335
Support Your AppExchange Customers Usage Metrics Visualization
Note: You should have enabled Usage Metrics for your app at least a few days before, so some usage data is available to
analyze.
2. Specify the organization(s) that you want to view metrics for by choosing one of these options.
• For a single organization, enter its Organization ID in the Single Organization field.
• For a group of organizations, select one of the following from the All Organizations menu.
– Any Status
– All Active: These are organizations used by paying customers.
– All Free: These are Developer Edition (DE) organizations.
– All Trial: These are trial organizations, which expire after a specified period.
3. Specify the type of metric that you want to visualize by selecting one of these values from the Show menu.
• Total Visualforce Page Views
• Top 5 Visualforce Pages
• Total Record Count
• Top 5 Objects by Record Count
4. Specify the time period to cover by selecting one of these values from the Date Range menu.
• Last 30 Days
• Last 7 Days
• Last 2 Days
Note: If the volume of usage data is too large, you might get an error message. In that case, choose a smaller date range and
try again.
336
CHAPTER 15 Update Your Solution
In this chapter ... Your packaged solution is ready for an update. Learn how to fix small issues with patches and make
major changes with upgrades.
• About Package
Versions
• Create and Upload
Patches
• Working with Patch
Versions
• Publish Upgrades to
Managed Packages
• Push Package
Upgrades to
Subscribers
337
Update Your Solution About Package Versions
Second upload Managed - 1.0 A Managed - Released upload. Note that the version number does not
Released change.
Third upload Managed - 1.1 Note the change of the minor release number for this Managed - Released
Released upload. If you are uploading a new patch version, you can't change the patch
number.
Fourth upload Managed - Beta 2.0 The first Managed - Beta upload for version number 2.0. Note the major
version number update.
Fifth upload Managed - 2.0 A Managed - Released upload. Note that the version number does not
Released change.
When an existing subscriber installs a new package version, there is still only one instance of each component in the package, but the
components can emulate older versions. For example, a subscriber may be using a managed package that contains an Apex class. If the
publisher decides to deprecate a method in the Apex class and release a new package version, the subscriber still sees only one instance
of the Apex class after installing the new version. However, this Apex class can still emulate the previous version for any code that
references the deprecated method in the older version.
Package developers can use conditional logic in Apex classes and triggers to exhibit different behavior for different versions. This allows
the package developer to continue to support existing behavior in classes and triggers in previous package versions while continuing
to evolve the code.
When you are developing client applications using the API, you can specify the version of each package that you use in your integrations.
338
Update Your Solution Create and Upload Patches
Note: If you ever lose your login information, click Reset on the package detail page under Patch Development Organizations
to reset the login to your patch development org.
If the main development org from which you created the patch org has My Domain enabled, the patch org also has My Domain enabled.
The name of the patch development org’s custom subdomain is randomly generated.
After you receive an email that Salesforce has created your patch development org, you can click Login to begin developing your patch
version.
Development in a patch development org is restricted.
• You can’t add package components.
• You can’t delete existing package components.
• API and dynamic Apex access controls can’t change for the package.
• No deprecation of any Apex code.
• You can’t add new Apex class relationships, such as extends.
• You can’t add Apex access modifiers, such as virtual or global.
• You can’t add new web services.
• You can’t add feature dependencies.
When you finish developing your patch, upload it through the UI in your patch development org. You can also upload a package using
the Tooling API. For sample code and more details, see the PackageUploadRequest object in the Tooling API Developer Guide.
Note: When you upload a new package in your patch development org, the upload process is asynchronous. Because the time
to process the request varies, the package might not be available immediately after the upload. While waiting, you can run SOQL
queries on the PackageUploadRequest status field to monitor the request.
1. From Setup, enter Packages in the Quick Find box, then select Packages.
2. Click the name of the package.
3. On the Upload Package page, click Upload.
4. Enter a Version Name. As a best practice, it's useful to have a short description and the date.
5. Notice that the Version Number has had its patchNumber incremented.
6. For managed packages, select a Release Type:
• Choose Managed - Released to upload an upgradeable version. After upload, some attributes of Salesforce components are
locked.
339
Update Your Solution Working with Patch Versions
• Choose Managed - Beta if you want to upload a version of your package to a small sampling of your audience for testing purposes.
You can still change the components and upload other beta versions.
Note: Beta packages can only be installed in Developer Edition or sandbox organizations, and thus can't be pushed to
customer organizations.
340
Update Your Solution Versioning Apex Code
After version 2.0 is released, the developer creates a patch. The package version number in the patch development organization starts
at 2.0.1. As the main development organization moves towards a released version of 3.0, a second patch is created for 2.0.2. Finally, the
developer merges the changes between the main development organization, and the patch development organization, and releases
the package as version 3.0.
The best way to keep track of your package versions with Git source control. Learn about Git from this trail:
https://trailhead.salesforce.com/en/content/learn/modules/git-and-git-hub-basics.
Version control is integrated into Visual Studio Code. See Salesforce Extensions for Visual Studio Code and Version Control in Visual Studio
Code for details.
341
Update Your Solution Apex Deprecation Effects for Subscribers
The following sample shows different behavior in a trigger for different package versions:
trigger oppValidation on Opportunity (before insert, before update) {
To compare different versions of your Apex classes, click the Class Definition tab when viewing the class details.
For more information about the System.requestVersion method, see the Apex Developer Guide.
342
Update Your Solution Publish Upgrades to Managed Packages
343
Update Your Solution Delete Components from First-Generation Managed
Packages
Here are some key types of components you can delete when updating a previously released managed package.
• Custom buttons or links
• Custom console
• Custom fields
• Custom objects
• Custom settings
344
Update Your Solution Delete Components from First-Generation Managed
Packages
• Custom tabs
• Field sets
• Lightning components (Aura and Lightning web components)
• Permission sets
• Record types
• S-Controls
• Static resources
• Validation rules
• Visualforce components
• Visualforce pages
For a more complete list, see Available Components on page 24.
When you delete a component, you also permanently delete the data that exists in that component. Delete tracked history data is also
deleted, and integrations that rely on the component, such as assignment or escalation rules, are changed. After you delete a component
in a managed package, you can’t restore it or create another component with the same name.
Note: In a managed package, the API names of fields must be unique and cannot be reused even after you delete the component.
This restriction prevents conflicts during package installation and upgrade.
Data and metadata are never deleted in a subscriber org without specific action by the customer. When a subscriber upgrades to the
new package version, the deleted components are still available in the subscriber’s org. The components are displayed in the Unused
Components section of the Package Details page. This section ensures that subscribers have the opportunity to export data and modify
custom integrations involving those components before explicitly deleting them. For example, before deleting custom objects or fields,
customers can preserve a record of their data from Setup by entering Data Export in the Quick Find box and then selecting Data
Export.
Note: Educate your customers about the potential impact of deleted components. Consider listing all custom components you've
deleted, and specifying any actions needed, in the Release Notes for your upgraded package.
The following restrictions apply when deleting managed components.
• If a component of any type is referenced by any other metadata, such as workflow rules, validation rules, or Apex classes, it is not
deletable.
• A custom object is not deletable if it includes any of the following: Apex Sharing Reason, Apex Sharing Recalculation, Related Lookup
Filter, Compact Layout, or Action.
• Salesforce doesn’t recommend deleting a custom field that is referenced by a custom report type in the same package. Such a
deletion leads to an error when installing the upgraded package.
• When you delete a field that is used for bucketing or grouping in a custom report type that’s part of a managed package, you receive
an error message.
• When you remove a connected app that is a component of a package, the app remains available until you update the package with
a new version. But if you delete the connected app, it’s permanently deleted. Any version of the package that contains the deleted
connected app is invalidated and cannot be installed. You can update a version of the package that doesn’t contain the connected
app as a component. Never delete a connected app that Salesforce distributes, such as the Salesforce app.
You can delete managed components either declaratively from the user interface or programmatically using Metadata API. With Metadata
API, specify the components you want to delete in a destructiveChanges.xml manifest file and then use the standard
deploy() call. The process is identical to deleting components that aren’t managed. For more information, see the Metadata API
Developer Guide.
345
Update Your Solution Viewing Deleted Components
Warning: When a component is deleted, its Name remains within Salesforce, and you can’t create a new component that uses
the deleted component’s name. The Deleted Package Components page lists the names that can no longer be used.
You can retrieve these types of components.
• Apex classes and triggers that don't have global access.
• Visualforce components with public access. (If the ability to remove components has been enabled for your packaging org then
these Visualforce components can’t be undeleted. As a result, they don’t show up in the Recycle Bin or the Deleted Package
Components page after they have been deleted.)
• Protected components, including:
– Custom labels
– Custom links (for Home page only)
– Custom metadata types
– Custom permissions
– Custom settings
– Workflow alerts
– Workflow field updates
– Workflow outbound messages
– Workflow tasks
– Workflow flow triggers
The pilot program for flow trigger workflow actions is closed. If you've already enabled the pilot in your org, you can continue
to create and edit flow trigger workflow actions. If you didn't enable the pilot in your org, use Flow Builder to create a
record-triggered flow, or use Process Builder to launch a flow from a process.
• Data components, such as Documents, Dashboards, and Reports. These components are the only types that can also be undeleted
from the Recycle Bin.
You can retrieve components from the Recycle Bin and Deleted Package Components page any time before uploading a new version
of the package. To do this, click Undelete next to the component.
The Deleted Components displays the following information (in alphabetical order):
Attribute Description
Action If the Managed - Released package hasn't been uploaded with
the component deleted, this contains an Undelete link that allows
you to retrieve the component.
Available in Versions Displays the version number of the package in which a component
exists.
346
Update Your Solution Modifying Custom Fields after a Package is Released
Attribute Description
Parent Object Displays the name of the parent object a component is associated
with. For example, a custom object is the parent of a custom field.
Manage Versions
After you upload a package to the AppExchange, you can still manage it from Salesforce. To manage
EDITIONS
your versions:
1. From Setup, enter Packages in the Quick Find box, then select Packages. Available in: Salesforce
Classic (not available in all
2. Select the package that contains the app or components you uploaded.
orgs)
3. Select the version number listed in the Versions tab.
Available in: Group,
• Click Change Password link to change the password option. Professional, Enterprise,
• Click Deprecate to prevent new installations of this package while allowing existing Performance, Unlimited,
installations to continue operating. and Developer Editions
Note: You cannot deprecate the most recent version of a managed package.
USER PERMISSIONS
When you deprecate a package, remember to remove it from AppExchange as well. See
“Removing Apps from AppExchange” in the AppExchange online help. To upload packages:
• Upload AppExchange
• Click Undeprecate to make a deprecated version available for installation again. Packages
Note: To create a test drive or choose a License Management Organization (LMO) for what
you have uploaded, click Proceed to AppExchange from the package upload detail page.
347
Update Your Solution Push Upgrades
Use the Push Upgrade Exclusion List to exclude specific subscriber orgs from a push upgrade. You can specify up to 500 comma-separated
org IDs.
Push upgrades minimize the potential risks and support costs of having multiple subscribers running different versions of your app. You
can also automate many post-upgrade configuration steps, further simplifying the upgrade process for your customers.
Push Upgrades
Overview of Push Upgrade Steps
• Upgrade your managed package installed in a customer organization from version X to version Y
• Select one, many, or all customer organizations to upgrade and select a particular version to upgrade to
• Schedule the upgrade to start at a particular date and time
• View progress of upgrades, abort upgrades in progress, or view the result of a push upgrade
• In conjunction with push, you can use a post-install Apex script to automate post-upgrade configurations that your customers have
previously performed manually
Warning: When you push an upgrade, you’re making changes to a subscriber’s org without explicit consent. Therefore, it’s
important to plan ahead and exercise caution. You can also exclude specific subscriber orgs from a push upgrade by entering the
org IDs, separated by a comma, in the Push Upgrade Exclusion List.
Pushing a major upgrade entails a higher degree of risk as it can impact existing functionality in a subscriber’s organization. This is because
new components in the upgraded package might not be available to existing users of the package, or could overwrite users’ customizations.
As the app developer, it’s your responsibility to protect users from any adverse impact due to upgrading. We strongly recommend you
consider all potential consequences of the upgrade and take appropriate steps to prevent any problems.
When pushing a major upgrade, we recommend that you divide changes in your package into two categories:
1. Enhancements to existing features that users already have access to—Use a post install Apex script to automatically assign the
relevant components to existing users. This ensures all current users of the package can continue using it without explicit action by
administrators.
2. New features you’re introducing for the first time—Don’t use a post install Apex script to auto-assign components. This ensures
your subscribers have the opportunity to decide if and when to use the new features.
Here are some additional guidelines to keep in mind when planning a push upgrade.
• Avoid changes to validation rules, formula fields, and errors thrown from Apex triggers, as they may negatively impact subscribers’
integrations.
• Don’t make visible changes to a package in a patch. This is because other than a change in the package version number, subscribers
aren't notified of push upgrades.
• Test your upgraded package in multiple environments, replicating all relevant features of your customers’ organizations, including
editions, customizations, other installed packages, and permission sets.
• Schedule push upgrades at your customers’ off-peak hours and outside of Salesforce’s major release windows, to minimize potential
subscriber impact.
• Notify your subscribers in advance about the timing of the upgrade, its potential consequences, and any steps they need to take.
348
Update Your Solution Assign Access to New and Changed Features
349
Update Your Solution Sample Post Install Script for a Push Upgrade
Enhancements to existing features Include a post-install script in the package that assigns permissions
to the new components or new fields automatically.
This approach ensures that current users of the package can
continue using features without interruption.
Automate the assignment of new components to existing users of a package. For more information on writing a post-install Apex script,
see Running Apex on Package Install/Upgrade on page 111.
In this sample script, the package upgrade contains new Visualforce pages and a new permission set that grants access to those pages.
The script performs the following actions.
• Gets the Id of the Visualforce pages in the old version of the package
• Gets the permission sets that have access to those pages
• Gets the list of profiles associated with those permission sets
• Gets the list of users who have those profiles assigned
• Assigns the permission set in the new package to those users
global class PostInstallClass implements InstallHandler {
global void onInstall(InstallContext context) {
350
Update Your Solution Scheduling Push Upgrades
AND Id IN :PermissionSetList];
351
Update Your Solution Scheduling Push Upgrades
5. If your upgrade was a patch, after you’ve successfully distributed the upgrade to subscriber organizations, reintegrate those changes
into your main development organization. For more information about combining patches in the main development organization,
see Working with Patch Versions on page 340.
Schedule a Push Upgrade Using the UI
Note: Only first-generation managed packages can schedule a push upgrade using the UI. To schedule a push upgrade for
unlocked and second-generation managed packages, use the PackagePushRequest object in the SOAP API.
1. Log in to your main development org (not the patch org you used to upload the new version).
2. From Setup, enter Packages in the Quick Find box, then select Packages.
3. Click the name of the managed package whose upgrade you want to push.
4. On the package detail page, click the Versions tab, and then click Push Upgrades.
5. Click Schedule Push Upgrades.
6. Select a package version to push from the Patch Version dropdown list.
7. For the scheduled start date, enter when you want the push upgrade to begin.
8. In the Select Target Organizations section, select the orgs to receive your push upgrade. If an org already received a push upgrade
for the selected package version, it doesn’t appear in this list. You can select orgs by:
• Entering a term that filters based on an org’s name or ID. Names can match by partial string, but IDs must match exactly.
• Choosing between production and sandbox orgs from the Organizations dropdown list.
• Choosing orgs that have already installed a particular version.
• Clicking on individual orgs or the Select All and Deselect All checkboxes.
This section lists the following information about the org (in alphabetical order):
Field Description
Current Version The current package version an organization has installed.
Organization Name The name of the org. To view the upgrade history for the org,
click on the org name.
Primary Contact The name of the user who installed the package.
9. Click Schedule. While a push upgrade is in progress, you can click Abort to stop it.
Schedule a Push Upgrade Using the Enterprise API
1. Authenticate to your main development org (not the patch org you used to upload the new version) according to the tool you’re
using.
Note: For unlocked and second-generation managed packages, authenticate to your Dev Hub.
2. Determine the package version you want to upgrade subscribers to by querying the MetadataPackageVersion object.
3. Gather the list of subscriber orgs that are eligible to be upgraded by querying the PackageSubscriber object.
352
Update Your Solution Scheduling Push Upgrades
Note: If you are retrieving more than 2,000 subscribers, use the SOAP APIqueryMore() call.
4. Create a PackagePushRequest object. PackagePushRequest objects take a PackageVersionId and, optionally, a ScheduledStartTime
parameter to specify when the push begins. If you omit the ScheduledStartTime, the push begins when you set the
PackagePushRequest's status to Pending.
5. Create a PackagePushJob for each eligible subscriber and associate it with the PackagePushRequest you created in the previous
step.
6. Schedule the push upgrade by changing the status of the PackagePushRequest to Pending.
7. Check the status of the PackagePushRequest and PackagePushJob objects by querying the Status fields. If the status is either
Created or Pending, you can abort the push upgrade by changing the status of the PackagePushRequest to Canceled. You cannot
abort a push upgrade that has a status of Canceled, Succeeded, Failed, or In Progress.
Note: If you are pushing the upgrade to more than 2,000 subscribers, use the Bulk_API to process the job in batches.
For sample code and more details, see SOAP API Developer Guide.
353
APPENDICES
Introduction
The following tables compare object access, user permissions and features, and organization limits for these license types.
• Lightning Platform Administrator—A standard Salesforce license with complete customization capabilities. It prohibits Create, Read,
Update, and Delete on Leads, Opportunities, Products, Cases, Solutions, and Campaigns.
• Lightning Platform—A standard Salesforce Platform license with access to Accounts, Contacts, and custom objects. Used by
non-administrators.
Object Accessed
Object Accessed Lightning Platform Lightning Platform
Administrator
EE UE/PXE EE UE/PXE
Accounts CRUD CRUD CRUD CRUD
Assets
Campaigns
Cases
354
ISVforce User License Comparison
Entitlements
Knowledge R R
Leads
Opportunities
Quotes
Service Contracts
Solutions
User Features
User Features Lightning Platform Lightning Platform
Administrator
EE UE/PXE EE UE/PXE
Content
Flows
Jigsaw Exports $ $ $ $
Knowledge $ $ $ $
Mobile (Full) $ $
Offline
Siteforce Contributor $ $ $ $
Siteforce Publisher $ $ $ $
355
ISVforce User License Comparison
User Permissions
User Permissions Lightning Platform Lightning Platform
Administrator
EE UE/PXE EE UE/PXE
Customize Reports
Customize Dashboards
View Dashboards*
Identity
Identity Connect $ $ $ $
WDC $ $ $ $
* The running user of a dashboard must be a Lightning Platform or a Lightning Platform One App user to view the dashboard. Dashboards
using the Lightning Platform administrator as the running user are not viewable by other Lightning Platform license types.
** Restricted limit for Lightning Platform One App and Chatter Plus.
File Storage 2 GB 2 GB 2 GB 2 GB
API Calls (Per Day Per User) 1,000 5,000 1,000 5,000
356
ISVforce User License Comparison
For data storage, orgs of all editions are automatically allocated 10 GB. For each user added to an org, an extra 20 MB of storage is
allocated, though Unlimited Edition and Performance Edition orgs receive more storage capacity. For each user added to an Unlimited
Edition or Performance Edition org, an extra 120 MB of storage is allocated.
For file storage, Enterprise, Performance, and Unlimited Editions are allocated a per-user limit multiplied by the number of users in the
organization plus an additional per-organization allocation of 11 GB. For example, an Enterprise Edition organization with 600 users
receives 1,211 GB of file storage, or 2 GB per user multiplied by 600 users plus an additional 11 GB.
Note: For a complete list of storage limits for each edition, see:
https://help.salesforce.com/HTViewHelpDoc?id=limits_storage_allocation.htm
357
APPENDIX B OEM User License Comparison
Compare object access, user permissions and features, and org limits for the license types available to partners.
358
OEM User License Comparison
Objects
Object Accessed OEM ISV Portal ISV Portal Customer Customer Partner
Embedded with Community Community Community
Sharing Plus
Accounts CRUD CRU R CRU CRUD
Documents CRUD R R R R R
Ideas CR CR CR CR CR CR
* With the Orders Platform permission set license (PSL), available to OEM partners only, administrators can give users with Lightning
Platform user licenses access to Contracts, Products, Price Books, and Orders. Orders functionality is automatically available to all licenses
except the Lightning Platform licenses, which explicitly require the new PSL to grant access.
User Features
User Feature OEM ISV Portal ISV Portal Customer Customer Partner
Embedded with Community Community Community
Sharing Plus
Knowledge $ R R R R
Identity
Flows
359
OEM User License Comparison
User Permissions
User Permission OEM ISV Portal ISV Portal Customer Customer Partner
Embedded with Community Community Community
Sharing Plus
Create and Customize Reports Create and Create and
Manage Manage
View Reports
View Dashboards*
Identity
* The running user of a dashboard must be a Lightning Platform user to view the dashboard. Dashboards using the Lightning Platform
administrator as the running user are not viewable by other Lightning Platform license types.
** The limit of 400 custom objects applies to the primary app offering. Subscribers cannot create their own custom objects.
Storage Limits
Additional Organization Limits OEM ISV Portal ISV Portal Customer Customer Partner
(Added Per User) Embedded with Community Community Community
Sharing Plus
Data Storage 20 MB 0 2 MB 0 2 MB per 5 MB
member
(member-based
license)
1 MB per
member
(login-based
license)
360
OEM User License Comparison
Additional Organization Limits OEM ISV Portal ISV Portal Customer Customer Partner
(Added Per User) Embedded with Community Community Community
Sharing Plus
File Storage 2 GB 0 0 0 0 0
For data storage, each OEM Embedded organization is allocated a minimum of 10 GB. For example, an OEM Embedded organization
with 20 users at 20 MB per user receives 400 MB plus 10 GB, or 10.4 GB total data storage. An OEM Embedded organization with 100
users receives 12 GB because 100 users multiplied by 20 MB per user is 2 GB.
For file storage, each OEM Embedded organization is allocated a per-user limit multiplied by the number of users in the organization
plus a per organization allocation of 11 GB. For example, an OEM Embedded organization with 600 users receives 1,211 GB of file storage,
or 2 GB per user multiplied by 600 users plus 11 GB.
Salesforce Edition Data Storage Minimum per File Storage Minimum per Storage Allocation Per User
Organization Organization License
OEM Embedded 1 GB, plus 5 MB for each Gold 11 GB 20 MB of data storage and 2 GB
Partner license of file storage
API Limits
The following table lists the limits for the total API requests (calls) for an OEM Embedded org.
Salesforce Edition API Calls Per License Type Total Calls Per 24-Hour Period
OEM Embedded • Salesforce: 1,000 100,000 + (number of licenses x calls per license type)
Limits are enforced against the aggregate of all API calls made to the org in a 24 hour period. Limits are not on a per-user basis. When
an org exceeds a limit, all users in the org can be temporarily blocked from making additional calls. Calls are blocked until usage for the
preceding 24 hours drops below the limit.
361
GLOSSARY
The following terms and definitions describe key application and packaging concepts and capabilities:
EDITIONS
App
Short for "application." A collection of components such as tabs, reports, dashboards, and Available in: Salesforce
Visualforce pages that address a specific business need. Salesforce provides standard apps such Classic (not available in all
as Sales and Service. You can customize the standard apps to match the way you work. In orgs)
addition, you can package an app and upload it to the AppExchange along with related
Available in: Group,
components such as custom fields, custom tabs, and custom objects. Then, you can make the Professional, Enterprise,
app available to other Salesforce users from the AppExchange. Performance, Unlimited,
AppExchange and Developer Editions
The AppExchange is a sharing interface from Salesforce that allows you to browse and share
apps and services for the Lightning Platform.
Beta, Managed Package
In the context of managed packages, a beta managed package is an early version of a managed package distributed to a sampling
of your intended audience to test it.
Deploy
To move functionality from an inactive state to active. For example, when developing new features in the Salesforce user interface,
you must select the “Deployed” option to make the functionality visible to other users.
The process by which an application or other functionality is moved from development to production.
To move metadata components from a local file system to a Salesforce organization.
For installed apps, deployment makes any custom objects in the app available to users in your organization. Before a custom object
is deployed, it is only available to administrators and any users with the “Customize Application” permission.
License Management Application (LMA)
A free AppExchange app that allows you to track sales leads and accounts for every user who downloads your managed package
(app) from the AppExchange.
License Management Organization (LMO)
The Salesforce organization that you use to track all the Salesforce users who install your package. A license management organization
must have the License Management Application (LMA) installed. It automatically receives notification every time your package is
installed or uninstalled so that you can easily notify users of upgrades. You can specify any Enterprise, Unlimited, Performance, or
Developer Edition organization as your license management organization. For more information, go to
http://www.salesforce.com/docs/en/lma/index.htm.
Major Release
A significant release of a package. During these releases, the major and minor numbers of a package version increase to any chosen
value.
Managed Package
A collection of application components that is posted as a unit on the AppExchange and associated with a namespace and possibly
a License Management Organization. To support upgrades, a package must be managed. An organization can create a single
managed package that can be downloaded and installed by many different organizations. Managed packages differ from unmanaged
packages by having some locked components, allowing the managed package to be upgraded later. Unmanaged packages do not
include locked components and cannot be upgraded. In addition, managed packages obfuscate certain components (like Apex) on
subscribing organizations to protect the intellectual property of the developer.
362
Glossary
363
Glossary
Publisher
The publisher of an AppExchange listing is the Salesforce user or organization that published the listing.
Push Upgrade
A method of delivering updates that sends upgrades of an installed managed package to all organizations that have installed the
package.
Subscriber
The subscriber of a package is a Salesforce user with an installed package in their Salesforce organization.
Test Drive
A test drive is a fully functional Salesforce organization that contains an app and any sample records added by the publisher for a
particular package. It allows users on AppExchange to experience an app as a read-only user using a familiar Salesforce interface.
Unmanaged Package
A package that cannot be upgraded or controlled by its developer.
Upgrading
Upgrading a package is the process of installing a newer version. Salesforce supports upgrades for managed packages that are not
beta.
Uploading
Uploading a package in Salesforce provides an installation URL so other users can install it. Uploading also makes your packaged
available to be published on AppExchange.
364
INDEX
A F
analytics 196, 217–218, 235–237, 244–245 Feature Management App
Apex considerations 310
behavior in packages 341 installation 305
deprecation effects 342 known issues 310
API token setup 305
requesting 162 Feature parameters
app best practices 309
installation options 137 considerations 310
patch (version) updates 161 de-protecting custom objects 309
search optimization 161 de-protecting custom permissions 309
AppExchange fields 304
deleting components 346 known issues 310
AppExchange Checkout 164 limits 309
Apps LMO-to-subscriber 307–308
uploading 23, 101 objects 304
Attributes 20 protecting custom permissions 309
subscriber-to-LMO 308
B types 304
Beta packages feedback 163
uninstalling 109 FMA 303–305, 307–310
uploading 99 free trial
create 163
C vs test drive 163
Channel Order App 247
Checkout 164 G
company name 160 Group edition
Components 20 access control 73
Creating packages 23, 101 limits 73
Creating patches 339 packages 75
using Apex 73
D
data file 331 I
Dependencies 58 ideas 163
Deployment 109 industries 160
dev hub 91 Installing packages 106
Developer Tools 91 introduction 330
Developing
partner WSDL 69 L
Dynamic Apex licenses
supporting multiple editions 76 choose settings 138
listing
E add categories 152
Editions 3 analytics 158
Extending packages 75 delisted by Salesforce 163
365
Index
366
Index
367