Newer Version Available

This content describes an older version of this product. View Latest

Portal

The Portal metadata type represents a partner portal.

It extends Metadata and inherits its fullName field. To use this metadata type, you must have a partner portal or Customer Portal enabled for your organization. For more information, see Partner Portal Overview in Salesforce Help.

Declarative Metadata File Suffix and Directory Location

Lightning Platform Portal components are stored in the portals directory of the corresponding package directory. The file name matches the portal name, and the extension is .portal.

Version

Lightning Platform Portal components are available in API version 15.0 and later.

Special Access Rules

All users, including unauthenticated guest users, can view portals via the API.

Fields

Field Field Type Description
active boolean Required. Denotes whether this portal is active.
admin string The full name of the user designated to administer the portal.
defaultLanguage string The default language for HTML messages for the portal. Use the abbreviation for the language, for example, en_US for United States English.
description string The portal description.
emailSenderAddress string Required. The email address used when sending emails using templates configured from the portal (for example, for resetting the password).
emailSenderName string Required. The name to display when sending emails using templates configured from the portal (for example, for resetting the password).
enableSelfCloseCase boolean For the Customer Portal, allows portal users to close their own cases.
footerDocument string The file to be used as the footer for this portal.
forgotPassTemplate string The email template to use when a user clicks the Forgot Password link.

Lightning email templates aren’t packageable. We recommend using a Classic email template.

fullName string Required. The name of the portal.

Inherited from Metadata, this field is defined in the WSDL for this metadata type. It must be specified when creating, updating, or deleting. See createMetadata() to see an example of this field specified for a call.

headerDocument string The file to be used as the header for this portal.
isSelfRegistrationActivated boolean Determines whether self-registration is active or not for this portal.
loginHeaderDocument string The file to be used as the header for this portal's login page.
logoDocument string The file to be used as the logo for this portal.
logoutUrl string The URL that the user is redirected to on logout.
newCommentTemplate string The email template to be used for auto-notifications on new case comments.
newPassTemplate string The email template to be used for auto-notifications on password reset.

Lightning email templates aren’t packageable. We recommend using a Classic email template.

newUserTemplate string The email template to be used for auto-notifications on new user creation.

Lightning email templates aren’t packageable. We recommend using a Classic email template.

ownerNotifyTemplate string The email template to be used for auto-notifications on owner change.

Lightning email templates aren’t packageable. We recommend using a Classic email template.

selfRegNewUserUrl string The URL of the self-registration page.
selfRegUserDefaultProfile string The default profile for self-registered users.
selfRegUserDefaultRole PortalRoles (enumeration of type string) The default role for self-registered users. The valid values are:
  • Executive
  • Manager
  • User
  • PersonAccount
selfRegUserTemplate string The email template to be used for auto-notifications on self-registration.

Lightning email templates aren’t packageable. We recommend using a Classic email template.

showActionConfirmation boolean Determines whether confirmation messages are displayed for actions in the portal.
stylesheetDocument string The Document object to be used as the CSS style sheet for this portal.
type PortalType (enumeration of type string) Required. The type for this portal. The valid values are:
  • CustomerSuccess
  • Partner

Declarative Metadata Sample Definition

Here’s a sample XML definition of a portal.

1<?xml version="1.0" encoding="UTF-8"?>
2<Portal xmlns="http://soap.sforce.com/2006/04/metadata">
3    <active>true</active>
4    <description>Customer Portal</description>
5    <emailSenderName>rguest@albany.com</emailSenderName>
6    <enableSelfCloseCase>false</enableSelfCloseCase>
7    <forgotPassTemplate>unfiled$public/ChangePwdEmail</forgotPassTemplate>
8    <isSelfRegistrationActivated>false</isSelfRegistrationActivated>
9    <newPassTemplate>unfiled$public/ChangePwdEmail</newPassTemplate>
10    <newUserTemplate>unfiled$public/NewUserEmail</newUserTemplate>
11    <selfRegUserTemplate>unfiled$public/SelfRegUserEmail</selfRegUserTemplate>
12    <showActionConfirmation>false</showActionConfirmation>
13    <type>CustomerSuccess</type>
14</Portal>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.