Skip to main content

Package and Distribute External Client Apps

Learning Objectives

After completing this unit, you’ll be able to:

  • Determine when a 2GP managed package would be the best option.
  • Understand the difference between association and disassociation.

Wrap Your External Client App in a 2GP Managed Package

There are several reasons to use External Client Apps instead of Connected Apps. But perhaps the greatest advantage of using External Client Apps is the ability to distribute them with second-generation managed packages. If you want to use a version-control system to keep track of the metadata in your package, 2GP managed packages is the only way to go. In contrast to first-generation managed packages, it lets you automate packaging, associate several packages with the same namespace, and be much more flexible with versioning.

All 2GP managed packages are created using Salesforce DX developer tools along with Metadata API. So after you get your external client app configured for publication, set up the tools and orgs for a development environment.

Associate and Disassociate External Client Apps

One final feature that’s available with external client apps is association. When using OAuth, every external client app must have access to OAuth consumer credentials. A subscriber org can share OAuth consumer credentials with the original external client app or the external client app can generate new credentials when it’s downloaded.

The sensitive and confidential configurations like OAuth consumer credentials are considered global settings. These global external client apps settings are shared by all associated deployments of the external client app. These settings must not be packaged but stored on a non-ephemeral org that exists throughout the life of all packages.

A distributed external client app that uses the global settings of the developer org is associated with the developer org external client app. That association can be broken if the distributed external client app has OAuth consumer credentials configured for it locally.

Respond to Demand

As these things often go, Robert and Chinua designed a simple application that made a big splash. With the simple goal of making life easier for the sales team, they revolutionized the way swag was distributed to partners and customers. As we discussed earlier, they created their Swagatron application, realized the ability to greatly enhance the app’s effectiveness by connecting it to Salesforce data, and configured an external client app that would connect the two. Their sales teams were impressed with how quickly and seamlessly they could access the historical swag records for their clients.

Alan Johnson is the sales manager for Get Cloudy Consulting. One day while putting in an order for some Cloudy plushies after a sales pitch, he noticed the customers marveling at the swag-based analytics on the Swagatron dashboard.

He had discovered that there was a demand for Swagatron among the very customers his team was giving plushies to. It was a true lightbulb moment. He saw storage rooms full of swag and imagined sales teams at these other companies empowered with the knowledge of what gifts would make the most impact.

At the next team meeting, he brought up the prospect of packaging and selling Swagatron and the external client app that could connect it to Salesforce data. After showing a few data points about projected sales, the team was sold. Robert got to work setting up the external client in a 2GP managed package.

Since Robert created the external client app with an OAuth plugin enabled, he stored the global OAuth setting file in a non-ephemeral dev hub org and packaged all the other files in a 2GP managed package.

The package was distributed through the AppExchange and word spread fast.

External Client Apps to the Future

As the next generation of connected apps, external client apps build on the functionality of their predecessor with source-driven development, defined user roles, and improved options for packaging and distribution.

Resources

Comparta sus comentarios de Trailhead en la Ayuda de Salesforce.

Nos encantaría saber más sobre su experiencia con Trailhead. Ahora puede acceder al nuevo formulario de comentarios en cualquier momento en el sitio de Ayuda de Salesforce.

Más información Continuar a Compartir comentarios