Skip to main content

Native Salesforce listing component

A Lightning Web Component from the PartnerPage for Salesforce package that lets partners edit their listing in a native Experience Cloud page.

M
Written by Mario Tarabbia

For portals that should look and behave like the rest of your Experience Cloud site, the PartnerPage for Salesforce package includes partnerPageListing, a Lightning Web Component where a partner edits their listing in a native page: title, headline, description, website, logos (light and dark variants when your directory has them) and the filters they are allowed to set. Fields you manage for your partners show as locked with "Managed by your partner program". Filters with up to 12 options are checkboxes (or radio buttons when single-select); longer ones such as Locations or Languages render as an Available / Chosen dual listbox (multi-select) or a dropdown (single-select), so nothing is hidden and nothing is a wall of checkboxes.

It uses the same identity pass-through as the embedded editor: Apex mints an embed session for the signed-in portal user, exchanges it for an access token tied to that partner's listing, and reads and writes through the PartnerPage entry-owner API. So the approval flow, managed fields and partner permissions apply exactly as in the Partner Dashboard, and PartnerPage records the change under the partner's own user. The organization API key stays in Salesforce, in an External Credential; it is never sent to the browser.

What it covers

Section

Native component

Embedded editor

Title, headline, description, website

yes

yes

Logos (light / dark, landscape / square)

yes

yes

Filters

yes

yes

Locations, testimonials, case studies, media, awards, resources, certifications, questionnaire

no

yes

Approval flow and managed fields

yes

yes

Put both on the portal when you want the native look for the essentials and the full editor for the rest.

Set it up

  1. Install and configure the package (README): API key on the External Credential principal, directory id in the custom metadata record, PartnerPage_Partner_User permission set on the portal profiles.

  2. In Experience Builder, drag PartnerPage Listing onto a page partners can reach when signed in.

  3. Allocate 1 MB of Platform Cache (org cache) to the PartnerPage partition. The package deploys the partition empty; with the allocation the partner's access token is reused for 90 minutes, without it every page load and every save mints and exchanges a new session (two extra PartnerPage calls each).

  4. Give portal profiles read-only access to the Account field named in External_Id_Field__c when it is not the Account Id: the component refuses to run when the signed-in user could edit the field that identifies their listing.

How the partner is matched

The component reads the portal user's Account and takes the External ID from the field named in External_Id_Field__c (Account Id by default). The listing with that External ID in your directory is the one they see. If none matches, the component says so and asks them to contact you.

Errors partners can see

Message

Cause

No listing matches your account

The Account's External ID matches no listing. Create it with the Flow sync or in the Vendor Dashboard.

More than one listing matches

Two listings share the External ID. Fix it in the Vendor Dashboard.

Your email belongs to another organization

The user's email is already a PartnerPage user in another organization.

Your user cannot manage listings (user_not_allowed)

The PartnerPage user with this email is removed, a staff user or an API user. Use another email or ask PartnerPage.

Your email does not belong to the organization that owns this listing (user_not_in_organization)

The listing is owned, the email is unknown there and its domain does not match the partner organization. Have the organization invite the user, or use an email on its domain.

This field is managed by your partner program

The partner tried to change a locked field.

PartnerPage is not configured

The custom metadata record has no directory id (or an invalid dashboard origin).

The External ID field is editable by portal users

The field named in External_Id_Field__c is updateable by the portal profile; make it read-only or use the Account Id.

Named Credential error, or "You do not have permission" (HTTP 403)

The credential principal has no ApiKey parameter, the key is wrong or belongs to another organization, or the user lacks access to the principal.

The component shows PartnerPage's error messages word for word; the error code is in the Apex debug log under "PartnerPage API error".

Did this answer your question?