Metadata Types. salesforce Metadata API
Διαφήμιση
Διαφήμιση
CHAPTER 10 Metadata Types
Metadata API enables you to access some entities and feature settings that you can customize in the user interface. The following table lists the metadata types that you can retrieve or deploy and whether you can retrieve the metadata type with the wildcard character (*) in package.xml
. For more information about using wildcards, see Working with the Zip File
.
Note:
•
Metadata type names are case-sensitive. Specifying a type name with an invalid case results in a deployment error.
•
Metadata types don’t always correspond directly to their related data types. In some cases, the information is accessible but not organized as expected. For example, dependent picklists are exposed as a type of picklist, not a separate metadata type.
•
The wildcard character doesn’t apply to metadata types for feature settings, like AccountSettings. The wildcard applies only
when retrieving all settings and not an individual setting. See Settings .
Metadata Type
Allows Wildcard
(*)?
Not Applicable
Description
Yes
No
Not Applicable
Not Applicable
No
Represents an organization’s account settings for account teams, account owner report, and the View Hierarchy link.
Represents the action link group template. Action link templates let you reuse action link definitions and package and distribute action links. An action link is a button on a feed element. Clicking on an action link can take a user to another Web page, initiate a file download, or invoke an API call to an external server or Salesforce. Use action links to integrate Salesforce and third-party services into the feed. Every action link belongs to an action link group and action links within the group are mutually exclusive.
Represents an action override on a standard or custom object. Use it to create, update, edit, or delete action overrides.
Represents an organization’s activity settings, and its user interface settings for the calendar.
Represents the configuration of country and state picklists.
Represents a reporting snapshot. A reporting snapshot lets you report on historical data. Authorized users can save tabular or summary report results to fields on a custom object, then map those fields to corresponding fields on a target object. They can then schedule when to run the report to load the custom object's fields with the report's data. Reporting snapshots enable you to work with report data similarly to how you work with other records in
Salesforce.
106
Metadata Types
Metadata Type
Allows Wildcard
(*)?
Yes
Description
Yes
Yes
Yes
Yes
Yes
(See description.)
Represents an Apex class. An Apex class is a template or blueprint from which
Apex objects are created. Classes consist of other classes, user-defined methods, variables, exception types, and static initialization code.
Represents a Visualforce component.
Represents a Visualforce page.
Represents an Apex trigger. A trigger is Apex code that executes before or after specific data manipulation language (DML) events occur, such as before object records are inserted into the database, or after records have been deleted.
Represents the Force.com app menu or the Salesforce1 navigation menu.
Represents the metadata associated with an approval process. An approval process automates how records are approved in Salesforce. An approval process specifies each step of approval, including who to request approval from and what to do at each point of the process.
Use the wildcard (*) symbol to retrieve all approval processes for all objects.
You can’t use it to retrieve a subset of approval processes; syntax such as
Lead.*
is not supported.
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Not Applicable
Represents the metadata associated with an article type.
Represents assignment rules that allow you to automatically route cases to the appropriate users or queues.
Represents an authentication provider (or auth provider) in your organization.
An auth provider enables users to log in to your Salesforce organization using their login credentials from an external service provider such as Facebook
© or Janrain
©
.
Represents a Lightning definition bundle. A bundle contains a Lightning definition and all its related resources. The definition can be a component, application, event, interface, or a tokens collection.
Represents an auto-response rule that sets conditions for sending automatic email responses to lead or case submissions based on the attributes of the submitted record.
Represents the base container for criteria-based and owner-based sharing rules.
Represents the definition of a set of branding properties for a community, as defined in the Branding Panel in Community Builder.
Represents the metadata used to manage settings for business hours and holidays in entitlements, entitlement templates, campaigns, and cases.
107
Metadata Types
Metadata Type
Allows Wildcard
(*)?
(See description.)
Description
The BusinessProcess metadata type enables you to display different picklist values for users based on their profile.
Supports wildcard (*) only if a
is specified.
Yes
Not Applicable
No
Yes
Not Applicable
Not Applicable
Yes
Not Applicable
Yes
Yes
Yes
Yes
Yes
Yes
Not Applicable
Yes
Yes
Represents the Call Center definition used to integrate Salesforce with a third-party computer-telephony integration (CTI) system.
Represents an organization’s case settings, such as the default case owner, which case-related features are enabled, and which email templates are used for various case activities.
Represents the Social Business Rules custom format for the Case Subject field on cases created from inbound social posts.
Represents a certificate used for digital signatures which verify that requests are coming from your org. Certificates are used for either authenticated single sign-on with an external website, or when using your org as an identity provider.
Represents the metadata used to manage settings for Chatter Answers.
Represents the metadata used to describe a Rich Publisher App that’s integrated with the Chatter publisher.
Represents a data service that adds and updates data in standard objects.
Represents global settings that affect multiple features in your organization.
Represents a zone that contains Ideas or Chatter Answers objects. Zones are shared by the Ideas, Answers, and Chatter Answers features, allowing you to view and create zones from those locations.
Represents the definition of a community template.
Represents the definition of a community theme.
Represents the metadata associated with a compact layout.
Represents a connected app configuration. A connected app integrates an application with Salesforce using APIs. Connected apps use standard SAML and OAuth protocols to authenticate, provide single sign-on, and provide tokens for use with Salesforce APIs. In addition to standard OAuth capabilities, connected apps allow Salesforce admins to set various security policies and have explicit control over who can use the corresponding apps.
Represents the metadata for creating an asset file.
Represents contract settings.
Represents an origin in the CORS whitelist.
Represents a criteria-based sharing rule. CriteriaBasedSharingRule enables you to share records based on specific criteria. It contains metadata for the
108
Metadata Types
Metadata Type
Allows Wildcard
(*)?
Description
Yes
Yes
Yes
No
No
Yes following criteria-based sharing rules: Accounts, Campaigns, Cases, Contacts,
Custom Objects, Leads, and Opportunities.
CustomApplication represents a custom or standard application. In API version
29.0 and earlier, CustomApplication represents only a custom application. An application is a list of tab references, with a description and a logo.
Represents a custom console component (Visualforce page) assigned to a
that is marked as a Salesforce console. Custom console components extend the capabilities of Salesforce console apps.
Represents a custom feed filter that limits the feed view to feeds from the
Cases object. The custom feed filter shows only feed items that satisfy the criteria specified in the CustomFeedFilter definition.
Represents the metadata associated with a field. Use this metadata type to create, update, or delete custom field definitions on standard, custom, and external objects or standard field definitions on standard objects.
Represents a custom label that can be localized and used in different languages, countries, and currencies. Use this type instead of CustomLabels if you want to retrieve custom labels by name.
Represents the metadata associated with a custom metadata type.
Yes
Yes
(See description.)
Represents a record of a custom metadata type.
This metadata type allows you to create custom labels that can be localized for use in different languages, countries, and currencies.
Represents a custom object that stores data unique to your organization or an external object that maps to data stored outside Salesforce.
You can also use this metadata type to work with customizations of standard objects, such as Accounts. It contains the following types: Action Overrides,
Business Processes, Custom Fields, Field Sets, List Views, Named Filters (Lookup
Filters), Picklists (including Dependent Picklists), Record Types, Search Layouts,
Sharing Reasons, Sharing Recalculations, Validation Rules, Weblinks, and Field
Types.
Supports wildcard (*) for Field Sets and Record Types, but not for other components.
Yes
Yes
Yes
Yes
This metadata type allows you to translate custom objects for a variety of languages.
Represents a custom link defined in a home page component.
Represents a permission that grants access to a custom feature.
Represents a Force.com site. Force.com Sites enables you to create public websites and applications that are directly integrated with your Salesforce
109
Metadata Types
Metadata Type
Allows Wildcard
(*)?
Description
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
Not Applicable
Yes
Yes
Yes
Yes
Yes
Yes organization—without requiring users to log in with a username and password.
Represents a custom tab. Custom tabs let you display custom object data or other web content in Salesforce. When you add a custom tab to an app in
Salesforce Classic, it displays as a tab. When you add a custom tab to an app in Lightning Experience, it displays as an item in the app’s navigation bar.
When a tab displays a custom object, the tab name is the same as the custom object name; for page, s-control, or URL tabs, the name is arbitrary.
Represents a dashboard. Dashboards are visual representations of data that allow you to see key metrics and performance at a glance.
Represents a data category group.
Represents a group of users who have the same administrative privileges.
These groups are different from public groups used for sharing.
Represents a Document. All documents must be in a document folder, for example sampleFolder/TestDocument
.
Represents a rule that specifies how duplicate records in an object are detected.
Represents a Wave custom map chart. Custom maps are user-defined maps that are uploaded to Wave and are used just as standard maps are. Custom maps are accessed in Wave from the list of maps available with the map chart type.
Represents an email template.
Represents the settings for an entitlement process.
Represents an organization’s entitlement settings.
Represents an entitlement template. Entitlement templates are predefined terms of customer support that you can quickly add to products. For example, you can create entitlement templates for Web or phone support so that users can easily add entitlements to products offered to customers.
Represents how an event instance maps to a target payload.
Represents a subscription to an event type.
Represents the External Service configuration for an org.
Represents the metadata associated with an external data source. Create external data sources to manage connection details for integration with data and content that are stored outside your Salesforce org.
Represents a field set. A field set is a grouping of fields. For example, you could have a field set that contains fields describing a user's first name, middle name, last name, and business title.
110
Metadata Types
Metadata Type
FileUploadAndDownloadSecuritySettings
Allows Wildcard
(*)?
Not Applicable
Yes
Yes
Yes
No
No
Not Applicable
Yes
Yes
No
Yes
Yes
Yes
Not Applicable
No
Description
Represents the security settings for uploading and downloading files.
Represents the metadata associated with a Lightning page. A Lightning page represents a customizable screen made up of regions containing Lightning components.
Represents the metadata associated with a flow. With Flow, you can create an application that navigates users through a series of screens to query and update records in the database. You can also execute logic and provide branching capability based on user input to build dynamic applications.
Represents the flow definition’s description and active flow version number.
Represents a folder. A folder can contain documents, email templates, reports, or dashboards. You must specify the folder type (Document, EmailTemplate,
Report, or Dashboard) to retrieve or deploy.
Represents the settings for enhanced analytics folder sharing. Users can control access to reports or dashboards by giving others Viewer, Editor or Manager access to the folder that contains the report or dashboard.
Represents the Collaborative Forecasts settings options.
Represents the metadata for a global picklist value set, which is the set of shared values that custom picklist fields can use. A global value set isn't a field itself. (In contrast, the custom picklist fields that are based on a global picklist are of type ValueSet.)
Contains details for a global value set translation. Global value sets are lists of values that can be shared by multiple custom picklist fields, optionally across objects.
Represents the definition of a value used in a global picklist. Custom picklist fields can inherit the picklist value set from a global picklist. This type extends
the Metadata metadata type and inherits its
fullName
field.
Represents a set of public groups, which can have users, roles, and other groups.
Represents the metadata associated with a home page component. You can customize the Home tab in Salesforce Classic to include components such as sidebar links, a company logo, a dashboard snapshot, or custom components that you create.
Represents the metadata associated with a home page layout. You can customize home page layouts and assign the layouts to users based on their user profile.
Represents the metadata used to manage settings for Ideas.
Represents the index defined within a custom Big Object . Use this metadata type to define the composite primary key (index) for a custom Big Object.
111
Metadata Types
Metadata Type
Allows Wildcard
(*)?
Yes
Description
Yes
Not Applicable
Yes
No
No
Not Applicable
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Not Applicable
Represents a package to be installed or uninstalled. Deploying a newer version of a currently installed package upgrades the package.
Represents a list of keywords used in community moderation. This keyword list is a type of moderation criteria that defines offensive language or inappropriate content that you don’t want in your community.
Represents the metadata used to manage settings for Salesforce Knowledge.
Represents the metadata associated with a page layout.
Represents formatting options for the letterhead in an email template. A letterhead defines the logo, page color, and text settings for your HTML email templates. Use letterheads to ensure a consistent look and feel in your company’s emails.
ListView allows you to see a filtered list of records, such as contacts, accounts, or custom objects.
Represents an organization’s Live Agent settings, such as whether or not Live
Agent is enabled.
Represents the configuration of an organization’s Live Agent deployment, such as how many chats can be assigned to an agent and whether or not chat sounds are enabled.
Represents a Live Agent deployment’s settings for the button that customers click to chat with an agent and the chat window, such as the label that appears on the button and the pre-chat form that appears before a live chat begins.
Represents the configuration settings for a specific Live Agent deployment, such as the branding image for the deployment and whether or not chat transcripts are automatically saved.
Represents a rule for masking or deleting data of a specified pattern. Written as a regular expression (regex). This object is available in API version 35.0 and later.
Represents navigational and featured topics managed in a community.
Represents a matching rule that is used to identify duplicate records.
This is the base class for all metadata types. You cannot edit this object. A component is an instance of a metadata type.
This is the base type for all metadata types that contain content, such as documents or email templates.
Represents the name and description of a milestone, which you can use in an entitlement process to track important steps in cases.
Represents an organization’s mobile settings.
112
Metadata Types
Metadata Type
OrgPreferenceSettings
Allows Wildcard
(*)?
Yes
Description
Yes
Represents a rule used in your community to moderate member-generated content.Each rule specifies the member-generated content the rule applies to, the criteria to enforce the rule on, and the moderation action to take.
Moderation rules help protect your community from spammers, bots, and offensive or inappropriate content.
Represents a named credential, which specifies the URL of a callout endpoint and its required authentication parameters in one definition. A named credential can be specified as an endpoint to simplify the setup of authenticated callouts.
No
Not Applicable
Yes
Yes
Not Applicable
Not Applicable
No applicable
Yes
No
Yes
Not Applicable
This component has been removed as of API version 30.0 and is only provided for backward compatibility. The metadata associated with a lookup filter is now represented by the lookupFilter
field in the CustomField component.
Represents the metadata associated with a lookup filter. Use this metadata type to create, update, or delete lookup filter definitions.
Enables or disables middle name and suffix attributes for the following person objects: Contact, Lead, Person Account, and User.
Represents a community. Communities are branded spaces for your employees, customers, and partners to connect. You can customize and create communities to meet your business needs, then transition seamlessly between them. Use the Network component for Salesforce Communities. If you want to create zones that contain Chatter Answers and Ideas, use the Community
(Zone) component.
Represents the branding and color scheme applied to a community.
Represents organization preferences for features such as automatic opportunity updates and similar-opportunity filters.
Represents order settings.
Represents the unique org preference settings in a Salesforce org.
Represents an ownership-based sharing rule. OwnerSharingRule enables you to share records owned by a set of users with another set, using rules that specify the access level of the target user group. It contains metadata for the following specific owner-sharing rules: Accounts, Campaigns, Cases, Contacts,
Custom Objects, Leads, Account Territory and Opportunities.
Specifies which metadata components to retrieve as part of a retrieve()
call or defines a package of components.
Represents Path records.
Represents the Path preference setting.
113
Metadata Types
Metadata Type
Allows Wildcard
(*)?
Yes
Description
No
No
Yes
Yes
Yes
Not Applicable
Yes
No
Yes
Yes
Yes
Yes
Not Applicable
No
Represents a set of permissions that's used to grant additional access to one or more users without changing their profile or reassigning profiles. You can use permission sets to grant access, but not to deny access.
Represents an organization’s Adoption Manager setting, which enables or disables the Adoption Manager tool.
Deprecated. Represents a picklist (or dependent picklist) definition for a custom field in a custom object or a custom or standard field in a standard object, such as an account.
Represents a partition in the Platform Cache.
The Portal metadata type represents a partner portal or Customer Portal.
Represents the metadata associated with an approval post template for
Approvals in Chatter. With approval post templates, you can customize the information included in approval request posts that appear in Chatter feeds.
Represents organization preferences for quantity schedules, revenue schedules, and active flag interaction with prices.
Represents a user profile. A profile defines a user’s permission to perform different functions within Salesforce.
Represents an override of an ActionOverride by a user profile. You can use it to override an ActionOverride on a standard Home tab or object record page in Lightning Experience. When a user logs in with a profile, a matching
ProfileActionOverride assignment takes precedence over existing overrides for the Home tab or record page specified in ActionOverride.
Represents a profile’s password policies. Profile password policies override org-wide password policies for that profile’s users. Use ProfilePasswordPolicy to retrieve password policies for a given profile.
Represents a profile’s session settings. Use ProfileSessionSetting to retrieve the session settings for a given profile.
Represents a holding area for items before they are processed.
Represents a specified create or update quick action for an object that then becomes available in the Chatter publisher. For example, you can create an action that, on the detail page of an account, allows a user to create a contact related to that account from the Chatter feed on that page. QuickAction can be created on objects that allow custom fields.
Enables or disables Quotes, which show proposed prices for products and services.
Represents the metadata associated with a record type. Record types let you offer different business processes, picklist values, and page layouts to different users.
114
Metadata Types
Metadata Type
Allows Wildcard
(*)?
Not Applicable
Description
No
Yes
Yes
Yes
Yes
No
No
Not Applicable
No
No
No
Yes
Yes
Represents a remote site setting. 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.
Represents a custom report.
Represents the metadata associated with a custom report type. Custom report types allow you to build a framework from which users can create and customize reports.
Represents a role in your organization.
Represents a SAML Single Sign-On configuration.
Deprecated. Represents an Scontrol component, corresponding to an s-control in the Salesforce user interface.
Represents the metadata associated with the Search Layouts for an object.
You can customize which fields to display for users in search results, search filter fields, lookup dialogs, and recent record lists on tab home pages.
Represents an org's search settings.
Represents an organization’s security settings. Security settings define trusted
IP ranges for network access, password and login requirements, and session expiration and security settings.
Represents sharing rule settings such as access level and to whom access is granted.
Represents an Apex sharing reason, which is used to indicate why sharing was implemented for a custom object.
Represents Apex classes that recalculate the Apex managed sharing for a specific custom object.
Represents the base container for sharing rules, which can be criteria-based, ownership-based, or territory-based. SharingRules enables you to share records with a set of users, using rules that specify the access level for the target user group.
Represents a sharing set. A sharing set defines an access mapping that grants portal or community users access to objects that are associated with their accounts or contacts.
Yes
Represents a site for deployment. It extends the
and inherits its fullName
and content
fields.
Yes Represents the settings for a skill used for field service or to route chats to agents in Live Agent, such as the name of the skill and which agents the skills are assigned to.
115
Metadata Types
Metadata Type
Allows Wildcard
(*)?
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Description
Represents the Social Business Rules custom format for the Case Subject field on cases created from inbound social posts.
Represents the set of values in a standard picklist field. This type extends the
Metadata metadata type and inherits its
fullName
field.
Contains details for a standard picklist translation. It returns a translated standard value set.
Represents a static resource file, often a code library in a ZIP file.
Represents a set of synonym groups, which are groups of words or phrases that are treated as equivalent in users’ searches. You can define synonym groups to optimize search results for acronyms, variations of product names, and other terminology unique to your organization.
Represents a territory in your organization.
Represents the metadata associated with a sales territory in Territory
Management 2.0.
Represents the metadata associated with a territory model in Territory
Management 2.0.
Represents the metadata associated with a territory assignment rule associated with an object, such as Account, in Territory Management 2.0.
Represents the metadata for the default settings for Territory Management
2.0 users to access and modify records associated with sales territories. The standard record access settings apply to accounts and opportunities. If your
Salesforce org uses
Private
default internal access for contacts or cases, you can also set access for those records.
Represents the metadata for a category of territories in Territory Management
2.0. Every Territory2 must have a Territory2Type.
Represents the ability to assign topics to objects or to remove topic assignments.
Represents a transaction security policy definition. Transaction Security policies give you a way to look through events in your organization and specify actions to take when certain combinations occur.
This metadata type allows you to work with translations for various supported languages.
Represents a validation rule, which is used to verify that the data a user enters in a record is valid and can be saved. A validation rule contains a formula or expression that evaluates the data in one or more fields and returns a value of true
or false
. Validation rules also include an error message that your client application can display to the user when the rule returns a value of true
due to invalid data.
116
Metadata Types Metadata Components and Types
Metadata Type
Allows Wildcard
(*)?
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Description
Represents the Wave Analytics application.
Represents the WaveDashboard object in the Wave Analytics application.
Represents the WaveDataflow object in the Wave Analytics application.
Represents the WaveDataset object in the Wave Analytics application.
Represents the WaveLens object in the Wave Analytics application.
Represents a Wave Analytics template bundle, which can be used to create
Wave apps. A bundle contains a Wave template definition and all its related resources.
Represents the WaveXmd object in the Wave Analytics application.
Represents a custom button or link defined in a custom object.
Represents the metadata associated with a workflow rule. A workflow rule sets workflow actions into motion when its designated conditions are met.
You can configure workflow actions to execute immediately when a record meets the conditions in your workflow rule, or set time triggers that execute the workflow actions on a specific day.
Metadata Components and Types
Metadata components are not based on sObjects, like objects in the API. Instead, they are based on metadata types, such as ApexClass
and CustomObject, which extend Metadata
. A component is an instance of a metadata type. For example,
CustomObject
is a metadata type for custom objects, and the
MyCustomObject__c
component is an instance of a custom object.
that is a metadata type includes the following element in its WSDL definition:
<xsd:extension base= "tns:Metadata">
CustomObject and BusinessProcess extend Metadata so they are metadata types; ActionOverride doesn't extend Metadata so it's not a metadata type.
You can individually deploy or retrieve a component for a metadata type. For example, you can retrieve an individual BusinessProcess component, but you can't retrieve an individual ActionOverride component. You can only retrieve an ActionOverride component by retrieving its encompassing CustomObject component.
Metadata components can be manipulated by
asynchronous Metadata API calls or
declarative (or file-based) Metadata API calls .
Most of the components can be accessed using Force.com IDE. Exceptions are noted in the description of the object.
Field Data Types
Each component field has a specific field type. These field types can correspond to other components defined in the WSDL, or primitive data types, like string
, that are commonly used in strongly typed programming languages.
117
Metadata Types Unsupported Metadata Types
These field data types are used in the SOAP messages that are exchanged between your client application and the API. When writing your client application, follow the data typing rules defined for your programming language and development environment. Your development tool handles the mapping of typed data in your programming language with these SOAP data types.
For more information about primitive data types, see the
SOAP API Developer's Guide
.
Enumeration Fields
Some component fields have a data type that is an enumeration. An enumeration is the API equivalent of a picklist. The valid values of the field are restricted to a strict set of possible values, all having the same data type. These values are listed in the field description
column for each enumeration field. See sortBy
for an example of an enumeration field of type string. The XML below shows a sample definition of an enumeration of type string in the WSDL.
<xsd:simpleType name= "DashboardComponentFilter">
<xsd:restriction base= "xsd:string">
<xsd:enumeration value= "RowLabelAscending"/>
<xsd:enumeration value= "RowLabelDescending"/>
<xsd:enumeration value= "RowValueAscending"/>
<xsd:enumeration value= "RowValueDescending"/>
</xsd:restriction >
</xsd:simpleType >
Supported Calls
All of the metadata types are supported by the main calls, unless it is stated otherwise in the individual component sections. The main
Metadata API calls are:
•
, such as
and
•
, such as
•
, such as
Unsupported Metadata Types
Some things you can customize in a Salesforce organization aren’t available in Metadata API.
The following components can’t be retrieved or deployed with Metadata API, and changes to them must be made manually in each of your organizations:
•
Account Teams
•
Activity Button Overrides
•
Analytic Settings
•
Automated Case User Settings
•
Auto-number on Customizable Standard Fields
•
Campaign Influences
•
Case Contact Roles
•
Case Feed Layouts
•
Case Team Roles
•
Console Layouts
118
Metadata Types Unsupported Metadata Types
•
Currency Exchange Rates
•
Data Category Visibility Settings
•
Delegated Administration
•
Divisions
•
Email Services
•
Fiscal Year
•
File Upload and Download Security Settings
•
Lead Settings
•
Live Agent chats routed with Omni-Channel
•
Mail Merge Templates
•
Mobile Administration
•
Mobile Users and Devices
•
Multiline layout fields for opportunity teams
•
Offline Briefcase Configurations
•
Opportunity Big Deal Alerts
•
Opportunity Update Reminders
•
Organization Wide Email Addresses
•
Outlook Configurations
•
Partner Management
•
The following standard picklists: IdeaTheme.Categories, Order.Status, Question.Origin. (All other standard picklists are supported.)
•
Predefined Case Teams
•
Product Schedule Setup
•
Public and Resource Calendars
•
Quote Templates
•
Salesforce to Salesforce
•
Standard fields that aren’t customizable, such as autonumber fields or system fields
•
Self-Service Portal Font and Colors
•
Self-Service Portal Settings
•
Self-Service Portal Users
•
Self-Service Public Solutions
•
Self-Service Web-to-Case
•
Site.com
•
Social Account/Contact Settings
•
Social Business Rules
•
Social Customer Service Settings
•
SoftPhone Layout
•
Solution Categories
•
Solution Settings
•
Tag Settings
•
Territory Assignment Rules
119
Metadata Types Special Behavior in Metadata API Deployments
•
User Interface Settings (except calendar features, which are supported in
on page 588)
•
Web Links on Person Account Page Layouts
•
Web-to-Lead
Special Behavior in Metadata API Deployments
Important considerations for specific types and contents of a deployment.
When deploying changes to a Salesforce org, consider how individual components in your deployment behave so you’re including all the necessary changes. Use the following information to determine what to include in your deployment, and how the changes appear in the destination org.
Apex Classes and Apex Triggers
By default, changes to Apex code that have Apex jobs pending or in progress can’t be deployed. To deploy these changes, do one of the following.
•
Cancel Apex jobs before deploying changes to Apex code. Reschedule the jobs after the deployment.
•
Enable deployments with Apex jobs in the Salesforce user interface in the Deployment Settings page.
Approval Processes
•
To use approval processes on Salesforce Knowledge articles with the Metadata API, the article type must be deployed. For article version (_kav) in approval processes, the supported action types are: Knowledge Action, Email Alert, Field Update, and Outbound
Message.
•
If the approval process references any post templates that contain custom fields, then you need to resave those post templates in the originating organization before adding them to the change set. From Setup, enter
Post Templates
in the
Quick
Find
box, then select Post Templates. For each post template, click Edit and then Save.
•
The metadata doesn’t include the order of active approval processes. You might need to reorder the approval processes in the destination org after deployment.
•
If you change the
Unique Name
of an approval process that was previously included in a change set and deployed in another organization, and you resend the approval process via a change set, a new approval process will be created upon deployment in the other organization. The previously deployed approval process will not be modified.
Custom Fields
Starting in API version 30.0, when deploying a new custom field, the default values for the editable
and readable
fields in profile field permissions are false
. To override the default values, include field permissions for the new field in your profiles.
Custom Objects
Using API version 29.0, you can’t change the sharingModel
of an object using Metadata API. You must manually make this change to the target org through the user interface.
Starting with API version 30.0, you can change the sharingModel
of an object for internal users using Metadata API and the user interface.
Connected App
•
You cannot set the consumerKey
in Metadata API. It is included in a retrieve operation for informational purposes. If you try to move the connected app to another org, you must remove the consumerKey
from the .zip file before the deployment to an org. A new key will be generated in the destination org.
•
Mobile settings of connected apps are not supported in change sets and must be manually migrated.
120
Metadata Types ActionLinkGroupTemplate
Page Layout
A deployment containing page layout assignments replaces all existing page layout assignments in the destination org with those specified in the .zip file. Existing page layouts in the org disappear if they’re not included in the .zip file. Always include all page layouts for all required record types in the .zip file.
Profiles
If a package includes a profile with a name that doesn’t exist in the target org, a new profile is created with that name. If the deployed profile doesn’t specify any permissions or settings, the resulting profile consists of all the permissions and settings in the Standard
Profile.
Sharing
•
Simultaneously updating the sharingModel
field for an object and adding a new sharing rule isn’t supported in Metadata
API, regardless of which object you’re updating. For example, you can add a sharing rule when the org-wide default is public, and subsequently update the sharingModel
. This would result in a single sharing recalculation.
•
You might encounter an error if you’re deploying a change set with a custom object that has a parent-child relationship without the master/detail field in the same change set. To resolve this error, include the master/detail custom field in the change set, even if you haven’t changed the org-wide default.
Workflow
Test mode for flow triggers isn’t supported in the Metadata API. If you want a flow trigger to run the latest flow version when an administrator causes the workflow rule to fire, enable test mode via the user interface after deployment.
ActionLinkGroupTemplate
Represents the action link group template. Action link templates let you reuse action link definitions and package and distribute action links. An action link is a button on a feed element. Clicking on an action link can take a user to another Web page, initiate a file download, or invoke an API call to an external server or Salesforce. Use action links to integrate Salesforce and third-party services into the feed.
Every action link belongs to an action link group and action links within the group are mutually exclusive. This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
ActionLinkGroupTemplate components have the suffix
.actionLinkGroupTemplate
and are stored in the actionLinkGroupTemplates
folder.
Version
ActionLinkGroupTemplate components are available in API version 33.0 and later.
Fields
Field Name
actionLinkTemplates
Field Type Description
on page 122[]
Action link templates that are associated with the action link group template.
121
Metadata Types ActionLinkGroupTemplate
Field Name
category executionsAllowed hoursUntilExpiration isPublished name
Field Type
PlatformAction
GroupCategory
(
type string)
Description
Required. The location of the action link group within the feed element.
Values are:
•
Primary
—The action link group is displayed in the body of the feed element.
•
Overflow
—The action link group is displayed in the overflow menu of the feed element.
ActionLink
ExecutionsAllowed
(
type string)
Required. The number of times an action link can be executed. Values are:
•
Once
—An action link can be executed only once across all users.
•
OncePerUser
—An action link can be executed only once for each user.
•
Unlimited
—An action link can be executed an unlimited number of times by each user. If the action link’s actionType
is
Api
or
ApiAsync
, you can’t use this value.
int boolean string
Required. The number of hours from when the action link group is created until it's removed from associated feed elements and can no longer be executed. The maximum value is 8,760.
Required. If true
, the action link group template is published. Action link group templates shouldn’t be published until at least one action link template is associated with it.
Required. The name of the action link group template to use in code.
ActionLinkTemplate
ActionLinkTemplate components are used to create multiple action links that share properties.
Field Name
actionUrl headers
Field Type
string string isConfirmationRequired boolean
Description
Required. The action link URL. For example, a
Ui
action link URL is a Web page.
A
Download
action link URL is a link to the file to download.
Ui
and
Download
action link URLs are provided to clients. An
Api
or
ApiAsync action link URL is a REST resource.
Api
and
ApiAsync
action link URLs aren’t provided to clients. Links to Salesforce can be relative. All other links must be absolute and start with https://
.
Template for the HTTP headers sent when corresponding action links are invoked. This field can be used only for
Api
and
ApiAsync
action links.
This field can contain context variables and binding variables in the form
{!Bindings.
key}
.
Required. If true
, a confirmation dialog appears before the action is executed.
122
Metadata Types
Field Name
isGroupDefault label labelKey linkType method position requestBody
ActionLinkGroupTemplate
Field Type
boolean string string
Description
Required. If true
, action links derived from this template are the default or primary action in their action groups. There can be only one default action per action group.
A custom label to display on the action link button. If none of the
LabelKey values make sense for an action link, use a custom label. Set the
LabelKey field to
None
and enter a label name in the
Label
field.
Required. Key for the set of labels to display for these action link states: new, pending, success, failed. For example, the Approve set contains these labels:
Approve, Pending, Approved, Failed. For a complete list of keys and labels, see
Action Links Labels in the Chatter REST API Developer Guide or the Apex Developer
Guide.
ActionLinkType
string)
Required. The type of action link. One of these values:
•
Api
—The action link calls a synchronous API at the action URL. Salesforce sets the status to
SuccessfulStatus
or
FailedStatus on the HTTP status code returned by your server.
based
•
ApiAsync
—The action link calls an asynchronous API at the action URL.
The action remains in a
PendingStatus
state until a third party makes a request to
/connect/action-links/
actionLinkId
to set the status to
SuccessfulStatus
or
FailedStatus
when the asynchronous operation is complete.
•
Download
—The action link downloads a file from the action URL.
•
Ui
—The action link takes the user to a web page at the action URL.
ActionLink
HttpMethod
string)
Required. HTTP method for the action URL. One of these values:
•
HttpDelete class is empty.
—Returns HTTP 204 on success. Response body or output
•
HttpGet
—Returns HTTP 200 on success.
•
HttpHead
—Returns HTTP 200 on success. Response body or output class is empty.
•
HttpPatch
—Returns HTTP 200 on success or HTTP 204 if the response body or output class is empty.
•
HttpPost
—Returns HTTP 201 on success or HTTP 204 if the response body or output class is empty. Exceptions are the batch posting resources and methods, which return HTTP 200 on success.
•
HttpPut
—Return HTTP 200 on success or HTTP 204 if the response body or output class is empty.
Ui
and
Download
action links must use
HttpGet
.
int string
Required. An integer specifying the position of the action link template relative to other action links in the group. 0 is the first position.
Template for the HTTP request body sent when corresponding action links are invoked. This field can be used only for
Api
and
ApiAsync
action links.
123
Metadata Types
Field Name
userAlias userVisibility
ActionLinkGroupTemplate
Field Type Description
This field can contain context variables and binding variables in the form
{!Bindings.
key}
.
string If you selected
CustomUser
or
CustomExcludedUser
for
UserVisibility
, this field is the alias for the custom user. Use the alias in a template binding to specify the custom user when an action link group is created using the template.
ActionLink
UserVisibility
string)
Required. Who can see the action link. This value is set per action link, not per action link group. Values are:
•
Creator
—Only the creator of the action link can see the action link.
•
Everyone
—Everyone can see the action link.
•
EveryoneButCreator
—Everyone but the creator of the action link can see the action link.
•
Manager
—Only the manager of the creator of the action link can see the action link.
•
CustomUser
—Only the custom user can see the action link.
•
CustomExcludedUser
—Everyone but the custom user can see the action link.
Declarative Metadata Sample Definition
The following is an example of an ActionLinkGroupTemplate component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ActionLinkGroupTemplate xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionLinkTemplates >
<actionUrl >/services/data/{!Bindings.word}/chatter/feed-elements </actionUrl >
<headers >Content-Type:{!Bindings.word3} </headers >
<isConfirmationRequired >true </isConfirmationRequired >
<isGroupDefault >true </isGroupDefault >
<labelKey >Add </labelKey >
<linkType >API </linkType >
<method >httpPost </method >
<position >0 </position >
<requestBody >{"body":{"messageSegments":[{"type": "Text",
"text": "{!Bindings.word1}"}]},"subjectId": "{!Bindings.word2}",
"feedElementType": "feedItem"} </requestBody >
<userAlias >customExcludedUser </userAlias >
<userVisibility >CustomExcludedUser </userVisibility >
</actionLinkTemplates >
<category >Primary </category >
<executionsAllowed >OncePerUser </executionsAllowed >
<hoursUntilExpiration >10 </hoursUntilExpiration >
<isPublished >true </isPublished >
<name >MyPackage </name >
</ActionLinkGroupTemplate >
124
Metadata Types AnalyticSnapshot
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >ActionLinkGroupTemplate </name >
</types >
<version >33.0
</version >
</Package >
Usage
If you modify action link group templates, you overwrite the related action link templates.
If you delete a published action link group template, you delete all related action link information which includes deleting all action links that were instantiated using the template from feed items.
AnalyticSnapshot
Represents a reporting snapshot. A reporting snapshot lets you report on historical data. Authorized users can save tabular or summary report results to fields on a custom object, then map those fields to corresponding fields on a target object. They can then schedule when to run the report to load the custom object's fields with the report's data. Reporting snapshots enable you to work with report data similarly to how you work with other records in Salesforce.
Declarative Metadata File Suffix and Directory Location
Force.com AnalyticSnapshot components are stored in the analyticSnapshots
directory of the corresponding package directory.
The file name matches the unique name of the reporting snapshot, and the extension is
.analyticsnapshot
.
Version
Force.com AnalyticSnapshot components are available in API version 16.0 and later.
Fields
Field
description fullName groupColumn
Field Type
string string string
Description
A description of the reporting snapshot.
The reporting snapshot name used for API access. The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
This field is inherited from the Metadata
component.
A column that specifies which level to extract data from the source report. It is only applicable for summary reports.
125
Metadata Types AnalyticSnapshot
Field
mappings name runningUser sourceReport targetObject
Field Type
string string string string
Description
A list of reporting snapshot mappings. For valid values, see
.
Required. The display name of the reporting snapshot.
The username of the user whose role and sharing settings are used to run the reporting snapshot.
Required. The report where data will be extracted from.
Required. The custom object where data will be inserted into.
AnalyticSnapshotMapping
AnalyticSnapshotMapping defines the mapping for the reporting snapshot. Valid values are:
Field
aggregateType sourceField sourceType targetField
Field Type Description
of type string)
List that defines if and how each report field is summarized. For valid
.
string The sourceField can be one of the following:
•
The field on the sourceReport that you want to map to the targetField
in the
•
A summary of a filed on the sourceReport
(for Summary reports only)
•
A field on the reporting snapshot, such as JobName, RunningUser, or
ExecutionTime (set through the user interface)
Note: The sourceField must correspond to the
you specify.
[]
of type string)
List that defines the report format for the reporting snapshot. For valid
values, see ReportJobSourceTypes .
string A field on the
targetObject into which this particular sourceField
will be inserted.
ReportJobSourceTypes
An enumeration of type string that defines the report format for the reporting snapshot. Valid values are:
Enumeration Value
snapshot summary tabular
Description
Use this option if the
sourceField contains snapshot-specific information such as JobName,
RunningUser, or ExecutionTime.
Use this option if referencing a summary (Sum, Average, Minimum, Maximum) of a field from
Use this option if referencing an available column from the sourceReport .
126
Metadata Types ArticleType
Declarative Metadata Sample Definition
A sample XML definition of a reporting snapshot is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<AnalyticSnapshot xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >my description </description >
<groupColumn >INDUSTRY </groupColumn >
<mappings >
<aggregateType >Average </aggregateType >
<sourceField >SALES </sourceField >
<sourceType >summary </sourceType >
<targetField > myObject __c.Name
</targetField >
</mappings >
<mappings >
<sourceField >ExecutionTime </sourceField >
<sourceType >snapshot </sourceType >
<targetField > myObject __c.field3__c
</targetField >
</mappings >
<mappings >
<sourceField >INDUSTRY </sourceField >
<sourceType >tabular </sourceType >
<targetField >testObject__c.Name
</targetField >
</mappings >
<name >my snapshot </name >
<runningUser >[email protected]
</runningUser >
<sourceReport >myFolder/mytSummaryReport </sourceReport >
<targetObject >myObject__c </targetObject >
</AnalyticSnapshot >
SEE ALSO:
ArticleType
Represents the metadata associated with an article type.
All articles in Salesforce Knowledge are assigned to an article type. An article's type determines the type of content it contains, its appearance, and which users can access it. For example, a simple FAQ article type can have two custom fields,
Question
and
Answer
, where article managers enter data when creating or updating FAQ articles. A more complex article type can have dozens of fields organized into several sections. Using layouts and templates, administrators can structure the article type in the most effective way for its particular content. User access to article types is controlled by permissions. For each article type, an administrator can grant “Create,”
“Read,” “Edit,” or “Delete” permissions to users. For example, the article manager can allow internal users to read, create, and edit FAQ article types, but let partner users only read FAQs. See “Knowledge Article Types” in the Salesforce online help and “Articles” in the
SOAP
API Developer's Guide
.
127
Metadata Types ArticleType
Declarative Metadata File Suffix and Directory Location
An ArticleType is defined as a custom object and is stored in the objects
folder. ArticleTypes have a suffix
__kav
(instead of
__c for custom objects). ArticleType field names have a suffix of
__c
like other custom objects, and must be dot-qualified with the name of the article type to which they belong. This is shown in the following sample package.xml
file:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<fullName >articlefilemetadata </fullName >
<apiAccessLevel >Unrestricted </apiAccessLevel >
<types >
<members >newarticle__kav.description__c
</members >
<name >CustomField </name >
</types >
<types >
<members >newarticle__kav </members >
<name >CustomObject </name >
</types >
</Package >
Version
ArticleTypes are available in API version 19.0 and later.
Fields
Field Name
articleTypeChannel
Display
Field Type
deploymentStatus
of type string)
Description
Represents the article-type templates used to display an article in the various channels. See “Article Type Templates” in the Salesforce online help.
A string which represents the deployment status of a custom object or field. Valid values are:
•
InDevelopment
•
Deployed description fields gender label pluralLabel string
string string
A description of the article type. Maximum of 1000 characters.
Represents one or more fields in the article type.
Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender.
Label that represents the object throughout the Salesforce user interface.
Plural version of the
128
Metadata Types ArticleType
Field Name
startsWith
Field Type
(
of type string)
Description
Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character. Valid values are listed in
articleTypeChannelDisplay
Determines the article-type templates that are used to display an article in its channels. Unless otherwise noted, all fields are createable, filterable, and nillable.
Field Name Field Type
articleTypeTemplates
Description
Indicates which article-type template applies in the specified channel.
articleTypeTemplates
Sets the article-type template for a specific channel. If not specified, the default article-type template applies.
Field Name
channel page template
Field Type
string string string
Description
Specifies the channel where the article-type template applies:
•
AllChannels
: all the available channels.
•
App
: the Articles tab in Salesforce Knowledge.
•
Pkb
: the public knowledge base.
•
Csp
: the Customer Portal.
•
Prm
: the partner portal.
Represents the name of the custom Visualforce page used as a custom article-type template. Use this field when you select
Page
in the template field.
Indicates the article-type template used for the specified channel:
•
Page
: custom Visualforce page. When specifying this value, you must also set the page
field with the Visualforce page name.
•
Tab
: display the sections you defined in the layout as tabs.
•
Toc
: display the sections you defined in the layout as table of content.
Declarative Metadata Sample Definitions
A sample article type definition follows:
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<articleTypeChannelDisplay >
<articleTypeTemplates >
129
Metadata Types ArticleType Layout
<channel >App </channel >
<template >Tab </template >
</articleTypeTemplates >
<articleTypeTemplates >
<channel >Prm </channel >
<template >Tab </template >
</articleTypeTemplates >
<articleTypeTemplates >
<channel >Csp </channel >
<template >Tab </template >
</articleTypeTemplates >
<articleTypeTemplates >
<channel >Pkb </channel >
<template >Toc </template >
</articleTypeTemplates >
</articleTypeChannelDisplay >
<deploymentStatus >Deployed </deploymentStatus >
<description >Article type with custom fields </description >
<fields >
<fullName >description__c </fullName >
<label >Description </label >
<length >48 </length >
<type >Text </type >
</fields >
<label >newarticle </label >
<pluralLabel >newarticles </pluralLabel >
</CustomObject >
SEE ALSO:
ArticleType Layout
Represents the metadata associated with an article type page layout. Article type layouts determine which fields users can view and edit when entering data for an article, they also determine which sections appear when users view articles.
The format of the article, for example whether layout sections display as subtabs or as a single page with links, is defined by the
. Each article type has only one layout, but you can choose a different template for each of the article type's four channels. For more information, see "Knowledge Article Types" in the Salesforce online help and “Articles” in the
SOAP API Developer's Guide
File Suffix and Directory Location
ArticleType layouts are stored in the layouts
directory of the corresponding package directory. The prefix must match with the article type API name. The extension is
.layout
.
Version
ArticleType layouts are available in API version 19.0 and later.
130
Metadata Types
Fields
Field Name
layoutSections
ArticleType Layout
Field Type
[]
Description
The main sections of the layout containing the article fields. The order here determines the layout order.
LayoutSection
LayoutSection represents a section of an ArticleType layout.
Field Name
customLabel label layoutColumns style
Field Type
boolean string
[]
LayoutSectionStyle
(
string)
Description
Indicates if this section's label is custom or standard (built-in). Custom labels can be any text, but must be translated. Standard labels have a predefined set of valid values, for example 'System Information', which are automatically translated.
The label; either standard or custom, based on the customLabel
flag.
The columns of the layout, depending on the style. Salesforce Knowledge only supports one column in article type layouts.
The style of the layout. Salesforce Knowledge only supports the value
OneColumn
which displays a one column page.
LayoutColumn
LayoutColumn represents the items in a column within a layout section.
Field Name
layoutItems
Field Type
Description
The individual items within a column (ordered from top to bottom).
LayoutItem
LayoutItem represents the valid values that define a layout item.
Field Name
field
Field Type
string
Description
The field name reference, for example
MyField__c
.
Declarative Metadata Sample Definition
The following is the definition of an ArticleType page layout:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Layout xmlns= "http://soap.sforce.com/2006/04/metadata">
131
Metadata Types ChannelLayout
<layoutSections >
<customLabel >true </customLabel >
<label >Description </label >
<layoutColumns >
<layoutItems >
<field >description__c </field >
</layoutItems >
<layoutItems >
<field >dateTime__c </field >
</layoutItems >
</layoutColumns >
<style >OneColumn </style >
</layoutSections >
<layoutSections >
<label >Data Sheet </label >
<layoutColumns >
<layoutItems >
<field >file__c </field >
</layoutItems >
</layoutColumns >
<style >OneColumn </style >
</layoutSections >
</Layout >
SEE ALSO:
ChannelLayout
Represents the metadata associated with an communication channel layout. Communication channel layouts allow admins to share article contents inline into communication channels (eg. email publisher, portal publisher, social publisher etc.). Admins can create a list of fields of an article type that they want to share for each communication channels and customize its order.
File Suffix and Directory Location
Channel layout components have the suffix
.channelLayout
and are stored in the channelLayouts
folder of the corresponding package directory. The prefix must match with the article type API name.
Version
Channel layout components are available in API version 32.0 and later.
Fields
Field Name
label
Field Type
string
Description
The label
132
Metadata Types ArticleType CustomField
Field Name
layoutItems enabledChannels
Field Type
layoutItem enabledChannel
Description
The article fields contained in the layout. The order here determines the field order.
The channels where this layout applies.
layoutItem
Field Name
field enabledChannel
Field Type
string enum
Description
Name of the field. The format is <ArticleType name>.<Field name>
Enum name of the communcation channel (eg. email, portal etc)
Declarative Metadata Sample Definition
The following is an example of a Channel Layout component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ChannelLayout xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >layoutaaaa </label >
<layoutItems >
<field >ArticleTypeA.FieldA
</field >
</layoutItems >
<layoutItems >
<field >ArticleTypeA.FieldC
</field >
</layoutItems >
<enabledChannels >email </enabledChannels >
<enabledChannels >portal </enabledChannels >
</ChannelLayout >
The following is an example package.xml
that references the previous definition.
ArticleType CustomField
Represents the metadata associated with an article type custom field. Use this metadata type to create, update, or delete article type custom field definitions.
This type extends the
Metadata metadata type and inherits its
fullName
field.
Always specify the full name whenever you create or update a custom field. For example, a custom field on a custom object:
MyArticleType__kav.MyCustomField__c
Declarative Metadata File Suffix and Directory Location
Custom fields are defined as part of the article type. ArticleType field names have a suffix of
__c
like other custom objects, and must
be dot-qualified with the name of the article type to which they belong. See ArticleType
for more information.
133
Metadata Types ArticleType CustomField
Retrieving Custom Fields on Custom or Standard Objects
When you retrieve a custom or standard object, you return everything associated with the object. However, you can also retrieve only the custom fields for an object by explicitly naming the object and fields in package.xml
. The following definition in package.xml
retrieves the files objects/MyCustomObject__c.object
, objects/Account.object__c.object
, and objects/MyArticleType__kav.object
, each containing one custom field definition.
<types >
<members >MyCustomObject__c.MyCustomField__c
</members >
<members >Account.MyCustomAccountField__c
</members >
<members >MyArticleType__kav.MyOtherCustomField__c
</members >
<name >CustomField </name >
</types >
Version
ArticleTypes custom fields are available in API version 19.0 and later.
Fields for ArticleType
Unless otherwise noted, all fields are createable, filterable, and nillable.
Note:
If you create a knowledge validation rule, the errors always display at the top of the page, even if you add it beside the field. Therefore, write the errors descriptively so authors know how to satisfy the validation rule. For example, identify which field is causing the error. The Salesforce Classic user interface does not support field level error messages for articles.
Field Name
defaultValue deleteConstraint description formula
Field Type
string
of type string) string string
Description
If specified, represents the default value of the field.
Provides deletion options for lookup relationships. Valid values are:
SetNull
This is the default. If the lookup record is deleted, the lookup field is cleared.
Restrict
Prevents the record from being deleted if it’s in a lookup relationship.
Cascade
Deletes the lookup record as well as associated lookup fields.
For more information on lookup relationships, see “Object
Relationships” in the Salesforce Help.
Description of the field.
If specified, represents a formula on the field.
134
Metadata Types
Field Name
formulaTreatBlankAs fullName inlineHelpText label length picklist referenceTo relationshipLabel relationshipName required type
ArticleType CustomField
Field Type
of type string) string string string int
string string string boolean
FieldType
Description
Indicates how to treat blanks in a formula. Valid values are
BlankAsBlank
and
BlankAsZero
.
Inherited from
Metadata , this field is not defined in the WSDL
for this metadata type. It must be specified when creating, updating, or deleting. See
to see an example of this field specified for a call.
This value cannot be null
.
Represents the content of field-level help. For more information, see “Define Field-Level Help” in the Salesforce Help.
Label for the field. You cannot update the label for standard fields in Article Type such as Title, UrlName, Summary, etc.
Length of the field.
(Deprecated. Use this field in API version 37.0 and earlier only.
In later versions, use valueSet
instead.) If specified, the field is a picklist, and this field enumerates the picklist values and labels.
If specified, indicates a reference this field has to another object.
Label for the relationship.
If specified, indicates the value for one-to-many relationships.
For example, in the object MyObject that had a relationship to
YourObject, the relationship name might be YourObjects.
Indicates whether the field requires a value on creation ( true
) or not ( false
).
Required. Indicates the field type for the field. Valid values are:
•
Checkbox
available in version 30.0 and later
•
Currency
•
ArticleCurrency
•
Date
•
DateTime
•
•
File
•
Formula
•
Html
•
Lookup
•
Number
•
Percent
135
Metadata Types ApexClass
Field Name
visibleLines
Field Type
int
Description
•
Phone
•
Picklist
•
DependentPicklist
•
MultiselectPicklist
•
Text
•
TextArea
•
LongTextArea
•
URL
Indicates the number of lines displayed for the field.
Declarative Metadata Sample Definition
<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
....
<fields>
<fullName>Comments__c</fullName>
<description>add your comments about this object here</description>
<label>Comments</label>
<length>32000</length>
<type>LongTextArea</type>
<visibleLines>30</visibleLines>
</fields>
....
</CustomObject>
SEE ALSO:
ApexClass
Represents an Apex class. An Apex class is a template or blueprint from which Apex objects are created. Classes consist of other classes, user-defined methods, variables, exception types, and static initialization code. For more information, see the
Force.com Apex Code
Developer's Guide
. This type extends the MetadataWithContent metadata type and inherits its
content
and fullName
fields.
Note: By default, you can’t deploy updates to an Apex class if there are one or more active jobs for that class. To deploy updates in this case, do one of the following.
•
Cancel Apex jobs before deploying changes to Apex code. Reschedule the jobs after the deployment.
•
Enable deployments with Apex jobs in the Salesforce user interface in the Deployment Settings page.
136
Metadata Types ApexClass
Supported Calls
All Metadata API calls except
constraints.
Declarative Metadata File Suffix and Directory Location
The file suffix is
.cls
for the class file. The accompanying metadata file is named
ClassName-meta.xml
.
Apex classes are stored in the classes
folder in the corresponding package directory.
Version
Apex classes are available in API version 10.0 and later.
Fields
This metadata type contains the following fields:
Field Name
apiVersion
Field Type
double
Description
The API version for this class. Every class has an API version specified at creation.
content fullName packageVersions status base64 string
[]
The Apex class definition. Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary.
This conversion is usually handled for you by a SOAP client. This field is inherited from the
MetadataWithContent component.
The Apex class name. The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters. This field is inherited from the
The list of installed managed package versions that are referenced by this Apex class.
For more information about managed packages, see the Force.com Quick
Reference for Developing Packages . For more information about package versions, see “About Package Versions” in the Salesforce online help. This field is available in API version 16.0 and later.
ApexCodeUnitStatus
(
The current status of the Apex class. The following string values are valid:
•
Active
- The class is active.
•
Deleted
- The class is marked for deletion. This is useful for managed packages, because it allows a class to be deleted when a managed package is updated.
Note:
ApexCodeUnitStatus includes an
Inactive
option, but it is only supported for
ApexTrigger ; it is not supported for ApexClass.
137
Metadata Types ApexClass
PackageVersion
PackageVersion identifies a version of a managed package. A package version is a number that identifies the set of components uploaded in a package. The version number has the format
majorNumber.minorNumber.patchNumber
(for example, 2.1.3). The major and minor numbers increase to a chosen value during every major release. The
patchNumber
is generated and updated only for a patch release. It is available in API version 16.0 and later.
Field Name
namespace
Field Type
string majorNumber minorNumber int int
Description
Required. In a packaging context, a namespace prefix is a one to 15-character alphanumeric identifier that distinguishes your package and its contents from packages of other developers on AppExchange. Namespace prefixes are case-insensitive. For example, ABC and abc are not recognized as unique. Your namespace prefix must be globally unique across all Salesforce organizations.
It keeps your managed package under your control exclusively.
Salesforce automatically prepends your namespace prefix, followed by two underscores (“__”), to all unique component names in your Salesforce organization. A unique package component is one that requires a name that no other component has within Salesforce, such as custom objects, custom fields, custom links, s-controls, and validation rules. For more information about namespaces, see “Register a Namespace Prefix” in the Salesforce online help.
Required. The major number of the package version. A package version number has a
majorNumber.minorNumber
format.
Required. The minor number of the package version. A package version number has a
majorNumber.minorNumber
format.
Declarative Metadata Sample Definition
The following sample creates the
MyhelloWorld.cls
class, and the corresponding
MyHelloWorld.cls-meta.xml
metadata file.
MyHelloWorld.cls
file: public class MyHelloWorld {
// This method updates the Hello field on a list
// of accounts.
public static void addHelloWorld(Account[] accs){ for (Account a:accs){ if (a.Hello__c != 'World' ) a.Hello__c = 'World' ;
}
}
}
MyHelloWorld.cls-meta.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ApexClass xmlns= "http://soap.sforce.com/2006/04/metadata">
138
Metadata Types ApexComponent
<apiVersion >41.0
</apiVersion >
</ApexClass >
SEE ALSO:
ApexComponent
Represents a Visualforce component. For more information, see “Visualforce” in the Salesforce online help. This type extends the
MetadataWithContent metadata type and inherits its
content
and fullName
fields.
Declarative Metadata File Suffix and Directory Location
The file suffix is
.component
for the page file. The accompanying metadata file is named
ComponentName-meta.xml
.
Visualforce components are stored in the components
folder in the corresponding package directory.
Version
Visualforce components are available in API version 12.0 and later.
Fields
This metadata type contains the following fields:
Field Name
apiVersion
Field Type
double content description fullName string string label base64Binary string
Description
The API version for this Visualforce component. Every component has an API version specified at creation. This field is available in API version 16.0 and later.
The component content. Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary.
This conversion is usually handled for you by a SOAP client. This field is inherited from the
MetadataWithContent component.
A description of what the component does.
The component developer name used as a unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
component.
Required. The label for this component.
139
Metadata Types
Field Name Field Type
packageVersions
[]
ApexPage
Description
The list of installed managed package versions that are referenced by this
Visualforce component.
Note: Package components and Visualforce custom component are distinct concepts. A package is comprised of many elements, such as custom objects, Apex classes and triggers, and custom pages and components.
For more information about managed packages, see the Force.com Quick
Reference for Developing Packages . For more information about package versions, see “About Package Versions” in the Salesforce online help. This field is available in API version 16.0 and later.
SEE ALSO:
ApexPage
Represents a Visualforce page. For more information, see “Visualforce” in the Salesforce online help. This type extends the
MetadataWithContent metadata type and inherits its
content
and fullName
fields.
Declarative Metadata File Suffix and Directory Location
The file suffix is
.page
for the page file. The accompanying metadata file is named
PageName-meta.xml
.
Visualforce pages are stored in the pages
folder in the corresponding package directory.
Version
Visualforce pages are available in API version 11.0 and later.
Fields
This metadata type contains the following fields:
Field Name
apiVersion
Field Type
double content base64Binary
Description
Required. The API version for this page. Every page has an API version specified at creation. This field is available in API version 15.0 and later.
If you set this field to a number lower than 15.0, it will be changed to
15.0.
The page content. Base 64-encoded binary data. Prior to making an
API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled for you
140
Metadata Types ApexPage
Field Name
description fullName availableInTouch confirmationTokenRequired label packageVersions
Field Type
string string boolean boolean string
Description
by a SOAP client. This field is inherited from the MetadataWithContent
component.
A description of what the page does.
The page developer name used as a unique identifier for API access.
The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
Indicates if Visualforce tabs associated with the Visualforce page can be used in the Salesforce1 app. (Use of this field for Salesforce Touch is deprecated.). This field is available in API version 27.0 and later.
Standard object tabs that are overridden with a Visualforce page aren’t supported in Salesforce1, even if you set this field for the page. The default Salesforce1 page for the object is displayed instead of the
Visualforce page.
Indicates whether
GET
requests for the page require a CSRF confirmation token. This field is available in API version 28.0 and later.
If you change this field’s value from false
to true
, links to the page require a CSRF token to be added to them, or the page will be inaccessible.
Required. The label for this page.
The list of installed managed package versions that are referenced by this Visualforce page.
For more information about managed packages, see the Force.com
Quick Reference for Developing Packages . For more information about package versions, see “About Package Versions” in the Salesforce online help. This field is available in API version 16.0 and later.
Declarative Metadata Sample Definition
The following sample creates the
MyPage.page
page, and the corresponding
MyPage.page-meta.xml
metadata file.
SampleApexPage.page
file:
<apex:page >
<h1 >Congratulations </h1 >
This is your new Page.
</apex:page >
SampleApexPage.page-meta.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ApexPage xmlns= "http://soap.sforce.com/2006/04/metadata">
141
Metadata Types ApexTestSuite
<description >This is a sample Visualforce page.
</description >
<label >SampleApexPage </label >
</ApexPage >
SEE ALSO:
ApexTestSuite
Represents a suite of Apex test classes to include in a test run.
File Suffix and Directory Location
ApexTestSuite components have the suffix
.testSuite
and are stored in the testSuites
folder.
Version
ApexTestSuite components are available in API version 38.0 and later.
Fields
Field Name
testClassName
Field Type
string[]
Description
A list of Apex test classes, specified by name, to include in this test suite.
Declarative Metadata Sample Definition
To include namespaced tests in an Apex test suite, specify each namespace individually. Local Apex tests consist of all tests in the org that don’t originate from managed packages.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ApexTestSuite xmlns= "http://soap.sforce.com/2006/04/metadata">
<testClassName >
LocalTestClass
</testClassName >
<!--
LocalTestClass
adds the test class named LocalTestClass. -->
<testClassName >
A*Class
</testClassName >
<!--
A*Class
adds AClass, AnotherClass, AwesomeClass, and so on. -->
<testClassName >
Namespace1.NamespacedTestClass
</testClassName >
<testClassName >* </testClassName > <!-- Adds all local tests. -->
<testClassName >
Namespace1
.* </testClassName > <!-- Adds all tests in Namespace1. -->
<testClassName >
Namespace2
.* </testClassName > <!-- Adds all tests in Namespace2. -->
</ApexTestSuite >
142
Metadata Types ApexTrigger
These syntaxes are supported in package.xml
. If the test classes in your suites are already present in the target org, you can omit the
ApexClass
type in package.xml
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >ApexClass </name >
</types >
<types >
<members >* </members >
<name >ApexTestSuite </name >
</types >
<version >38.0
</version >
</Package >
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >ApexClass </name >
</types >
<types >
<members >
Suite1
</members >
<members >
Suite2
</members >
<name >ApexTestSuite </name >
</types >
<version >38.0
</version >
</Package >
ApexTrigger
Represents an Apex trigger. A trigger is Apex code that executes before or after specific data manipulation language (DML) events occur, such as before object records are inserted into the database, or after records have been deleted. For more information, see “Manage
content
and fullName
fields.
Supported Calls
All Metadata API calls except
constraints.
Declarative Metadata File Suffix and Directory Location
The file suffix is
.trigger
for the trigger file. The accompanying metadata file is named
TriggerName-meta.xml
.
Apex triggers are stored in the triggers
folder in the corresponding package directory.
Version
Triggers are available in API version 10.0 and later.
143
Metadata Types ApexTrigger
Fields
This metadata type contains the following fields:
Field Name
apiVersion content fullName packageVersions status
Field Type
double base64 string
[]
Description
Required. The API version for this trigger. Every trigger has an API version specified at creation.
The Apex trigger definition. This field is inherited from the MetadataWithContent
component.
The Apex trigger name. The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters. This field is inherited from the
The list of installed managed package versions that are referenced by this Apex trigger.
For more information about managed packages, see the Force.com Quick
Reference for Developing Packages . For more information about package versions, see “About Package Versions” in the Salesforce online help. This field is available in API version 16.0 and later.
ApexCodeUnitStatus
(
Required. The current status of the Apex trigger. The following string values are valid:
•
Active
- The trigger is active.
•
Inactive
- The trigger is inactive, but not deleted.
•
Deleted
- The trigger is marked for deletion. This is useful for managed packages, because it allows a trigger to be deleted when a managed package is updated.
Declarative Metadata Sample Definition
The following sample creates the
MyhelloWorld.trigger
trigger, and the corresponding
MyHelloWorld.trigger-meta.xml
metadata file.
MyHelloWorld.
trigger
file: trigger helloWorldAccountTrigger on Account (before insert) {
Account[] accs = Trigger.new;
MyHelloWorld.addHelloWorld(accs);
}
MyHelloWorld.trigger-meta.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ApexTrigger xmlns= "http://soap.sforce.com/2006/04/metadata">
144
Metadata Types AppMenu
<apiVersion >41.0
</apiVersion >
</ApexTrigger >
SEE ALSO:
AppMenu
Represents the Force.com app menu or the Salesforce1 navigation menu.
File Suffix and Directory Location
Each AppMenu component gets stored in a single file in the folder of the corresponding package directory. The filename uses the format
Feature.appMenu
.
•
There’s one app switcher app menu file stored in a file named
AppSwitcher.appMenu
.
•
There’s one Salesforce1 app menu file stored in a file named
Salesforce1.appMenu
.
These two files are located in the appMenus
folder. The
.appMenu
files are different from other named components, as there’s only one file for each AppMenu component. App menu files can’t be created or deleted.
Version
AppMenu components are available in API version 30.0 and later.
Fields
Field Name
appMenuItems
Field Type
Description
A list of menu items in the app menu.
AppMenuItem
Represents a menu item in the app menu.
Field Name
name type
Field Type
string string
Description
The API name of the item.
The type of application represented by this item.
Acceptable values for
AppSwitcher.appMenu
are:
•
ConnectedApp
•
CustomApplication
•
ServiceProvider
Acceptable values for
Salesforce1.appMenu
are:
145
Metadata Types
Field Name Field Type Description
•
CustomApplication
•
CustomTab
•
StandardAppMenuItem
.
The name for this item can be:
–
MyDay
–
Feed
–
Tasks
–
Dashboards
–
Search
–
People
(available only when Chatter is enabled)
–
Groups
(available only when Chatter is enabled)
Declarative Metadata Sample Definition
The following is an example of an AppSwitcher.appMenu file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<AppMenu xmlns= "http://soap.sforce.com/2006/04/metadata">
<appMenuItems >
<appMenuItem >
<name >standard__Sales </name >
<type >CustomApplication </type >
</appMenuItem >
<appMenuItem >
<name >standard__Support </name >
<type >CustomApplication </type >
</appMenuItem >
<appMenuItem >
<name >CustomApp1 </name >
<type >CustomApplication </type >
</appMenuItem >
<appMenuItem >
<name >CustomApp2 </name >
<type >CustomApplication </type >
</appMenuItem >
<appMenuItem >
<name >ConnectedApp1 </name >
<type >ConnectedApp </type >
</appMenuItem >
</appMenuItems >
</AppMenu >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
146
AppMenu
Metadata Types AppMenu
<members >AppSwitcher </members >
<name >AppMenu </name >
</types >
The following is an example of a
Salesforce1.appMenu
component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<AppMenu xmlns= "http://soap.sforce.com/2006/04/metadata">
<appMenuItems >
<appMenuItem >
<name >StandardItem1 </name >
<type >StandardAppMenuItem </type >
</appMenuItem >
<appMenuItem >
<name >StandardItem2 </name >
<type >StandardAppMenuItem </type >
</appMenuItem >
<appMenuItem >
<name >StandardItem3 </name >
<type >StandardAppMenuItem </type >
</appMenuItem >
<appMenuItem >
<name >CustomTab1 </name >
<type >CustomTab </type >
</appMenuItem >
</appMenuItems >
</AppMenu >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Salesforce1 </members >
<name >AppMenu </name >
</types >
The following is an example of a package manifest used to deploy or retrieve all the available app menu metadata for an organization, using a wildcard:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >AppMenu </name >
</types >
<version >30.0
</version >
</Package >
Usage
Use
AppSwitcher.appMenu
to reorder the list of menu items that appears in the Force.com app menu. You can’t add app menu items to or remove app menu items from
AppSwitcher.appMenu
.
147
Metadata Types ApprovalProcess
Use
Salesforce1.appMenu
to customize the list of menu items that appears in the Salesforce1 navigation menu by reordering, adding, or removing the app menu items.
ApprovalProcess
Represents the metadata associated with an approval process. An approval process automates how records are approved in Salesforce.
An approval process specifies each step of approval, including who to request approval from and what to do at each point of the process.
This type extends the
Metadata metadata type and inherits its
fullName
field.
Note:
•
To use approval processes on Salesforce Knowledge articles with the Metadata API, the article type must be deployed. For article version (_kav) in approval processes, the supported action types are: Knowledge Action, Email Alert, Field Update, and
Outbound Message.
•
Send actions and approval processes for email drafts aren’t supported in the Metadata API.
•
The metadata doesn’t include the order of active approval processes. You might need to reorder the approval processes in the destination org after deployment.
•
Before you implement an approval process for your organization, see “Considerations for Approvals” in the Salesforce Help.
File Suffix and Directory Location
ApprovalProcess components have the suffix
.approvalProcess
and are stored in the approvalProcesses
folder.
Version
ApprovalProcess components are available in API version 28.0 and later.
Fields
Field Name
active
Field Type
boolean allowRecall allowedSubmitters approvalPageFields boolean
Description
Required. Whether the approval process is active.
After an approval process is activated, you can’t add, delete, or change the order of the steps or change its reject or skip behavior, even if the process is inactive.
Whether to allow submitters to recall approval requests.
If set to false
, only administrators can recall approval requests.
Required. An array of users who are allowed to submit records for approval.
Specifies which fields to display on the approval page, where the approver goes to approve or reject the record. By default, the approval page displays the following:
•
Name
field
148
Metadata Types ApprovalProcess
Field Name
approvalStep description emailTemplate enableMobileDeviceAccess entryCriteria finalApprovalActions finalApprovalRecordLock finalRejectionActions finalRejectionRecordLock initialSubmissionActions label nextAutomatedApprover
Field Type
string string boolean boolean
boolean
string
Description
•
Owner
field (except for child objects)
If you enable notifications in Salesforce1, keep in mind that approvers may view this list of fields on a mobile device. Select only the fields necessary for users to decide whether to approve or reject records.
An array of approval step definitions.
Describes the approval process.
Specifies which email template to use for approval requests.
If not specified, the default email template is used.
When an approval process assigns an approval request to a user, Salesforce sends the user an approval request email.
Whether users can access an external version of the approval page from any browser, including those on mobile devices, without logging in to Salesforce. Corresponds to
Security
Settings
in the user interface.
If set to true
, approval steps can’t have approvers of type adhoc
.
If set to false
, approvers must log in to Salesforce to access the approval page.
Determines which records can enter the approval process.
Exclude this field to allow all records to enter the approval process.
Specifies which workflow actions to execute when all required approvals have been given for a record.
Whether to keep the record locked after it receives all necessary approvals. Default: false
.
Specifies which workflow actions to execute after a record enters the final rejection state.
Whether to keep the record locked after it’s finally rejected.
Default: false
.
Specifies which workflow actions to execute when a record is initially submitted for approval.
Required. Name of the approval process.
Specifies a standard or custom user hierarchy field that can be used to automatically assign the approver for an approval step.
If you exclude this field, then no approval step can use a user hierarchy field to automatically assign the approver.
149
Metadata Types
Field Name
postTemplate recallActions recordEditability showApprovalHistory
ApprovalProcess
Field Type
string
Description
Post template to use for Approvals in Chatter.
Chatter post approval notifications are only available for approval processes associated with an object that has been enabled for feed tracking.
RecordEditabilityType
(enumeration of type string)
Specifies which workflow actions to execute when a pending approval request is withdrawn.
Specifies which users can edit records that are pending approval. When a record is submitted for approval, it is automatically locked to prevent other users from editing it during the approval process. Valid values are:
•
AdminOnly
—Records pending approval can be edited by:
–
Users with the “Modify All Data” permission
–
Users with the “Modify All” object-level permission for the given object
•
AdminOrCurrentApprover
—Records pending approval can be edited by:
–
Users with the “Modify All Data” permission
–
Users with the “Modify All” object-level permission for the given object
–
The assigned approver, who must have edit access to the record through user permissions and the organization-wide sharing defaults for the given object boolean Whether to add the Approval History related list to the approval page, which is where the approver can view the approval request details and approve or reject the record. The
Approval History related list tracks a record through the approval process.
If you also want to add the Approval History related list to record detail and edit pages, use the Salesforce user interface to customize the page layouts for the given object.
ApprovalSubmitter
Represents a user or set of users who can submit records for approval.
150
Metadata Types ApprovalProcess
Field Name
submitter type
Field Type
string
Description
Identifies a specific user or set of users who can submit records for approval. This field is required, except when the following types are specified and the submitter field is ignored:
•
owner
•
creator
•
allInternalUsers
Example:
<allowedSubmitters >
<type >allInternalUsers </type >
</allowedSubmitters >
<allowedSubmitters >
<submitter >myGroup </submitter >
<type >group </type >
</allowedSubmitters >
ProcessSubmitterType
(enumeration of type string)
Required. Type of user or set of users who can submit records for approval. Valid values are:
•
group
•
role
•
user
•
roleSubordinates
•
roleSubordinatesInternal
•
owner
•
creator
•
partnerUser
•
customerPortalUser
•
portalRole
•
portalRoleSubordinates
•
allInternalUsers
—all Salesforce users in the organization
ApprovalPageField
Represents the selection of fields to display on the approval page, where an approver can view the approval request details and approve or reject the record.
Field Name
field
Field Type
string[]
Description
An array of fields that are displayed on the page for the approver to approve or reject the record.
151
Metadata Types ApprovalProcess
ApprovalStep
Represents a step in the approval process. Approval steps define the chain of approval for a particular approval process. Each step determines which records can advance to that step, who to assign approval requests to, and whether to let each approver’s delegate respond to the requests. The first step specifies what to do if a record doesn’t advance to that step. Later steps specify what happens if an approver rejects the request.
Note:
•
The order of the
ApprovalStep
entries in the approval process definition determines the order in which the approval steps are executed.
•
After an approval process is activated, you can’t add, delete, or change the order of the steps or change its reject or skip behavior, even if the process is inactive.
•
Each approval process supports up to 30 steps.
Field Name
allowDelegate approvalActions assignedApprover description entryCriteria ifCriteriaNotMet label name
Field Type
boolean
string
StepCriteriaNotMetType
(enumeration of type string) string string
Description
Whether to allow delegated approvers in this step of the approval process. A delegated approver is a user appointed by an assigned approver as an alternate for approval requests.
Specifies which workflow actions to execute when a record is approved in this step of the approval process.
Specifies the assigned approvers for this step of the approval process.
Describes the approval step.
Determines which records can enter this step of the approval process.
Specifies what to do for records that don’t meet the entry criteria. Valid values are:
•
ApproveRecord
—Approve the request and execute all final approval actions.
•
RejectRecord
—Reject the request and execute all final rejection actions. This option is available only for the first step in the approval process.
•
GotoNextStep
—Skip to the next approval step. If you select this option for the first approval step, and a record doesn’t meet the entry criteria for any other step, the record is rejected.
Required. Name of the approval step.
Required. Unique name of the approval step. It must contain only underscores and alphanumeric characters, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. The requirement for uniqueness is only within the specific approval process.
152
Metadata Types ApprovalProcess
Field Name
rejectBehavior rejectionActions
Field Type
Description
Required, except for the first step in the approval process.
Specifies what happens if the approver rejects the request during this approval step, unless it’s the first step in the approval process.
If the approver rejects the request in the first step in the approval process, the reject behavior is determined by the finalRejectionActions
.
Specifies which workflow actions to execute when a record is rejected in this step of the approval process.
ApprovalAction
Represents the actions that occur as a result of an approval process.
Field Name
action
Field Type
Description
An array of workflow actions to execute.
ApprovalStepApprover
Represents the assigned approvers for an approval step. Each step supports up to 25 approvers.
Field Name
approver whenMultipleApprovers
Field Type
RoutingType
(enumeration of type string)
Description
An array of assigned approvers for this step of the approval process.
Specifies how to handle approval or rejection when multiple approvers are assigned to the step. Valid values are:
•
Unanimous
—(Default) Require unanimous approval from all approvers for this step. The approval request for this step is rejected if any of the approvers reject the request.
•
FirstResponse
—Approve or reject based on the first response.
Approver
Represents an assigned approver for an approval step. Check out the Salesforce Help for Considerations for Setting Approvers.
Field Name
name
Field Type
string
Description
Identifies an assigned approver. This field is required, except when the type
is one of the following and the name
is ignored:
•
adhoc
•
userHierarchyField
153
Metadata Types ApprovalProcess
Field Name
type
Field Type
NextOwnerType
(enumeration of type string)
Description
Combined with the specified name
, this identifies an assigned approver. Valid values are:
•
adhoc
—The approver for the step must be selected manually. For the first step, the submitter selects the approver. For the second and later steps, the approver for the previous step selects the approver. For this value, exclude the name
field.
•
user
—A user in your organization. For this value, enter a username for the name field.
•
userHierarchyField
—A user specified in a standard or custom user hierarchy field, such as the standard
Manager
field. For this value, exclude the name
field.
The user hierarchy field must be defined in the
for the approval process.
•
relatedUserField
—A user specified in a user lookup field on the submitted record, such as the
Last Modified By
field. For this value, enter the name of the user lookup field for the name
field.
•
queue
—Automatically assign to a queue. For this value, enter the name of the queue for the name
field.
ApprovalEntryCriteria
Represents the criteria that records must meet to enter the approval process or an approval step. Specify either filter criteria or a formula, but not both.
Field Name
booleanFilter criteriaItems formula
Field Type
string
[] string
Description
Filter logic for criteriaItems
. Exclude this field if you enter a formula
.
Filter criteria that a record must meet to enter the approval process or approval step.
Approval processes don’t support valueField
entries in filter criteria.
Formula that must evaluate to true for a record to enter the approval process or approval step.
ApprovalStepRejectBehavior
Represents what happens if the approver rejects the request during this approval step, unless it’s the first step in the approval process.
For the first step in the approval process, the reject behavior is determined by the approval process’s final rejection actions.
Field Name
type
Field Type Description
StepRejectBehaviorType
(enumeration of type string)
Not allowed in the first step of the approval process. Valid values are:
•
RejectRequest
—Rejects the request even if previous steps were approved.
Salesforce performs all rejection actions specified for this step and all final rejection actions.
154
Metadata Types
Field Name Field Type
ApprovalProcess
Description
•
BackToPrevious
—Rejects the request, and returns the approval request to the previous approver. Salesforce performs all rejection actions specified for this step.
NextAutomatedApprover
Represents the user hierarchy field to use as the next automated approver for the approval process. If defined, the user specified in the hierarchy field can be automatically assigned as the approver in one or more approval steps.
Description Field Name Field
Type
useApproverFieldOfRecordOwner boolean userHierarchyField string
Required. Whether the first executed approval step should use the specified userHierarchyField
in the record owner’s user record—instead of the submitter’s user record—as the approver. All remaining steps use the specified userHierarchyField
in the user record of the preceding step’s approver.
Required. Standard or custom user hierarchy field whose value specifies which user to assign as the approver. For example, the standard
Manager
hierarchy field can be used to assign approvers for employee
PTO (paid time off) requests.
Declarative Metadata Sample Definition
The following is an example of an ApprovalProcess component:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ApprovalProcess xmlns= "http://soap.sforce.com/2006/04/metadata">
<active >false </active >
<allowRecall >false </allowRecall >
<allowedSubmitters >
<type >owner </type >
</allowedSubmitters >
<allowedSubmitters >
<submitter >USSalesRep </submitter >
<type >role </type >
</allowedSubmitters >
<allowedSubmitters >
<submitter >MarketingGroup </submitter >
<type >group </type >
</allowedSubmitters >
<allowedSubmitters >
<submitter >[email protected]
</submitter >
<type >user </type >
</allowedSubmitters >
<approvalPageFields >
<field >Name </field >
155
Metadata Types
<field >Owner </field >
<field >MyLeadCustomField__c </field >
<field >Address </field >
</approvalPageFields >
<approvalStep >
<allowDelegate >false </allowDelegate >
<approvalActions >
<action >
<name >LeadApprovedTask1 </name >
<type >Task </type >
</action >
<action >
<name >LeadApprovedTask2 </name >
<type >Task </type >
</action >
</approvalActions >
<assignedApprover >
<approver >
<type >adhoc </type >
</approver >
</assignedApprover >
<label >Step1 </label >
<name >Step1 </name >
<rejectionActions >
<action >
<name >LeadRejectedTask </name >
<type >Task </type >
</action >
</rejectionActions >
</approvalStep >
<approvalStep >
<allowDelegate >false </allowDelegate >
<assignedApprover >
<approver >
<type >userHierarchyField </type >
</approver >
</assignedApprover >
<entryCriteria >
<criteriaItems >
<field >Lead.CreatedDate
</field >
<operation >greaterThan </operation >
<value >3/25/2013 </value >
</criteriaItems >
<criteriaItems >
<field >User.IsActive
</field >
<operation >notEqual </operation >
<value >true </value >
</criteriaItems >
</entryCriteria >
<ifCriteriaNotMet >ApproveRecord </ifCriteriaNotMet >
<label >Step2 </label >
<name >Step2 </name >
<rejectBehavior >
<type >RejectRequest </type >
156
ApprovalProcess
Metadata Types
</rejectBehavior >
</approvalStep >
<approvalStep >
<allowDelegate >true </allowDelegate >
<assignedApprover >
<approver >
<name >MarketingTeamQueue </name >
<type >queue </type >
</approver >
<approver >
<name >LastModifiedBy </name >
<type >relatedUserField </type >
</approver >
<approver >
<name >[email protected]
</name >
<type >user </type >
</approver >
<whenMultipleApprovers >FirstResponse </whenMultipleApprovers >
</assignedApprover >
<entryCriteria >
<formula >CONTAINS( MyLeadCustomField__c , 'Salesforce') </formula >
</entryCriteria >
<label >Step3 </label >
<name >Step3 </name >
<rejectBehavior >
<type >BackToPrevious </type >
</rejectBehavior >
</approvalStep >
<emailTemplate >MyFolder/LeadsNewassignmentnotification </emailTemplate >
<enableMobileDeviceAccess >false </enableMobileDeviceAccess >
<entryCriteria >
<criteriaItems >
<field >Lead.AnnualRevenue
</field >
<operation >greaterThan </operation >
<value >10500 </value >
</criteriaItems >
<criteriaItems >
<field >Lead.MyLeadCustomField__c
</field >
<operation >equals </operation >
<value >Salesforce </value >
</criteriaItems >
</entryCriteria >
<finalApprovalActions >
<action >
<name >LeadEmailContacted </name >
<type >Alert </type >
</action >
</finalApprovalActions >
<finalApprovalRecordLock >true </finalApprovalRecordLock >
<finalRejectionActions >
<action >
<name >ProcessRejectedMessageAction </name >
<type >OutboundMessage </type >
</action >
ApprovalProcess
157
Metadata Types AssignmentRules
</finalRejectionActions >
<finalRejectionRecordLock >false </finalRejectionRecordLock >
<initialSubmissionActions >
<action >
<name >LeadFieldUpdate </name >
<type >FieldUpdate </type >
</action >
<action >
<name >NewLeadEmail </name >
<type >Alert </type >
</action >
</initialSubmissionActions >
<label >SampleProcess </label >
<nextAutomatedApprover >
<useApproverFieldOfRecordOwner >false </useApproverFieldOfRecordOwner >
<userHierarchyField >customlookupuserfield__c </userHierarchyField >
</nextAutomatedApprover >
<postTemplate >MyPostTemplate </postTemplate >
<recallActions >
<action >
<name >ProcessRecalledMessageAction </name >
<type >OutboundMessage </type >
</action >
</recallActions >
<recordEditability >AdminOnly </recordEditability >
<showApprovalHistory >false </showApprovalHistory >
</ApprovalProcess >
AssignmentRules
Represents assignment rules that allow you to automatically route cases to the appropriate users or queues. You can access rules metadata for all applicable objects, for a specific object, or for a specific rule on a specific object. The package.xml
syntax for accessing all assignment rules for all objects is:
<types>
<members>*</members>
<name>AssignmentRules</name>
</types>
All rules for a specific object uses a similar syntax without the wildcard. For example, all assignment rules for the Case object would use this syntax:
<types>
<members>Case</members>
<name>AssignmentRules</name>
</types>
You can also access specific assignment rules for an object. The following example only accesses the “samplerule” and “newrule” assignment rules on the Case object. Notice that for this example the type name syntax is
AssignmentRule
and not
AssignmentRules
.
<types>
<members>Case.samplerule</members>
158
Metadata Types AssignmentRules
<members>Case.newrule</members>
<name>AssignmentRule</name>
</types>
File Suffix and Directory Location
Assignment rules for an object have the suffix
.assignmentRules
and are stored in the assignmentRules
folder. For example, all Case assignment rules are stored in the
Case.assignmentRules
file.
Version
AssignmentRules components are available in API version 27.0 and later.
Fields
Field Name
assignmentRule
Field Type
Description
Represents the definitions of the named assignment rules.
AssignmentRule
Specifies whether the rule is active or not and its definition. Rules are processed in the order they appear within the AssignmentRules container.
Field Name
active fullname ruleEntry
Field Type
boolean string
Description
Indicates whether the assignment rule is active ( true
) or not ( false
).
Inherited from Metadata , this field is not defined in the
WSDL for this metadata type. It must be specified when
creating, updating, or deleting. See create()
example of this field specified for a call.
This value cannot be null
.
Represents the type and description for the assignment rule.
RuleEntry
Represents the fields used by the rule.
Field Name
assignedTo
Field Type
string
Description
The name of the user or queue the item is assigned to.
159
Metadata Types AssignmentRules
Field Name
assignedToType booleanFilter criteriaItems formula notifyCcRecipients overrideExistingTeams team template
Field Type Description
AssignToLookupValueType
(
of type string)
Valid values are:
•
User
•
Queue string
string boolean boolean string[] string
Advanced filter conditions that were specified for the rule.
The items in the list that define the assignment criteria.
The validation formula.
Note: Specify either formula
or criteriaItems
, but not both fields.
Specifies whether email addresses included on the Cc line of an incoming Email-to-Case or Web-to-Lead message should be included on the Cc line of the auto-response to that message ( true
) or not ( false
). Available in API version 32.0 and later.
Specifies whether the case team should be reset when the assignment is done true
) or if the current team is added to the case instead of replacing the previous team ( false
).
The name of the case team. It may occur 0 or more times.
Specifies the template to use for the email that is automatically sent to the designated recipient.
Declarative Metadata Sample Definition
The following is an example file showing two assignment rules on the Case object:
<AssignmentRules xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance">
<assignmentRule >
<fullName >samplerule </fullName >
<active >false </active >
<ruleEntry >
<assignedTo >[email protected]
</assignedTo >
<assignedToType >User </assignedToType >
<criteriaItems >
<field >Case.IsEscalated
</field >
<operation >equals </operation >
<value >True </value >
</criteriaItems >
<template >emailtemplate </template >
</ruleEntry >
</assignmentRule >
<assignmentRule >
<fullName >Another samplerule </fullName >
<active >false </active >
160
Metadata Types AuraDefinitionBundle
<ruleEntry >
<assignedTo >[email protected]
</assignedTo >
<assignedToType >User </assignedToType >
<criteriaItems >
<field >Case.IsEscalated
</field >
<operation >equals </operation >
<value >False </value >
</criteriaItems >
<template >emailtemplate </template >
</ruleEntry >
</assignmentRule >
</AssignmentRules >
AuraDefinitionBundle
Represents a Lightning definition bundle. A bundle contains a Lightning definition and all its related resources. The definition can be a component, application, event, interface, or a tokens collection.
File Suffix and Directory Location
A Lightning bundle is a folder that contains definition files. Unlike other metadata components, an AuraDefinitionBundle component isn’t represented by a single component file but instead by a collection of component definition files. Each definition file represents a resource in a bundle, such as markup, applications, code files (including controllers and helpers), events, documentation, and interfaces.
For example, this directory structure shows the hierarchy of the folders and files for two bundles: bundle1
and bundle2
.
aura bundle1 bundle1.cmp
bundle1Controller.js
bundle2 bundle2.app
bundle2.cmp
bundle2Controller.js
bundle2.auradoc
Lightning bundles must be under a top-level folder that’s named aura
. Each bundle must have its own subfolder under the aura folder. The name of each definition file must start with the bundle name.
A bundle doesn’t have a suffix. Definition files can have one of these suffixes:
Suffix
.app
.cmp
.design
.evt
.intf
.js
Component Type
Application
Component
Design
Event
Interface
Controller, Helper, or Renderer
161
Metadata Types AuraDefinitionBundle
Suffix
.svg
.css
.auradoc
.tokens
Component Type
SVG image
Style
Documentation
Tokens collection
Each bundle can have only one file each with a suffix of
.app
,
.cmp
,
.design
,
.evt
,
.intf
, or
.tokens
.
Version
AuraDefinitionBundle components are available in API version 32.0 and later.
Design and SVG components are available in API version 33.0 and later.
Special Access Rules
Definitions can be created only in organizations with defined namespaces.
Fields
Field Name
apiVersion controllerContent description designContent documentationContent helperContent markup modelContent packageVersions rendererContent styleContent
SVGContent
Field Type
double base64Binary string base64Binary base64Binary base64Binary base64Binary base64Binary
base64Binary base64Binary base64Binary
Description
The API version for this definition bundle. When you create an Aura bundle, you can specify the API version to save it with. Available in API version 35.0 and later.
The content of a JavaScript client-side controller.
The specification of the Aura bundle. Available in API version 35.0 and later.
The content of a design definition. Only valid inside a component bundle.
The content of a documentation definition.
The content of a JavaScript helper.
The content of the markup for a definition.
Deprecated. Do not use.
The list of installed managed package versions that this Aura definition bundle references. Available in API version 35.0 and later.
The content of a JavaScript client-side renderer.
The CSS for the definition.
The SVG image for the definition.
162
Metadata Types
Field Name
testsuiteContent type
Field Type
base64Binary
AuraBundleType
(enumeration of type string)
Description
Reserved for future use.
The definition type. Valid values are:
•
Application
•
Component
•
Event
•
Interface
•
Tokens
AuraDefinitionBundle
Declarative Metadata Sample Definition
This example shows the directory structure of an AuraDefinitionBundle component.
aura sampleCmp sampleCmp.cmp
sampleCmpController.js
The following samples show the contents of the metadata definition files that correspond to the sample aura
directory.
Content of sampleCmp.cmp
:
<aura:component >
<aura:attribute name= "val1" type= "String" default= "Value"/>
<aura:attribute name= "val2" type= "String" />
<aura:handler name= "init" value= "{!this}" action= "{!c.myAction}"/>
<ui:outputText value= 'Hello world!'/>
<ui:outputText value= '{!v.val1}'/>
<ui:outputText value= '{!v.val2}'/>
</aura:component >
Content of sampleCmpController.js
:
({ myAction : function(component) { component.set('v.val1','Value1');
}) component.set('v.val2','Value2');
}
This package.xml
references the definitions of all Lightning components that are present in the sampleCmp
bundle.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >sampleCmp </members >
<name >AuraDefinitionBundle </name >
</types >
<version >41.0
</version >
</Package >
163
Metadata Types AuthProvider
AuthProvider
Represents an authentication provider (or auth provider) in your organization. An auth provider enables users to log in to your Salesforce organization using their login credentials from an external service provider such as Facebook
©
or Janrain
©
. This type extends the Metadata
metadata type and inherits its fullName
field.
File Suffix and Directory Location
Authentication providers are stored in the authproviders
directory. The file name matches the URL suffix and the extension is
.authprovider
. For example, an auth provider with URL suffix
FacebookProvider
is stored in authproviders/FacebookProvider.authprovider
.
Version
Authentication providers are available in API version 27.0 and later.
Special Access Rules
Only users with the “Customize Application” and “Manage AuthProviders” permissions can access this object.
Fields
Field Name
authorizeUrl
Field Type
string consumerKey consumerSecret string string
Description
Required, but only if providerType
is
OpenIdConnect
. The OAuth authorization endpoint URL. Used only with OpenID Connect authentication providers. Available in API version 29.0 and later.
In API version 33.0 and later, the behavior of this field changed to support the Salesforce-managed auth provider configuration, which allows
Salesforce to manage the value for Facebook, Salesforce, LinkedIn, Twitter
or Google authentication. For more information, see the Usage section.
Required. The app’s key that is registered at the third-party single sign-on provider.
In API version 33.0 and later, the behavior of this field changed to support the Salesforce-managed auth provider configuration, which allows
Salesforce to manage the value for Facebook, Salesforce, LinkedIn, Twitter
or Google authentication. For more information, see the Usage section.
Required. The consumer secret of the app that is registered at the third-party single sign-on provider. This field cannot be updated. When using create()
this field must be encrypted. To create an encrypted form of the consumer secret from plain text:
1. Create an auth provider with the consumerSecret
plain text value.
2. Save the auth provider.
164
Metadata Types
Field Name
customMetadataTypeRecord defaultScopes
DeveloperName errorUrl executionUserId friendlyName iconUrl idTokenIssuer logoutUrl
Field Type
string string string string string string string string string
AuthProvider
Description
3. Create an outbound change set that includes the auth provider component.
The new change set .xml file will have an entry in the form
<consumerSecret >++XYZ++ </consumerSecret >
where
++XYZ++ is the encrypted secret.
In API version 33.0 and later, the behavior of this field changed to support the Salesforce-managed auth provider configuration, which allows
Salesforce to manage the value for Facebook, Salesforce, LinkedIn, Twitter
or Google authentication. For more information, see the Usage section.
Required, but only with custom authentication provider plug-ins, when
ProviderType
is
Custom
. The API name of the authentication provider. Available in API version 36.0 and later.
Required, but only if providerType
is
OpenIdConnect
The scopes to be sent with the authorization request, if not specified when a flow is started. Used only with OpenID Connect authentication providers. Available in API version 29.0 and later.
In API version 33.0 and later, the behavior of this field changed to support the Salesforce-managed auth provider configuration, which allows
Salesforce to manage the value for Facebook, Salesforce, LinkedIn, Twitter
or Google authentication. For more information, see the Usage section.
Required. Used when referring to the auth provider from a program.
A custom error URL for the provider to use to report any errors.
The user that runs the Apex handler class. The user must have the “Manage
Users” permission. A user is required if you specify a registration handler class.
Required. A user-friendly name for the provider.
The path to an icon to use as a button on the login page for a community.
Users click the button to log in to a community with the associated authentication provider, such as Twitter
©
or LinkedIn
©
. Available in API version 32.0 and later.
Only available if providerType
is
OpenIdConnect
. This value identifies the source of the authentication token in the form
https:
URI
. Used only with OpenID Connect authentication providers. If provided,
Salesforce validates the returned id_token
value. The OpenID Connect specification requires an id_token
value to be returned with the access_token
value. Available in API version 30.0 and later.
Provides a specific destination for users after they log out if they authenticated using the single sign-on flow. The URL must be fully qualified with an http
or https
prefix, such as
165
Metadata Types AuthProvider
Field Name
plugin providerType registrationHandler sendAccessTokenInHeader sendClientCredentialsInHeader
Field Type Description
https://acme.my.salesforce.com
. Available in API version
33.0 and later.
string An existing Apex class that extends the
Auth.AuthProviderPluginClass
abstract class. Available in
API version 36.0 and later.
AuthProviderType
type string)
Required. The third-party single sign-on provider to use. Valid values are:
•
•
•
Salesforce
•
Janrain
•
(Available in API version 32.0 and later.)
•
(Available in API version 32.0 and later.)
•
OpenIdConnect
(Available in API version 29.0 and later.)
Note: This type requires values for the following fields:
–
authorizeUrl
–
defaultScopes
–
tokenUrl
–
userInfoUrl string boolean boolean
•
MicrosoftACS
Microsoft Access Control Service typically provides authentication for a Microsoft Office 365 service like SharePoint
®
Online.
(Available in API version 31.0 and later.)
•
GitHub
—Use the
GitHub
provider to log in users of your Force.com
app to GitHub using OAuth. When logged in to GitHub, your app can make calls to GitHub APIs. The
GitHub
provider isn’t available as a single sign-on provider, so users can’t log in to your Salesforce org using their GitHub login credentials. (Available in API version 35.0 and later.)
•
Custom
—A provider configured with a custom authentication provider plug-in. (Available in API version 36.0 and later.)
An existing Apex class that implements the
Auth.RegistrationHandler
interface.
Required only if providerType
is
OpenIdConnect
. When true
, the access token is sent to the userInfoUrl
in a header instead of a query string. Used only with OpenID Connect authentication providers.
Available in API version 30.0 and later.
Required only if providerType
is
OpenIdConnect
. When true
, the client credentials are sent in a header, instead of a query string, to the tokenUrl
. The credentials are in the standard OpenID Connect Basic
Credentials header form, which is
Basic <token>
, where
<token>
166
Metadata Types
Field Name
tokenUrl userInfoUrl
Field Type
string string
AuthProvider
Description
is the base64-encoded string
"clientkey:clientsecret"
. Used only with OpenID Connect authentication providers. Available in API version
30.0 and later.
Required, but only if providerType
is
OpenIdConnect
. The OAuth token endpoint URL. Used only with OpenID Connect authentication providers. Available in API version 29.0 and later.
In API version 33.0 and later, the behavior of this field changed to support the Salesforce-managed auth provider configuration, which allows
Salesforce to manage the value for Facebook, Salesforce, LinkedIn, Twitter
or Google authentication. For more information, see the Usage section.
Required, but only if providerType
is
OpenIdConnect
. The
OpenID Connect endpoint URL. Used only with OpenID Connect authentication providers. Available in API version 29.0 and later.
In API version 33.0 and later, the behavior of this field changed to support the Salesforce-managed auth provider configuration, which allows
Salesforce to manage the value for Facebook, Salesforce, LinkedIn, Twitter
or Google authentication. For more information, see the Usage section.
Declarative Metadata Sample Definition
<?xml
version= "1.0" encoding= "UTF-8"?>
<AuthProvider xmlns= "http://soap.sforce.com/2006/04/metadata">
<consumerKey >yourappkey </consumerKey >
<consumerSecret>PwdVxXjzu3NCZ3MD4He+wA= = </consumerSecret >
<executionUser >[email protected]
</executionUser >
<friendlyName >FacebookAuthProvider </friendlyName >
<providerType >Facebook </providerType >
<registrationHandler >RegistrationHandler </registrationHandler >
</AuthProvider >
The following is an example package manifest that references the previous AuthProvider definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >FacebookAuthProvider </members >
<name >AuthProvider </name >
</types >
<version >28.0
</version >
</Package >
Usage
For API version 33.0 and later when implementing the Salesforce-managed authentication provider configuration, you can have Salesforce create and manage the following fields for you:
167
Metadata Types AutoResponseRules
•
authorizeUrl
•
consumerKey
•
consumerSecret
•
defaultScopes
•
tokenURL
•
userInfoUrl
To configure a Salesforce-managed authentication provider, set up a Facebook, Salesforce, LinkedIn, Twitter or Google auth provider and leave all of the listed fields blank. Salesforce automatically creates values for you. However, if you provide a value for any of these fields, then consumerKey
and consumerSecret
must also be specified.
AutoResponseRules
Represents an auto-response rule that sets conditions for sending automatic email responses to lead or case submissions based on the attributes of the submitted record. You can access rules metadata for all applicable objects, for a specific object, or for a specific rule on a specific object. The package.xml
syntax for accessing all auto-response rules for all objects is:
<types>
<members>*</members>
<name>AutoResponseRules</name>
</types>
All rules for a specific object uses a similar syntax without the wildcard. For example, all auto-response rules for the Case object would use this syntax:
<types>
<members>Case</members>
<name>AutoResponseRules</name>
</types>
You can also access specific auto-response rules for an object. The following example only accesses the “samplerule” and “newrule” auto-response rules on the Case object. Notice that for this example the type name syntax is
AutoResponseRule
and not
AutoResponseRules
.
<types>
<members>Case.samplerule</members>
<members>Case.newrule</members>
<name>AutoResponseRule</name>
</types>
File Suffix and Directory Location
AutoResponseRules for an object have the suffix
.autoResponseRules
and are stored in the autoResponseRules
folder.
For example, all Case auto-response rules are stored in the
Case.autoResponseRules
file.
Version
AutoResponseRules components are available in API version 27.0 and later.
168
Metadata Types
Fields
Field Name
autoresponseRule
AutoResponseRules
Field Type Description
Represents the definitions of the named auto-response rules.
AutoResponseRule
Represents whether a rule is active or not and the order in which the entry is processed in the rule.
Field Name
active fullname ruleEntry
Field Type
boolean string
Description
Indicates whether the autoresponse rule is active ( true
) or not ( false
).
Inherited from Metadata , this field is not defined in the
WSDL for this metadata type. It must be specified when
creating, updating, or deleting. See create()
example of this field specified for a call.
This value cannot be null
.
Represents the type and description for the auto-response rule.
RuleEntry
Represents the fields used by the rule.
Field Name
booleanFilter criteriaItems formula
Field Type
string
string replyToEmail senderEmail senderName template string string string string
Description
Advanced filter conditions that were specified for the rule.
The items in the list that define the assignment criteria.
The validation formula.
Note: Specify either formula
or criteriaItems
, but not both fields.
The email address that appears in the reply-to header.
The email address of the person or queue sending the email notification.
The name of the person or queue sending the email notification.
Specifies the template to use for the email that is automatically sent to the designated recipient.
169
Metadata Types BrandingSet
Declarative Metadata Sample Definition
The following is an example AutoResponseRules component:
<AutoResponseRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<autoResponseRule >
<fullName >ajbdeploytest2 </fullName >
<active >false </active >
<ruleEntry >
<criteriaItems >
<field >Case.Description
</field >
<operation >contains </operation >
<value >testing </value >
</criteriaItems >
<senderEmail >[email protected]
</senderEmail >
<senderName >tester name j </senderName >
<replyToEmail >test@@test.org
</replyToEmail >
<template >emailtemplate </template >
</ruleEntry >
</autoResponseRule >
</AutoResponseRules >
BrandingSet
Represents the definition of a set of branding properties for a community, as defined in the Branding Panel in Community Builder. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
BrandingSet components have the suffix brandingSet
and are stored in the brandingSets
folder.
Version
BrandingSet components are available in API version 40.0 and later.
Special Access Rules
This object is available only if Salesforce Communities is enabled in your org.
Fields
Field Name
brandingSetProperty description masterLabel
Field Type Description
[] An array containing the name and value of each branding property, such as
TextColor:#333
.
string string
A description of the set of branding properties.
Required. The user interface name of the set of branding properties.
170
Metadata Types
Field Name
type
Field Type
string
Description
The assigned branding set definition for this BrandingSet.
BrandingSetProperty
Represents the definition of a branding property in the Branding panel in Community Builder.
Field Name
propertyName propertyValue
Field Type
string string
Description
Required. The name of the branding property, such as
TextColor
.
The value of the branding property, such as
#333
.
Declarative Metadata Sample Definition
The following is an example of a BrandingSet component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<BrandingSet xmlns= "http://soap.sforce.com/2006/04/metadata">
<brandingSetProperty >
<propertyName >TextTransformStyle </propertyName >
<propertyValue >uppercase </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >DetailTextColor </propertyName >
<propertyValue >#696969 </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >BorderColor </propertyName >
<propertyValue >#D4D4D4 </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >HeaderImage </propertyName >
<propertyValue > </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >HeaderFonts </propertyName >
<propertyValue >Montserrat </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >CardBackgroundColor </propertyName >
<propertyValue >rgba(255, 255, 255, 0) </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >LoginBackgroundColor </propertyName >
<propertyValue >#F4F4F4 </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >ActionColor </propertyName >
<propertyValue >#2574A9 </propertyValue >
</brandingSetProperty >
BrandingSet
171
Metadata Types
<brandingSetProperty >
<propertyName >_ActionColorTrans </propertyName >
<propertyValue >rgba(25, 124, 190, 0.9) </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >CompanyLogo </propertyName >
<propertyValue > </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >LoginBackgroundImage </propertyName >
<propertyValue >../../../../sfsites/picasso/core/external/ salesforceIdentity/images/background.jpg?v= 1 </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >_LinkColorDarker </propertyName >
<propertyValue >#135F90 </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >_ActionColorDarker </propertyName >
<propertyValue >#135F90 </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >_HoverColor </propertyName >
<propertyValue >rgba(25, 124, 190, 0.1) </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >ErrorFontColor </propertyName >
<propertyValue >#ff9e9e </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >TextColor </propertyName >
<propertyValue >#333 </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >OverlayTextColor </propertyName >
<propertyValue >#FFFFFF </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >PrimaryFont </propertyName >
<propertyValue >Lato </propertyValue >
</brandingSetProperty >
<brandingSetProperty >
<propertyName >LinkColor </propertyName >
<propertyValue >#2574A9 </propertyValue >
</brandingSetProperty >
<masterLabel >ex </masterLabel >
<type >napili:branding-napili-merged </type >
</BrandingSet >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyBrandingSet </members >
172
BrandingSet
Metadata Types
<name >BrandingSet </name >
</types >
<version >40.0
</version >
</Package >
CallCenter
Represents the Call Center definition used to integrate Salesforce with a third-party computer-telephony integration (CTI) system.
File Suffix and Directory Location
CallCenter components have the suffix callCenter
and are stored in the callCenters
folder.
Version
CallCenter components are available in API version 27.0 and later.
Fields
Field Name
adapterUrl displayName displayNameLabel internalNameLabel version sections
Field Type
string string
Description
Optional field. A URL that points to an adapter.
The display name of this call center.
string string
The label of the displayName
field in Call Center setup page.
The label of the internalName
field in Call Center setup page.
string The version of this call center.
Custom setup items defined for this call center.
CallCenterSection
Field Name
items label name
Field Type
string string
Description
Contains the label, name, and value that describe the sections.
The label of the section.
The name of the section.
CallCenter
173
Metadata Types
CallCenterItem
Field Name
label name value
Field Type
string string int or URL
Declarative Metadata Sample Definition
The following is an example of a CallCenter component:
<?xml
version= "1.0" encoding= "UTF-8"?>
<CallCenter xmlns= "http://soap.sforce.com/2006/04/metadata">
<adapterUrl >http://localhost:11000 </adapterUrl >
<displayName >Demo Call Center Adapter </displayName >
<displayNameLabel >Display Name </displayNameLabel >
<internalNameLabel >Internal Name </internalNameLabel >
<sections >
<items >
<label >Description </label >
<name >reqDescription </name >
<value >Demo Call Center Adapter </value >
</items >
<items >
<label >CTI Connector ProgId </label >
<name >reqProgId </name >
<value >DemoAdapter.DemoAdapter.1
</value >
</items >
<items >
<label >Version </label >
<name >reqVersion </name >
<value >3.0
</value >
</items >
<items >
<label >CTI Adapter URL </label >
<name >reqAdapterUrl </name >
<value >http://localhost:11000 </value >
</items >
<label >General Information </label >
<name >reqGeneralInfo </name >
</sections >
<sections >
<items >
<label >Outside Prefix </label >
<name >reqOutsidePrefix </name >
<value >1 </value >
</items >
<items >
<label >Long Distance Prefix </label >
<name >reqLongDistPrefix </name >
Description
The label of the custom setup item.
The name of the custom setup item.
The value of the custom setup item.
CallCenter
174
Metadata Types
<value >1 </value >
</items >
<items >
<label >International Prefix </label >
<name >reqInternationalPrefix </name >
<value >01 </value >
</items >
<label >Dialing Options </label >
<name >reqDialingOptions </name >
</sections >
<version >4 </version >
</CallCenter >
CampaignInfluenceModel
Represents a campaign influence model used by Customizable Campaign Influence.
You can’t configure Customizable Campaign Influence via the Metadata API, but you can add a campaign influence model.
Note: This information applies only to Customizable Campaign Influence and not to Campaign Influence 1.0
.
File Suffix and Directory Location
CampaignInfluenceModel values are stored in the campaignInfluenceModels
directory of the corresponding package directory.
The file name matches the model name, and the extension is
.campaignInfluenceModel
.
Version
CampaignInfluenceModel components are available in API version 38.0 and later.
Fields
Field Name
isDefaultModel
Field Type
boolean isModelLocked modelDescription name boolean string string
Description
Indicates if the model is the primary model or not. Only campaign influence records associated with the primary model appear on
Campaigns and Opportunities.
Indicates if the model is locked or not. Campaign Influence records for locked models can be manipulated only via the API.
A description of the influence model.
A unique name for the model.
Declarative Metadata Sample Definition
The following is an example of a CampaignInfluenceModel component that represents the default Salesforce campaign influence attribution model. The default isDefaultModel
value of true
can be changed if another model is created and set as the primary
175
CampaignInfluenceModel
Metadata Types CaseSubjectParticle model. The isModelLocked
value of true
means that Campaign Influence records for this model can be seen in the UI, but not created, updated, or deleted.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CampaignInfluenceModel xmlns= "http://soap.sforce.com/2006/04/metadata">
<isDefaultModel >true </isDefaultModel >
<isModelLocked >true </isModelLocked >
<modelDescription >Primary Campaign gets 100% of the revenue share </modelDescription >
<name >Salesforce Model </name >
</CampaignInfluenceModel >
The following is an example of a CampaignInfluenceModel component that creates an influence model called Last Touch, which will not be the primary model.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CampaignInfluenceModel xmlns= "http://soap.sforce.com/2006/04/metadata">
<isDefaultModel >false </isDefaultModel >
<isModelLocked >true </isModelLocked >
<modelDescription >This model gives 100% influence attribution to the last campaign that touched the contact.
</modelDescription >
<name >Last Touch </name >
</CampaignInfluenceModel >
CaseSubjectParticle
Represents the Social Business Rules custom format for the Case Subject field on cases created from inbound social posts.
File Suffix and Directory Location
CaseSubjectParticle components have the suffix
.CaseSubjectParticle
and are stored in the
CaseSubjectParticles folder.
Version
CaseSubjectParticle is available in API version 41.0 and later.
Fields
Field Name
index
Field Type
int textField string
Description
Required. The order in which the custom Case Subject is generated, meaning if the social network is 0 and the social message is 1, then the subject generates as
Twitter |
Tweet
.
Specifies inbound social content added to Case Subject in case records.
176
Metadata Types
Field Name
type
Certificate
Field Type Description
CaseSubjectParticleType
(
string)
Required. Specifies the custom Case Subject format from which inbound social content appears in case records. Valid values are:
•
ProvidedString
•
Source
•
MessageType
•
SocialHandle
•
SocialNetwork
•
Sentiment
•
RealName
•
Content
•
PipeSeparator
•
ColonSeparator
•
HyphenSeparator
Declarative Metadata Sample Definition
This is a sample of a
.CaseSubjectParticle
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= http://soap.sforce.com/2006/04/metadata"">
<types >
<members >* </members >
<name >CaseSubjectParticle </name >
</types >
<version >41.0
</version >
</Package >
Certificate
Represents a certificate used for digital signatures which verify that requests are coming from your org. Certificates are used for either authenticated single sign-on with an external website, or when using your org as an identity provider. This type extends the
MetadataWithContent metadata type and inherits its
content
and fullName
fields.
File Suffix and Directory Location
Certificate components have the suffix
.crt
and are stored in the certs
folder.
Version
Certificate components are available in API version 36.0 and later.
177
Metadata Types
Fields
Field Name
caSigned keySize masterLabel privateKeyExportable
Field Type
boolean encryptedWithPlatformEncryption boolean expirationDate dateTime int string boolean
Certificate
Description
Required. Indicates whether this certificate is signed by the issuer (true) or not (false).
Indicates whether this certificate is encrypted with Platform Encryption.
The date that this certificate expires and is no longer usable. For self-signed certificates, if keySize
is 2048 bits, the expiration date is automatically 1 year after you create the certificate. If keySize
is 4096 bits, the expiration date is automatically 2 years after you create the certificate. For CA-signed certificates, expirationDate
is automatically updated to the signed certificate’s expiration date when a signed certificate chain is uploaded. The date format is YYYY-MM-DD.
Certificate keys can be either 2048 bits or 4096 bits. A certificate with
4096-bit keys lasts 2 years, and a certificate with 2048-bit keys lasts 1 year. Certificates with 2048-bit keys are faster than certificates with
4096-bit keys. If keySize
isn’t specified when you create a certificate, the key size defaults to 2048 bits.
Required. A user-friendly name for the certificate that appears in the
Salesforce user interface, such as in Certificate and Key Management.
Limit: 64 characters.
Indicates whether this certificate’s private key is exportable. If privateKeyExportable
isn’t specified when you create a certificate, its default value is true
.
Usage
The Metadata API can be used to create a self-signed or a CA-signed certificate. The .crt file’s contents are the certificate chain, which can be updated when you renew or update the intermediate certificate chain of a CA-signed certificate. After creating a CA-signed certificate, the .crt file contains a certificate signing request (CSR). For details, see About Salesforce Certificates and Keys in the Salesforce
Help.
To copy an existing certificate’s X.509 parameter data to a new certificate, upload the existing certificate. You can also use this procedure to renew a certificate. A new private+public key pair is created with a new certificate. Salesforce doesn’t allow the import or export of the private key via the API. For details, see Repeating an Upload of a CA-Signed Certificate in Salesforce Help.
Using the Metadata API, you can download a CSR. After it’s CA-signed, you can upload it back to Salesforce.
•
Downloading a CSR. The CSR is downloadable after a CA-signed cert is created. If a signed certificate hasn’t been uploaded to that certificate, the content of the downloaded .crt file is the CSR.
•
Uploading a CA-Signed Certificate. To upload the signed certificate chain back to Salesforce, save the signed certificate chain as the content of the .crt file and update it via the Metadata API.
Note: After the signed certificate chain is uploaded via the Metadata API, the CSR of that certificate can’t be downloaded via the
API anymore. This is because the content of the .crt file is the signed certificate chain. However, the CSR can still be downloaded via the UI.
178
Metadata Types ChatterExtension
Declarative Metadata Sample Definition
The following is an example of a Certificate component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Certificate xmlns= "http://soap.sforce.com/2006/04/metadata">
<caSigned >true </caSigned >
<encryptedWithPlatformEncryption >true </encryptedWithPlatformEncryption >
<expirationDate >2017-03-19 </expirationDate >
<keySize >4096 </keySize >
<masterLabel >My Certificate Name </masterLabel >
<privateKeyExportable >true </privateKeyExportable >
</Certificate >
ChatterExtension
Represents the metadata used to describe a Rich Publisher App that’s integrated with the Chatter publisher.
Retrieving ChatterExtension
Using Workbench or another API tool, you can get extension information from package.xml using this code.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >xw1 </members >
<name >ChatterExtension </name >
</types >
<version >41.0
</version >
</Package >
Use the
<members>
tag to name a specific extension (in this example,
xw1
), or use the wildcard (*) symbol to retrieve all your extensions.
Here’s an example of retrieved information.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ChatterExtension xmlns= "http://soap.sforce.com/2006/04/metadata">
<compositionComponent >xwComp </compositionComponent >
<description >des </description >
<extensionName >xw1 </extensionName >
<headerText >h1 </headerText >
<hoverText >h2 </hoverText >
<icon >tiger </icon >
<masterLabel >master </masterLabel >
<renderComponent >xwRend </renderComponent >
<type >Lightning </type >
</ChatterExtension >
Version
ChatterExtension is a new feature in API version 41.0.
179
Metadata Types CleanDataService
Fields
Field
compositionComponent description extensionName headerText hoverText icon isProtected masterLabel renderComponent type
Field Type
string string string string string string boolean string string
ChatterExtensionType
of type string)
Description
Required. The composition component of the Rich Publisher
App that you provide. It’s comprised of the lightning:availableForChatterExtensionComposer interface.
Required. The description of your custom Rich Publisher App.
Required. The name of your extension. That is, your Rich
Publisher App.
The text to show in the header of your app composer.
The text to show when a user mouses over your extension’s icon.
Required. The icon to show in the Chatter publisher. Use an existing file asset id from your org.
An auto-generated value. It currently has no impact.
Required. An auto-generated value.
Required. The rendering component of the Rich Publisher App that you provide. It’s comprised of the lightning:availableForChatterExtensionRenderer interface.
Required. Describes the type of the extension. Currently, the only value supported is
lightning
. Included to allow for other possible types in the future.
CleanDataService
Represents a data service that adds and updates data in standard objects. This type extends the
Metadata metadata type and inherits
its fullName
field.
File Suffix and Directory Location
CleanDataService components have the
.cleanDataService
suffix and are stored in the cleanDataServices
directory.
The name of the component file is based on the name of the object associated with the data service. For example, the component file name cleanDataServices/DataCloudCompanyMatch.cleanDataService
describes a data service component called DataCloudCompanyMatch that's associated with the company name in account objects.
Version
CleanDataService components are available in API version 41.0 and later.
180
Metadata Types
Fields
Field Name
cleanRules description masterLabel matchEngine
Field Type
[] string string string
CleanDataService
Description
Required. A list of data integration rules
Required. A description of the data service
Required. Master label for this data service. Although this value is displayed, it’s an internal label for the data service and isn’t translated.
Required. A key that maps to the internal data service identifier.
CleanRule
Represents information that controls how the data service adds and updates data in an org.
Field Name
bulkEnabled bypassTriggers bypassWorkflow description developerName fieldMappings masterLabel matchRule sourceSobjectType status targetSobjectType
Field Type
boolean boolean boolean string string
string string string string string
Description
Required. If this field is set to true
, Salesforce applies the data integration rule to existing records whenever the rule is updated or saved.
Required. If this field is set to true
, Salesforce bypasses triggers when it applies the rule; otherwise, it applies triggers after it applies the rule.
Required. If this field is set to true
, Salesforce bypasses workflow rules when it applies the data integration rule; otherwise, it applies workflow rules after it applies the rule.
Required. User-friendly text that describes the data integration rule.
Required. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
This unique name prevents conflicts with rules from other packages that have the same MasterLabel.
Required. A list of FieldMapping entries for the rule.
Required. Master label for this object. This display value is the internal label that is not translated.
Required. An internal label for a matching rule in the data service that’s associated with the CleanRule.
Required. A virtual object in the data service that is associated with the
CleanRule. Specifying a non-existent object causes an error.
Required. Status of the data integration rule. Valid values are
Active
and
Inactive
.
Required. A standard object that’s the target of additions and updates specified by this CleanRule. Specifying an object that the data service does not support causes an error.
181
Metadata Types CleanDataService
FieldMapping
Represents a mapping between fields in the data service and fields in an object in the org.
Field Name
developerName fieldMappingRows masterLabel
SObjectType
Field Type
string
string string
Description
Required. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
This unique name prevents conflicts with field mappings from other packages that have the same MasterLabel.
Required. A list of FieldMappingRow entries. Each entry represents a field in a standard object that maps to a field in the data service.
Required. Master label for this object. This display value is the internal label that is not translated.
Required. The standard object associated with this FieldMapping. Specifying an object that the data service does not support causes an error.
FieldMappingRow
Represents the status of a CleanRule.
Field Name
fieldName fieldMappingFields mappingOperation
SObjectType
Field Type
string
Required. A list of FieldMappingField entries. Each entry is a field in a standard object that maps to a field in the data service.
string string
Description
The display name for the field represented by the FieldMappingRow.
The comparison operation the data service applies when it compares the value of this FieldMappingRow to the mapped field in the object specified in
SObjectType. The value of this field is
AutoFill
, which indicates that the data service only adds data if the object field is blank.
The standard object for the field mapped to the FieldMappingRow. Specifying an object that the data service does not support causes an error.
FieldMappingField
Represents a field in a standard object. A FieldMappingField maps to a FieldMappingRow entry in a data service.
Field Name
dataServiceField
Field Type
string dataServiceObjectName string
Description
Required. A field in the data service that is mapped to this field.
Required. An object in the data service that contains the FieldMappingRow associated with this FieldMappingField. Specifying a non-existent object causes an error.
182
Metadata Types CleanDataService
Field Name
priority
Field Type
int
Description
Required. Represents the priority that the data service uses when it updates the field, relative to other update rules for the same field. Valid values are 1-100.
Declarative Metadata Sample Definition
The following is an example of a CleanDataService component for the lead standard object.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CleanDataService xmlns= "http://soap.sforce.com/2006/04/metadata">
<cleanRules >
<bulkEnabled >false </bulkEnabled >
<bypassTriggers >false </bypassTriggers >
<bypassWorkflow >false </bypassWorkflow >
<description >Adds data info to leads </description >
<developerName >DataService_Leads_Enrichment </developerName >
<fieldMappings >
<SObjectType >DataServiceCompanyObject </SObjectType >
<developerName >DataService_Leads_Enrichment_InputMapping </developerName >
<fieldMappingRows >
<SObjectType >DataServiceCompanyObject </SObjectType >
<fieldMappingFields >
<dataServiceField >Email </dataServiceField >
<dataServiceObjectName >Lead </dataServiceObjectName >
<priority >1 </priority >
</fieldMappingFields >
<fieldName >Email </fieldName >
<mappingOperation >Autofill </mappingOperation >
</fieldMappingRows >
<fieldMappingRows >
<SObjectType >DataServiceCompanyObject </SObjectType >
<fieldMappingFields >
<dataServiceField >Company </dataServiceField >
<dataServiceObjectName >Lead </dataServiceObjectName >
<priority >1 </priority >
</fieldMappingFields >
<fieldName >Name </fieldName >
<mappingOperation >Autofill </mappingOperation >
</fieldMappingRows >
<masterLabel >DataServiceInputMapping </masterLabel >
</fieldMappings >
<fieldMappings >
<SObjectType >Lead </SObjectType >
<developerName >DataService_Leads_Enrichment_OutputMapping </developerName >
<fieldMappingRows >
<SObjectType >Lead </SObjectType >
<fieldMappingFields >
<dataServiceField >EmployeesTotal </dataServiceField >
<dataServiceObjectName >DataServiceCompanyObject </dataServiceObjectName >
<priority >1 </priority >
</fieldMappingFields >
183
Metadata Types CleanDataService
<fieldName >NumberOfEmployees </fieldName >
<mappingOperation >Autofill </mappingOperation >
</fieldMappingRows >
<fieldMappingRows >
<SObjectType >Lead </SObjectType >
<fieldMappingFields >
<dataServiceField >Revenue </dataServiceField >
<dataServiceObjectName >DataServiceCompanyObject </dataServiceObjectName >
<priority >1 </priority >
</fieldMappingFields >
<fieldName >AnnualRevenue </fieldName >
<mappingOperation >Autofill </mappingOperation >
</fieldMappingRows >
<fieldMappingRows >
<SObjectType >Lead </SObjectType >
<fieldMappingFields >
<dataServiceField >Industry </dataServiceField >
<dataServiceObjectName >DataServiceCompanyObject </dataServiceObjectName >
<priority >1 </priority >
</fieldMappingFields >
<fieldName >Industry </fieldName >
<mappingOperation >Autofill </mappingOperation >
</fieldMappingRows >
<masterLabel >DataServiceOutputMapping </masterLabel >
</fieldMappings >
<masterLabel >Data Service Company Info for Leads </masterLabel >
<matchRule >DataServiceLeadAppendMatchRule </matchRule >
<sourceSobjectType >DataServiceCompanyObject </sourceSobjectType >
<status >Active </status >
<targetSobjectType >Lead </targetSobjectType >
</cleanRules >
<description >Data Service Companies for Leads </description >
<masterLabel >Data Service Companies for Leads </masterLabel >
<matchEngine >LeadEnrichmentMatchEngine </matchEngine >
</CleanDataService >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >DataService_Leads_Enrichment </members >
<name >CleanDataService </name >
</types >
<version >38.0
</version >
</Package >
Usage
Use CleanDataService to retrieve all the metadata that describes a data enrichment service. To configure the service in a new org, deploy the metadata you retrieved. Avoid using CRUD-Based Calls with CleanDataService.
184
Metadata Types Community (Zone)
To make small modifications to the CleanDataService component, use the Tooling API.
Community (Zone)
Note: Starting with the Summer ’13 release, Chatter Answers and Ideas “communities” have been renamed to “zones.” In API version 28, the API object label has changed to
Zone
, but the API type is still
Community
.
Represents a zone that contains Ideas or Chatter Answers objects. Zones are shared by the Ideas, Answers, and Chatter Answers features, allowing you to view and create zones from those locations. This type extends the
Metadata metadata type and inherits its
fullName field.
Note:
When enableChatterAnswers
is set to false
, values specified for the following fields are ignored and not saved: communityFeedPage
, emailFooterDocument
, emailHeaderDocument
, enablePrivateQuestions
, emailNotificationUrl
, and site
.
File Suffix and Directory Location
Zones have the suffix community
and are stored in the communities
folder.
Version
Community (Zone) components are available in API version 27.0 and later.
Fields
Field Name
active
Field Type
boolean chatterAnswersFacebookSsoUrl string communityFeedPage description emailFooterDocument emailHeaderDocument emailNotificationUrl string string string string string
Description
Indicates whether the zone is active ( true
) or not ( false
).
(Read only) The Facebook sign-on URL, which is based on the Facebook authentication provider selected in your Chatter Answers settings. This field is available only if Chatter Answers and Facebook Single Sign-On for Chatter Answers are enabled.
The Visualforce page that hosts the zone’s feeds. This field is available when Chatter Answers is enabled in the organization.
The description of the zone.
The text or HTML file that incorporates your organization’s branding into the footer of email notifications. This field is available when Chatter
Answers is enabled in the organization.
The text or HTML file that incorporates your organization’s branding into the header of email notifications. This field is available when Chatter
Answers is enabled in the organization.
The URL that’s included in email notifications. This field is available when
Chatter Answers is enabled in the organization. This field replaces portalEmailNotificationUrl
in API version 28.0 and later.
185
Metadata Types Community (Zone)
Field Name
enableChatterAnswers enablePrivateQuestions expertsGroup portal portalEmailNotificationUrl reputationLevels showInPortal site
Field Type
boolean boolean string string string
boolean string
Description
Indicates whether the zone has Chatter Answers enabled ( true
) or not
( false
). This field is available when Chatter Answers is enabled in the organization.
Indicates whether Chatter Answers questions can be escalated to cases
( true
) or not ( false
). This field is available when Chatter Answers is enabled in the organization.
The name of the public group that act as experts in the zone. This field is available when eitherIdeas or Answers are enabled in the organization.
The name of the portal in which to display the zone.
The portal URL that’s included in email notifications. This field is available when Chatter Answers is enabled in the organization. This field has been replaced by emailNotificationUrl
in API version 28.0 and later.
The fields that define the points and name of each reputation level you define. You can create up to 25 reputation levels per zone.
Indicates whether the zone is available to all portals ( true
) or not available to any portals ( false
).
The name of the site for the zone. This field is available when Chatter
Answers is enabled in the organization.
ReputationLevels
Represents the points and reputation label that displays on hover over a user’s photo in the feed.
Field Name
ideaReputationLevels
Field Type Description
chatterAnswersReputationLevels
[]
Contains the name and value pair that describes the reputation level for Chatter Answers. Available in API version
28.0 and later.
Contains the name and value pair that describes the reputation for Ideas. Available in API version 28.0 and later.
ChatterAnswersReputationLevel
Represents the reputation name and the number of points for that level for Chatter Answers.
Field Name
name value
Field Type
string int
Description
The name of the reputation level, for example, “Expert.”
The minimum number of points for the reputation level.
186
Metadata Types
IdeaReputationLevel
Represents the reputation name and the number of points for that level for Ideas. Available in API version 28.0 and later.
Field Name
name value
Field Type
string int
Description
The name of the reputation level, for example, “Expert.”
The minimum number of points for the reputation level.
Community (Zone)
Declarative Metadata Sample Definition
The following is the definition of a community (zone) component:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Community xmlns= "http://soap.sforce.com/2006/04/metadata">
<active >true </active >
<communityFeedPage >communityWithHeaderAndFooter_main </communityFeedPage >
<description >Metadata Test </description >
<emailFooterDocument >sampleFolder/emailFooter.html
</emailFooterDocument >
<emailHeaderDocument >sampleFolder/emailHeader.html
</emailHeaderDocument >
<enableChatterAnswers >true </enableChatterAnswers >
<enablePrivateQuestions >true </enablePrivateQuestions >
<expertsGroup >CommunityExperts </expertsGroup >
<portal >Customer Portal </portal >
<emailNotificationUrl >http://yourURL </emailNotificationUrl >
<reputationLevels >
<chatterAnswersReputationLevels >
<name >Newbie </name >
<value >0 </value >
</chatterAnswersReputationLevels >
<chatterAnswersReputationLevels >
<name >Smartie </name >
<value >500 </value >
</chatterAnswersReputationLevels >
<chatterAnswersReputationLevels >
<name >Pro </name >
<value >2000 </value >
</chatterAnswersReputationLevels >
<chatterAnswersReputationLevels >
<name >All Star </name >
<value >5000 </value >
</chatterAnswersReputationLevels >
<ideaReputationLevels >
<name >Observer </name >
<value >0 </value >
</ideaReputationLevels >
<ideaReputationLevels >
<name >Contributor </name >
<value >100 </value >
</ideaReputationLevels >
<ideaReputationLevels >
<name >Influencer </name >
187
Metadata Types CommunityTemplateDefinition
<value >400 </value >
</ideaReputationLevels >
<ideaReputationLevels >
<name >Thought Leader </name >
<value >1500 </value >
</ideaReputationLevels >
</reputationLevels >
<showInPortal >true </showInPortal >
<site >ChatterAnswersSite </site >
</Community >
CommunityTemplateDefinition
Represents the definition of a community template. This type extends the Metadata
metadata type and inherits its fullName
field.
File Suffix and Directory Location
CommunityTemplateDefinition components have the suffix
.communityTemplateDefinition
and are stored in the communityTemplateDefinitions
folder.
Version
CommunityTemplateDefinition components are available in API version 38.0 and later.
Special Access Rules
This object is available only if Salesforce Communities is enabled in your org.
Fields
Field Name
baseTemplate bundlesInfo category
Field Type
CommunityBase
Template
(enumeration of type string)
Description
Denotes that this CommunityTemplateDefinition was created in API version 41.0 or later. The valid value is
CommunityApp
. This field is available in API 41.0 and later.
[ ]
Required. The list of preview images and feature descriptions of this
CommunityTemplateDefinition.
CommunityTemplate
Category
(
type string)
Required. The optimized use case of this CommunityTemplateDefinition.
Valid values are:
•
IT
•
Marketing
•
Sales
•
Service
188
Metadata Types CommunityTemplateDefinition
Field Name
defaultBrandingSet defaultThemeDefinition description enableExtendedCleanupUp
OnDelete masterLabel navigationLinkSet pageSetting
Field Type
string string
Description
The set of branding properties associated with this
CommunityTemplateDefinition, as defined in the Branding panel in
Community Builder. Available in API version 40.0 and later.
Required. The assigned theme definition for this
CommunityTemplateDefinition.
The optional description text of this CommunityTemplateDefinition.
string boolean string
Determines if deleting this CommunityTemplateDefinition attempts to delete other directly or indirectly referenced objects automatically, for
example, CommunityThemeDefinition
on page 193, Flexipage on page
381, or StaticResource on page 693.
Required. The label for this CommunityTemplateDefinition, which displays in Setup.
The navigation menu associated with this CommunityTemplateDefinition.
A navigation menu consists of items that users can click to go to other parts of the community. Available in API version 40.0 and later.
Required. The list of FlexiPages of this CommunityTemplateDefinition.
CommunityTemplateBundleInfo
Field Name
description image order title type
Field Type
string string int
Description
The optional description text of its CommunityTemplateBundleInfo.
Required only when the type
is
PreviewImage
, otherwise this field is optional. A preview image for this CommunityTemplateDefinition.
Required. An integer specifying the position of this
CommunityTemplateBundleInfo relative to others of the same Type within its
CommunityTemplateDefinition. 1 is the first position, 3 is the max position for
PreviewImage type, and 4 is the max position for
Highlight
type.
string Required. The title of this CommunityTemplateBundleInfo to use in code.
CommunityTemplate
BundleInfoType
string)
Required. Stores descriptive information about the template that is included in the export (currently limited to Features and Preview Images). The template powers the UI of the Community Creation Wizard. Valid values are:
•
Highlight
—This CommunityTemplateBundleInfo is used as a highlighted feature.
•
PreviewImage
—This CommunityTemplateBundleInfo is used as a preview image.
189
Metadata Types CommunityTemplateDefinition
CommunityTemplatePageSetting
Field Name
page themeLayout
Field Type
string string
Description
Required. The list of FlexiPages of this CommunityTemplateDefinition.
Required. The name of the FlexiPage for the theme layout.
This field is available in API version 39.0 and later.
Declarative Metadata Sample Definition
The following is an example of a CommunityTemplateDefinition component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CommunityTemplateDefinition xmlns= "http://soap.sforce.com/2006/04/metadata">
<bundlesInfo >
<description >ax </description >
<order >1 </order >
<title >ax </title >
<type >Highlight </type >
</bundlesInfo >
<bundlesInfo >
<image >siteAsset_82806ab739204fa99e657012c181c87c </image >
<order >1 </order >
<title >siteAsset_82806ab739204fa99e657012c181c87c </title >
<type >PreviewImage </type >
</bundlesInfo >
<category >Sales </category >
<defaultBrandingSet >ax </defaultBrandingSet >
<defaultThemeDefinition >ax </defaultThemeDefinition >
<description >ax </description >
<enableExtendedCleanUpOnDelete >true </enableExtendedCleanUpOnDelete >
<masterLabel >ax </masterLabel >
<navigationLinkSet >
<navigationMenuItem >
<label >Topics </label >
<position >1 </position >
<publiclyAvailable >true </publiclyAvailable >
<target >ShowMoreTopics </target >
<type >NavigationalTopic </type >
</navigationMenuItem >
</navigationLinkSet >
<pageSetting >
<page >ax_Report_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Topic_Catalog </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Check_Password </page >
190
Metadata Types
<themeLayout >ax_themeLayout_Login </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Error </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_User_Settings </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Login </page >
<themeLayout >ax_themeLayout_Login </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Group_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Sfdc_Page </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Report_Related_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Register </page >
<themeLayout >ax_themeLayout_Login </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Case_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_User_Profile </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Dashboard_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Group_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Canvasapp_Page </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Login_Error </page >
<themeLayout >ax_themeLayout_Login </themeLayout >
</pageSetting >
191
CommunityTemplateDefinition
Metadata Types
<pageSetting >
<page >ax_Search </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Create_Record </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Group_Related_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_User_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Case_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Dashboard_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Question_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Related_Record_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Record_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Forgot_Password </page >
<themeLayout >ax_themeLayout_Login </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Home </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Dashboard_Related_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_User_Related_List </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Case_Related_List </page >
192
CommunityTemplateDefinition
Metadata Types CommunityThemeDefinition
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Topic_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Messages </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Report_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Record_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Feed_Detail </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
<pageSetting >
<page >ax_Contact_Support </page >
<themeLayout >ax_themeLayout_Inner </themeLayout >
</pageSetting >
</CommunityTemplateDefinition >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyTemplate </members >
<name >CommunityTemplateDefinition </name >
</types >
<version >41.0
</version >
</Package >
CommunityThemeDefinition
Represents the definition of a community theme.This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
CommunityThemeDefinition components have the suffix
.communityThemeDefinition
and are stored in the communityThemeDefinitions
folder.
Version
CommunityThemeDefinition components are available in API version 38.0 and later.
193
Metadata Types CommunityThemeDefinition
Special Access Rules
This object is available only if Salesforce Communities is enabled in your org.
Fields
Field Name
customThemeLayoutType description enableExtendedCleanupUp
OnDelete masterLabel themeSetting
Field Type
string
Description
[ ]
The list of custom theme layout types available to the theme layout. This field is available in API version 39.0 and later.
The optional description text of this CommunityThemeDefinition.
boolean string
Determines if deleting this CommunityThemeDefinition attempts to delete other directly or indirectly referenced objects automatically, for example, FlexiPage.
Required. The label for this CommunityThemeDefinition, which displays in Setup.
Required. The list of settings for this CommunityThemeDefinition.
CommunityCustomThemeLayoutType
Field Name
description label
Field Type
string string
Description
The description of the custom theme layout type.
Required. The name of the custom theme layout type. The values
Inner
,
Home
, and
Login
are reserved.
CommunityThemeSetting
Field Name
customThemeLayoutType themeLayout themeLayoutType
Field Type
string
Description
Required when themeLayoutType
is not specified. The custom theme layout type associated with the theme layout. This field and themeLayoutType are mutually exclusive; you can’t specify both. This field is available in API version
39.0 and later.
string Required. The configuration and layout for this theme.
CommunityTheme
LayoutType
string)
Required when customThemeLayoutType
is not specified. The default theme layout type associated with the theme layout. Valid values are
Inner
,
Home
, or
Login
. This field and customThemeLayoutType
are mutually exclusive; you can’t specify both.
194
Metadata Types ConnectedApp
Declarative Metadata Sample Definition
The following is an example of a CommunityThemeDefinition component.
<CommunityThemeDefinition xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableExtendedCleanUpOnDelete >true </enableExtendedCleanUpOnDelete >
<masterLabel >ax_theme </masterLabel >
<themeSetting >
<themeLayout >ax_theme_napili_themeLayout_home </themeLayout >
<themeLayoutType >Inner </themeLayoutType >
</themeSetting >
</CommunityThemeDefinition >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyTheme </members >
<name >CommunityThemeDefinition </name >
</types >
<version >41.0
</version >
</Package >
ConnectedApp
Represents a connected app configuration. A connected app integrates an application with Salesforce using APIs. Connected apps use standard SAML and OAuth protocols to authenticate, provide single sign-on, and provide tokens for use with Salesforce APIs. In addition to standard OAuth capabilities, connected apps allow Salesforce admins to set various security policies and have explicit control over
who can use the corresponding apps. This type extends the Metadata
metadata type and inherits its fullName
field.
File Suffix and Directory Location
ConnectedApp components have the suffix
.connectedapp
and are stored in the connectedapps
folder.
Version
ConnectedApp components are available in API version 29.0 and later.
Fields
Field Name
attributes canvasConfig contactEmail
Field Type
string
Description
A custom attribute of the connected app.
The configuration options of the connected app if it’s exposed as a canvas app.
The email address Salesforce should use for contacting you or your support team.
195
Metadata Types ConnectedApp
Field Name
contactPhone description iconUrl infoUrl ipRanges label logoUrl mobileStartUrl oauthConfig plugin samlConfig startUrl
Field Type
string string string string
string string string
string
string
Description
The phone number for Salesforce to use in case we need to contact you.
An optional description for your application.
Reserved for future use.
An optional URL for a Web page with more information about your application.
Specifies the ranges of IP addresses that can access the app without requiring the user to authenticate with the connected app.
The name of the app.
An optional application logo. The logo appears with the application’s entry in the list of apps and on the consent page the user sees when authenticating. The URL must use HTTPS, and the logo can’t be larger than 125 pixels high or 200 pixels wide. The default logo is a cloud.
Users are directed to this URL after they’ve authenticated when the app is accessed from a mobile device. If you don’t give a URL, the user is sent to the application’s default start page after authentication completes. If the connected app that you’re creating is a canvas app, then you don’t need to enter a value for this field. The Canvas App
URL field contains the URL that gets called for the connected app.
Specifies how your application communicates with Salesforce.
The name of a custom Apex class that extends
Auth.ConnectedAppPlugin
to customize the behavior of the app.
Controls how the app uses single sign-on.
If the app is not accessed from a mobile device, users are directed to this URL after they’ve authenticated. If you don’t give a URL, the user is sent to the application’s default start page after authentication completes. If the app is accessed from a mobile device, see mobileStartUrl
. If the connected app that you’re creating is a canvas app, then you don’t need to enter a value for this field. The
Canvas App URL field contains the URL that gets called for the connected app.
ConnectedAppAttribute
Represents the field names that make up a custom attribute when using SAML with a ConnectedApp. These values should be tailored to a specific service provider.
196
Metadata Types ConnectedApp
Field Name
formula key
Field Type
string string
Description
The value of the attribute.
The attribute’s identifier.
ConnectedAppCanvasConfig
The configuration options of the connected app if it’s exposed as a canvas app.
Field Name
accessMethod canvasUrl lifecycleClass locations
Field Type
AccessMethod (
of type string)
Description
Indicates how the canvas app initiates the OAuth authentication flow.
The valid values are:
•
Get
—OAuth authentication is used, and the user is prompted to allow the third-party application to access their information. When you use this access method, the canvas app must initiate the OAuth authentication flow.
•
Post
—OAuth authentication is used, but when the administrator installs the canvas app, they implicitly allow access for users.
Therefore, the user won’t be prompted to allow the third-party to access their user information. When you use this access method, the authentication is posted directly to the canvas app URL.
string string
CanvasLocationOptions
of type string)
The URL of the third-party app that’s exposed as a canvas app.
The name of the
Canvas.CanvasLifecycleHandler
Apex class, if you’ve implemented this class for custom parameters.
This field is available in API version 31.0 and later.
Indicates where the canvas app can appear to the user. The valid values are:
•
Aura
—Reserved for future use.
•
AppLauncher
—Reserved for future use.
•
Chatter
—The canvas app can appear in the app navigation list on the Chatter tab.
•
ChatterFeed
—The canvas app can appear as a Chatter feed item.
•
MobileNav
—The canvas app can appear in a mobile card in the Salesforce1 app. This value is available in API version 31.0 and later.
•
None
—The canvas app can appear only in the Canvas App
Previewer.
•
OpenCTI
—The canvas app can appear in the call control tool.
•
PageLayout
—The canvas app can appear on a page layout.
When viewed in the Salesforce1 app, the canvas app appears in
197
Metadata Types ConnectedApp
Field Name
options
Field Type Description
the record detail page. This value is available in API version 31.0
and later.
•
Publisher
—The canvas app can appear as a global action.
•
ServiceDesk
—The canvas app can appear in the footer or sidebars of a Salesforce console.
•
UserProfile
—Reserved for future use.
•
Visualforce
—The canvas app can appear on a Visualforce page.
of type string)
Indicates whether you want to hide the share button and header in the publisher for your canvas app, and whether the app is a canvas personal app. Valid values are:
•
HideShare
—The Share button is hidden in the publisher for the related canvas app.
Available in API version 30.0 and later.
•
HideHeader
—The header is hidden in the publisher for the related canvas app.
Available in API version 30.0 and later.
•
PersonalEnabled
—The app can be installed by end users as a canvas personal app.
Available in API version 32.0 and later.
samlInitiationMethod
SamlInitiationMethod
of type string)
If you’re using SAML single sign-on (SSO), indicates which provider initiates the SSO flow.
•
IdpInitiated
—Identity provider initiated. Salesforce makes the initial request to start the SSO flow.
•
SpInitiated
—Service provider initiated. The canvas app starts the SSO flow after it’s invoked.
•
None
—The canvas app isn’t using SAML SSO.
This field is available in API version 31.0 and later.
ConnectedAppIpRange
The list of IP addresses that can access the app without requiring the user to authenticate.
Field Name
description startAddress
Field Type
string string
Description
Use this field to identify the purpose of the range, such as which part of a network corresponds to this range. This field is available in API version 31.0 and later.
The first address in the IP range, inclusive.
198
Metadata Types
Field Name
endAddress
Field Type
string
Description
The last address in the IP range, inclusive.
ConnectedApp
ConnectedAppOauthConfig
Represents the field names that make up a custom attribute in a ConnectedApp.
Field Name
callbackUrl certificate consumerKey consumerSecret scopes
Field Type
string string string
Description
The endpoint that Salesforce calls back to your application during
OAuth; it’s the OAuth redirect_uri
.
The PEM-encoded certificate string, if the app uses a certificate.
A value used by the consumer for identification to Salesforce. Referred to as client_id
in OAuth 2.0.
In API version 32.0 and later, this field write-enabled. Once set, the value cannot be edited. The value must be alphanumeric (no special characters and no spaces) and a minimum of eight characters
(maximum of 256 characters). If you specify a key already in use for another connected app in the organization, you’ll get an error.
string A value that is combined with the consumerKey
and used by the consumer for identification to Salesforce. Referred to as client_secret
in OAuth 2.0. Typically, this value is generated by
Salesforce when you create the connected app. However, the field is write-enabled so you can customize the shared secret value. Once set, the value is not returned in metadata API requests.
The value must be alphanumeric (no special characters and no spaces) and a minimum of eight characters (maximum of 256 characters). If you specify a secret already in use for another connected app in the organization, you’ll get an error.
This field is available in API version 32.0 and later.
ConnectedAppOauthAccessScope
(enumeration of type string)
The scopes refer to permissions given by the user running the connected app. When deploying metadata, valid values are:
•
Address
—Allows access to the logged-in user’s street address
(the same behavior as deploying
Basic
).
•
Api
—Allows access to the logged-in user’s account over the APIs.
•
Basic
—Allows access to your identity URL service (the same behavior as deploying
Address
,
,
Phone
, and
Profile
).
•
Chatter
—Allows access to only the Chatter REST API resources.
•
CustomApplications
—Provides access to custom applications, such as those using Visualforce.
199
Metadata Types
Field Name Field Type
ConnectedApp
Description
•
CustomPermissions
—Allows access to the custom permissions in an organization associated with the connected app, and shows whether the current user has each permission enabled.
•
—Allows access to the logged-in user’s email address (the same behavior as deploying
Basic
).
•
Full
—Allows access to all data accessible by the logged-in user.
•
OfflineAccess
—Allows the app to interact with the user’s data while the user is offline, and get a refresh token (the same behavior as deploying
RefreshToken
).
•
OpenID
—Allows access to the logged-in user’s unique identifier for OpenID Connect apps.
•
Phone
—Allows access to the logged-in user’s phone number value (the same behavior as deploying
Basic
).
•
Profile
—Allows access to the logged-in user’s profile (the same behavior as deploying
Basic
).
•
RefreshToken
—Allows a refresh token to be returned if you’re eligible to receive one (the same behavior as deploying
OfflineAccess
).
•
Wave
—Allows access to the Wave REST API resources. Available in API version 35.0 and later.
•
Web
—Allows the ability to use the access_token
on the
Web. This also includes visualforce
, allowing access to
Visualforce pages.
When retrieving metadata, valid values are:
•
Api
—Allows access to the logged-in user’s account over the APIs.
•
Basic
—Allows access to the user’s identity URL service, and includes
Address
,
,
Phone
, and
Profile
.
•
Chatter
—Allows access to only the Chatter REST API resources.
•
CustomApplications
—Allows access to custom applications, such as those using Visualforce.
•
Full
—Allows access to all data accessible by the logged-in user.
•
OpenID
—Allows access to the logged in user’s unique identifier for OpenID Connect apps.
•
RefreshToken
—Allows a refresh token to be returned if you are eligible to receive one, and is synonymous with allowing
OfflineAccess
.
•
Wave
—Allows access to the Wave REST API resources. Available in API version 35.0 and later.
•
Web
—Allows the ability to use the access_token
on the
Web. This also includes visualforce
, allowing access to
Visualforce pages.
200
Metadata Types ConnectedApp
ConnectedAppSamlConfig
Specifies how an app uses single sign-on.
Field Name
acsUrl certificate entityUrl
Field Type
string string string encryptionCertificate string
Description
The assertion consumer service URL from the service provider.
The PEM-encoded certificate string, if the app uses a certificate.
The entity ID from your service provider.
Note: This page is about Classic Encryption, not Shield Platform
Encryption. What's the difference?
The name of the certificate to use for encrypting SAML assertions to the service provider. This certificate is saved in the organization’s
Certificate and Key Management list. Available in API version 30.0 and later .
encryptionType
SamlEncryptionType
(enumeration of type string)
Note:
This page is about Classic Encryption, not Shield Platform
Encryption. What's the difference?
When Salesforce is the identity provider, the SAML configuration can specify the encryption method used for encrypting SAML assertions to the service provider. The service provider detects the encryption method in the SAML assertion for decryption. Valid values are:
•
AES_128
—128–bit key.
•
AES_256
—256–bit key.
•
Triple_Des
—Triple Data Encryption Algorithm.
Available in API version 30.0 and later.
issuer string A URI that sends the SAML response. It can be used by the service provider to determine which identity provider sent the response.
Available in API version 29.0 and later.
samlIdpSLOBinding
SamlIdpSLOBinding (enumeration of type string)
The SAML HTTP binding type from the service provider used for single logout. Available in API version 40.0 and later. Valid values are:
•
PostBinding
•
RedirectBinding samlNameIdFormat
SamlNameIdFormatType
(enumeration of type string)
Indicates the format the service provider (SP) requires for the user’s single sign-on identifier. Available in API version 29.0 and later. Valid values are:
•
Unspecified
—No format given. This is the default.
•
EmailAddress
—Used if the subject type is the user’s name ora federation ID (an ID internal to the SP).
•
Persistent
—Used with the user ID and persistent ID subject types.
201
Metadata Types ConnectedApp
Field Name Field Type Description
•
Transient
—Used when the subject type is a custom attribute and can change every time the user logs in.
samlSloUrl string The SAML single-logout endpoint of the connected app service provider
(SP). This endpoint is where SAML LogoutRequests and
LogoutResponses are sent when users log out of Salesforce. The SP provides this endpoint. Available in API version 40.0 and later.
samlSubjectCustomAttr samlSubjectType string If the samlSubjectType
is
CustomAttr
, include that custom value here; otherwise, leave empty. Available in API version 29.0 and later.
SamlSubjectType (enumeration of type string)
The single sign-on identifier for the user. Valid values are:
•
Username
—The user’s Salesforce name.
•
FederationId
—The user’s identifier at the service provider.
Get this value from the service provider.
•
UserId
—The user’s Salesforce identifier.
•
PersistentID
—A persistent opaque identifier that is specific to the identity provider and a service provider.
•
CustomAttr
—The identifier is taken from a custom field value in samlSubjectCustomAttr
.
Declarative Metadata Sample Definition
The following is an example package manifest used to deploy or retrieve the ConnectedApp metadata for an organization.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >PortalTestApp </members >
<name >ConnectedApp </name >
</types >
<version >29.0
</version >
</Package >
The following is an example of a ConnectedApp component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ConnectedApp xmlns= "http://soap.sforce.com/2006/04/metadata">
<fullName >AConnectedApp </fullName >
<attributes >
<formula >$User.CompanyName
</formula >
<key >companyName </key >
</attributes >
<contactEmail >[email protected]
</contactEmail >
<mobileStartUrl >https://m.connectedapp.company.com
</mobileStartUrl >
<label >A ConnectedApp </label >
<oauthConfig >
<callbackUrl >https://callback.company.com
</callbackUrl >
202
Metadata Types ContentAsset
<scopes >Basic </scopes >
<scopes >Chatter </scopes >
</oauthConfig >
<samlConfig >
<acsUrl >http://acs.company.com
</acsUrl >
<entityUrl >http://samlentityId.company.com
</entityUrl >
<samlSubjectType >Username </samlSubjectType >
</samlConfig >
<startUrl >https://connectedapp.company.com
</startUrl >
<ipRanges >
<endAddress >10.0.0.46
</endAddress >
<startAddress >10.0.0.42
</startAddress >
</ipRanges >
<ipRanges >
<endAddress >10.0.0.32
</endAddress >
<startAddress >10.0.0.25
</startAddress >
</ipRanges >
</ConnectedApp >
Usage
If you're constructing a SAML-enabled connected app using Metadata API, and need to set the
IdP-Initiated Login URL
for your service provider, you have two options:
You can use the service provider app ID with the app
parameter in the following format. This value is displayed in the Salesforce user interface. From Setup, enter “Connected Apps” in the
Quick Find
box, then select Connected Apps, then click the name of the connected app to see its detail page.
https://
<Salesforce_base_URL>
/idp/login?app=
<app_id>
Or, if you’re configuring the connected app using Metadata API only, you can use the apiName
parameter of the service provider app in the following format. The apiName
parameter is the fullName
inherited from the Metadata type.
https://
<Salesforce_base_URL>
/idp/login?apiName=
<fullName>
ContentAsset
Represents the metadata for creating an asset file. Asset files enable a Salesforce file to be used for org setup and configuration purposes.
This type extends the
MetadataWithContent metadata type and inherits its
content
and fullName
fields.
File Suffix and Directory Location
ContentAsset components have the suffix
.asset
and are stored in the contentassets
folder.
Version
ContentAsset components are available in API version 38.0 and later.
203
Metadata Types ContentAsset
Special Access Rules
The system prevents metadata retrieval if the total size of the asset’s file content exceeds 30 MB. All pre-existing limits for packaging apply to asset files.
Fields
Field Name
format language masterLabel originNetwork relationships versions
Field Type Description
ContentAssetFormat
(
type string)
Describes the format of the asset file. Valid values are:
•
Original
—A single asset file version.
•
ZippedVersions
—Contains multiple versions of the asset file.
string string
Required. The language of the asset file label.
Required. The label for the asset file record, which displays in Setup.
string For deploys, the name of the community the file is assigned upon creation. For retrievals, the name of the community the file is assigned to populates the field value. If null
, file was not assigned to a community.
ContentAsset
Relationships[]
The list of ContentAssetLinks that describe whether the asset file should be shared with the org.
Required. Captures basic information about the file version(s) included the asset metadata. Typically the file has only one version.
ContentAssetRelationships
Represents the relationships between an asset file and the locations it's linked with.
Field Name
organization
Field Type
ContentAssetLink[]
Description
Carries information about sharing the asset file with the org. Maps to
ContentDocumentLink.
ContentAssetLink
Represents a relationship link for an asset file, and includes details about the level of access for the link.
Field Name
access
Field Type Description
ContentAssetAccess
string)
Required. The permission granted to the user of the shared file, determined by the permission the user already has. Valid values are:
•
VIEWER
•
COLLABORATOR
•
INFERRED
204
Metadata Types
Field Name
name
Field Type
string
Description
Reserved for future use.
ContentAssetVersions
Represents information about all file versions included in the asset metadata.
Field Name
version
Field Type Description
A list of file versions for the asset.
ContentAsset
ContentAssetVersion
Represents information about one file version included in the asset metadata.
Field Name
number pathOnClient zipEntry
Field Type
string string string
Description
Required. The version number. This field is based on, or sets, the ContentVersion.
Required. Describes the original filename of the file. This field maps to
ContentVersion.PathOnClient. It provides the data for the ContentVersion Title field.
If the asset file has more than one version, format
is
ZippedVersions
.
In this case, zipEntry
is the name of the file within the zip. If the asset file has only one version, this field is empty.
Declarative Metadata Sample Definition
The following is an example of a ContentAsset component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ContentAsset xmlns= "http://soap.sforce.com/2006/04/metadata">
<masterLabel >some asset </masterLabel >
<relationships >
<organization >
<access >VIEWER </access >
</organization >
</relationships >
<versions >
<version >
<number >1 </number >
<pathOnClient >some asset.txt
</pathOnClient >
</version >
</versions >
</ContentAsset >
For assets that include just one version, the format field can be omitted or specified with the value as
Original
. File assets with more than one version have versions wrapped in a zip file.
205
Metadata Types CorsWhitelistOrigin
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyAsset </members >
<name >ContentAsset </name >
</types >
<version >41.0
</version >
</Package >
CorsWhitelistOrigin
Represents an origin in the CORS whitelist.
File Suffix and Directory Location
CorsWhitelistOrigin components have the suffix
.corswhitelistorigin
and are stored in the corswhitelistorigins folder.
Version
CorsWhitelistOrigin components are available in API version 32.0 and later.
Fields
Field Name
developerName urlPattern
Field Type
String
String
Description
A unique name for the entry.
A URL pattern for the origin.
The origin URL pattern must include the HTTPS protocol and a domain name, and may include a port. The wildcard character (*) is supported and must be in front of a second-level domain name. For example, https://*.example.com
adds all subdomains of example.com
to the whitelist.
The origin URL pattern can be an IP address. However, an IP address and a domain that resolve to the same address are not the same origin and you must add them to the CORS whitelist as separate entries.
Declarative Metadata Sample Definition
The following is an example package manifest used to deploy or retrieve the CorsWhitelistOrigin metadata for an organization.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
206
Metadata Types CspTrustedSite
<members >* </members >
<name >CorsWhitelistOrigin </name >
</types >
<version >32.0
</version >
</Package >
The following is an example of a CorsWhitelistOrigin component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CorsWhitelistOrigin xmlns= "http://soap.sforce.com/2006/04/metadata">
<developerName >CorsWhitelistEntry1 </developerName >
<urlPattern >https://*.example.com
</urlPattern >
</CorsWhitelistOrigin >
Usage
CORS (cross-origin resource sharing) is a W3C recommendation that enables Web browsers to request resources from origins other than their own. For example, using CORS, a JavaScript script at https://www.example.com
could request a resource from https://www.salesforce.com
.
If a browser that supports CORS makes a request to an origin in the Salesforce CORS whitelist, Salesforce returns the origin in the
Access-Control-Allow-Origin
HTTP header, along with any additional CORS HTTP headers. If the origin is not whitelisted,
Salesforce returns HTTP status code 404.
CspTrustedSite
Represents a CSP Trusted Site. The Lightning Component framework uses Content Security Policy (CSP), which is a W3C standard, to control the source of content that can be loaded on a page. To use third-party APIs that make requests to an external (non-Salesforce) server, add the server as a CSP Trusted Site.
Declarative Metadata File Suffix and Directory Location
CspTrustedSite components are stored in the cspTrustedSites
directory of the corresponding package directory. The file name matches the unique name of the trusted site, and the extension is
.cspTrustedSite
.
Version
CspTrustedSite components are available in API version 39.0 and later.
Fields
Field
description endpointUrl isActive
Field Type
string string boolean
Description
The description explaining what this trusted site is used for.
Required. The URL for the trusted site.
Required. Indicates if the trusted site is active ( true
) or not
( false
).
207
Metadata Types CustomApplication
Declarative Metadata Sample Definition
A sample XML definition of a trusted site is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CspTrustedSite xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >Used for Lightning component callout to mapping web service </description >
<endpointUrl >https://www.maptestsite.net/ </endpointUrl >
<isActive >true </isActive >
</CspTrustedSite >
Usage
CSP is a Candidate Recommendation of the W3C working group on Web Application Security. The framework uses the
Content-
Security-Policy
HTTP header recommended by the W3C. By default, the framework’s headers allow content to be loaded only from secure (HTTPS) URLs and forbid XHR requests from JavaScript.
When you define a CSP Trusted Site, the site’s URL is added to the list of allowed sites for the following directives in the CSP header.
•
connect-src
•
frame-src
•
img-src
•
style-src
•
font-src
•
media-src
This change to the CSP header directives allows Lightning components to load resources, such as images, styles, and fonts, from the site. It also allows client-side code to make requests to the site.
Important: You can’t load JavaScript resources from a third-party site, even a CSP Trusted Site. To use a JavaScript library from a third-party site, add it to a static resource, and then add the static resource to your component. After the library is loaded from the static resource, you can use it as normal.
CustomApplication
CustomApplication represents a custom or standard application. In API version 29.0 and earlier, CustomApplication represents only a custom application. An application is a list of tab references, with a description and a logo. This type extends the
type and inherits its fullName
field.
File Suffix and Directory Location
Custom and standard applications have the suffix
.app
and are stored in the applications
folder.
Note:
Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.
Version
Custom applications are available in API version 10.0 and later. Standard applications are available in API version 30.0 and later.
208
Metadata Types CustomApplication
Fields
Field Name
actionOverrides brand domainWhitelist enableKeyboardShortcuts
Field Type
customApplicationComponents
defaultLandingTab description string detailPageRefreshMethod string enableCustomizeMyTabs string
boolean boolean
Description
Represents an action override for an application. Use it to create, update, edit, or delete action overrides.
This field is available for Lightning Experience in API version 38.0 and later.
The color scheme and logo used for the app.
This field is available for Lightning Experience in API version 38.0 and later.
Represents custom console components (Visualforce pages) assigned to a Salesforce console app.
The
of a standard tab or custom tab that opens when this application is selected.
The optional description text of the application.
Determines how detail pages refresh in a Salesforce console app. Required if isServiceCloudConsole
is true
. The valid values are:
•
none
•
autoRefresh
•
flag
This field is available in API version 25.0 and later.
Any external domains that users can access from within a Salesforce console app. For example, www.yourdomain.com
. This field is available in API version 25.0 and later.
Indicates if a Salesforce console app has Customize My
Tabs enabled. If enabled, users can hide, display, and organize items in the navigation tab.
This field is available in API version 34.0 and later.
Indicates if a Salesforce console app has keyboard shortcuts enabled. Shortcuts let users perform actions by pressing a combination of keys instead of having to use a mouse. After keyboard shortcuts are enabled, several default shortcuts are available for customization.
Before you can create custom shortcuts, a developer must define the shortcut’s action with the addEventListener()
method in the Salesforce
Console Integration Toolkit. You can’t create keyboard
209
Metadata Types
Field Name Field Type
enableListViewHover boolean enableListViewReskin boolean enableMultiMonitorComponents boolean enablePinTabs enableTabHover boolean boolean enableTabLimits boolean footerColor string
CustomApplication
Description
shortcuts for actions performed outside of the console.
This field is required if isServiceCloudConsole is true
.
This field is available in API version 28.0 and later.
Indicates if a Salesforce console app has list view hovers enabled. If set to true
, summary information is displayed about a record in a responsive list when the user hovers over a record name. For cases, hover over the subject field.
This field is available in API version 38.0 and later.
Indicates if Salesforce console apps use responsive list views instead of Salesforce Classic lists views.
This field is available in API version 38.0 and later.
Indicates if a Salesforce console app has multi-monitor components enabled, which lets users move portions of a console from their browsers to locations on their screens. This field is required if isServiceCloudConsole
is true
.
This field is available in API version 30.0 and later.
Indicates if a Salesforce console app has pinned tabs enabled, which lets users pin primary tabs to the tab bar for quick access.
This field is available in API version 34.0 and later.
Indicates if a Salesforce console app has tab hover enabled. If enabled, summary information is displayed about a record in an overlay when the user hovers over a tab.
This field is available in API version 36.0 and later.
Indicates whether limits are enabled on the number of primary tabs and subtabs that can be opened in a
Salesforce console session. When true
, values for tabLimitConfig
are required
This field is available in API version 36.0 and later.
Determines the footer color in a Salesforce console app.
Specify the color with a hexadecimal code, such as
#0000FF for blue.
210
Metadata Types
Field Name
formFactors
Field Type
string headerColor string isServiceCloudConsole boolean keyboardShortcuts
label listPlacement listRefreshMethod liveAgentConfig string
string
CustomApplication
Description
Indicates the form factors for which the app is visible for
Lightning Experience. Valid values are:
•
Null
(no value)—For a desktop using a Salesforce
Classic app
•
Large
—For a desktop using Lightning Experience
This field is available in API version 38.0 and later.
Note:
As of version 38.0, formFactors
is set to
Large
for existing Salesforce Classic apps, except for Salesforce Classic consoles. Salesforce
Classic apps installed from packages created before version 38.0 also have formFactors set to
Large
. For Salesforce Classic apps in packages created with 38.0 or later, you must set formFactors
to
Large
for Salesforce Classic apps to appear in the Lightning Experience desktop.
Determines the header color in a Salesforce console app.
Specify the color with a hexadecimal code, such as
#0000FF for blue.
Indicates if the application is a Salesforce console app.
For more information, see “Salesforce Console” in the
Salesforce online help.
Represents the keyboard shortcuts for a Salesforce console app. Keyboard shortcuts let users perform actions by pressing a combination of keys instead of having to use a mouse.
This field is available in API version 28.0 and later.
The name of the application.
Represents how lists display in a Salesforce console app.
Required if isServiceCloudConsole
is true
.
Determines how lists refresh in a Salesforce console app.
Required if isServiceCloudConsole
is true
.
The valid values are:
•
none
•
refreshList
•
refreshListRows
This field is available in API version 25.0 and later.
Represents the configurations for using Live Agent in the
Salesforce Console.
211
Metadata Types
Field Name
logo navType
Field Type
string string primaryTabColor string profileActionOverrides
pushNotifications saveUserSessions subscriberTabs tab
boolean string string
CustomApplication
Description
The optional reference to the image document for a
Salesforce app or Salesforce console.
Not updateable. Indicates the type of navigation the app uses. The value Standard is for Lightning Experience. A null value means Salesforce Classic.
This field is available in API version 38.0 and later.
Determines the primary tab color in a Salesforce console app. Specify the color with a hexadecimal code, such as
#0000FF for blue.
A list of the Lightning Experience record page
ProfileActionOverrides that are assigned to this custom app. When a user invokes the custom app, a matching
ProfileActionOverride assignment takes precedence over existing overrides for the record page specified in
ActionOverride . This lets you override a record page for
the custom app by record type and profile.
Represents push notifications for a Salesforce console app. Push notifications are visual indicators on lists and detail pages that show when a record or field has changed during a user’s session. For example, assume that two support agents are working on the same case.
If one agent changes the
Priority
, a push notification displays to the other agent so the agent notices the change and doesn’t duplicate the effort.
This field is available in API version 28.0 and later.
Indicates if a Salesforce console app saves user sessions automatically. If enabled, when console users close their browsers or log out of Salesforce, any previously open tabs display when users log in again. Required if isServiceCloudConsole
is true
.
This field is available in API version 28.0 and later.
Represents the list of tabs appended by a subscriber to a Lightning app installed from a managed package.
Records in a subscriber tab always open as primary tabs.
This field is available in API version 41.0 and later.
The list of tabs included in this application. In API version
12.0, the fullName
for built-in tabs like Home,
Account, and Reports, is the name of the tab (Home, for example). In API version 13.0 and later, built-in tabs are
212
Metadata Types CustomApplication
Field Name
tabLimitConfig uiType utilityBar workspaceMappings
Field Type
string string
Description
prefixed with standard-
. For example, to reference the Account tab you would use standard-Account
.
Represents the maximum number of primary tabs and subtabs allowed in one Salesforce console session.
Required if enableTabLimits
is true
.
This field is available in API version 36.0 and later.
Not updateable. Identifies the type of custom app. The value is:
•
Aloha
for Salesforce Classic
•
Lightning
for Lightning Experience
This field is available in API version 38.0 and later.
The developer name of the UtilityBar associated with this app.
Note: We recommend assigning a UtilityBar to only one Lightning App, because UtilityBars are shared. Sharing means that if you change the
UtilityBar in one app, it automatically changes in all apps it’s part of.
This field is available in API version 38.0 and later.
Represents how records open in a Salesforce console app. Required if isServiceCloudConsole
is true
. This field is available for Salesforce Classic console apps in API version 25.0 and later. This field is available for Lightning console apps in API version 41.0 and later.
AppActionOverride
Represents an action override for an application. Use it to create, update, edit, or delete action overrides. AppActionOverride inherits from
ActionOverride and extends it by one field,
pageOrSobjectType
. Available for Lightning Experience in API version 38.0 and later.
Field Name
actionName comment content
Field Type
string string string
Description
The only valid value is view
.
Any comments you want associated with the override.
Set this field if type
is set to flexipage
. It refers to the name of the page to use as the override. To reference installed components, use the format of
Component_namespace__Component_name
.
213
Metadata Types CustomApplication
Field Name
formFactor pageOrSobjectType skipRecordTypeSelect type
Field Type
FormFactor
(
string)
Description
The size of the page being overridden. Only the
Large
value is supported. The other values,
Small
and
Medium
, are reserved for future use.
If the type
field is set to flexipage
, set this field to
Large
to override the View action with a Lightning page in Lightning Experience.
The
Large
value represents the Lightning Experience desktop environment, and is only valid for the flexipage
type. For other types, this field defaults to null
.
This field is available in API version 37.0 and later, and is part of the feature for creating and editing record pages in Lightning Experience.
string boolean
(
string)
The name of the sObject type being overridden. Valid values are standard
and custom
.
Set this field to true
if you prefer that any new records created by this action override aren’t forwarded to the record type selection page. This field is only valid if the actionName
is a “create” type (like new
), and type
is set to visualforce
.
Required. Represents the type of action override. The valid values are
Flexipage
and
Default
.
AppBrand
The color scheme and logo used for the app. Available for Lightning apps in API version 38.0 and later.
Field Name
footerColor headerColor logo logoVersion
Field Type
string string string int
Description
Optional. Determines the footer color in the app. Specify the color with a hexadecimal code, such as #0000FF for blue.
Optional. Determines the header color in the app. Specify the color with a hexadecimal code, such as #0000FF for blue.
The optional reference to the image document for the application.
An optional version number for the logo.
AppProfileActionOverride
Represents a ProfileActionOverride for a custom app. This type inherits from
on page 536 and extends it by one field, profile
. Available for Lightning Experience in API version 39.0 and later.
214
Metadata Types CustomApplication
Field Name
actionName content formFactor pageOrSobjectType profile recordType type
Field Type
string
Description
The name of the action. The only valid values are
Tab
.and
View
.
If pageOrSobjectType
is record-home
, this field must be
View
. The
View
action is supported only when ProfileActionOverride is being specified as part of a CustomApplication.
string
FormFactor
(
string) string
Read-only. Represents the name of the Lightning page being used as the override.
The size of the page being overridden. Only the
Large
value is supported. The other values,
Small
and
Medium
, are reserved for future use. The
Large
value represents the Lightning Experience desktop environment.
The name of the page being overridden. The only valid values are record-home
and standard-home
.
string string
ActionOverrideType
(
string)
The profile associated with the ProfileActionOverride.
The record type associated with the override. If pageOrSobjectType is standard-home
, this field must be null
. This field is required when actionName
is set to
View
.
Read-only. The type of action override. The only valid value is flexipage
.
CustomApplicationComponents
Represents custom console components (Visualforce pages) assigned to a Salesforce console app. Available in API version 25.0 and later.
Field Name
alignment
Field Type
string customApplicationComponent string
Description
Determines how custom console components are aligned in the footer of a Salesforce console app.
The name of a custom console component assigned to a Salesforce console app.
CustomShortcut
Represents custom keyboard shortcuts assigned to a Salesforce console app. Before you can create custom shortcuts, a developer must define the shortcut’s action with the addEventListener()
method in the Salesforce Console Integration Toolkit. You can’t create keyboard shortcuts for actions performed outside of the console. Available in API version 28.0 and later.
Field Name
action
Field Type
string
Description
Required. The action performed in the console when a user presses the keyboard shortcut.
215
Metadata Types
Field Name
active keyCommand
Field Type
boolean string
CustomApplication
Description
Required. Indicates whether the keyboard shortcut is active ( true
) or not ( false
).
Required. The combination of keys a user presses to trigger the keyboard shortcut. Keyboard shortcuts aren’t case-sensitive, but they display as uppercase on setup pages in the Salesforce user interface so that they’re easier to read.
Each key command can include up to four modifier keys followed by one non-modifier key. Modifier and non-modifier keys are separated by the
+
key. Modifier keys can occur in any order, but you must place non-modifier keys at the end of the key command sequence. For example,
SHIFT+CTRL+ALT+META +A
.
Valid modifier keys are:
•
SHIFT
•
CTRL
•
ALT
•
META
(represents the COMMAND key on Macs)
Valid non-modifier keys are letters A through Z and numbers 0 through
9. Other valid keys are:
•
TAB
•
ENTER
•
PAUSE/BREAK
•
CAPS LOCK
•
ESC
•
SPACE
•
PAGE UP
•
PAGE DOWN
•
END
•
HOME
•
LEFT ARROW
•
UP ARROW
•
RIGHT ARROW
•
DOWN ARROW
•
PRINT SCREEN
•
INSERT
•
DELETE
•
RIGHT WINDOW
•
NUMPAD 0
•
NUMPAD 1
•
NUMPAD 2
216
Metadata Types
Field Name Field Type Description
•
NUMPAD 3
•
NUMPAD 4
•
NUMPAD 5
•
NUMPAD 6
•
NUMPAD 7
•
NUMPAD 8
•
NUMPAD 9
•
MULTIPLY
•
ADD
•
SUBTRACT
•
DECIMAL POINT
•
DIVIDE
•
F1
•
F2
•
F3
•
F4
•
F5
•
F6
•
F7
•
F8
•
F9
•
F10
•
,
•
—
•
.
•
/
•
‘
•
[
•
F11
•
F12
•
NUM LOCK
•
SCROLL LOCK
•
;
•
=
•
]
•
\
•
'
217
CustomApplication
Metadata Types CustomApplication
Field Name
description eventName
Field Type
string string
Description
The optional description text for the keyboard shortcut.
Required. Code available to developers who want to add custom shortcut functions to the console via the Salesforce Console Integration Toolkit.
DefaultShortcut
Represents default keyboard shortcuts assigned to a Salesforce console app. Once you enable keyboard shortcuts for a console, several default shortcuts are available for customization. These include opening and closing tabs, moving between tabs, and saving records.
Available in API version 28.0 and later.
Field Name
action
Field Type
string active keyCommand boolean string
Description
Required. The action performed in the console when a user presses the keyboard shortcut. Valid values are:
•
FOCUS_CONSOLE
•
FOCUS_NAVIGATOR_TAB
•
FOCUS_DETAIL_VIEW
•
FOCUS_PRIMARY_TAB_PANEL
•
FOCUS_SUBTAB_PANEL
•
FOCUS_LIST_VIEW
•
FOCUS_FIRST_LIST_VIEW
•
FOCUS_SEARCH_INPUT
•
MOVE_LEFT
•
MOVE_RIGHT
•
UP_ARROW
•
DOWN_ARROW
•
OPEN_TAB_SCROLLER_MENU
•
OPEN_TAB
•
CLOSE_TAB
•
ENTER
•
EDIT
•
SAVE
For a list and description of the default keyboard shortcuts, see “Default
Keyboard Shortcuts for a Salesforce Console in Salesforce Classic” in the
Salesforce online help.
Required. Indicates whether the keyboard shortcut is active ( true
) or not ( false
).
Required. The combination of keys a user presses to trigger the keyboard shortcut. Keyboard shortcuts aren’t case-sensitive, but they display as
218
Metadata Types
Field Name Field Type
CustomApplication
Description
uppercase on setup pages in the Salesforce user interface so that they’re easier to read.
Each key command can include up to four modifier keys followed by one non-modifier key. Modifier and non-modifier keys are separated by the
+
key. Modifier keys can occur in any order, but you must place non-modifier keys at the end of the key command sequence. For example,
SHIFT+CTRL+ALT+META +A
.
Valid modifier keys are:
•
SHIFT
•
CTRL
•
ALT
•
META
(represents the COMMAND key on Macs)
Valid non-modifier keys are letters A through Z and numbers 0 through
9. Other valid keys are:
•
TAB
•
ENTER
•
PAUSE/BREAK
•
CAPS LOCK
•
ESC
•
SPACE
•
PAGE UP
•
PAGE DOWN
•
END
•
HOME
•
LEFT ARROW
•
UP ARROW
•
RIGHT ARROW
•
DOWN ARROW
•
PRINT SCREEN
•
INSERT
•
DELETE
•
RIGHT WINDOW
•
NUMPAD 0
•
NUMPAD 1
•
NUMPAD 2
•
NUMPAD 3
•
NUMPAD 4
•
NUMPAD 5
•
NUMPAD 6
219
Metadata Types
Field Name
CustomApplication
Field Type Description
•
‘
•
[
•
]
•
\
•
'
•
;
•
=
•
,
•
—
•
.
•
/
•
NUMPAD 7
•
NUMPAD 8
•
NUMPAD 9
•
MULTIPLY
•
ADD
•
SUBTRACT
•
DECIMAL POINT
•
DIVIDE
•
F1
•
F2
•
F3
•
F4
•
F5
•
F6
•
F7
•
F8
•
F9
•
F10
•
F11
•
F12
•
NUM LOCK
•
SCROLL LOCK
DomainWhitelist
Represents any external domains that users can access from within a Salesforce console app. For example, www.yourdomain.com
.
Available in API version 25.0 and later.
220
Metadata Types CustomApplication
Field Name
domain
Field Type
string
Description
The external domains that users can access from within this Salesforce console app.
KeyboardShortcuts
Represents keyboard shortcuts assigned to a Salesforce console app. Required if isServiceCloudConsole
is true
. Available in API version 28.0 and later.
Field Name
customShortcut defaultShortcut
Field Type
KeyboardShortcuts[]
KeyboardShortcuts[]
Description
Represents custom keyboard shortcuts assigned to a Salesforce console app. Before you can create custom shortcuts, a developer must define the shortcut’s action with the addEventListener()
method in the Salesforce Console Integration Toolkit. You can’t create keyboard shortcuts for actions performed outside of the console.
Represents default keyboard shortcuts assigned to a Salesforce console app. Once you enable keyboard shortcuts for a console, several default shortcuts are available for customization. These include opening and closing tabs, moving between tabs, and saving records.
For a list and description of the default keyboard shortcuts, see “Default
Keyboard Shortcuts for a Salesforce Console in Salesforce Classic” in the
Salesforce online help.
ListPlacement
Represents how lists display in a Salesforce console app. Required if isServiceCloudConsole
is true
. Available in API version
25.0 and later.
Field Name
height location units width
Field Type
int string string int
Description
Height of the list in pixels or percentage. Required if location
is top.
Required. Location of the list on the screen. Valid values are:
•
full
•
top
•
left
Required. Represents if height
or width
is in pixels or percentage.
Width of the list in pixels or percentage. Required if location
is left.
LiveAgentConfig
Represents your organization’s settings for using Live Agent in the Salesforce Console.
221
Metadata Types CustomApplication
Field Name
enableLiveChat openNewAccountSubtab openNewCaseSubtab openNewContactSubtab openNewLeadSubtab openNewVFPageSubtab pagesToOpen showKnowledgeArticles
Field Type
boolean boolean boolean
Description
Specifies whether Live Agent is enabled in your organization ( true
) or not ( false
).
Specifies whether to open a new Account subtab in the Salesforce
Console automatically ( true
) or not ( false
) when an agent accepts a chat.
Specifies whether to open a new Case subtab in the Salesforce Console automatically ( true
) or not ( false
) when an agent accepts a chat.
boolean boolean
Specifies whether to open a new Contact subtab in the Salesforce Console automatically ( true
) or not ( false
) when an agent accepts a chat.
Specifies whether to open a new Lead subtab in the Salesforce Console automatically ( true
) or not ( false
) when an agent accepts a chat.
boolean Specifies whether to open a new Visualforce page as a subtab in the
Salesforce Console automatically ( true
) or not ( false
) when an agent accepts a chat.
on page
222
Specifies the Visualforce pages to open in subtabs when an agent accepts a chat in the Salesforce Console.
boolean Specifies whether to display the Knowledge component while using Live
Agent in the Salesforce Console ( true
) or not ( false
).
PagesToOpen
Represents the Visualforce pages you want to open in subtabs when an agent accepts a chat request in the Salesforce Console. Available in API version 28.0 and later.
Field Name
pagesToOpen
Field Type
string
Description
The name of the Visualforce pages you want to open in subtabs when an agent accepts a chat in the Salesforce Console.
PushNotifications
Represents a set of push notifications, which are visual indicators on lists and detail pages that show when a record or field has changed during a user’s session. Available for use if isServiceCloudConsole
is true
. Available in API version 28.0 and later.
Field Name
pushNotification
Field Type
PushNotification[]
Description
The set of push notifications.
222
Metadata Types CustomApplication
PushNotification
Represents if visual indicators on lists and detail pages display in a Salesforce console app when a record or field has changed during a user’s session. Available for use if isServiceCloudConsole
is true
. Available in API version 28.0 and later.
Field Name
fieldNames objectName
Field Type
string string
Description
Required. The name of the field, or fields, that trigger push notifications for the selected object.
Required. Name of the object that triggers push notifications.
TabLimitConfig
Represents the maximum number of primary tabs and subtabs allowed in one Salesforce console session. Required if enableTabLimits
is true
. Available in API version 36.0 and later.
Field Name Field Type
maxNumberOfPrimaryTabs string maxNumberOfSubTabs string
Description
The maximum number of primary tabs allowed in one console session.
Valid values are:
•
5
•
10
•
20
•
30
The maximum number of subtabs allowed in one console session. Valid values are:
•
5
•
10
•
15
WorkspaceMappings
Represents how records open in a Salesforce console app. Required if isServiceCloudConsole
is true
. Available for Salesforce
Classic console apps in API version 25.0 and later. Available for Lightning console apps in API version 41.0 and later.
Field Name
mapping
Field Type
Description
Represents how records for a specific tab open in a Salesforce console app. Required for each tab specified in the CustomApplication.
223
Metadata Types CustomApplication
WorkspaceMapping
Represents how records for a specific tab open in a Salesforce console app. Required for each tab specified in the CustomApplication.
Available in API version 25.0 and later for Salesforce Classic console apps. Available in API version 41.0 and later for Lightning console apps.
Field Name
fieldName tab
Field Type
string string
Description
The name of the field that specifies the primary tab in which to display tab
as a subtab. If not specified, tab
opens as a primary tab.
Required. Name of the tab.
Retrieving Apps
To retrieve apps in your organization, use the CustomApplication type name in the package.xml
manifest file. You can either retrieve all apps or specify which apps to retrieve in the types section of package.xml
.
To retrieve all apps in your organization—custom and standard apps, specify the wildcard character (
*
), as follows.
<types >
<members >* </members >
<name >CustomApplication </name >
</types >
Note: In API version 29.0 and earlier, use of the wildcard returns only all custom applications but not standard applications.
To retrieve a custom app, specify the app name.
<types >
<members >MyCustomApp </members >
<name >CustomApplication </name >
</types >
To retrieve a standard app, add the standard__
prefix to the app name. For example, to retrieve the Chatter standard app, specify standard__Chatter
.
<types >
<members >standard__Chatter </members >
<name >CustomApplication </name >
</types >
To retrieve an app that is part of an installed package, add the package namespace prefix followed by two underscores and the app name. For example, if the package namespace is myInstalledPackageNS
and the app name is
PackageApp
, specify myInstalledPackageNS__PackageApp
, as follows.
<types >
<members >myInstalledPackageNS__PackageApp </members >
<name >CustomApplication </name >
</types >
224
Metadata Types
Declarative Metadata Sample Definition
The following is the definition of a custom app:
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomApplication xmlns= "http://soap.sforce.com/2006/04/metadata">
<defaultLandingTab >Myriad_Publishing__c </defaultLandingTab >
<description >App to manage Myriad Publishing </description >
<label >Myriad </label >
<logo >MyriadFolder/Myriad_Logo.jpg
</logo >
<tab >standard-Chatter </tab >
<tab >standard-File </tab >
<tab >Myriad_Publishing__c </tab >
<tab >standard-report </tab >
<tab >standard-Dashboard </tab >
</CustomApplication >
The following is a definition of a standard app (Chatter):
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomApplication xmlns= "http://soap.sforce.com/2006/04/metadata">
<defaultLandingTab >standard-home </defaultLandingTab >
<label >Collaboration </label >
<tab >standard-Chatter </tab >
<tab >standard-UserProfile </tab >
<tab >standard-OtherUserProfile </tab >
<tab >standard-CollaborationGroup </tab >
<tab >standard-File </tab >
</CustomApplication >
Declarative Metadata Sample Definition—Salesforce Console
The following is the definition of a custom app where isServiceCloudConsole
is true
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomApplication xmlns= "http://soap.sforce.com/2006/04/metadata">
<customApplicationComponents >
<alignment >left </alignment >
<customApplicationComponent >MyComponent </customApplicationComponent >
</customApplicationComponents >
<defaultLandingTab >standard-home </defaultLandingTab >
<detailPageRefreshMethod >autoRefresh </detailPageRefreshMethod >
<isServiceCloudConsole >true </isServiceCloudConsole >
<keyboardShortcuts >
<customShortcut >
<action >MyCustomShortcutAction </action >
<active >true </active >
<keyCommand >X </keyCommand >
<description >Custom Shortcut example </description >
<eventName >myCustomShortcutExample </eventName >
</customShortcut >
<defaultShortcut >
<action >FOCUS_CONSOLE </action >
<active >true </active >
CustomApplication
225
Metadata Types
<keyCommand >ESC </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >FOCUS_NAVIGATOR_TAB </action >
<active >true </active >
<keyCommand >V </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >FOCUS_DETAIL_VIEW </action >
<active >true </active >
<keyCommand >SHIFT+S </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >FOCUS_PRIMARY_TAB_PANEL </action >
<active >true </active >
<keyCommand >P </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >FOCUS_SUBTAB_PANEL </action >
<active >true </active >
<keyCommand >S </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >FOCUS_LIST_VIEW </action >
<active >true </active >
<keyCommand >N </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >FOCUS_FIRST_LIST_VIEW </action >
<active >true </active >
<keyCommand >SHIFT+F </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >FOCUS_SEARCH_INPUT </action >
<active >true </active >
<keyCommand >R </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >MOVE_LEFT </action >
<active >true </active >
<keyCommand >LEFT ARROW </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >MOVE_RIGHT </action >
<active >true </active >
<keyCommand >RIGHT ARROW </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >UP_ARROW </action >
<active >true </active >
<keyCommand >UP ARROW </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >DOWN_ARROW </action >
226
CustomApplication
Metadata Types
<active >true </active >
<keyCommand >DOWN ARROW </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >OPEN_TAB_SCROLLER_MENU </action >
<active >true </active >
<keyCommand >D </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >OPEN_TAB </action >
<active >true </active >
<keyCommand >T </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >CLOSE_TAB </action >
<active >true </active >
<keyCommand >C </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >ENTER </action >
<active >true </active >
<keyCommand >ENTER </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >EDIT </action >
<active >true </active >
<keyCommand >E </keyCommand >
</defaultShortcut >
<defaultShortcut >
<action >SAVE </action >
<active >true </active >
<keyCommand >CTRL+S </keyCommand >
</defaultShortcut >
</keyboardShortcuts >
<label >MyConsole </label >
<listPlacement >
<location >left </location >
<units >percent </units >
<width >20 </width >
</listPlacement >
<listRefreshMethod >refreshList </listRefreshMethod >
<pushNotifications >
<pushNotification >
<fieldNames >CreatedBy </fieldNames >
<objectName >Campaign </objectName >
</pushNotification >
<pushNotification >
<fieldNames >CustomField1__c </fieldNames >
<objectName >CustomObject1__c </objectName >
</pushNotification >
</pushNotifications >
<saveUserSessions >false </saveUserSessions >
<tab >standard-Case </tab >
<tab >standard-Account </tab >
227
CustomApplication
Metadata Types CustomApplicationComponent
<tab >standard-Contact </tab >
<tab >standard-Contract </tab >
<workspaceMappings >
<mapping >
<tab >standard-Case </tab >
</mapping >
<mapping >
<fieldName >AccountId </fieldName >
<tab >standard-Contract </tab >
</mapping >
<mapping >
<tab >standard-Contract </tab >
</mapping >
<mapping >
<fieldName >ParentId </fieldName >
<tab >standard-Account </tab >
</mapping >
</workspaceMappings >
</CustomApplication >
SEE ALSO:
CustomApplicationComponent
Custom console components extend the capabilities of Salesforce console apps. See “Customize a Console with Custom Components in Salesforce Classic” in the Salesforce online help.
File Suffix and Directory Location
Custom application components have the suffix
.customApplicationComponent
and are stored in the customApplicationComponents
folder.
Version
Custom applications are available in API version 25.0 and later.
Fields
Field Name
buttonIconUrl buttonStyle buttonText
Field Type
string string string
Description
The address of a page that hosts an icon for the button.
The inline style used to define how the button looks.
The label on the button used to launch the custom console component.
228
Metadata Types CustomFeedFilter
Field Name
buttonWidth height isHeightFixed isHidden isWidthFixed visualforcePage width
Field Type
int int boolean boolean boolean string int
Description
The pixel width of the button as it should display in the Salesforce console.
The pixel height of the window used to display the custom console component.
Required. Indicates whether users can change the custom console component height ( false
) or not ( true
).
Required. Indicates whether the custom console component is hidden from users ( true
) or not ( false
).
Required. Indicates whether users can change the component width
( false
) or not ( true
).
Required. Name of the Visualforce page that represents the custom console component.
The pixel width of the window used to display the custom console component.
Declarative Metadata Sample Definition
The following is the definition of a custom application component:
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomApplicationComponent xmlns= "http://soap.sforce.com/2006/04/metadata">
<buttonIconUrl >http://www.salesforce.com
</buttonIconUrl >
<buttonStyle >buttonStyleCSS </buttonStyle >
<buttonText >buttonText </buttonText >
<buttonWidth >200 </buttonWidth >
<height >200 </height >
<isHeightFixed >false </isHeightFixed >
<isHidden >false </isHidden >
<isWidthFixed >false </isWidthFixed >
<visualforcePage >MyVisualforcePage </visualforcePage >
<width >50 </width >
</CustomApplicationComponent >
CustomFeedFilter
Represents a custom feed filter that limits the feed view to feeds from the Cases object. The custom feed filter shows only feed items
metadata type and inherits its fullName
field.
File Suffix and Directory Location
CustomFeedFilter components have the suffix
.feedFilter
and are stored in the feedFilters
folder.
229
Metadata Types CustomFeedFilter
Version
CustomFeedFilter components are available in API version 35.0 and later.
Fields
Field Name
description criteria label
Field Type
string
FeedFilterCriterion
[] string
Description
The description of the custom feed filter. For example, specify what feed items that filter shows.
The criterion that defines which feed items are shown when the filter is applied. The feed filter displays all feed items that satisfy the criteria.
Required. The API label of the custom feed filter.
FeedFilterCriterion
Represents the conditions that a feed item must satisfy to be displayed when a feed filter is applied.
Field Name
feedItemType feedItemVisibility
Field Type Description
of type string)
Required. The type of feed items that the filter shows.
The feed item type can be one of the following values:
•
AttachArticleEvent
•
CallLogPost
•
CanvasPost
•
CaseCommentPost
•
ChangeStatusPost
•
ChatTranscriptPost
•
ContentPost
•
CreateRecordEvent
•
EmailMessageEvent
•
LinkPost
•
MilestoneEvent
•
QuestionPost
•
PollPost
•
ReplyPost
•
SocialPost
•
TextPost
FeedItemVisibility (
of type string)
The visibility of feed items that the filter shows. For example, you can show only poll posts that are visible internally.
230
Metadata Types
Field Name
relatedSObjectType
Field Type
string
CustomLabels
Description
Valid values are:
•
AllUsers
•
InternalUsers
The API name of the object that the feed item refers to.
This field is typically used with the CreateRecordEvent feed item type.
For example, a feed filter can show CreateRecordEvent feed items for the Cases object.
Declarative Metadata Sample Definition
The following is an example of a CustomFeedFilter component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomFeedFilter xmlns= "http://soap.sforce.com/2006/04/metadata">
<criteria >
<feedItemType >CreateRecordEvent </feedItemType >
<relatedSObjectType >MyCO01__c </relatedSObjectType >
</criteria >
<criteria >
<feedItemType >CreateRecordEvent </feedItemType >
<relatedSObjectType >Case </relatedSObjectType >
</criteria >
<criteria >
<feedItemType >PollPost </feedItemType >
<feedItemVisibility >InternalUsers </feedItemVisibility >
</criteria >
<label >Sample Custom Feed Filter </label >
</CustomFeedFilter >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >myCaseFeedFilter </members >
<name >CustomFeedFilter </name >
</types >
<version >41.0
</version >
</Package >
CustomLabels
This metadata type allows you to create custom labels that can be localized for use in different languages, countries, and currencies.
This type extends the
Metadata metadata type and inherits its
fullName
field. Custom labels are custom text values, up to 1,000
231
Metadata Types CustomLabels characters in length, that can be accessed from Apex classes or Visualforce pages. For more information, see “Custom Labels” in Salesforce
Help.
Declarative Metadata File Suffix and Directory Location
Master custom label values are stored in the
CustomLabels.labels
file. Translations for custom labels can be retrieved through
Translations in Metadata API. Translations are stored in files under the
translations
folder with the name format of
localeCode.translation
, where
localeCode
is the locale code of the translation language. The supported locale codes are listed in
on page 712.
Version
CustomLabels components are available in API version 14.0 and later.
Fields
Field
fullName
Field Type
string labels
[]
Description
Required. The name of the custom label bundle.
Inherited from Metadata , this field is not defined in the WSDL
for this metadata type. It must be specified when creating,
updating, or deleting. See create()
to see an example of this field specified for a call.
A list of custom labels.
CustomLabel
fullName
field.
Field
categories fullName language protected
Field Type
string string string boolean
Description
A comma-separated list of categories for the label. This field can be used in filter criteria when creating custom label list views.
Maximum of 255 characters.
Required. The name of the custom label.
Inherited from Metadata , this field is not defined in the WSDL
for this metadata type. It must be specified when creating,
updating, or deleting. See create()
to see an example of this field specified for a call.
Required. The language of the translated custom label.
Required. Indicates whether this component is protected ( true
) or not ( false
). Protected components cannot be linked to or referenced by components created in the installing organization.
232
Metadata Types CustomLabels
Field
shortDescription value
Field Type
string string
Description
Required. An easily recognizable term to identify this custom label. This description is used in merge fields.
Required. The translated custom label. Maximum of 1000 characters.
Usage
Use CustomLabels with the wildcard character (*) for members in the package.xml
manifest file to retrieve all custom labels that are defined in your organization. CustomLabels doesn’t support retrieving one or more custom labels by name. To retrieve specific labels by name, use CustomLabel and specify the label names as members.
Declarative Metadata Sample Definition
A sample XML definition of a custom label components is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomLabels xmlns= "http://soap.sforce.com/2006/04/metadata">
<labels >
<fullName >quoteManual </fullName >
<value >This is a manual quote.
</label >
<language >en_US </language >
<protected >false </protected >
<shortDescription >Manual Quote </shortDescription >
</labels >
<labels >
<fullName >quoteAuto </fullName >
<value >This is an automatically generated quote.
</label >
<language >en_US </language >
<protected >false </protected >
<shortDescription >Automatic Quote </shortDescription >
</labels >
</CustomLabels >
This is a sample manifest file for retrieving all custom labels in the organization by using the CustomLabels type.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<fullName >MyPkg </fullName >
<types >
<members >* </members >
<name >CustomLabels </name >
</types >
<version >41.0
</version >
</Package >
This is a sample manifest file for retrieving two custom labels by name. Notice it uses the CustomLabel singular type.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<fullName >MyPkg </fullName >
233
Metadata Types Custom Metadata Types (CustomObject)
<types >
<members >quoteManual </members >
<members >quoteAuto </members >
<name >CustomLabel </name >
</types >
<version >41.0
</version >
</Package >
SEE ALSO:
Custom Metadata Types (CustomObject)
Represents the metadata associated with a custom metadata type.
For more information, see the
Custom Metadata Types Implementation Guide
.
File Suffix and Directory Location
A custom metadata type is defined as a custom object and is stored in the objects folder. Custom metadata types have a suffix of
__mdt
(instead of
__c
for custom objects). Custom metadata type field names have a suffix of
__c
, like other custom fields. Custom metadata type field names must be dot-qualified with the name of the custom metadata type to which they belong.
Names of custom metadata types must be unique within their namespace. All custom metadata types belong to the
CustomMetadata namespace and can optionally belong to a second namespace. In your organization, you can use custom metadata types with your namespace as well as other organizations’ namespaces.
Version
Custom metadata type components are available in API version 31.0 and later.
Special Access Rules
To create custom metadata types, you must have the “Author Apex” permission. Only managed package developers can add new fields to the custom metadata types in their managed packages. Customers who install a managed custom metadata type can’t add new custom fields to it.
Fields
Custom metadata types can contain the following CustomObject fields.
To make the fields on your custom metadata types unique and indexable, mark your fields as
Unique
and
ExternalId
.
Field Name
description
Field Type
string
Description
A description of the custom metadata type. This field can contain a maximum of 1,000 characters.
234
Metadata Types
Field Name
fields gender
Protected label pluralLabel startsWith visibility
Custom Metadata Types (CustomObject)
Field Type
boolean string
Description
Represents one or more custom fields in the custom metadata type.
Indicates the gender of the noun that represents the object.
This field is used for languages where words need different treatment depending on their gender.
When a custom metadata type is released in a managed package, access is limited in specific ways.
•
Code that’s in the same managed package as custom metadata records can read the records.
•
Code that’s in the same managed package as custom metadata types can read the records that belong to that type.
•
Code that’s in a managed package that doesn’t contain either the type or the protected record can’t read the protected records.
•
Code that the subscriber creates and code that’s in an unmanaged package can’t read the protected records.
•
The developer can modify protected records with a package upgrade or by using the Metadata Apex classes
(if the Apex code is in the same namespace as either the records or their type). The subscriber can’t read or modify protected records. The developer name of a protected record can’t be changed after release.
•
The subscriber can’t create records of a protected type.
Records that are hidden by these access rules are also unavailable to REST, SOAP, SOQL, and Setup.
A label that represents the object throughout the Salesforce
Setup user interface. Custom metadata types are visible only through the recently used objects list on the Force.com
Home Page and in the packaging user interface.
string
The plural version of the label value.
Indicates whether the noun starts with a vowel, a consonant, or a special character. This field is used for languages where words need different treatment depending on their first character.
SetupObjectVisibility (enumeration of type string)
When this field is present, this component is not a custom object, but a custom setting or custom metadata type. This field returns the visibility of the custom setting or custom metadata type. The following values are valid.
•
Public
—If the custom setting or custom metadata type is packaged, it’s accessible to all subscribing organizations.
235
Metadata Types
Field Name Field Type
Custom Metadata Types (CustomObject)
Description
•
Protected
—If the custom setting or custom metadata type is in a managed package, it’s only accessible to the developer organization; subscribing organizations can’t access it.
The default value is
Public
.
Declarative Metadata Sample Definition
In this example, Picklists R Us creates its Reusable Picklist custom metadata type by deploying a file in the objects folder, named
ReusablePicklistOption__mdt.object
, with these contents.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<fields >
<fullName >AlphaSort__c </fullName >
<defaultValue >false </defaultValue >
<externalId >false </externalId >
<label >Sorted Alphabetically </label >
<type >Checkbox </type >
</fields >
<label >Reusable Picklist </label >
<pluralLabel >Reusable Picklist </pluralLabel >
<visibility >Public </visibility >
</CustomObject >
This excerpt from a package.xml
file shows the use of dot notation and the
__mdt
suffix. If you’re using a namespace, for example picklist1234
, the full name of
ReusablePicklistOption__mdt
would be picklist1234
__ReusablePicklistOption__mdt
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
...
<types >
<members >PicklistTest__c.PicklistTestField__c
</members >
<members >ReusablePicklistOption__mdt.Picklist__c
</members >
<members >ReusablePicklistOption__mdt.SortOrder__c
</members >
<members >PicklistUsage__mdt.Field__c
</members >
<members >PicklistUsage__mdt.Picklist__c
</members >
<members >PicklistUsage__mdt.SObjectType__c
</members >
<members >ReusablePicklist__mdt.AlphaSort__c
</members >
<name >CustomField </name >
...
</types >
<types >
<members >PicklistTest__c </members >
<members >ReusablePicklistOption__mdt </members >
<members >PicklistUsage__mdt </members >
<members >ReusablePicklist__mdt </members >
<name >CustomObject </name >
</types >
236
Metadata Types CustomMetadata
...
<version >41.0
</version >
</Package >
CustomMetadata
Represents a record of a custom metadata type.
This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
CustomMetadata components have the suffix
.md
and are stored in the customMetadata
folder. Unlike custom metadata types, custom metadata records don’t have a double-underscore suffix. Custom metadata record names are prepended with their custom metadata type name, excluding the
__mdt
suffix but including the namespace of any types in an installed managed package.
Version
CustomMetadata components are available in API version 31.0 and later.
Special Access Rules
To create custom metadata records, you must have the “Customize Application” permission.
Fields
Field Name
description
Field Type
string label values string
Description
A description of the custom metadata record. This field can contain a maximum of 1,000 characters.
A label that represents the object throughout the
Salesforce Setup user interface. Custom metadata records are currently visible only through the packaging user interface.
Represents one or more values for custom fields on the custom metadata record.
CustomMetadataValue
Represents a value for a custom field on the custom metadata record.
Field Name
field
Field Type
string
Description
Required. The non-object-qualified name of a custom field in the custom metadata type. This value corresponds to the name of a field on the custom metadata record’s custom metadata type. Include the namespace (if the
237
Metadata Types
Field Name
value
Field Type
Any type
CustomMetadata
Description
type is from a managed package) and the
__c
suffix.
The name of the custom metadata type isn’t required.
For example, picklist1234__AlphaSort__c
.
The value on a custom metadata record. Where fields are
EntityDefinition and FieldDefinition, the qualified API names of the entity and the field it points to. This value can be null.
For more information, see Usage on page 241.
Declarative Metadata Sample Definitions
The following is an example of a CustomMetadata component. In this example, the sample app TravelApp deploys a Planets picklist, specifies its sort order, and adds picklist items to it.
Assuming Picklists R Us’s namespace is picklist1234
, to define the
Planets
picklist, TravelApp deploys a file in the customMetadata
folder, named picklist1234__ReusablePicklist.Planets.md
, with these contents. The xsi:type
attribute specifies the type for the value of the
AlphaSort__c
checkbox field.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomMetadata xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= "http://www.w3.org/2001/XMLSchema">
<description >All the planets in the solar system. Does not include asteroids.
</description >
<label >Planets </label >
<values >
<field >picklist1234__AlphaSort__c </field >
<value xsi:type= "xsd:boolean">false </value >
</values >
</CustomMetadata >
Picklists R Us creates its Reusable Picklist Option custom metadata type by deploying a file in the objects folder, named
ReusablePicklist__mdt.object
, with these contents.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<fields >
<fullName >Picklist__c </fullName >
<externalId >false </externalId >
<label >Picklist </label >
<length >40 </length >
<required >true </required >
<type >Text </type >
<unique >false </unique >
</fields >
<fields >
<fullName >SortOrder__c </fullName >
<externalId >false </externalId >
<label >Non-Alphabetical Sort Order </label >
<precision >3 </precision >
238
Metadata Types CustomMetadata
<scale >0 </scale >
<required >false </required >
<type >Number </type >
<unique >false </unique >
</fields >
<label >Reusable Picklist Option </label >
<pluralLabel >Reusable Picklist Options </pluralLabel >
</CustomObject >
To define the
Mars
picklist item, TravelApp deploys a file, named picklist1234__ReusablePicklistOption.Mars.md
, with these contents. This component file specifies types that apply to the
ReusablePicklistOption__mdt
custom fields.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomMetadata xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= "http://www.w3.org/2001/XMLSchema">
<label >Mars </label >
<values >
<field >picklist1234__Picklist__c </field >
<value xsi:type= "xsd:string">Planets </value >
</values >
<values >
<field >picklist1234__SortOrder__c </field >
<value xsi:type= "xsd:int">4 </value >
</values >
</CustomMetadata >
To define the
Motel6
picklist item, TravelApp deploys a file, named picklist1234__ReusablePicklistOption.Motel6.md
, with these contents.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomMetadata xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= "http://www.w3.org/2001/XMLSchema">
<label >Motel 6 </label >
<values >
<field >picklist1234__Picklist__c </field >
<value xsi:type= "xsd:string">Hotels </value >
</values >
</CustomMetadata >
Because the
SortOrder__c
field isn’t required, this file doesn’t require a value for
SortOrder__c
. Alternatively, the file could have explicitly specified a value with xsi:nil
to ensure that
SortOrder__c
was cleared of any previous value.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomMetadata xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= "http://www.w3.org/2001/XMLSchema">
<label >Motel 6 </label >
<values >
<field >picklist1234__Picklist__c </field >
<value xsi:type= "xsd:string">Hotels </value >
</values >
<values >
<field >picklist1234__SortOrder__c </field >
239
Metadata Types CustomMetadata
<value xsi:nil= "true" />
</values >
</CustomMetadata >
This excerpt from a package.xml
file illustrates the inclusion of custom metadata types and their namespaces in custom metadata records’ names. Assume that Picklists R Us’s namespace is picklist1234
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<package xmlns= "http://soap.sforce.com/2006/04/metadata">
…
<types >
<members >picklist1234__ReusablePicklist.Hotels
</members >
<members >picklist1234__ReusablePicklist.Planets
</members >
<members >picklist1234__ReusablePicklistOption.Bellagio
</members >
<members >picklist1234__ReusablePicklistOption.Motel6
</members >
<members >picklist1234__ReusablePicklistOption.Mercury
</members >
<members >picklist1234__ReusablePicklistOption.Venus
</members >
<members >picklist1234__ReusablePicklistOption.Earth
</members >
<members >picklist1234__PicklistUsage.BookedHotel
</members >
<members > picklist1234__PicklistUsage.DestinationPlanetPL
</members >
<members >picklist1234__PicklistUsage.PlanetVisitedPl
</members >
<name >CustomMetadata </name >
</types >
…
</package >
TravelApp, Inc.’s package.xml
file uses a wildcard to install custom metadata, as is shown in this excerpt from their package.xml
file. Unless you want to deploy or retrieve specific records, using a wildcard is easier than listing all of your custom metadata records in your package.xml
file.
<types >
<members >*</members>
<name >CustomMetadata </name >
</types >
If the custom metadata is from a managed package, the name after the dot in the package.xml
file—between the two dots in the file name—is qualified by the managed package’s namespace. For example, assuming TravelApp uses the namespace travelApp1234
, the first member element in the TravelApp package.xml
file appears to Galactic Tours as:
<members >picklist1234__ReusablePicklist.travelApp1234__Hotels
</members >
Here’s another example. In this case, we have an instance of custom metadata record, whose EntityDefinition field points to a custom object named
SalesAgreement__c
. The FieldDefinition field points to the custom field
CustomerReference__c
on
SalesAgreement__c
. You can deploy new custom metadata records and retrieve existing ones with EntityDefinition and
FieldDefinition fields using qualified API names of custom and standard entities and their fields.
<?xml
version= "1.0" encoding= "UTF-8"?> <values >
<field >EntityDefintionField__c </field >
<value xsi:type= "xsd:string">v1__SalesAgreement__c </value >
</values >
<values >
<field >FieldDefinitionField__c </field >
240
Metadata Types CustomObject
<value xsi:type= "xsd:string">v1__CustomerReference__c </value >
</values >
Usage
When specifying the value
field in the CustomMetadataValue subtype, specify an appropriately typed object that’s based on your field type definition. In declarative metadata definitions for CustomMetadataValue, use the xsi:type
attribute of the value element.
For example, to specify a boolean value:
<value xsi:type= "xsd:boolean">true </value >
. Valid xsi:type
attributes are:
Custom metadata value
xsi:type="xsd:boolean" xsi:type="xsd:date" xsi:type="xsd:dateTime" xsi:type="xsd:picklist" xsi:type="xsd:string" xsi:type="xsd:string" xsi:type="xsd:string" xsi:type="xsd:string" xsi:type="xsd:string" xsi:type="xsd:int" xsi:type="xsd:double"
Custom field definition
Checkbox
Date
Date/Time
Picklist
Text
Phone
TextArea
URL
Number/Percent, with scale equal to 0
Number/Percent, with scale not equal to 0
You can also omit the xsi:type
attribute. For example,
<value >true </value >
.
Although this attribute must be specified for any CustomMetadataValue, you can use an element with the xsi:nil
attribute set to true
to explicitly set the field’s value to null
. For example,
<value xsi:nil= "true"/>
.
Using null
field values differs from leaving out the CustomMetadataValue for a particular field entirely. If you leave out the
CustomMetadataValue, the value of the field doesn’t change. The field’s value is null
for newly deployed custom metadata records and left at its previous value for updated custom metadata records.
When you retrieve CustomMetadataValue objects, the value
field of the returned object holds a value of the correct type, specified by xsi:type
in the case of declarative metadata definitions.
CustomObject
Represents a custom object that stores data unique to your organization or an external object that maps to data stored outside Salesforce.
This type extends the
Metadata metadata type and inherits its
fullName
field. You must specify all relevant fields when you create or update a custom object. You cannot update a single field on the object. For more information about custom objects, see Administer
Custom Objects in the Salesforce online help.
241
Metadata Types CustomObject
You can also use this metadata type to work with customizations of standard objects, such as accounts. For an example, see
All metadata components have a
field, which must be fully specified for any custom object.
For example, the following are fully specified names for a standard object and a custom object respectively:
Account
MyCustomObject__c
And the following is a fully specified name for an external object:
MyExternalObject__x
Declarative Metadata File Suffix and Directory Location
Custom object names are automatically appended with __c. The file suffix is
.object
for the custom object or standard object file.
External object names are automatically appended with __x. The file suffix is
.object
for the external object file.
Custom, standard, and external objects are stored in the objects
folder in the corresponding package directory.
Note:
Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.
Version
Custom objects are available in API version 10.0 and later. External objects are available in API version 32.0 and later.
Fields
Unless otherwise noted, all fields are createable, filterable, and nillable.
Field Name
actionOverrides
Field Type
allowInChatterGroups businessProcesses compactLayoutAssignment compactLayouts boolean
[] string
[]
Description
A list of action overrides on the object.
This field is available in API version 18.0 and later.
Indicates whether records of this custom object type can be added to Chatter groups.
This field is available in API version 34.0 and later.
A list of business processes associated with the object.
This field is available in API version 17.0 and later.
The compact layout assigned to the object.
This field is available in API version 29.0 and later.
A list of compact layouts associated with the object.
This field is available in API version 29.0 and later.
242
Metadata Types CustomObject
Field Name
customHelp customHelpPage customSettingsType deploymentStatus deprecated description enableActivities
Field Type
string string
Description
The s-control that contains the help content if the object has customized help content. This field is available in API version
14.0 and later.
The Visualforce page that contains the help content if the object has customized help content. This field is available in
API version 16.0 and later.
CustomSettingsType
(enumeration of type string)
When this field is present, this component is not a custom object, but a custom setting. This field returns the type of custom setting. The following string values are valid:
•
List
—static data stored in cache and accessed as part of your application and available organization-wide.
•
Hierarchy
—static data stored in cache and accessed as part of your application and available based on a hierarchy of user, profile or organization. This is the default value.
This field is available in API version 17.0 and later.
customSettingsVisibility
CustomSettingsVisibility
(enumeration of type string)
When this field is present, this component is not a custom object, but a custom setting. This field returns the visibility of the custom setting. The following string values are valid:
•
Public
—if the custom setting is packaged, it is accessible to all subscribing organizations.
•
Protected
—if the custom setting is in a managed package, it is only accessible to the developer organization. Subscribing organizations cannot access it.
This is the default value.
This field is available in API versions 17.0 through 33.0. In versions 34.0 and later, use the visibility
field instead of this field.
boolean
Indicates the deployment status of the object.
Reserved for future use.
string boolean
A description of the object. Maximum of 1000 characters.
Indicates whether the object is enabled for activities ( true
) or not ( false
).
Not available for external objects.
enableBulkApi boolean When enabled, the object is classified as an Enterprise
Application object for usage tracking.
When enabled, enableSharing
and enableStreamingApi
must also be enabled.
243
Metadata Types
Field Name Field Type
enableChangeDataCapture enableDivisions boolean boolean enableEnhancedLookup boolean enableFeeds enableHistory enableReports enableSearch enableSharing boolean boolean boolean boolean boolean
244
CustomObject
Description
This field is available in API version 31.0 and later.
Reserved for future use.
Indicates whether the object is enabled for divisions ( true
) or not ( false
). For more information about the Division object, see the
SOAP API Developer's Guide
.
Indicates whether the object is enabled for enhanced lookups
( true
) or not ( false
). In API version 28.0 and later, this field can also be used for the Account, Contact, and User objects. Enhanced lookups provide an updated lookup dialog interface that gives users the ability to filter, sort, and page through search results as well as customize search result columns. For more information about enhanced lookups, see
“Enable Enhanced Lookups” in the Salesforce online help.
Indicates whether the object is enabled for feed tracking
( true
) or not ( false
). For more information, see “Customize
Chatter Feed Tracking” in the Salesforce online help.
This field is available in API version 18.0 and later.
Indicates whether the object is enabled for history tracking
( true
) or not ( false
). Also available for standard objects in API version 29.0 and later.
Indicates whether the object is enabled for reports ( true
) or not ( false
). Support for external objects is available in
API version 38.0 and later.
Indicates whether the object’s records can be found via SOSL and Salesforce searches. Corresponds to
Allow Search in the user interface.
By default, search is disabled for new custom objects. This field is available for custom objects in API version 35.0 and later.
By default, search is disabled for new external objects.
However, you can validate and sync an external data source to automatically create external objects. Syncing always enables search on the external object when search is enabled on the external data source, and vice versa. This field is available for external objects in API version 37.0 and later.
When enabled, the object is classified as an Enterprise
Application object for usage tracking.
When enabled, enableBulkApi
and enableStreamingApi
must also be enabled.
This field is available in API version 31.0 and later.
Metadata Types
Field Name
enableStreamingApi eventType externalDataSource externalName externalRepository externalSharingModel
CustomObject
Field Type
boolean
Description
When enabled, the object is classified as an Enterprise
Application object for usage tracking.
When enabled, enableBulkApi
and enableSharing must also be enabled.
This field is available in API version 31.0 and later.
PlatformEventType
This field applies only to platform events. Indicates whether the event is a standard or a high-volume event. High-volume events are available as part of a pilot. Valid values are:
•
HighVolume
(Part of a pilot)
•
StandardVolume
This field is available in API version 41.0 and later.
string Required and available for external objects only. The name of the external data source that stores the data for the external object. The data source is represented by the
ExternalDataSource component.
This field is available in API version 32.0 and later.
string string
Required and available for external objects only. The name of the table in the external data source that contains the data for the external object.
This field is available in API version 32.0 and later.
Available for Salesforce Connect external objects only.
Corresponds to
Display URL Reference Field in the user interface.
The external object’s
Display URL
standard field values are automatically generated from the external system. For example, with the OData 2.0 adapter for Salesforce Connect, the value is based on the link href
that’s defined on the
OData producer. You can override the default values with the values of a custom field on the same external object. Select the field name, and make sure that the custom field’s values are valid URLs.
This field is available in API version 32.0 and later.
of type string)
Indicates the external organization-wide defaults for the object, which determines the access level for external users, such as portal and community users. This field is supported for these objects:
•
Accounts and their associated contracts and assets
•
Cases
245
Metadata Types CustomObject
Field Name
fields fieldSets
gender household listViews namedFilter
Field Type
string
boolean historyRetentionPolicy index label
string
[]
[]
Description
•
Contacts
•
Opportunities
•
Custom Objects
•
Users
This field is available in API version 31.0 and later.
Represents one or more fields in the object.
Defines the field set that exists on this object.
, this field is not defined in the WSDL for this metadata type. It must be specified when creating,
updating, or deleting. See create()
this field specified for a call.
This value cannot be null
.
Indicates the gender of the noun that represents the object.
This is used for languages where words need different treatment depending on their gender.
This field supports relationship groups, a feature available only with Salesforce for Wealth Management. For more information, see “Salesforce for Wealth Management” in the
Salesforce online help.
Reserved for future use.
Defines the index for a custom BigObject.
Label that represents the object throughout the Salesforce user interface.
We recommend that you make object labels unique across all standard, custom, and external objects in the org.
Represents one or more list views associated with the object.
Represents the metadata associated with a lookup filter. Use this metadata type to create, update, or delete lookup filter definitions.
This field is available in API version 17.0 and later.
This field has been removed as of API version 30.0 and is only available in prior versions. The metadata associated with a lookup filter is now represented by the lookupFilter field in the CustomField component.
246
Metadata Types CustomObject
Field Name
nameField pluralLabel recordTypes recordTypeTrackFeedHistory recordTypeTrackHistory searchLayouts sharingModel sharingReasons sharingRecalculations startsWith
Field Type
string
boolean boolean
Description
Required for custom objects. External objects may instead specify the name field by setting isNameField
to true in the CustomField component.
The field that this object's name is stored in. Every custom object must have a name, usually a string or autonumber.
Identifier for the custom object record. This name appears in page layouts, related lists, lookup dialogs, search results, and key lists on tab home pages. By default, this field is added to the custom object page layout as a required field.
Plural version of the
value.
An array of one or more record types defined for this object.
Indicates whether the record type is enabled for feed tracking
( true
) or not ( false
). To set this field to true
, the
field on the associated CustomObject
must also be true
. For more information, see “Customize Chatter
Feed Tracking” in the Salesforce online help.
This field is available in API version 19.0 and later.
Indicates whether history tracking is enabled for this record type ( true
) or not ( false
). To set recordTypeTrackHistory
to true the enableHistory
field on the associated custom object must also be true
.
This field is available in API version 19.0 and later.
of type string)
The Search Layouts related list information for the object.
Indicates the organization-wide defaults for the object.
Note:
Using API version 29.0 and earlier, this field is read-only and you can't set this field through Metadata
API; you must use the Salesforce user interface. Using
API version 30.0 and later, you can set this field for internal users using the API and the Salesforce user interface.
[]
of type string)
The reasons why the object is being shared.
A list of custom sharing recalculations associated with the object.
Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character. Valid values are listed in
247
Metadata Types CustomObject
Field Name
validationRules visibility webLinks
Field Type
[]
Description
An array of one or more validation rules on the object.
SetupObjectVisibility
(enumeration of type string)
When this field is present, this component is not a custom object, but a custom setting or custom metadata type. This field returns the visibility of the custom setting or custom metadata type. The following values are valid.
•
Public
—If the custom setting or custom metadata type is packaged, it’s accessible to all subscribing organizations.
•
Protected
—If the custom setting or custom metadata type is in a managed package, it’s only accessible to the developer organization; subscribing organizations can’t access it.
The default value is
Public
.
This field is available in API version 34.0 and later. For custom settings, this field replaces the customSettingsVisibility
field.
An array of one or more weblinks defined for the object.
Declarative Metadata Additional Components
CustomObject definitions may include additional components which are defined in the custom object for declarative metadata. The following components are defined in the CustomObject:
•
•
•
•
•
•
•
•
•
•
•
•
•
Declarative Metadata Sample Definition
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
248
Metadata Types CustomObject
<deploymentStatus >Deployed </deploymentStatus >
<description >test object with one field for eclipse ide testing </description >
<fields >
<fullName >Comments__c </fullName >
<description >add your comments about this object here </description >
<inlineHelpText >This field contains comments made about this object </inlineHelpText >
<label >Comments </label >
<length >32000 </length >
<type >LongTextArea </type >
<visibleLines >30 </visibleLines >
</fields >
<label >MyFirstObject </label >
<nameField >
<label >MyFirstObject Name </label >
<type >Text </type >
</nameField >
<pluralLabel >MyFirstObjects </pluralLabel >
<sharingModel >ReadWrite </sharingModel >
</CustomObject >
The following is the metadata definition of an external object for Salesforce Connect.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionOverrides >
<actionName >CancelEdit </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Delete </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Edit </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Follow </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >List </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >New </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >SaveEdit </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Tab </actionName >
249
Metadata Types
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >View </actionName >
<type >Default </type >
</actionOverrides >
<deploymentStatus >InDevelopment </deploymentStatus >
<description >Products </description >
<enableFeeds >false </enableFeeds >
<externalDataSource >OData </externalDataSource >
<externalIndexAvailable >false </externalIndexAvailable >
<externalName >Products </externalName >
<fields >
<fullName >DiscontinuedDate__c </fullName >
<description >DiscontinuedDate </description >
<externalDeveloperName >DiscontinuedDate </externalDeveloperName >
<externalId >false </externalId >
<isFilteringDisabled >false </isFilteringDisabled >
<isNameField >false </isNameField >
<isSortingDisabled >false </isSortingDisabled >
<label >DiscontinuedDate </label >
<required >false </required >
<type >DateTime </type >
</fields >
<fields >
<fullName >ID__c </fullName >
<description >ID </description >
<externalDeveloperName >ID </externalDeveloperName >
<externalId >false </externalId >
<isFilteringDisabled >false </isFilteringDisabled >
<isNameField >false </isNameField >
<isSortingDisabled >false </isSortingDisabled >
<label >ID </label >
<precision >18 </precision >
<required >false </required >
<scale >0 </scale >
<type >Number </type >
<unique >false </unique >
</fields >
<fields >
<fullName >Name__c </fullName >
<description >Name </description >
<externalDeveloperName >Name </externalDeveloperName >
<externalId >false </externalId >
<isFilteringDisabled >false </isFilteringDisabled >
<isNameField >false </isNameField >
<isSortingDisabled >false </isSortingDisabled >
<label >Name </label >
<length >128 </length >
<required >false </required >
<type >Text </type >
<unique >false </unique >
</fields >
<fields >
250
CustomObject
Metadata Types
<fullName >Price__c </fullName >
<description >Price </description >
<externalDeveloperName >Price </externalDeveloperName >
<externalId >false </externalId >
<isFilteringDisabled >false </isFilteringDisabled >
<isNameField >false </isNameField >
<isSortingDisabled >false </isSortingDisabled >
<label >Price </label >
<precision >16 </precision >
<required >false </required >
<scale >2 </scale >
<type >Number </type >
<unique >false </unique >
</fields >
<fields >
<fullName >Products__c </fullName >
<externalDeveloperName >Products </externalDeveloperName >
<externalId >false </externalId >
<isFilteringDisabled >false </isFilteringDisabled >
<isNameField >false </isNameField >
<isSortingDisabled >false </isSortingDisabled >
<label >Products </label >
<length >20 </length >
<referenceTo >Products__x </referenceTo >
<relationshipLabel >Products </relationshipLabel >
<relationshipName >Products </relationshipName >
<type >ExternalLookup </type >
</fields >
<fields >
<fullName >Rating__c </fullName >
<description >Rating </description >
<externalDeveloperName >Rating </externalDeveloperName >
<externalId >false </externalId >
<isFilteringDisabled >false </isFilteringDisabled >
<isNameField >false </isNameField >
<isSortingDisabled >false </isSortingDisabled >
<label >Rating </label >
<precision >18 </precision >
<required >false </required >
<scale >0 </scale >
<type >Number </type >
<unique >false </unique >
</fields >
<fields >
<fullName >ReleaseDate__c </fullName >
<description >ReleaseDate </description >
<externalDeveloperName >ReleaseDate </externalDeveloperName >
<externalId >false </externalId >
<isFilteringDisabled >false </isFilteringDisabled >
<isNameField >false </isNameField >
<isSortingDisabled >false </isSortingDisabled >
<label >ReleaseDate </label >
<required >false </required >
<type >DateTime </type >
251
CustomObject
Metadata Types ActionOverride
</fields >
<label >Products </label >
<pluralLabel >Products </pluralLabel >
<searchLayouts >
<customTabListAdditionalFields >ExternalId </customTabListAdditionalFields >
<lookupDialogsAdditionalFields >ExternalId </lookupDialogsAdditionalFields >
<lookupPhoneDialogsAdditionalFields >ExternalId </lookupPhoneDialogsAdditionalFields >
<searchResultsAdditionalFields >ExternalId </searchResultsAdditionalFields >
<searchResultsAdditionalFields >DisplayUrl </searchResultsAdditionalFields >
<searchResultsAdditionalFields >ID__c </searchResultsAdditionalFields >
</searchLayouts >
</CustomObject >
SEE ALSO:
Picklist (Including Dependent Picklist)
ActionOverride
Represents an action override on a standard or custom object. Use it to create, update, edit, or delete action overrides. You can only access ActionOverride by accessing its encompassing CustomObject.
Declarative Metadata File Suffix and Directory Location
Action overrides are defined as part of a standard or custom object.
Version
Action overrides are available in API version 18.0 and later. Beginning in Summer ’13, action overrides can be applied to both standard or custom objects. Previously, action overrides only applied to custom objects.
Fields
Unless otherwise noted, all fields are createable, filterable, and nillable.
Field Name
actionName
Field Type
string
Description
Required. The possible values are the same as the actions you can override:
•
accept
•
clone
252
Metadata Types ActionOverride
Field Name Field Type Description
•
delete
•
edit
•
list
•
new
•
tab
•
view comment content formFactor string string
type string)
Any comments you want associated with the override.
Set this field if type
is set to flexipage
, lightningcomponent
, scontrol
, or visualforce
. It refers to the name of the Lightning page, Lightning component, s-control, or Visualforce page to use as the override. To reference installed components, use the format of
Component_namespace__Component_name
.
The size of the page being overridden. Only the
Large
value is supported. The other values,
Small
and
Medium
, are reserved for future use.
If the type
field is set to flexipage
, set this field to
Large
to override the View action with a Lightning page in Lightning Experience.
The
Large
value represents the Lightning Experience desktop environment, and is only valid for the flexipage
type. For other types, this field defaults to null
.
This field is available in API version 37.0 and later, and is part of the feature for creating and editing record pages in Lightning Experience.
skipRecordTypeSelect type boolean
ActionOverrideType
of type string)
Set this field to true
if you prefer that any new records created by this action override aren’t forwarded to the record type selection page. This field is only valid if the actionName
is a “create” type (like new
), and type
is set to visualforce
. This field is available in API version 21.0
and later.
Required. Represents the type of action override. Valid values are described in
.
ActionOverrideType
ActionOverrideType is an enumeration of type string that defines which kind of action override to use. The valid values are:
•
default
—The override uses a custom override provided by an installed package. If there isn’t one available, the standard Salesforce behavior is used.
•
flexipage
—The override uses behavior from a Lightning page, and is only valid for the View action in Lightning Experience.
•
lightningcomponent
—The override uses behavior from a Lightning component.
•
scontrol
—The override uses behavior from an s-control.
•
standard
—The override uses regular Salesforce behavior.
253
Metadata Types BusinessProcess
•
visualforce
—The override uses behavior from a Visualforce page.
Declarative Metadata Sample Definitions
You can define an action like this:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionOverrides >
<actionName >edit </actionName >
<type >visualforce </type >
<content >myEditVFPage </content >
<comment >This edit action is a lot safer.
</comment >
</actionOverrides >
</CustomObject >
With the previous definition, calling
presents:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionOverrides >
<actionName >edit </actionName >
<type >default </type >
</actionOverrides >
</CustomObject >
If a subscriber installed a package with the previous metadata, you can override the behavior by editing the XML. For example, if you want the regular Salesforce behavior, use:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionOverrides >
<actionName >edit </actionName >
<type >standard </type >
</actionOverrides >
</CustomObject >
To set a Lightning page action override on the View standard button in Lightning Experience, use:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionOverrides >
<actionName >View </actionName >
<content >myLightningPage </content >
<formFactor >Large </formFactor >
<type >flexipage </type >
</actionOverrides >
</CustomObject >
SEE ALSO:
BusinessProcess
The BusinessProcess metadata type enables you to display different picklist values for users based on their profile. This type extends the
metadata type and inherits its fullName
field.
254
Metadata Types BusinessProcess
Multiple business processes allow you to track separate sales, support, and lead lifecycles. A sales, support, lead, or solution process is assigned to a record type. The record type determines the user profiles that are associated with the business process. For more information, see “ Managing Multiple Business Processes ” in the Salesforce online help.
Declarative Metadata File Suffix and Directory Location
for more information.
Version
BusinessProcess components are available in API version 17.0 and later.
Fields
Field
description fullName
Field Type
string string isActive namespacePrefix values boolean string
Description
Description for the business process.
The name used as a unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
component.
Indicates if the business process is active ( true
) or not
( false
).
The namespace of the developer organization where the package was created.
A list of picklist values associated with this business process.
Declarative Metadata Sample Definition
A sample XML definition of a lead business process is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
....
<businessProcesses >
<fullName >HardwareLeadProcess </fullName >
<description >Lead Process for hardware division </description >
<isActive >true </isActive >
<values >
<fullName >Closed - Converted </fullName >
<default >false </default >
</values >
<values >
<fullName >CustomLeadStep1 </fullName >
<default >false </default >
255
Metadata Types CompactLayout
</values >
<values >
<fullName >CustomLeadStep2 </fullName >
<default >false </default >
</values >
<values >
<fullName >Open - Not Contacted </fullName >
<default >false </default >
</values >
<values >
<fullName >Working - Contacted </fullName >
<default >true </default >
</values >
....
</businessProcesses >
</CustomObject >
SEE ALSO:
CompactLayout
Represents the metadata associated with a compact layout. This type extends the Metadata
metadata type and inherits its fullName field.
Compact layouts display a record’s key fields at a glance in both Salesforce1 and Lightning Experience.
Compact layouts support all field types except:
•
text area
•
long text area
•
rich text area
•
multi-select picklist
For more information on compact layouts, see “Compact Layouts” in the Salesforce Help.
File Suffix and Directory Location
Compact layouts are defined as part of the custom object or standard object definition. See
for more information.
Version
CompactLayout components are available in API version 29.0 and later.
Fields
Field Name
fields
Field Type
string
Description
The fields assigned to the compact layout. Their order represents the prioritization given to them when defining the compact layout.
256
Metadata Types CompactLayout
Field Name
label
Field Type
string
Description
Label that represents the object throughout the Salesforce user interface.
Declarative Metadata Sample Definition
The following is an example of a CompactLayout component:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionOverrides >
<actionName >Accept </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Clone </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Delete </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Edit </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >List </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >New </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >Tab </actionName >
<type >Default </type >
</actionOverrides >
<actionOverrides >
<actionName >View </actionName >
<type >Default </type >
</actionOverrides >
<compactLayouts >
<fullName >testCompactLayout </fullName >
<compactLayoutItems >textfield__c </compactLayoutItems >
<label >testCompactLayoutLabel </label >
</compactLayouts >
<defaultCompactLayoutAssignment >SYSTEM </defaultCompactLayoutAssignment >
<deploymentStatus >Deployed </deploymentStatus >
<enableActivities >false </enableActivities >
<enableFeeds >false </enableFeeds >
<enableHistory >false </enableHistory >
<enableReports >false </enableReports >
<fields >
257
Metadata Types CustomField
<fullName >textfield__c </fullName >
<externalId >false </externalId >
<label >textfield </label >
<length >255 </length >
<required >false </required >
<type >Text </type >
<unique >false </unique >
</fields >
<label >customObj </label >
<nameField >
<label >customObj Name </label >
<type >Text </type >
</nameField >
<pluralLabel >customObjs </pluralLabel >
<recordTypes >
<fullName >RT1 </fullName >
<active >true </active >
<label >RT1 </label >
<compactLayoutAssignment >testCompactLayout </compactLayoutAssignment >
</recordTypes >
<recordTypes >
<fullName >RT2 </fullName >
<active >true </active >
<label >RT2 </label >
</recordTypes >
<searchLayouts/ >
<sharingModel >ReadWrite </sharingModel >
</CustomObject >
CustomField
Represents the metadata associated with a field. Use this metadata type to create, update, or delete custom field definitions on standard, custom, and external objects or standard field definitions on standard objects. This type extends the
metadata type and inherits its fullName
field.
Only standard fields that you can customize are supported, that is, standard fields to which you can add help text or enable history tracking or Chatter feed tracking. Other standard fields aren't supported, including system fields (such as
CreatedById
or
LastModifiedDate
) and autonumber fields.Some standard picklist fields aren’t supported. See
Specify the full name whenever you create or update a field. For example, a custom field on a custom object:
MyCustomObject__c.MyCustomField__c
An example of a custom field on a standard object:
Account.MyAcctCustomField__c
An example of a standard field on a standard object:
Account.Phone
An example of a custom field on an external object:
MyExternalObject__x.MyCustomField__c
258
Metadata Types CustomField
Note: In the Metadata API, external objects are represented by the CustomObject metadata type.
The following custom field types aren’t available for external objects.
•
Auto-number (available only with the cross-org adapter for Salesforce Connect)
•
Currency (available only with the cross-org adapter for Salesforce Connect)
•
Formula
•
Geolocation
•
Master-detail relationship
•
Picklist and multi-select picklist (available only with the cross-org adapter for Salesforce Connect)
•
Roll-up summary
•
Text (encrypted)
•
Text Area (rich)
Declarative Metadata File Suffix and Directory Location
for more information. Standard fields are predefined on standard objects.
Note: Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.
Retrieving Fields on Custom or Standard Objects
When you retrieve a custom or standard object, you return everything associated with the object, except for standard fields that aren’t customizable. You can also retrieve only specific fields for an object by explicitly naming the object and fields in package.xml
. The following definition in package.xml
will create the files objects/MyCustomObject__c.object
and objects/Account.object
, each containing the requested field definitions.
<types >
<members >MyCustomObject__c.MyCustomField__c
</members >
<members >Account.MyCustomAccountField__c
</members >
<members >Account.Phone
</members >
<name >CustomField </name >
</types >
Version
Custom and standard fields are available in API version 10.0 and later.
Fields
Unless otherwise noted, all fields are createable, filterable, and nillable.
259
Metadata Types CustomField
Field Name
caseSensitive customDataType defaultValue deleteConstraint
Field Type
boolean
Description
Indicates whether the field is case-sensitive ( true
) or not
( false
).
For indirect lookup relationship fields on external objects, this attribute affects how this custom field’s values are matched against the values of the referenceTargetField
.
string string
Reserved for future use.
If specified, represents the default value of the field.
(
of type string)
Provides deletion options for lookup relationships. Valid values are:
SetNull
This is the default. If the lookup record is deleted, the lookup field is cleared.
Restrict
Prevents the record from being deleted if it’s in a lookup relationship.
Cascade
Deletes the lookup record as well as associated lookup fields.
For more information on lookup relationships, see “Object
Relationships” in the Salesforce Help.
deprecated description boolean string displayFormat string displayLocationInDecimal boolean
Reserved for future use.
Description of the field.
The display format.
Indicates how the value of a Geolocation custom field appears in the user interface. If true
, the geolocation appears in decimal notation. If false
, the geolocation appears as degrees, minutes, and seconds.
encrypted boolean externalDeveloperName externalId string boolean
Note: This page is about Shield Platform Encryption, not
Classic Encryption. What's the difference?
Indicates whether this field is encrypted ( true
) or not ( false
).
This field is available in API version 34.0 and later.
Available only for external objects. Name of the table column on the external data source that maps to this custom field in Salesforce.
Corresponds to
External Column Name
in the user interface. This field is available in API version 32.0 and later.
Indicates whether the field is an external ID field ( true
) or not
( false
).
260
Metadata Types CustomField
Field Name
fieldManageability
Field Type
string
Description
Determines who can update the field after it’s released in a managed package. Valid values:
•
Locked—The field can’t be updated.
•
DeveloperControlled—The creator of the record can update the field with a package upgrade.
•
SubscriberControlled—Anyone with proper permissions can update the field. The field can’t be updated with a package upgrade.
Available only for fields on custom metadata types. If the field type is
MetadataRelationship
, and the manageability of the entity definition field is:
•
Subscriber-controlled, then the Field Definition field must be subscriber-controlled.
•
Upgradeable, then the Field Definition field must be either upgradeable or subscriber-controlled.
formula formulaTreatBlankAs fullName string If specified, represents a formula on the field.
of type string)
Indicates how to treat blanks in a formula. Valid values are
BlankAsBlank
and
BlankAsZero
.
string Inherited from
Metadata , this field is not defined in the WSDL for
this metadata type. It must be specified when creating, updating,
to see an example of this field
specified for a call.
This value cannot be null
.
globalPicklist indexed inlineHelpText isFilteringDisabled isNameField string.
boolean string boolean boolean
(This field is available in API version 37.0 only and removed from later versions.) If this custom field is a picklist that’s based on a global picklist, globalPicklist
is the name of the global picklist whose value set this picklist inherits. A custom picklist that’s based on a global picklist is restricted. You can only add or remove values by editing the global picklist.
Indicates if the field is indexed. If this field is unique or the externalId
is set true, the isIndexed
value is set to true.
This field has been deprecated as of version 14.0 and is only provided for backward compatibility.
Represents the content of field-level help. For more information, see “Define Field-Level Help” in the Salesforce Help.
Available only for external objects. Indicates whether the custom field is available in filters. This field is available in API version 32.0
and later.
Available only for external object fields of type text. For each external object, you can specify one field as the name field. If you
261
Metadata Types CustomField
Field Name
isSortingDisabled reparentableMasterDetail label length lookupFilter maskChar maskType metadataRelationship
ControllingField
Field Type
boolean boolean string int
string
Description
set this to true
, make sure that the external table column identified by the externalDeveloperName
attribute contains name values. This field is available in API version 32.0 and later.
Available only for external objects. Indicates whether the custom field is sortable. This field is available in API version 32.0 and later.
Indicates whether the child records in a master-detail relationship on a custom object can be reparented to different parent records.
The default value is false
.
This field is available in API version 25.0 and later.
Label for the field. You cannot update the label for standard picklist fields, such as the
Industry
field for accounts.
Length of the field.
Represents the metadata associated with a lookup filter. Use this metadata type to create, update, or delete lookup filter definitions.
This field is available in API version 30.0 and later.
Note:
LookupFilter is not supported on the article type object.
Note: This page is about Classic Encryption, not Shield
Platform Encryption. What's the difference?
For encrypted fields, specifies the character to be used as a mask.
Valid values are enumerated in
For more information on encrypted fields, see “Classic Encryption for Custom Fields” in the Salesforce Help.
Note:
This page is about Classic Encryption, not Shield
Platform Encryption. What's the difference?
For encrypted text fields, specifies the format of the masked and unmasked characters in the field. Valid values are enumerated in
EncryptedFieldMaskType For more information on encrypted fields,
see “Classic Encryption for Custom Fields” in the Salesforce Help.
In custom metadata relationships, represents the controlling field that specifies the standard or custom object in an entity definition metadata relationship. Required when creating a field definition metadata relationship on a custom metadata type. The object specified in the controlling field determines the values available in its dependent field definition. For example, specifying the
Account object filters the available fields in the field definition to
262
Metadata Types
Field Name Field Type
picklist
populateExistingRows boolean precision int referenceTargetField string referenceTo relationshipLabel relationshipName relationshipOrder required scale startingNumber string string string int boolean int int
CustomField
Description
Account fields only. This field is available in API version 39.0 and later.
(Deprecated. Use this field in API version 37.0 and earlier only. In later versions, use valueSet
instead.) If specified, the field is a picklist, and this field enumerates the picklist values and labels.
Indicates whether existing rows will be populated ( true
) or not
( false
).
The precision for number values. Precision is the number of digits in a number. For example, the number 256.99 has a precision of
5.
Available only for indirect lookup relationship fields on external objects. Specifies the custom field on the parent object to match against this indirect lookup relationship field, whose values come from an external data source. The specified custom field on the parent object must have both externalId
and unique
set to true
. This field is available in API version 32.0 and later.
If specified, indicates a reference this field has to another object.
Label for the relationship.
If specified, indicates the value for one-to-many relationships. For example, in the object MyObject that had a relationship to
YourObject, the relationship name might be YourObjects.
This field is valid for all master-detail relationships, but the value is only non-zero for junction objects. A junction object has two master-detail relationships, and is analogous to an association table in a many-to-many relationship. Junction objects must define one parent object as primary (0), the other as secondary (1). The definition of primary or secondary affects delete behavior and inheritance of look and feel, and record ownership for junction objects. For more information, see the Salesforce Help.
0 or 1 are the only valid values, and 0 is always the value for objects that are not junction objects.
Indicates whether the field requires a value on creation ( true
) or not ( false
).
The scale for the field. Scale is the number of digits to the right of the decimal point in a number. For example, the number 256.99
has a scale of 2.
If specified, indicates the starting number for the field. When you create records,
Starting Number
’s value increments to store the number that will be assigned to the next auto-number field created.
263
Metadata Types CustomField
Field Name Field Type Description
Note:
•
You can’t retrieve the starting number of an auto-number field through Metadata API. To specify a
Starting Number
while deploying, add a startingNumber
tag for your field to your package.xml
file. For example:
<startingNumber >42 </startingNumber >
•
If you deploy without specifying a
Starting
Number
value in your package.xml
file, the default starting number for standard fields is
0
. The default starting number for custom fields is
1
.
stripMarkup summarizedField summaryFilterItems summaryForeignKey summaryOperation trackFeedHistory trackHistory trackTrending boolean string
string
boolean boolean boolean
Set to true
to remove markup, or false
to preserve markup.
Used when converting a rich text area to a long text area.
Represents the field on the detail row that is being summarized.
This field cannot be null unless the
is count
.
Represents the set of filter conditions for this field if it is a summary field. This field will be summed on the child if the filter conditions are met.
Represents the master-detail field on the child that defines the relationship between the parent and the child.
Represents the sum operation to be performed. Valid values are enumerated in
.
Indicates whether the field is enabled for feed tracking ( true
) or not ( false
). To set this field to true
field on the associated
true
. For more information, see “Customize Chatter Feed Tracking” in the
Salesforce Help.
This field is available in API version 18.0 and later.
Indicates whether history tracking is enabled for the field ( true
) or not ( false
). Also available for standard object fields (picklist and lookup fields only) in API version 30.0 and later.
To set trackHistory
to true
, the enableHistory
field on the associated standard or custom object must also be true
.
For more information, see “Field History Tracking” in the Salesforce
Help.
Field history tracking isn’t available for external objects.
Indicates whether historical trending data is captured for the field
( true
) or not ( false
). An object is enabled for historical trending
264
Metadata Types
Field Name
trueValueIndexed type unique valueSet visibleLines writeRequiresMasterRead
Field Type
boolean
boolean
ValueSet int boolean
CustomField
Description
if this attribute is true
for at least one field. Available in API version 29.0 and later.
For more information, see “Report on Historical Changes” in the
Salesforce Help.
This is only relevant for a checkbox field. If set, true values are built into the index. This field has been deprecated as of API version 14.0
and is only provided for backward compatibility.
Indicates the field type for the field. Valid values are enumerated in
.
For standard fields on standard objects, the type
field is optional.
This field is included for some standard field types, such as Picklist or Lookup, but not for others. The type
field is included for custom fields.
Indicates whether the field is unique ( true
) or not ( false
).
Represents the set of values that make up a picklist on a custom field. Each value is defined as a
CustomValue on page 322. If this
custom field is a picklist that uses a global value set, valueSet is the name of the global value set whose values this picklist inherits. A custom picklist that uses a global value set is restricted.
You can only add or remove values by editing the global value set.
Note: A ValueSet component has either a valueSetDefinition
or a valueName
specified, but never both.
This field is available in API version 38.0 and later.
Indicates the number of lines displayed for the field.
Sets the minimum sharing access level required on the master record to create, edit, or delete child records. This field applies only to master-detail or junction object custom field types.
•
true
—Allows users with “Read” access to the master record permission to create, edit, or delete child records. This setting makes sharing less restrictive.
•
false
—Allows users with “Read/Write” access to the master record permission to create, edit, or delete child records. This setting is more restrictive than true
, and is the default value.
For junction objects, the most restrictive access from the two parents is enforced. For example, if you set to true
on both master-detail fields, but users have “Read” access to one master record and “Read/Write” access to the other master record, users won't be able to create, edit, or delete child records.
265
Metadata Types CustomField
Fields use additional data types. For more information, see Metadata Field Types on page 295.
EncryptedFieldMaskChar
This field type is used in
. It is a string with two valid values:
asterisk
or
X
. For more information on encrypted fields, see Classic Encryption for Custom Fields in the Salesforce online help.
EncryptedFieldMaskType
This field type is used in
all
All characters in the field are hidden. This option is equivalent to the
Mask All Characters
option in Salesforce.
creditCard
The first 12 characters are hidden and the last four display. This option is equivalent to the
Credit Card Number
option in
Salesforce.
ssn
The first five characters are hidden and the last four display. This option is equivalent to the
Social Security Number option in Salesforce.
lastFour
All characters are hidden but the last four display. This option is equivalent to the
Last Four Characters Clear
option in Salesforce.
sin
All characters are hidden but the last four display. This option is equivalent to the
Social Insurance Number
option in
Salesforce.
nino
All characters are hidden. Salesforce automatically inserts spaces after each pair of characters if the field contains nine characters.
This option is equivalent to the
National Insurance Number
option in Salesforce.
For more information on encrypted fields, see Classic Encryption for Custom Fields in the Salesforce online help.
LookupFilter
Represents the metadata associated with a lookup filter. Replaces the NamedFilter component, which was removed as of API version
30.0. LookupFilter is available in API version 30.0 and later.
Field
active booleanFilter description errorMessage filterItems
Field Type
boolean string string string
Description
Required. Indicates whether or not the lookup filter is active.
Specifies advanced filter conditions.
A description of what this filter does.
The error message that appears if the lookup filter fails.
Required. The set of filter conditions. You can have up to 10 FilterItems per lookup filter.
266
Metadata Types CustomField
Field
infoMessage isOptional
Field Type
string boolean
Description
The information message displayed on the page. Use to describe things the user might not understand, such as why certain items are excluded in the lookup filter.
Required. Indicates whether or not the lookup filter is optional.
Lookup filters use additional data types. For more information, see Metadata Field Types .
FilterItem
Represents one entry in a set of filter criteria.
Field
field operation value
Field Type
string
type string) string valueField string
Description
Represents the field specified in the filter.
Represents the filter operation for this filter item. Valid values are
.
Represents the value of the filter item being operated upon, for example, if the filter is my_number_field__c > 1
, the value of value
is
1
.
Specifies if the final column in the filter contains a field or a field value.
Approval processes don’t support valueField
entries in filter criteria.
FilterOperation
This is an enumeration of type string that lists different filter operations. Valid values are:
•
equals
•
notEqual
•
lessThan
•
greaterThan
•
lessOrEqual
•
greaterOrEqual
•
contains
•
notContain
•
startsWith
•
includes
•
excludes
•
within
(
DISTANCE
criteria only)
267
Metadata Types CustomField
SummaryOperations
Represents the type of a
•
Count
•
Min
•
Max
•
Sum
Declarative Metadata Sample Definition
The following example shows a field definition for a custom field that is named
Comments__c
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
....
<fields >
<fullName >Comments__c </fullName >
<description >Add your comments about this object here </description >
<inlineHelpText >This field contains help text for this object </inlineHelpText >
<label >Comments </label >
<length >32000 </length >
<type >LongTextArea </type >
<visibleLines >30 </visibleLines >
</fields >
....
</CustomObject >
The following is the definition for two fields on the Account standard object—a custom field (
MyCustomAccountField__c
), and a standard field (
Phone
) that has history tracking enabled.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<fields >
<fullName >MyCustomAccountField__c </fullName >
<description >A custom field on the Account standard object.
</description >
<externalId >false </externalId >
<inlineHelpText >Some help text.
</inlineHelpText >
<label >MyCustomAccountField </label >
<length >100 </length >
<required >false </required >
<trackFeedHistory >false </trackFeedHistory >
<trackHistory >false </trackHistory >
<type >Text </type >
<unique >false </unique >
</fields >
<fields >
<fullName >Phone </fullName >
<trackFeedHistory >false </trackFeedHistory >
<trackHistory >true </trackHistory >
268
Metadata Types
</fields >
</CustomObject >
SEE ALSO:
Picklist (Including Dependent Picklist)
FieldSet
Represents a field set. A field set is a grouping of fields. For example, you could have a field set that contains fields describing a user's first name, middle name, last name, and business title. Field sets can be referenced on Visualforce pages dynamically. If the page is added to a managed package, administrators can add, remove, or reorder fields in a field set to modify the fields presented on the Visualforce page without modifying any code.
Version
FieldSet components are available in API version 21.0 and later.
Fields
Field
availableFields description
Field Type
string displayedFields label
string
Description
An array containing all the possible fields in the field set.
Required. A description provided by the developer that describes the field set. This is required.
An array containing all the fields that are presented on the
Visualforce page. The order in which a field is listed determines the order of appearance on the page.
Required. The label used to reference the field set.
FieldSetItem
FieldSetItem represents an individual field in a field set.
Field
field isFieldManaged
Field Type
string boolean isRequired boolean
Description
Required. The name of a field in a standard or custom object.
Read-only. Denotes whether the field was added to the field set via a managed or unmanaged package.
Read-only. Indicates whether the field is universally required
( true
) or not ( false
).
FieldSet
269
Metadata Types HistoryRetentionPolicy
Declarative Metadata Sample Definition
A sample XML definition of a FieldSet component is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<fieldSets >
<fullName >FieldSetNames </fullName >
<availableFields >
<field >MiddleName__c </field >
</availableFields >
<availableFields >
<field >Title__c </field >
</availableFields >
<description >FieldSet containing how to properly address someone </description >
<displayedFields >
<field >FirstName__c </field >
</displayedFields >
<displayedFields >
<field >LastName__c </field >
</displayedFields >
<label >FieldSet Names </label >
</fieldSets >
</CustomObject >
HistoryRetentionPolicy
Represents the policy for retaining field history data. By setting a policy, you can specify the number of months you want to maintain field history in Salesforce, and the number of years that you want to retain field history in the archive.
This component is only available to users with the “RetainFieldHistory” permission.
Declarative Metadata File Suffix and Directory Location
Field history retention policies are defined as part of a standard or custom object. You can set field history retention policies for objects
individually. See CustomObject for more information.
Version
Available in API version 31.0 and later.
Fields
Field Name Field Type
archiveAfterMonths int
Description
Required. The number of months that you want to keep field history data in Salesforce before archiving. You can set a minimum of 1 month and a maximum of 18 months. If you don’t set a number, the default is 18 months. (That is, Salesforce maintains data for 18 months before archiving.)
270
Metadata Types
Field Name Field Type
archiveRetentionYears int description gracePeriodDays string int
Description
Required. The number of years that you want to retain data in the archive.
You can set a minimum of zero years, and a maximum of 10 years. If no number is set, the default is 10 years.
A text description for the history retention.
The number of days of extra time after the archiveAfterMonths period before the data is archived. The gracePeriodDays
interval applies only to the first time that the data is archived; because all the data is copied the first time, the operation may take longer than subsequent times when only the data that changed since the last archival operation is copied. The gracePeriodDays
provides extra time for the administrator to prepare the organization before the initial archive operation. You can set a minimum of zero days and a maximum of 10 days. If no number is set, the default is 1 day.
Declarative Metadata Sample Definition
This sample shows the definition of a history retention policy for a custom object:
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<historyRetentionPolicy >
<archiveAfterMonths >6 </archiveAfterMonths >
<archiveRetentionYears >5 </archiveRetentionYears >
<description >My field history retention </description >
</historyRetentionPolicy >
<fields >
<fullName >AccountSource </fullName >
...
</CustomObject >
Index
Represents the index defined within a custom Big Object . Use this metadata type to define the composite primary key (index) for a custom Big Object.This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
Indexes are user-defined and are part of the custom object definition for Big Objects. See CustomObject for more information.
Version
The Index type is available in API version 41.0 and later.
Index
271
Metadata Types
Fields
Field Name
fields
Field Type
IndexField[]
Description
The definition of the fields in the index.
IndexField
Defines which fields make up the index, their order, and sort direction. The order in which the fields are defined determines the order fields are listed in the index.
Field Name
name sortDirection
Field Type
string string
Description
Required. The API name for the field that’s part of the index. This value must match the value of the fullName
value for the field in the fields section and be marked as required.
Required. The sort direction of the field in the index. Valid values are
ASC
for ascending order and
DESC
for descending order.
Index
Declarative Metadata Sample Definition
The following is an example of an index contained within the definition of a custom Big Object,
Customer_Interactions__b.object
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<deploymentStatus >Deployed </deploymentStatus >
// Define the fields within the Big Object
<fields >
<fullName >Purchase__c </fullName >
<label >Purchase </label >
<length >16 </length >
<required >false </required >
<type >Text </type >
<unique >false </unique >
</fields >
<fields >
<fullName >Order_Number__c </fullName >
<label >Order Number </label >
<length >16 </length >
<required >false </required >
<type >Text </type >
<unique >true </unique >
</fields >
<fields >
<fullName >Platform__c </fullName >
272
Metadata Types
<label >Platform </label >
<length >16 </length >
<required >true </required >
<type >Text </type >
<unique >false </unique >
</fields >
<fields >
<fullName >Account__c </fullName >
<label >User Account </label >
<referenceTo >Account </referenceTo >
<relationshipName >User_Account </relationshipName >
<required >true </required >
<type >Lookup </type >
</fields >
<fields >
<fullName >Order_Date__c </fullName >
<label >Order Date </label >
<required >true </required >
<type >DateTime </type >
</fields >
// Define the index
<index >
<fullName >CustomerInteractionsIndex </fullName >
<fields >
<name >Account__c </name >
<sortDirection >DESC </sortDirection >
</fields >
<fields >
<name >Platform__c </name >
<sortDirection >ASC </sortDirection >
</fields >
<fields >
<name >Order_Date__c </name >
<sortDirection >DESC </sortDirection >
</fields >
</index >
<label >Customer Interaction </label >
<pluralLabel >Customer Interactions </pluralLabel >
</CustomObject >
SEE ALSO:
ListView
metadata type and inherits its fullName
field. See “Create a Custom List View in Salesforce Classic” in the Salesforce online help.
ListView
273
Metadata Types
Note: List views with the Visible only to me
Restrict Visibility
option are not accessible in Metadata API. Each of these list views is associated with a particular user.
Declarative Metadata File Suffix and Directory Location
List views are stored within a CustomObject component. The component can represent a custom object or a standard object, such as an account.
Version
ListView components for custom objects are available in API version 14.0 and later. ListView components for standard objects, such as accounts, are available in API version 17.0 and later.
Fields
Field
booleanFilter columns division filterScope filters fullName
Field Type
string string[] string
type string)
string
Description
This field represents an Advanced Option for a filter. Advanced
Options in filters allow you to build up filtering conditions that use a mixture of AND and OR boolean operators across multiple filter line items. For example,
(1 AND 2) OR 3
finds records that match both the first two filter line items or the third.
The list of fields in the list view. The field name relative to the object name, for example
MyCustomField__c
, is specified for each custom field.
Note: Field names in the ListView columns don’t always match their API name counterparts. In particular, if person accounts is enabled in your organization, standard fields merged from a contact into an account start with the
PC_
prefix, while the corresponding API name starts with the
Person
prefix. For example, the ListView column name is
PC_Email
for a corresponding API field name of
PersonEmail
.
If your organization uses divisions to segment data and you have the “Affected by Divisions” permission, records in the list view must match this division. This field is only available if you are searching all records.
This field is available in API version 17.0 and later.
Required. This field indicates whether you are filtering by owner or viewing all records.
The list of filter line items.
Required. Inherited from
Metadata , this field is not defined in
the WSDL for this metadata type. It must be specified when
ListView
274
Metadata Types
Field
label language queue sharedTo
Field Type
string
string
Description
creating, updating, or deleting. See create()
example of this field specified for a call.
Required. The list view name.
The language used for filtering if your organization uses the
Translation Workbench and you are using the startsWith or contains
operator. The values entered as search terms must be in the same language as the filter language.
For a list of valid language values, see
This field is available in API version 17.0 and later.
The name of a queue. Objects are sometimes assigned to a queue so that the users who have access to the queue can monitor and manage them. When you create a queue, a corresponding list view is automatically created. See “Create
Queues” in the Salesforce online help.
Sharing access for the list view.
This field is available in API version 17.0 and later.
ListView
ListViewFilter
ListViewFilter represents a filter line item.
Field
filter operation value
Field Type
string
Description
Required. Represents the field specified in the filter.
of type string)
Required. The operation used by the filter, such as equals
.
The valid values are listed in FilterOperation
.
string Represents the value of the filter item being operated upon, for example, if the filter is my_number_field__c > 1
, the value of value
is
1
.
FilterScope
This is an enumeration of type string that represents the filtering criteria for the records. The valid values are listed in the table below:
Enumeration Value
Everything
Mine
Queue
Description
All records, for example All Opportunities.
Records owned by the user running the list view, for example My Opportunities.
Records assigned to a queue.
275
Metadata Types
Enumeration Value
Delegated
MyTerritory
MyTeamTerritory
Team
Description
Records delegated to another user for action: for example, a delegated task. This option is available in API version 17.0 and later.
Records in the territory of the user seeing the list view. This option is available if territory management is enabled for your organization. This option is available in API version 17.0 and later.
Records in the territory of the team of the user seeing the list view. This option is available if territory management is enabled for your organization. This option is available in API version
17.0 and later.
Records assigned to a team. This option is available in API version 17.0 and later.
Declarative Metadata Sample Definition
A sample XML definition of a list view in a custom object is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
. . .
<listViews >
<fullName >All_Mileages </fullName >
<filterScope >all </filterScope >
<label >All Mileages </label >
</listViews >
<listViews >
<fullName >My_Mileages </fullName >
<booleanFilter >1 AND 2 </booleanFilter >
<columns >NAME </columns >
<columns >CREATED_DATE </columns >
<filterScope >mine </filterScope >
<filters >
<field >NAME </field >
<operation >equals </operation >
<value >Eric Bristow </value >
</filters >
<filters >
<field >City__c </field >
<operation >equals </operation >
<value >Paris </value >
</filters >
<label >My Mileages </label >
</listViews >
. . .
</CustomObject >
SEE ALSO:
Sample package.xml Manifest Files
ListView
276
Metadata Types NamedFilter
NamedFilter
Note: This component has been removed as of API version 30.0 and is only available in previous API versions. The metadata associated with a lookup filter is now represented by the lookupFilter
field in the CustomField component.
Represents the metadata associated with a lookup filter. Use this metadata type to create, update, or delete lookup filter definitions. This type extends the
Metadata metadata type and inherits its
fullName
field. You can also use this metadata type to work with customizations of lookup filters on standard fields.
Note: The namedFilter appears as a child of the target object of the associated lookup field.
Declarative Metadata File Suffix and Directory Location
for more information.
Note: Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.
Version
Lookup filters are available in API version 17.0 and later.
Fields
Unless otherwise noted, all fields are createable, filterable, and nillable.
Field Name
active booleanFilter description errorMessage field
Field Type
boolean string string string string filterItems infoMessage fullName
string string
Description
Required. Indicates whether or not the lookup filter is active.
Specifies advanced filter conditions.
A description of what this filter does.
The error message that appears if the lookup filter fails.
Required. The fullName
of the custom or standard field associated with the lookup filter. You can associate one relationship field with each lookup filter, and vice-versa.
Note: You cannot update a field associated with a lookup filter.
Required. The set of filter conditions.
The information message displayed on the page. Use to describe things the user might not understand, such as why certain items are excluded in the lookup filter.
Inherited from
Metadata , this field is not defined in the WSDL
for this metadata type. It must be specified when creating, updating, or deleting. See
to see an example of this field specified for a call.
277
Metadata Types NamedFilter
Field Name
isOptional name sourceObject
Field Type
boolean string string
Description
This value cannot be null
.
Required. Indicates whether or not the lookup filter is optional.
Required. The name of the lookup filter. If you create this field in the user interface, a name is automatically assigned. If you create this field through Metadata API, you must include the name
field.
The object that contains the lookup field that uses this lookup filter. Set this field if the lookup filter references fields on the source object.
Lookup filters use additional data types. For more information, see Metadata Field Types .
FilterItems
FilterItems contains the following properties:
Field
field operation value
Field Type
string
type string) string
Description
Represents the field specified in the filter.
Represents the filter operation for this filter item. Valid values are
.
Represents the value of the filter item being operated upon, for example, if the filter is my_number_field__c > 1
, the value of value
is
1
.
FilterOperation
This is an enumeration of type string that lists different filter operations. Valid values are:
•
equals
•
notEqual
•
lessThan
•
greaterThan
•
lessOrEqual
•
greaterOrEqual
•
contains
•
notContain
•
startsWith
•
includes
•
excludes
278
Metadata Types Picklist (Including Dependent Picklist)
Declarative Metadata Sample Definition
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
....
<namedfilters >
<fullName >nf_Acc </fullName >
<active >true </active >
<booleanFilter >1 OR 2 </booleanFilter >
<field >Account.lk__c
</field >
<filterItems >
<field >Account.Phone
</field >
<operation >notEqual </operation >
<value >x </value >
</filterItems >
<filterItems >
<field >Account.Fax
</field >
<operation >notEqual </operation >
<value >y </value >
</filterItems >
<name >Acc </name >
<sourceObject >Account </sourceObject >
....
</namedfilters >
</CustomObject >
SEE ALSO:
Picklist (Including Dependent Picklist)
Picklist (Including Dependent Picklist)
Deprecated. Represents a picklist (or dependent picklist) definition for a custom field in a custom object or a custom or standard field in a standard object, such as an account.
Version
Use this type in API version 37.0 and earlier only. In later versions, Picklist is replaced by ValueSet. Picklists for custom fields in custom objects are available in API version 12.0 and later. Picklists for custom or standard fields in standard objects, such as accounts, are available in API version 16.0 and later.
Declarative Metadata File Suffix and Directory Location
Picklist definitions are included in the custom object and field with which they are associated.
279
Metadata Types Picklist (Including Dependent Picklist)
Fields
Picklist contains the following fields:
Field Name
controllingField picklistValues restrictedPicklist sorted
Field Type
string
PicklistValue[] boolean boolean
Description
of the controlling field if this is a dependent picklist. A
dependent picklist works in conjunction with a controlling picklist or checkbox to filter the available options. The value chosen in the controlling field affects the values available in the dependent field. This field is available in API version 14.0 and later.
Required. Represents a set of values for a picklist.
Indicates whether the picklist’s value list is restricted. With a restricted picklist, only an admin can add or change values; users can’t load or remove values through the API. By default this value is false
.
This field is available in API version 37.0 and later.
Indicates whether values should be sorted ( true
), or not ( false
). By default this value is false
.
Java Sample
The following sample uses a picklist. For a complete sample of using a picklist with record types and profiles, see
on page 523.
public void setPicklistValues() {
// Create a picklist
Picklist expenseStatus = new Picklist();
PicklistValue unsubmitted = new PicklistValue(); unsubmitted.setFullName( "Unsubmitted" );
PicklistValue submitted = new PicklistValue(); submitted.setFullName( "Submitted" );
PicklistValue approved = new PicklistValue(); approved.setFullName( "Approved" );
PicklistValue rejected = new PicklistValue(); rejected.setFullName( "Rejected" ); expenseStatus.setPicklistValues( new PicklistValue[]
{unsubmitted, submitted, approved, rejected});
CustomField expenseStatusField = new CustomField(); expenseStatusField.setFullName(
"ExpenseReport__c.ExpenseStatus__c" ); expenseStatusField.setLabel( "Expense Report Status" ); expenseStatusField.setType(FieldType.Picklist); expenseStatusField.setPicklist(expenseStatus); try {
AsyncResult[] ars = metadataConnection.create( new Metadata[] {expenseStatusField});
} catch (ConnectionException ce) { ce.printStackTrace();
280
Metadata Types Picklist (Including Dependent Picklist)
}
}
Declarative Metadata Sample Definition
The following sample shows usage for picklists, including dependent picklists, in a custom object. The isAmerican__c
checkbox controls the list of manufacturers shown in the manufacturer__c
picklist. The manufacturer__c
checkbox in turn controls the list of models shown in the model__c
picklist.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<deploymentStatus >Deployed </deploymentStatus >
<enableActivities >true </enableActivities >
<fields >
<fullName >isAmerican__c </fullName >
<defaultValue >false </defaultValue >
<label >American Only </label >
<type >Checkbox </type >
</fields >
<fields >
<fullName >manufacturer__c </fullName >
<label >Manufacturer </label >
<picklist >
<controllingField >isAmerican__c </controllingField >
<picklistValues >
<fullName >Chrysler </fullName >
<controllingFieldValues >checked </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Ford </fullName >
<controllingFieldValues >checked </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Honda </fullName >
<controllingFieldValues >unchecked </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Toyota </fullName >
<controllingFieldValues >unchecked </controllingFieldValues >
<default >false </default >
</picklistValues >
<sorted >false </sorted >
</picklist >
<type >Picklist </type >
</fields >
<fields >
<fullName >model__c </fullName >
<label >Model </label >
<picklist >
<controllingField >manufacturer__c </controllingField >
281
Metadata Types Picklist (Including Dependent Picklist)
<picklistValues >
<fullName >Mustang </fullName >
<controllingFieldValues >Ford </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Taurus </fullName >
<controllingFieldValues >Ford </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >PT Cruiser </fullName >
<controllingFieldValues >Chrysler </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Pacifica </fullName >
<controllingFieldValues >Chrysler </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Accord </fullName >
<controllingFieldValues >Honda </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Civic </fullName >
<controllingFieldValues >Honda </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Prius </fullName >
<controllingFieldValues >Toyota </controllingFieldValues >
<default >false </default >
</picklistValues >
<picklistValues >
<fullName >Camry </fullName >
<controllingFieldValues >Toyota </controllingFieldValues >
<default >false </default >
</picklistValues >
<sorted >false </sorted >
</picklist >
<type >Picklist </type >
</fields >
....
</CustomObject >
The following sample shows usage for the standard
Stage
field in opportunities.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<fields >
<fullName >StageName </fullName >
<picklist >
<picklistValues >
282
Metadata Types RecordType
<fullName >Prospecting </fullName >
<default >false </default >
<forecastCategory >Pipeline </forecastCategory >
<probability >10 </probability >
</picklistValues >
<picklistValues >
<fullName >Qualification </fullName >
<default >false </default >
<forecastCategory >Pipeline </forecastCategory >
<probability >10 </probability >
</picklistValues >
<picklistValues >
<fullName >Needs Analysis </fullName >
<default >false </default >
<forecastCategory >Pipeline </forecastCategory >
<probability >20 </probability >
</picklistValues >
...
</picklist >
</fields >
<CustomObject >
RecordType
Represents the metadata associated with a record type. Record types let you offer different business processes, picklist values, and page layouts to different users. For more information, see “Tailor Business Processes to Different Users” in the Salesforce online help. Use this
metadata type and inherits its fullName
field.
Note: Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.
Version
Record types are available in API version 12.0 and later.
Fields
Field
active businessProcess
Field Type
boolean string
Description
Required. Indicates whether or not the record type is active.
The fullName
of the business process associated with the record type. This field is required in record types for lead, opportunity, solution, and case, and not allowed otherwise.
on page 254.
This field is available in API version 17.0 and later.
283
Metadata Types RecordType
Field Field Type
compactLayoutAssignment string description fullName label picklistValues string string string
[]
Description
Represents the compact layout that is assigned to the record type.
This field is available in API version 29.0 and later.
Record type description. Maximum of 255 characters.
Record type name. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
If this field contained characters before version 14.0 that are no longer allowed, the characters were stripped out of this field, and the previous value of the field was saved in the
field.
Inherited from the Metadata component, this field is not
defined in the WSDL for this component. It must be specified
when creating, updating, or deleting. See create()
see an example of this field specified for a call.
This value cannot be null
.
Required. Descriptive label for the record type. The list of
characters allowed in the fullName
field has been reduced for versions 14.0 and later. This field contains the value contained in the
field before version 14.0.
Represents a set of values for a picklist.
RecordTypePicklistValue
RecordTypePicklistValue represents the combination of picklists and valid values that define a record type:
Field Name
picklist values
Field Type
string
Description
Required. The name of the picklist.
One or more of the picklist values in the picklist. Each value defined is available in the record type that contains this component.
Java Sample
The following sample uses two record types. For the complete sample that includes profiles and picklists, see
public void recordTypeSample() { try {
// Employees and managers have different access
// to the state of the expense sheet
RecordType edit = new RecordType();
284
Metadata Types SearchLayouts edit.setFullName( "ExpenseReport__c.Edit" ); edit.setLabel( "ExpenseReport__c.Label" );
PicklistValue unsubmitted = new PicklistValue(); unsubmitted.setFullName( "Unsubmitted" );
PicklistValue submitted = new PicklistValue(); submitted.setFullName( "Submitted" );
RecordTypePicklistValue editStatuses = new RecordTypePicklistValue(); editStatuses.setPicklist( "ExpenseStatus__c" ); editStatuses.setValues( new PicklistValue[] {unsubmitted, submitted}); edit.setPicklistValues( new RecordTypePicklistValue[] {editStatuses});
AsyncResult[] arsEdit = metadataConnection.create( new Metadata[] {edit});
}
RecordType approve = new RecordType(); approve.setFullName( "ExpenseReport__c.Approve" );
PicklistValue approved = new PicklistValue(); approved.setFullName( "Approved" );
PicklistValue rejected = new PicklistValue(); rejected.setFullName( "Rejected" );
RecordTypePicklistValue approveStatuses = new RecordTypePicklistValue(); approveStatuses.setPicklist( "ExpenseStatus__c" ); approveStatuses.setValues( new PicklistValue[] {approved, rejected}); approve.setPicklistValues( new RecordTypePicklistValue[] {approveStatuses});
AsyncResult[] arsApprove = metadataConnection.create( new Metadata[] {approve});
} catch (ConnectionException ce) { ce.printStackTrace();
}
Declarative Metadata Sample Definition
The definition of a record type in a custom object is shown below:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
. . .
<recordTypes >
<fullName >My First Recordtype </fullName >
</recordTypes >
. . .
</CustomObject >
SearchLayouts
Represents the metadata associated with the Search Layouts for an object. You can customize which fields to display for users in search results, search filter fields, lookup dialogs, and recent record lists on tab home pages.
285
Metadata Types SearchLayouts
For more information, see ”Customize Search Layouts” and ”Customize Search Layouts for Custom Objects” in the Salesforce online help.
Version
Search layouts for custom objects are available in API version 14.0 and later. The ability to modify search layouts for standard objects
(except events and tasks) is available in API version 27.0 and later.
Fields
Field
customTabListAdditionalFields
Field Type
string[] excludedStandardButtons listViewButtons string[] string[] lookupDialogsAdditionalFields string[]
Description
The list of fields displayed in the Recent
Object Name
list view on a tab associated with the object. The name
field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example
MyCustomField__c
, is specified for each custom field.
The list of standard buttons excluded from the search layout.
The list of buttons available in list views for an object.
This field is equivalent to the Buttons Displayed value in the
Object Name List View
in the Search Layouts related list on the object detail page in the Salesforce user interface. For more information, see “Standard and Enhanced
Lookups in Salesforce Classic” in the Salesforce online help.
The list of fields displayed in a lookup dialog for the object.
The name
field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example
MyCustomField__c
, is specified for each custom field.
Salesforce objects often include one or more lookup fields that allow users to associate two records together in a relationship. For example, a contact record includes an
Account
lookup field that represents the relationship between the contact and the organization with which the contact is associated. A lookup search dialog helps you search for the record associated with the one being edited. Lookup filter fields allow you to filter your lookup search by a customized list of fields in the object.
This field is equivalent to the
Lookup Dialogs
in the
Search Layouts related list on the object detail page in the application user interface. For more information, see
“Standard and Enhanced Lookups in Salesforce Classic” in the Salesforce online help.
286
Metadata Types
Field
lookupFilterFields lookupPhoneDialogsAdditionalFields searchFilterFields searchResultsAdditionalFields searchResultsCustomButtons
Field Type
string[] string[] string[] string[] string[]
SearchLayouts
Description
The list of fields that can be used to filter enhanced lookups for an object. Enhanced lookups are optionally enabled by your administrator. The field name relative to the object name, for example
MyCustomField__c
, is specified for each custom field.
This field is equivalent to the
Lookup Filter Fields in the Search Layouts related list on the object detail page in the application user interface. For more information, see
“Standard and Enhanced Lookups in Salesforce Classic” in the Salesforce online help.
The list of phone-related fields displayed in a lookup dialog for the object. The name
field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example
MyCustomField__c
, is specified for each custom field.
This list enables integration of the fields with a softphone dial pad.
This field is equivalent to the
Lookup Phone Dialogs in the Search Layouts related list on the object detail page in the application user interface.
The list of fields that can be used to filter a search for the object. The field name relative to the object name, for example
MyCustomField__c
, is specified for each custom field.
This field is equivalent to the
Search Filter Fields in the Search Layouts related list on the object detail page in the application user interface.
The list of fields displayed in a search result for the object.
The name
field is mandatory and is always displayed as the first column header, so it is not included in this list; all additional fields are included. The field name relative to the object name, for example
MyCustomField__c
, is specified for each custom field.
This field is equivalent to the
Search Results
in the
Search Layouts related list on the object detail page in the application user interface.
The list of custom buttons available in a search result for the object. The actions associated with the buttons can be applied to any of the records returned in the search result.
287
Metadata Types SharingReason
Declarative Metadata Sample Definition
A sample definition of search layouts in an object is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
. . .
<searchLayouts >
<listViewButtons >New </listViewButtons >
<listViewButtons >Accept </listViewButtons >
<listViewButtons >ChangeOwner </listViewButtons >
<lookupDialogsAdditionalFields >firstQuote__c </lookupDialogsAdditionalFields >
<lookupDialogsAdditionalFields >finalQuote__c </lookupDialogsAdditionalFields >
<searchResultsAdditionalFields >CREATEDBY_USER </searchResultsAdditionalFields >
</searchLayouts >
. . .
</CustomObject >
SEE ALSO:
SharingReason
Represents an Apex sharing reason, which is used to indicate why sharing was implemented for a custom object. Apex managed sharing allows developers to use Apex to programmatically share custom objects. When you use Apex managed sharing to share a custom object, only users with the “Modify All Data” permission can add or change the sharing on the custom object's record, and the sharing access is maintained across record owner changes. For more information, see “Sharing Settings” in the Salesforce online help.
Use SharingReason to create, update, or delete sharing reason definitions for a custom object. This type extends the
type and inherits its fullName
field.
Version
Sharing reasons are available in API version 14.0 and later.
Fields
Field
Field Type
string label string
Description
Required. Sharing reason name. The __c suffix is appended to custom sharing reasons.
Inherited from
Metadata , this field is not defined in the WSDL for this
metadata type. It must be specified when creating, updating, or deleting.
See
to see an example of this field specified for a call.
Required. Descriptive label for the sharing reason. Maximum of 40 characters.
288
Metadata Types SharingRecalculation
Declarative Metadata Sample Definition
The definition of a sharing reason in a custom object:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
. . .
<sharingReasons >
<fullName >recruiter__c </fullName >
<label >Recruiter </label >
</sharingReasons >
. . .
</CustomObject >
SharingRecalculation
Represents Apex classes that recalculate the Apex managed sharing for a specific custom object. For more information, see “Recalculate
Apex Managed Sharing” in the Salesforce online help.
Version
Sharing recalculations are available in API version 14.0 and later.
Fields
Field
className
Field Type
string
Description
Required. The Apex class that recalculates the Apex sharing for a custom object. This class must implement the
Database.Batchable
interface.
Declarative Metadata Sample Definition
The definition of a sharing recalculation in a custom object:
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
. . .
<sharingRecalculations >
<className >RecruiterRecalculation </className >
</sharingRecalculations >
. . .
</CustomObject >
ValidationRule
Represents a validation rule, which is used to verify that the data a user enters in a record is valid and can be saved. A validation rule contains a formula or expression that evaluates the data in one or more fields and returns a value of true
or false
. Validation rules also include an error message that your client application can display to the user when the rule returns a value of true
due to invalid
data. This type extends the Metadata
metadata type and inherits its fullName
field.
289
Metadata Types ValidationRule
As of API version 20.0, validation rules can't have compound fields. Examples of compound fields include addresses, first and last names, dependent picklists, and dependent lookups.
As of API version 40.0, you can use validation rules with custom metadata types.
Version
Validation rules are available in API version 12.0 and later.
Fields
Field Name
active
Field Type
boolean description errorConditionFormula string string errorDisplayField errorMessage fullName string string string
Description
Required. Indicates whether this validation rule is active, ( true
), or not active ( false
).
A description of the validation rule.
Required. The formula defined in the validation rule. If the formula returns a value of true
, an error message is displayed.
See “Define Validation Rules” in the Salesforce online help.
The fully specified name of a field in the application. If a value is supplied, the error message appears next to the specified field. If you do not specify a value or the field isn’t visible on the page layout, the value changes automatically to
Top of Page
.
Required. The message that appears if the validation rule fails. The message must be 255 characters or less.
The internal name of the object. White spaces and special characters are escaped for validity. The name must:
•
Contain characters, letters, or the underscore (_) character
•
Must start with a letter
•
Can’t end with an underscore
•
Can't contain two consecutive underscore characters.
Inherited from the
Metadata component, this field is not defined in the
WSDL for this component. It must be specified when creating, updating,
to see an example of this field specified for a call.
Declarative Metadata Sample Definition
A sample XML definition of a validation rule in a custom object is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
<deploymentStatus >Deployed </deploymentStatus >
<fields >
290
Metadata Types
<fullName >Mommy_Cat__c </fullName >
<label >Mommy Cat </label >
<referenceTo >Cat__c </referenceTo >
<relationshipName >Cats </relationshipName >
<type >Lookup </type >
</fields >
<label >Cat </label >
<nameField >
<label >Cat Name </label >
<type >Text </type >
</nameField >
<pluralLabel >Cats </pluralLabel >
<sharingModel >ReadWrite </sharingModel >
<validationRules >
<fullName >CatsRule </fullName >
<active >true </active >
<errorConditionFormula >OR(Name = 'Milo',Name =
'Moop') </errorConditionFormula >
<validationMessage >Name must be that of one of my cats </validationMessage >
</validationRules >
</CustomObject >
WebLink
Represents a custom button or link defined in a custom object. This type extends the Metadata
metadata type and inherits its fullName field.
Version
WebLinks are available in API version 12.0 and later.
Fields
Field Name
availability description displayType
Field Type
WebLinkAvailability
of type string) string
WebLinkDisplayType
of type string)
Description
Required. Indicates whether the button or link is only available online
( online
, or if it is also available offline ( offline
).
A description of the button or link.
Represents how ththe button or link is rendered. Valid values are:
•
link
for a hyperlink
•
button
for a button
•
massAction
for a button attached to a related list
WebLink
291
Metadata Types
Field Name
encodingKey fullName hasMenubar hasScrollbars hasToolbar height isResizable
Field Type
of type string)
Description
Required. The default encoding setting is Unicode:
UTF-8
. Change it if your template requires data in a different format. This is available if your content source is URL.
Valid values include:
•
UTF-8
—Unicode (UTF-8)
•
ISO-8859-1
—General US & Western Europe (ISO-8859–1,
ISO-LATIN-1)
•
Shift_JIS
—Japanese (Shift-JIS)
•
ISO-2022-JP
—Japanese (JIS)
•
EUC-JP
—Japanese (EUC-JP)
•
x-SJIS_0213
—Japanese (Shift-JIS_2004)
•
ks_c_5601-1987
—Korean (ks_c_5601-1987)
•
Big5
—Traditional Chinese (Big5)
•
GB2312
—Simplified Chinese (GB2312)
•
Big5-HKSCS
—Traditional Chinese Hong Kong (Big5–HKSCS) string The name of the custom button or link with white spaces and special characters escaped for validity. The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
Inherited from the Metadata component, this field is not defined in the
WSDL for this component. It must be specified when creating, updating, or deleting. See
to see an example of this field specified for a call.
boolean boolean boolean int boolean
newWindow
, this field indicates whether to show the browser menu bar for the window ( true
) or not ( false
).
Otherwise, leave this field empty.
newWindow
, this field indicates whether to show the scroll bars for the window ( true
) or not ( false
). Otherwise, leave this field empty.
newWindow
, this field indicates whether to show the browser toolbar for the window ( true
) or not ( false
). Otherwise, leave this field empty.
Height in pixels of the window opened by the custom button or link.
is newWindow
. Otherwise, leave this field empty.
newWindow
, this field indicates whether to allow resizing of the window ( true
) or not ( false
). Otherwise, leave this field empty.
WebLink
292
Metadata Types
Field Name
linkType
Field Type
WebLinkType (
type string)
Description
Required. Represents whether the content of the button or link is specified by a URL, an sControl, a JavaScript code block, or a Visualforce page.
•
url
•
sControl
•
javascript
•
page
•
flow
—Reserved for future use.
masterLabel openType page position protected requireRowSelection scontrol showsLocation
string
WebLinkWindowType
of type string) string
WebLinkPosition (
of type string)
page
, this field represents the Visualforce page. Otherwise, leave this field empty.
If the value of
OpenType
is newWindow
, this field indicates how the new window should be displayed. Otherwise, don’t specify a value.
Valid values are:
•
fullScreen
•
none
•
topLeft boolean
Master label for this object. This display value is the internal label that is not translated.
Required. When the button or link is clicked, specifies the window style that will be used to display the content. Valid values:
•
newWindow
•
sidebar
•
noSidebar
•
replace
•
onClickJavaScript boolean string boolean
Required. Indicates whether this sub-component is protected ( true
) or not ( false
). Protected sub-components can’t be linked to or referenced by components or sub-components created in the installing organization.
If the
is massAction
, this field indicates whether to require individual row selection to execute the action for this button
( true
) or not ( false
). Otherwise, leave this field empty.
If the value of
is sControl
, this field represents the name of the sControl. Otherwise, leave this field empty.
newWindow
, this field indicates whether to show the browser location bar for the window ( true
) or not ( false
).
Otherwise, leave this field empty.
WebLink
293
Metadata Types
Field Name
showsStatus url width
Field Type
boolean string int
Description
If the
is newWindow
, this field indicates whether or not to show the browser status bar for the window. Otherwise, leave this field empty.
If the value of
is url
, this is the URL value. If the value of
javascript
, this is the JavaScript content. If the value is neither of these, leave this field empty.
Content must be escaped in a manner consistent with XML parsing rules.
Width in pixels of the window opened by the button or link.
is newWindow
. Otherwise, leave this field empty.
WebLink
Java Sample
The following Java sample shows sample values for WebLink fields: public void WebLinkSample(String name) throws Exception {
WebLink WebLink = new WebLink();
// name variable represents the full name of the object
// on which to create the WebLink, for example, customObject__c
WebLink.setFullName(name + ".googleButton" );
WebLink.setUrl( "http://www.google.com" );
WebLink.setAvailability(WebLinkAvailability.online);
WebLink.setLinkType(WebLinkType.url);
WebLink.setEncodingKey(Encoding.fromString( "UTF-8" ));
WebLink.setOpenType(WebLinkWindowType.newWindow);
WebLink.setHeight(600);
WebLink.setWidth(600);
WebLink.setShowsLocation(false);
WebLink.setHasScrollbars(true);
WebLink.setHasToolbar(false);
WebLink.setHasMenubar(false);
WebLink.setShowsStatus(false);
WebLink.setIsResizable(true);
WebLink.setPosition(WebLinkPosition.none);
WebLink.setMasterLabel( "google" );
WebLink.setDisplayType(WebLinkDisplayType.link);
AsyncResult[] asyncResults = metadataConnection.create( new WebLink[]{WebLink});
// After the create() call completes, we must poll the results of checkStatus()
//
}
294
Metadata Types Metadata Field Types
Declarative Metadata Sample Definition
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObject xmlns= "http://soap.sforce.com/2006/04/metadata">
....
<WebLinks >
<fullName >googleButton </fullName >
<availability >online </availability >
<displayType >link </displayType >
<encodingKey >UTF-8 </encodingKey >
<hasMenubar >false </hasMenubar >
<hasScrollbars >true </hasScrollbars >
<hasToolbar >false </hasToolbar >
<height >600 </height >
<isResizable >true </isResizable >
<linkType >url </linkType >
<masterLabel >google </masterLabel >
<openType >newWindow </openType >
<position >none </position >
<protected >false </protected >
<showsLocation >false </showsLocation >
<showsStatus >false </showsStatus >
<url >http://www.google.com
</url >
<width >600 </width >
....
</WebLinks >
</CustomObject >
SEE ALSO:
Metadata Field Types
These field types extend the field types described in the
SOAP API Developer's Guide
.
Field Type
CustomField
DeleteConstraint
Objects
Custom object
Custom field
What the Field Contains
Represents a custom field.
Custom field A string that represents deletion options for lookup relationships. Valid values are:
•
SetNull
•
Restrict
•
Cascade
295
Metadata Types
Field Type
DeploymentStatus
FieldType
Metadata Field Types
Objects
Custom object
Custom field
What the Field Contains
A string which represents the deployment status of a custom object or field. Valid values are:
•
InDevelopment
•
Deployed
Custom field Indicates the type of a custom field. Valid values are:
•
AutoNumber
•
Lookup
•
MasterDetail
•
MetadataRelationship
•
Checkbox
•
Currency
•
Date
•
DateTime
•
•
EncryptedText
Note: This page is about Classic Encryption, not Shield Platform
Encryption. What's the difference?
•
ExternalLookup
•
IndirectLookup
•
Number
1
•
Percent
•
Phone
•
Picklist
•
MultiselectPicklist
•
Summary
•
Text
•
TextArea
•
LongTextArea
•
Summary
•
Url
•
Hierarchy
•
File
•
CustomDataType
•
Html
•
Geolocation
•
Time
(Beta)
296
Metadata Types Metadata Field Types
Field Type
Gender
Objects
Custom object
What the Field Contains
1
A
Number
custom field is internally represented as a field of type double.
Setting the scale of the
Number
field to 0 gives you a double that behaves like an int.
Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender.
Valid values are:
•
Masculine
•
Feminine
•
Neuter
•
AnimateMasculine
(Slavic languages—currently Czech, Polish, Russian,
Slovak, Slovenian, and Ukrainian)
Note:
The following genders are displayed on the Rename Tabs and
Labels page in Setup but are stored internally as “Feminine”. When setting them through the Metadata API, use “Feminine”.
•
Euter (Swedish)
•
Common (Dutch)
SharingModel
StartsWith
Custom field
Custom object
(This field type isn’t used in Metadata API. CustomField includes this field type for
Tooling API support). Represents a picklist, a set of labels and values that can be selected from a picklist.
Represents the sharing model for the custom object. Depending on the object, valid values are:
•
Private
•
Read
•
ReadWrite
•
ReadWriteTransfer
•
FullAccess
•
ControlledByParent
For example, the User object supports
Private
and
Read
values. Accounts, opportunities, and custom objects support
Private
,
Read
and
ReadWrite values.
Custom object
Custom field
Indicates whether the noun starts with a vowel, consonant, or is a special character.
This is used for languages where words need different treatment depending on the first character. Valid values are:
•
Consonant
•
Vowel
•
Special (for nouns starting with z, or s plus consonants)
297
Metadata Types Metadata Field Types
Field Type
TreatBlanksAs
ValueSet
Objects
Custom field
Custom field
What the Field Contains
Indicates how blanks should be treated. Valid values are:
•
BlankAsBlank
•
BlankAsZero
Represents a set of values that can be selected from a custom picklist field. Defines the valueSet of a the custom picklist field.
ValueSet
Represents a set of values that can be selected from a custom picklist field. Defines the valueSet of a the custom picklist field.
Field Type
controllingField valueSetName valueSettings
Field Type
string
Description
The fullname
of the controlling field if this is a dependent picklist. A controlling field can be a checkbox or picklist field, but in this case it’s a picklist.
The controlling picklist filters the available values in the dependent picklist.
restricted boolean Whether the picklist’s values are limited to only the values defined by a
Salesforce admin. Values are true
or false
.
valueSetDefinition
ValueSetValuesDefinition Defines value-specific settings for a custom dependent picklist. Indicates whether the value set of the custom picklist field is sorted alphabetically.
string
ValueSettings
The masterLabel
of the global value set to be used for this picklist field.
Used for the settings that describe a value in a custom picklist field. The picklist can have its own unique value set, or inherit the values from a global value set.
ValueSetValuesDefinition
Field Name
sorted
Field Type
boolean value
CustomValue
Description
Whether the picklist’s value set is displayed in alphabetical order in the user interface.
Required. The list of values for this local, custom picklist.
ValueSettings
Field Name Field Type
controllingFieldValue string[] valueName string
Description
Applies only to dependent custom picklists. A list of values in the controlling or parent picklist (that the custom picklist values depend on).
Defines the values in the custom dependent picklist.
298
Metadata Types CustomObjectTranslation
CustomObjectTranslation
metadata type and inherits its fullName
field. The ability to translate component labels is part of the Translation Workbench. For more information, see
“Enable and Disable the Translation Workbench” in the Salesforce online help.
Declarative Metadata File Suffix and Directory Location
Translations are stored in a file with a format of
customObjectName__c-lang.objectTranslation
, where
customObjectName__c
is the custom object name, and
lang
is the translation language. A sample file name for German translations is myCustomObject__c-de.objectTranslation
.
Custom object translations are stored in the objectTranslations
folder in the corresponding package directory.
Version
CustomObjectTranslation components are available in API version 14.0 and later.
Fields
Field
caseValues
Field Type
[] fields fieldSets fullName gender layouts nameFieldLabel
[]
string
string
Description
Different combinations of the custom object with regard to article, plural, possessive, and case.
A list of translations for the custom fields associated with the custom object.
A list of field set translations. Available in API version 41.0 and later.
The name of the custom object and the translation language with a format of
customObjectName
-
lang
, where
customObjectName
is the custom object name, and
lang
is the translation language.
Inherited from Metadata , this field is not defined in the WSDL
for this metadata type. It must be specified when creating,
updating, or deleting. See create()
to see an example of this field specified for a call.
Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender.
A list of page layout translations.
The label for the name field. Maximum of 765 characters.
299
Metadata Types CustomObjectTranslation
Field
namedFilters quickActions recordTypes sharingReasons startsWith validationRules webLinks workflowTasks
Field Type
Description
A list of translations for lookup filter error messages associated with the custom object.
This field has been removed as of API version 30.0 and is only available in prior versions. The translation metadata associated with a lookup filter is now represented by the lookupFilter field in the CustomFieldTranslation subtype.
[]
[]
[]
[]
A list of translations for actions.
A list of record type translations.
[] A list of sharing reason translations.
(
of type string)
Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character.
A list of validation rule translations.
A list of web link translations.
A list of workflow task translations.
CustomFieldTranslation
CustomFieldTranslation contains details for a custom field translation. In API versions 37.0 and earlier standard picklist values could be
Note: Not every language supports all the possible values for the fields in CustomFieldTranslation. For language-specific supported
values, see the fully supported languages
and
appendices.
Field
caseValues description gender help label
Field Type
[] string
string string
Description
Different combinations of the custom object with regard to article, plural, possessive, and case. Available in API version 29.0
and later.
Translation for the custom field description.
Indicates the gender of the noun that represents the object. This is used for languages where words need different treatment depending on their gender. Available in API version 29.0 and later.
Translation for the text that displays in the field-level help hover text for this field.
Translation for the label. Maximum of 765 characters.
300
Metadata Types CustomObjectTranslation
Field
lookupFilter name picklistValues relationshipLabel startsWith
Field Type
Description
Represents the translation metadata associated with a lookup filter.
This field is available in API version 30.0 and later.
Note: LookupFilter is not supported on the article type object.
string
Required. The name of the field relative to the custom object; for example,
MyField__c
.
List of translations for picklist values. See
Note: “Subject” on the Task object is a text field, not a picklist value. It can’t be retrieved via Metadata API. Translations can be provided via the Translation Workbench.
string Translation for a lookup relationship label. A lookup relationship allows a field to be associated with another field. The relationship field allows users to select an option from a list of values defined by the other field. Maximum of 765 characters.
(
of type string)
Indicates whether the noun starts with a vowel, consonant, or is a special character. This is used for languages where words need different treatment depending on the first character.
Available in API version 29.0 and later.
FieldSetTranslation
Field
label name
Field Type
string string
Description
Required. Translation for the field set label. Maximum of 765 characters.
Required. The field set name.
LayoutTranslation
LayoutTranslation contains details for a page layout translation. For more details, see Fields
.
Field
layout layoutType sections
Field Type
string string
[]
Description
Required. The layout name.
An array of layout section translations.
301
Metadata Types CustomObjectTranslation
LayoutSectionTranslation
LayoutSectionTranslation contains details for a page layout section translation. For more details, see
Field
label section
Field Type
string string
Description
Required. Translation for the label. Maximum of 765 characters.
Required. The section name.
LookupFilterTranslation
LookupFilterTranslation shows a translation for a lookup filter error message associated with the custom object. Replaces
NamedFilterTranslation.
LookupFilterTranslation is available in API version 30.0 and later.
Field
errorMessage informationalMessage
Field Type
string string
Description
The error message that appears if the lookup filter fails.
The information message displayed on the page. Use to describe things the user might not understand, such as why certain items are excluded in the lookup filter.
NamedFilterTranslation
NamedFilterTranslation has been removed as of API version 30.0 and is only available in previous API versions.
NamedFilterTranslation shows a list of translations for lookup filter error messages associated with the custom object. See
for more information.
Field
errorMessage informationalMessage name
Field Type
string string string
Description
The error message that appears if the lookup filter fails.
The information message displayed on the page. Use to describe things the user might not understand, such as why certain items are excluded in the lookup filter.
Required. The name of the lookup filter. If you create this field in the user interface, a name is automatically assigned. If you create this field through Metadata API, you must include the name
field.
ObjectNameCaseValue
ObjectNameCaseValue supports multiple cases and definitions of the custom object name to allow usage in various grammatical contexts.
Note:
Not every language supports all the possible values for the fields in ObjectNameCaseValue. For language-specific supported
values, see the fully supported languages
and
appendices.
302
Metadata Types
Field
article caseType plural
CustomObjectTranslation
Field Type
of type string)
Description
English has two types of articles: definite (
the
) and indefinite
(
a
,
an
). The usage of these articles depends mainly on whether you are referring to any member of a group, or to a specific member of a group. The valid values are:
•
Definite
•
Indefinite
•
None
CaseType (
string)
The case of the custom object name. The valid values are:
•
Ablative
•
Accusative
•
Adessive
•
Allative
•
Causalfinal
•
Dative
•
Delative
•
Distributive
•
Elative
•
Essive
•
Essiveformal
•
Genitive
•
Illative
•
Inessive
•
Instrumental
•
Lative
•
Locative
•
Nominative
•
Objective
•
Partitive
•
Prepositional
•
Subjective
•
Sublative
•
Superessive
•
Termanative
•
Translative
•
Vocative boolean Indicates whether the
true
) or singular
( false
).
303
Metadata Types
Field
possessive value
CustomObjectTranslation
Field Type Description
Possessive (
of type string)
The possessive case of a language is a grammatical case used to indicate a relationship of possession. The valid values are:
•
First
•
None
•
Second string Required. The value or label in this grammatical context.
PicklistValueTranslation
(Including Dependent Picklist) .
Field
masterLabel translation
Field Type
string string
Description
Required. The picklist value defined on the setup page in the application is your master label. The master label is displayed wherever a translated label is not available.
Required. Translation for the value.
QuickActionTranslation
Field
label name
Field Type
string string
Description
Required. Translation for the label. Maximum of 765 characters.
Required. The quick action name.
RecordTypeTranslation
RecordTypeTranslation contains details for a record type name translation. For more details, see
Field
label name
Field Type
string string
Description
Required. Translation for the label. Maximum of 765 characters.
Required. The record type name.
SharingReasonTranslation
.
304
Metadata Types CustomObjectTranslation
Field
label name
Field Type
string string
Description
Required. Translation for the sharing reason.
Required. The sharing reason name.
ValidationRuleTranslation
.
Field
errorMessage name
Field Type
string string
Description
Required. Translation for the error message associated with the validation rule failure.
Required. The validation rule name.
WebLinkTranslation
WebLinkTranslation contains details for a web link translation. For more details, see WebLink
.
Field
label name
Field Type
string string
Description
Required. Translation for the web link label. Maximum of 765 characters.
Required. The web link name.
WorkflowTaskTranslation
WorkflowTaskTranslation contains details for a workflow task translation. For more details, see
.
Field
description name subject
Field Type
string string string
Description
Translation for the workflow task description.
Required. The workflow task name.
Translation for the workflow task subject.
Declarative Metadata Sample Definitions
This is a sample XML definition of a CustomObjectTranslation for the Description__c object in German, with one custom field, Summary__c.
The name and location of the file containing this definition would be objectTranslations/Description__c-de.objectTranslation
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObjectTranslation xmlns= "http://soap.sforce.com/2006/04/metadata">
<caseValues >
305
Metadata Types CustomObjectTranslation
<caseType >Nominative </caseType >
<plural >false </plural >
<value >Beschreibung </value >
</caseValues >
<caseValues >
<caseType >Nominative </caseType >
<plural >true </plural >
<value >Beschreibungen </value >
</caseValues >
<caseValues >
<caseType >Accusative </caseType >
<plural >false </plural >
<value >Beschreibung </value >
</caseValues >
<caseValues >
<caseType >Accusative </caseType >
<plural >true </plural >
<value >Beschreibungen </value >
</caseValues >
<caseValues >
<caseType >Genitive </caseType >
<plural >false </plural >
<value >Beschreibung </value >
</caseValues >
<caseValues >
<caseType >Genitive </caseType >
<plural >true </plural >
<value >Beschreibungen </value >
</caseValues >
<caseValues >
<caseType >Dative </caseType >
<plural >false </plural >
<value >Beschreibung </value >
</caseValues >
<caseValues >
<caseType >Dative </caseType >
<plural >true </plural >
<value >Beschreibungen </value >
</caseValues >
<fields >
<label >Zusammenfassung </label >
<name >Summary__c </name >
</fields >
<gender >Feminine </gender >
<nameFieldLabel >Beschreibungen </nameFieldLabel >
</CustomObjectTranslation >
This is a sample XML definition of a CustomObjectTranslation for the Account object, renaming Account to Client (Kunde) in German.
The Account object has one standard field, account_number, and one custom field, Account_Code__c. The name and location of the file containing this definition would be objectTranslations/Account-de.objectTranslation
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomObjectTranslation xmlns= "http://soap.sforce.com/2006/04/metadata">
<caseValues >
<caseType >Nominative </caseType >
306
Metadata Types
<plural >false </plural >
<value >Kunde </value >
</caseValues >
<caseValues >
<caseType >Nominative </caseType >
<plural >true </plural >
<value >Kunden </value >
</caseValues >
<caseValues >
<caseType >Accusative </caseType >
<plural >false </plural >
<value >Kunden </value >
</caseValues >
<caseValues >
<caseType >Accusative </caseType >
<plural >true </plural >
<value >Kunden </value >
</caseValues >
<caseValues >
<caseType >Genitive </caseType >
<plural >false </plural >
<value >Kunden </value >
</caseValues >
<caseValues >
<caseType >Genitive </caseType >
<plural >true </plural >
<value >Kunden </value >
</caseValues >
<caseValues >
<caseType >Dative </caseType >
<plural >false </plural >
<value >Kunden </value >
</caseValues >
<caseValues >
<caseType >Dative </caseType >
<plural >true </plural >
<value >Kunden </value >
</caseValues >
<fields >
<caseValues >
<caseType >Nominative </caseType >
<plural >false </plural >
<value >Kundennummer </value >
</caseValues >
<caseValues >
<caseType >Nominative </caseType >
<plural >true </plural >
<value >Kundennummern </value >
</caseValues >
<gender >Feminine </gender >
<name >account_number </name >
</fields >
<fields >
<label >Kunden-Code </label >
307
CustomObjectTranslation
Metadata Types CustomPageWebLink
<name >Account_Code__c </name >
</fields >
<gender >Masculine </gender >
</CustomObjectTranslation >
SEE ALSO:
CustomPageWebLink
Represents a custom link defined in a home page component. This type extends the Metadata
metadata type and inherits its fullName
field. All other custom links are stored as a WebLink in a
.
Declarative Metadata File Suffix and Directory Location
There is one file per custom link definition, stored in the weblinks
folder in the corresponding package directory. The file suffix is
.weblink
.
Version
CustomPageWebLinks are available in API version 13.0 and later.
Fields
Field Name
availability description displayType encodingKey
Field Type
WebLinkAvailability
(
of type string) string
WebLinkDisplayType
(
of type string)
Description
Required. Indicates whether the link is only available online ( online
, or if it is also available offline ( offline
).
A description of the link.
Represents how this link is rendered.
Valid values:
•
link
for a hyperlink
•
button
for a button
•
massAction
for a button attached to a related list
of type string)
Required. The default encoding setting is Unicode:
UTF-8
. Change it if your template requires data in a different format. This is available if your content source is URL.Valid values include:
•
UTF-8
—Unicode (UTF-8)
•
ISO-8859-1
—General US & Western Europe (ISO-8859–1,
ISO-LATIN-1)
•
Shift_JIS
—Japanese (Shift-JIS)
308
Metadata Types CustomPageWebLink
Field Name
fullName hasMenubar hasScrollbars hasToolbar height isResizable linkType masterLabel openType
Field Type Description
•
ISO-2022-JP
—Japanese (JIS)
•
EUC-JP
—Japanese (EUC-JP)
•
x-SJIS_0213
—Japanese (Shift-JIS_2004)
•
ks_c_5601-1987
—Korean (ks_c_5601-1987)
•
Big5
—Traditional Chinese (Big5)
•
GB2312
—Simplified Chinese (GB2312)
•
Big5-HKSCS
—Traditional Chinese Hong Kong (Big5–HKSCS) string boolean boolean boolean int boolean
WebLinkType (
type string)
The name used as a unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
newWindow
, this field indicates whether to show the browser menu bar for the window ( true
or not ( false
). Otherwise, leave this field empty.
newWindow
, this field indicates whether to show the scroll bars for the window ( true
) or not ( false
). Otherwise, leave this field empty.
newWindow
, this field indicates whether to show the browser toolbar for the window ( true
) or not ( false
). Otherwise, leave this field empty.
Height in pixels of the window opened by the link. Required if the
is newWindow
. Otherwise, leave this field empty.
newWindow
, this field indicates whether to allow resizing of the window ( true
) or not ( false
). Otherwise, leave this field empty.
Required. Represents whether the content of the button or link is specified by a URL, an sControl, a JavaScript code block, or a Visualforce page.
•
url
•
sControl
•
javascript
•
page
•
flow
—Reserved for future use.
string
WebLinkWindowType
(
of type string)
The master label for the link.
Required. When the link is clicked, this field specifies the window style used to display the content.
Valid values are:
•
newWindow
•
sidebar
309
Metadata Types CustomPageWebLink
Field Name Field Type Description
•
noSidebar
•
replace
•
onClickJavaScript page position protected requireRowSelection scontrol showsLocation showsStatus string If the value of
is page
, this field represents the Visualforce page. Otherwise, leave this field empty.
of type string)
If the
is newWindow
, this field indicates how the new window should be displayed. Otherwise, leave this field empty.
Valid values are:
•
fullScreen
•
none
•
topLeft boolean boolean string boolean boolean
Required. Indicates whether this component is protected ( true
) or not
( false
). Protected components cannot be linked to or referenced by components created in the installing organization.
is massAction
, this field indicates whether to require individual row selection to execute the action for this button ( true
) or not ( false
). Otherwise, leave this field empty.
sControl
, this field represents the name of the sControl. Otherwise, leave this field empty.
If the
is newWindow
, this field indicates whether or not to show the browser location bar for the window. Otherwise, leave this field empty.
If the
is newWindow
, this field indicates whether or not to show the browser status bar for the window. Otherwise, leave this field empty.
url string width int
If the value of
is url
, this field represents the URL value. If
is javascript
, this field represents the
JavaScript content. If the value is neither of these, leave this field empty.
Content must be escaped in a manner consistent with XML parsing rules.
Width in pixels of the window opened by the link.
Required if the
is newWindow
. Otherwise, leave this field empty.
310
Metadata Types CustomPermission
Declarative Metadata Sample Definition
The following is the definition of a Weblink. For related samples, see HomePageComponent and
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomPageWebLink xmlns= "http://soap.sforce.com/2006/04/metadata">
<availability >online </availability >
<displayType >button </displayType >
<encodingKey >UTF-8 </encodingKey
<hasMenubar >false </hasMenubar >
<hasScrollbars >true </hasScrollbars >
<hasToolbar >false </hasToolbar >
<height >600 </height >
<isResizable >true </isResizable >
<linkType >url </linkType >
<masterLabel >detailPageButon </masterLabel >
<openType >newWindow </openType >
<position >none </position >
<protected >false </protected >
<showsLocation >false </showsLocation >
<showsStatus >false </showsStatus >
<url >http://google.com
</url >
</CustomPageWebLink >
SEE ALSO:
CustomPermission
Represents a permission that grants access to a custom feature. This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
CustomPermission components have the suffix
.customPermission
and are stored in the customPermissions
folder.
Version
CustomPermission components are available in API version 31.0 and later.
311
Metadata Types
Fields
Field Name
connectedApp
CustomPermission description label requiredPermission
Field Type
string string string
Description
The name of the connected app that’s associated with this permission. Limit: 80 characters.
The custom permission description. Limit:
255 characters.
Required. The custom permission label.
Limit: 80 characters.
CustomPermissionDependencyRequired[]
Indicates which custom permissions are required by the parent custom permission.
This field is available in API version 32.0 and later.
CustomPermissionDependencyRequired
CustomPermissionDependencyRequired determines whether a custom permission is required by the parent custom permission. A required custom permission must be enabled when its parent is enabled.
Field Name
customPermission dependency
Field Type
string boolean
Description
Required. The custom permission name.
Required. Indicates whether this custom permission is required by the parent custom permission ( true
) or not ( false
).
Declarative Metadata Sample Definition
The following is an example of a CustomPermission component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomPermission xmlns= "http://soap.sforce.com/2006/04/metadata">
<connectedApp >Acme </connectedApp >
<description >Read and edit access for Acme accounts.
</description >
<label >Acme Account Full Access </label >
<requiredPermission >
<customPermission >Acme_Account_Read </customPermission >
<dependency >true </dependency >
</requiredPermission >
</CustomPermission >
The following is an example package.xml
that references the previous definition, as well as other custom permissions that are associated with a connected app.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
312
Metadata Types CustomSite
<members >Acme </members >
<name >ConnectedApp </name >
</types >
<types >
<members >Acme_Account_Email_Read </members >
<members >Acme_Account_Phone_Edit </members >
<members >Acme_Account_Full_Access </members >
<members >Acme_Account_Read </members >
<name >CustomPermission </name >
</types >
<types >
<members >Acme_Account_Email_Read </members >
<members >Acme_Account_Phone_Edit </members >
<members >Acme_Account_Full_Access </members >
<members >Acme_Account_Read </members >
<name >PermissionSet </name >
</types >
<version >41.0
</version >
</Package >
CustomSite
Represents a Force.com site. Force.com Sites enables you to create public websites and applications that are directly integrated with your Salesforce organization—without requiring users to log in with a username and password. For more information, see “Force.com
Sites” in the Salesforce online help.
Note: CustomSite does not support syndication feeds at this time.
This type extends the
Metadata metadata type and inherits its
fullName
field.
Declarative Metadata File Suffix and Directory Location
Force.com CustomSite components are stored in the sites
directory of the corresponding package directory. The file name matches the site name, and the extension is
.site
.
Version
Force.com CustomSite components are available in API version 14.0 and later.
Fields
Field
active allowHomePage
Field Type
boolean boolean
Description
Required. Determines whether or not the site is active.
Required. Determines whether or not the standard home page is visible to public users. This is a new field in API version 15.0.
313
Metadata Types
Field
allowStandardAnswersPages allowStandardIdeasPages allowStandardLookups allowStandardPortalPages
Field Type
boolean boolean boolean boolean allowStandardSearch analyticsTrackingCode boolean string authorizationRequiredPage bandwidthExceededPage browserXssProtection string string boolean changePasswordPage string chatterAnswersForgotPasswordConfirmPage string
CustomSite
Description
Determines whether the standard answer pages are visible to public users. This is a new field in API version
19.0.
Required. Determines whether or not the standard
Ideas pages are visible to public users. This is a new field in API version 15.0.
Required. Determines whether or not the standard lookup pages are visible to public users. This is a new field in API version 15.0.
Required. When enabled, authenticated users in this site can access standard Salesforce pages as allowed by their access controls. When disabled, authenticated users in this site can't access standard Salesforce pages, even if their access controls allow it. If your site serves only Visualforce pages, disabling this setting helps add a layer of access protection to your site. This is a new field in API version 39.0.
Determines whether or not the standard search pages are visible to public users. This is a new field in API version 15.0.
The tracking code associated with your site. This code can be used by services like Google Analytics to track page request data for your site. This field is available in API version 17.0 and later.
The name of the Visualforce page to be displayed when the guest user tries to access a page for which they are not authorized.
The name of the Visualforce page to be displayed when the site has exceeded its bandwidth quota.
Required. Determines whether protection against cross-site scripting attacks is enabled. If a reflected cross-site scripting attack is detected, the browser shows a blank page with no content. Available in API version 41.0 and later.
The name of the Visualforce page to be displayed when the portal user attempts to change his or her password for either the portal or for Chatter Answers, when enabled.
The name of the Visualforce page to be displayed that informs the user that an email has been sent to them with a temporary password. This field is available if
314
Metadata Types CustomSite
Field
contentSniffingProtection
Field Type
chatterAnswersForgotPasswordPage chatterAnswersHelpPage chatterAnswersLoginPage chatterAnswersRegistrationPage clickjackProtectionLevel string string string string
The name of the Visualforce page to be displayed when a user clicks the link to retrieve a forgotten password. This field is available if Chatter Answers is enabled for your organization. This field is available in
API version 27.0 and later.
The name of the Visualforce page to be displayed when the user clicks the help link. This field is available if Chatter Answers is enabled for your organization.
This field is available in API version 27.0 and later.
The name of the Visualforce page to be displayed to allow users to log in to the portal. This field is available if Chatter Answers is enabled for your organization.
This field is available in API version 27.0 and later.
The name of the Visualforce page to be displayed to allow users to register themselves and access the portal. This field is available in API version 27.0 and later.
SiteClickjackProtectionLevel
(enumeration of type string)
Required. Sets the clickjack protection level. The options are:
•
AllowAllFraming
— Allow framing by any page (no protection)
•
SameOriginOnly
— Allow framing by the same origin only (recommended)
•
NoFraming
— Don’t allow framing by any page (most protection)
This field is available in API version 30.0 and later.
boolean
Description
Chatter Answers is enabled for your organization. This field is available in API version 27.0 and later.
cspUpgradeInsecureRequests customWebAddresses boolean
SiteWebAddress[]
Required. Determines whether the browser is prevented from inferring the MIME type from the document content. If enabled, it also prevents the browser from executing some malicious files
(JavaScript, Stylesheet) as dynamic content. This field is available in API version 41.0 and later.
Required. Determines whether HTTP requests, including third-party domains, are upgraded to HTTPS.
This field is available in API version 41.0 and later.
The root custom URLs associated with the site. Saving or deploying a CustomSite replaces all root custom
URLs in the site with the root custom URLs in this list.
Custom URLs that use a non-root path prefix are not included in this list and are not affected when saving
315
Metadata Types
Field
description favoriteIcon fileNotFoundPage forgotPasswordPage genericErrorPage guestProfile inMaintenancePage inactiveIndexPage indexPage masterLabel portal string string string string string string string referrerPolicyOriginWhenCrossOrigin boolean requireHttps boolean
Field Type
string stringstring string string requireInsecurePortalAccess boolean
CustomSite
Description
or deploying a CustomSite. This field is available in API version 21.0 and later.
The site description.
The name of the file to be used for the icon that appears in the browser's address field when visiting the site. Sets the favorite icon for the entire site.
The name of the Visualforce page to be displayed when the guest user tries to access a non-existent page.
The name of the Visualforce page to be displayed when a user clicks the Forgot Password link on the site’s login page. This field is only applicable for
Communities sites.
The name of the Visualforce page to be displayed for errors not otherwise specified.
Read only. The name of the profile associated with the guest user.
The name of the Visualforce page to be displayed when the site is down for maintenance.
The name of the Visualforce page set as the inactive site home page.
Required. The name of the Visualforce page set as the active site home page.
The name of the site label in the Salesforce user interface.
The name of the portal associated with this site for login access.
Required. Determines whether the referrer header hides sensitive information when navigating to third-party sites. This field is available in API version
41.0 and later.
Determines whether the site requires secure connections (true) or not (false). When false, the site operates normally via insecure connections instead of redirecting to a secure connection.
Required. Determines whether to override your organization's security settings and exclusively use
HTTP when logging in to the associated portal from your site.
316
Metadata Types
Field
robotsTxtPage serverIsDown siteRedirectMappings siteAdmin siteTemplate siteType subdomain urlPathPrefix
Field Type
string string
SiteRedirectMapping[] stringstring string siteType string string
Description
The name of the Visualforce page to be displayed for the robots.txt
file used by web crawlers.
The name of the static resource to be displayed from the cache server when Salesforce servers are down.
The static resource must be a public zip file 1 MB or smaller and must contain a page named maintenance.html
at the root level of the zip file. Other resources in the zip file, such as images or
CSS files, can follow any directory structure. This field is available in API version 17.0 and later.
An array of all URL redirect rules set for your site. This field is available in API version 20.0 and later.
The username of the site administrator.
The name of the Visualforce page to be used as the site template.
Identifies whether the site is a Visualforce (Force.com
Sites) or a Site.com site.
If Salesforce Communities is enabled for your organization, the site could also be a ChatterNetwork
(Force.com Sites) or ChatterNetworkPicasso (Site.com) site.
This is a new field in API version 27.0.
Required. Read only. The custom subdomain prefix for the site. For example, if your site URL is mycompany.force.com/partners
, mycompany.force.com
is the subdomain
.
The first part of the path on the site's URL that distinguishes this site from other sites. For example, if your site URL is mycompany.force.com/partners
, partners
is the urlPathPrefix
.
SiteRedirectMapping
SiteRedirectMapping represents a URL redirect rule on your Force.com site. For more information, see “Force.com Sites URL Redirects” in the Salesforce online help.
Field
action
Field Type
SiteRedirect (
of type string)
Description
The type of the redirect. Available string values are:
•
Permanent
317
CustomSite
Metadata Types CustomSite
Field
isActive source target
Field Type
boolean string string
Description
•
Temporary
The status of the redirect: active or inactive.
The URL that you want to redirect. It must be a relative URL, but can have any valid extension type, such as
.html
or
.php
.
The new URL you want users to visit. It can be a relative URL or a fully-qualified URL with an http://
or https://
prefix.
SiteWebAddress
Represents the web address of a Force.com site.
Field
certificate domainName primary
Field Type
string string boolean
Description
Although this field is visible in Metadata API, the version 41.0, it’s not functional and should be left blank.
The domain of the website, in the form of www.acme.com
.
Indicates whether this is the primary domain
(
true)
. If
false
, this is not the primary domain.
Declarative Metadata Sample Definition
A sample XML definition of a site is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomSite xmlns= "http://soap.sforce.com/2006/04/metadata">
<active >true </active >
<allowHomePage >true </allowHomePage >
<allowStandardIdeasPages >true </allowStandardIdeasPages >
<allowStandardLookups >true </allowStandardLookups >
<allowStandardPortalPages >true </allowStandardPortalPages >
<allowStandardSearch >true </allowStandardSearch >
<authorizationRequiredPage >Unauthorized </authorizationRequiredPage >
<bandwidthExceededPage >BandwidthExceeded </bandwidthExceededPage >
<changePasswordPage >ChangePassword </changePasswordPage >
<chatterAnswersForgotPasswordConfirmPage >ChatterAnswersForgotPasswordConfirm </chatterAnswersForgotPasswordConfirmPage >
<chatterAnswersForgotPasswordPage >ChatterAnswersForgotPassword </chatterAnswersForgotPasswordPage >
318
Metadata Types CustomTab
<chatterAnswersHelpPage >ChatterAnswersHelp </chatterAnswersHelpPage >
<chatterAnswersLoginPage >ChatterAnswersLogin </chatterAnswersLoginPage >
<chatterAnswersRegistrationPage >ChatterAnswersRegistration </chatterAnswersRegistrationPage >
<clickjackProtectionLevel >SameOriginOnly </clickjackProtectionLevel >
<customWebAddresses >
<domainName >www.testing123.com
</domainName >
<primary >true </primary >
</customWebAddress >
<favoriteIcon >myFavIcon </favoriteIcon >
<fileNotFoundPage >FileNotFound </fileNotFoundPage >
<genericErrorPage >Exception </genericErrorPage >
<inMaintenancePage >InMaintenance </inMaintenancePage >
<serverIsDown >MyServerDownResource </serverIsDown >
<indexPage >UnderConstruction </indexPage >
<masterLabel >customSite </masterLabel >
<portal >Customer Portal </portal >
<requireInsecurePortalAccess >false </requireInsecurePortalAccess >
<siteAdmin >[email protected]
</siteAdmin >
<siteTemplate >SiteTemplate </siteTemplate >
<subdomain >myco </subdomain >
</CustomSite >
SEE ALSO:
CustomTab
Represents a custom tab. Custom tabs let you display custom object data or other web content in Salesforce. When you add a custom tab to an app in Salesforce Classic, it displays as a tab. When you add a custom tab to an app in Lightning Experience, it displays as an item in the app’s navigation bar. When a tab displays a custom object, the tab name is the same as the custom object name; for page, s-control, or URL tabs, the name is arbitrary. For more information, see “Show Custom Object Data for Your Users” in the Salesforce online help. This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
The file suffix is
.tab
. There is one file for each tab, stored in the tabs
folder in the corresponding package directory.
Note:
Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.
Version
Tabs are available in API version 10.0 and later.
Fields
This metadata type contains the following fields:
319
Metadata Types
Field Name
actionOverrides auraComponent customObject description flexiPage frameHeight
CustomTab
Field Type
[] string boolean string string int
Description
A list of the action overrides that are assigned to the tab. Only one
override is allowed per formFactor
This field is available in API version 37.0 and later.
Indicates whether this tab is for a Lightning component ( true
) or not
( false
). If set to true
, the name of the tab matches the name of the
Lightning component.
Only one of these fields should have a value set:
•
auraComponent
•
customObject
•
flexiPage
•
page
•
scontrol
•
url
Note: auraComponent
is part of the Lightning Components
(Beta) feature.
Indicates whether this tab is for a custom object ( true
) or not ( false
).
If set to true
, the name of the tab matches the name of the custom object.
Only one of these fields should have a value set:
•
auraComponent
•
customObject
•
flexiPage
•
page
•
scontrol
•
url
The optional description text for the tab.
The name of the Lightning page to display in this tab.
Only one of these fields should have a value set:
•
auraComponent
•
customObject
•
flexiPage
•
page
•
scontrol
•
url
The height, in pixels of the tab frame. Required for s-control and page tabs.
320
Metadata Types
Field Name
fullName hasSidebar icon label mobileReady motif page scontrol
Field Type
string boolean string string boolean string string string
CustomTab
Description
The name of the tab. The value of this field depends on the type of tab, and the API version.
•
For custom object tabs, the fullName
is the developer-assigned name of the custom object (MyCustomObject__c, for example). For custom object tabs, this name must be the same as the custom object name, and
true
.
•
For Web tabs, the fullName
is the developer-assigned name of the tab (MyWebTab, for example).
The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
Indicates if the tab displays the sidebar panel.
The optional reference to the image document for the tab if the tab is not using one of the standard tab styles. This is a new field in API version
14.0.
This is the label of the tab, for Web tabs only.
Required. Indicates if the custom tab is available for Mobile Edition
( true
) or not ( false
).
Required. The tab style for the color scheme and icon for the custom tab. For example, “'Custom70: Handsaw,” is the handsaw icon.
The name of the Visualforce page to display in this tab.
Only one of these fields should have a value set:
•
auraComponent
•
customObject
•
flexiPage
•
page
•
scontrol
•
url
The name of the s-control to display in this tab.
Only one of these fields should have a value set:
•
auraComponent
•
customObject
•
flexiPage
•
page
•
scontrol
•
url
321
Metadata Types
Field Name
splashPageLink url urlEncodingKey
CustomValue
Field Type
string string
Encoding
(
type string)
Description
The custom link used as the introductory splash page when users click
the tab. References a HomePageComponent .
The URL for the external web-page to embed in this tab.
Only one of these fields should have a value set:
•
auraComponent
•
customObject
•
flexiPage
•
page
•
scontrol
•
url
The default encoding setting is Unicode:
UTF-8
. Change it if you are passing information to a URL that requires data in a different format. This option is available when the value
URL
is selected in the tab type.
Declarative Metadata Sample Definition
The following is the definition of a tab:
<?xml
version= "1.0" encoding= "UTF-8"?>
<CustomTab xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >Myriad Publishing </description >
<frameHeight >600 </frameHeight >
<mobileReady >true </mobileReady >
<motif >Custom53: Bell </motif >
<url >http://www.myriadpubs.com
</url >
<urlEncodingKey >UTF-8 </urlEncodingKey >
</CustomTab >
SEE ALSO:
CustomValue
Represents the definition of a value used in a global value set or local custom picklist. Custom picklist fields can be local and unique, or can inherit their values from a global picklist (called a global value set in API version 38.0). This type extends the
and inherits its fullName
field.
To deactivate a global picklist value, you can invoke an update()
call on GlobalPicklist (API version 37.0) or GlobalValueSet (API version 38.0 and later) with the value omitted, or with the value’s isActive
field set to false
. Or, you can invoke an update() call directly on GlobalPicklistValue (API version 37.0) or CustomValue (API version 38.0 and later) with the isActive
field set to false
.
Note: If picklist values are missing from a component definition, they get deactivated when deployed. Deactivation occurs for picklist values of both standard and custom fields.
322
Metadata Types CustomValue
CustomValue doesn’t support file-based operations and only supports CRUD-based calls. CustomValue is retrieved or deployed together with a GlobalValueSet or CustomObject component.
File Suffix and Directory Location
CustomValue components have the suffix
.customValue
. A CustomValue component is returned with either a GlobalValueSet or
CustomObject component.
Version
CustomValue components are available in API version 38.0 and later. CustomValue replaces GlobalPicklistValue from API version 37.0.
Fields
Field Name
color
Field Type
string default description isActive label boolean string boolean string
Description
The color assigned to the picklist value when it’s used in charts on reports and dashboards. The color is in hexadecimal format; for example,
#FF6600. If a color is not specified, it’s assigned dynamically upon chart generation.
Required. Indicates whether this value is the default selection for the global picklist and the custom picklists that share its picklist value set.
This field is set to
true
by default.
A picklist value’s description. It’s useful to include a description for a picklist value so the reason for creating it can be tracked. Limit: 255 characters.
Indicates whether this value is currently active or inactive. The default value is
true
. Users can select only active values from a picklist. An API retrieve operation for global picklist values returns all active and inactive values in the picklist. (Meanwhile, retrieving the values of a non-global, unrestricted picklist returns only the active values.)
The value’s display label. If you don’t specify the label when creating a value it defaults to the API name. Available in API version 39.0 and later.
StandardValue
This metadata type defines a value in a value set for a standard picklist and specifies whether this value is the default value. This type extends the CustomValue metadata type and inherits all its fields.
When you deploy changes to standard picklist fields, picklist values are added as needed.
Field Name
allowEmail
Field Type
boolean
Description
Indicates whether this value lets users email a quote PDF ( true
), or not
( false
). This field is only relevant for the
Status
field in quotes. This field is available in API version 18.0 and later.
323
Metadata Types
Field Name
closed converted cssExposed forecastCategory highPriority
CustomValue
Field Type
boolean
Description
Indicates whether this value is associated with a closed status ( true
), or not ( false
). This field is only relevant for the standard
Status field in cases and tasks. This field is available in API version 16.0 and up to version 36.0. In version 37.0, this field is in GlobalPicklistValue.
boolean boolean
Indicates whether this value is associated with a converted status ( true
), or not ( false
). This field is relevant for only the standard
Lead
Status
field in leads. Your organization can set its own guidelines for determining when a lead is qualified, but typically, you want to convert a lead as soon as it becomes a real opportunity that you want to forecast.
For more information, see “Convert Qualified Leads” in the Salesforce online help. This field is available in API version 16.0 and later.
Indicates whether this value is available in your Self-Service Portal ( true
), or not ( false
). This field is only relevant for the standard
Case
Reason
field in cases.
Self-Service provides an online support channel for your customers allowing them to resolve their inquiries without contacting a customer service representative. For more information about Self-Service, see
“Setting Up Your Self-Service Portal” in the Salesforce online help.
Note:
Starting with Spring ’12, the Self-Service portal isn’t available for new orgs. Existing orgs continue to have access to the Self-Service portal.
This field is available in API version 16.0 and later.
ForecastCategories
(
type string)
Indicates whether this value is associated with a forecast category
( true
), or not ( false
). This field is only relevant for the standard
Stage
field in opportunities. For more information about forecast categories, including the valid string values listed below, see “Working with Forecast Categories” in the Salesforce online help.
•
Omitted
•
Pipeline
•
BestCase
•
Forecast
•
Closed
This field is available in API version 16.0 and later.
boolean Indicates whether this value is a high priority item ( true
), or not
( false
). This field is only relevant for the standard
Priority
field in tasks. For more information about tasks, see “Guidelines for Using
Tasks” in the Salesforce online help. This field is available in API version
16.0 and later.
324
Metadata Types Dashboard
Field Name
probability reverseRole reviewed won
Field Type
int string boolean boolean
Description
Indicates whether this value is a probability percentage ( true
), or not
( false
). This field is only relevant for the standard
Stage
field in opportunities. This field is available in API version 16.0 and later.
A picklist value corresponding to a reverse role name for a partner. If the role is “subcontractor”, then the reverse role might be “general contractor”. Assigning a partner role to an account in Salesforce creates a reverse partner relationship so that both accounts list the other as a partner. This field is only relevant for partner roles.
For more information, see “Partner Fields” in the Salesforce online help.
This field is available in API version 18.0 and later.
Indicates whether this value is associated with a reviewed status ( true
), or not ( false
). This field is only relevant for the standard
Status field in solutions. For more information about opportunities, see “Creating
Solutions” in the Salesforce online help. This field is available in API version 16.0 and later.
Indicates whether this value is associated with a closed or won status
( true
), or not ( false
). This field is only relevant for the standard
Stage
field in opportunities. This field is available in API version 16.0
and later.
Declarative Metadata Sample Definition
For an example of CustomValue components within a GlobalValueSet component that’s referenced by a package.xml
, see
.
Dashboard
Represents a dashboard. Dashboards are visual representations of data that allow you to see key metrics and performance at a glance.
This type extends the
Metadata metadata type and inherits its
fullName
field. For more information, see “Edit Dashboards in
Accessibility Mode in Salesforce Classic” in the Salesforce online help.
Declarative Metadata File Suffix and Directory Location
Dashboards are stored in the dashboards
directory of the corresponding package directory. The file name matches the dashboard title and the extension is
.dashboard
.
Retrieving Dashboards
You can’t use the wildcard (*) symbol with dashboards in package.xml
. To retrieve the list of dashboards for populating package.xml
with explicit names, call listMetadata()
and pass in
DashboardFolder
as the type. Note that
DashboardFolder is not returned as a type in describeMetadata()
. Dashboard is returned from describeMetadata()
325
Metadata Types Dashboard with an associated attribute of inFolder
set to true. If that attribute is set to true, you can construct the type by using the component name with the word Folder, such as DashboardFolder.
The following example shows folders in package.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyDBFolder/MyDBName </members >
<name >Dashboard </name >
</types >
<types >
<members >MyDocumentFolder/MyDocumentName </members >
<name >Document </name >
</types >
<types >
<members >unfiled$public/MarketingProductInquiryResponse </members >
<members >unfiled$public/SalesNewCustomerEmail </members >
<name >EmailTemplate </name >
</types >
<types >
<members >MyReportFolder/MyReportName </members >
<name >Report </name >
</types >
<version >41.0
</version >
</Package >
Version
Dashboard components are available in API version 14.0 and later.
Fields
Field
backgroundEndColor
Field Type
string backgroundFadeDirection
ChartBackgroundDirection
of type string)
Description
Required. A dashboard can have a gradient color change on its charts. This field defines the second color for the gradient and
defines the first color. If you
prefer your background to be all one color or do not want a gradient color change, select the same color for this field and
format; for example #FF6600.
Required. The direction of the gradient color change, defined
and
•
diagonal
•
leftToRight
•
topToBottom
326
Metadata Types Dashboard
Field
backgroundStartColor dashboardFilters dashboardGridLayout dashboardType description folderName fullName isGridLayout
Field Type
string
[]
Description
Required. The starting color for the gradient color change on the dashboard's charts. See
more information. The color is in hexadecimal format; for example #FF6600.
The list of filters in a dashboard.
This field is available in API version 23.0 and later.
Lists the included
objects, specifies the number of dashboard columns, and sets each dashboard row’s height in pixels.
This field is available in API version 35.0 and later.
of type string)
Determines the way visibility settings are set for a dashboard.
The valid values are:
•
SpecifiedUser
—All users see data at the access level of one specific running user, specified in the
field, regardless of their own security settings.
•
LoggedInUser
—Each logged-in user sees data according to his or her own access level.
•
MyTeamUser
—Managers can choose to view the dashboard from the point of view of their subordinates in the role hierarchy. This value is available in API version 20.0
and later.
This field is available in API version 19.0 and later.
string string string boolean
Description for the dashboard. Maximum of 255 characters.
Name of the folder that houses the dashboard.
This field is available in API version 35.0 and later.
Inherited from Metadata , this field is not defined in the WSDL
for this metadata type. It must be specified when creating,
updating, or deleting. See create()
to see an example of this field specified for a call.
This field specifies the folder and dashboard title; for example folderSales/California
.
Specifies whether a dashboard uses the Lightning Experience layout ( true
) or not ( false
).
Lightning Experience allows dashboards with more than three columns with components that span multiple columns and multiple rows in size.
This field is available in API version 35.0 and later.
327
Metadata Types Dashboard
Field
leftSection middleSection rightSection runningUser textColor title titleColor titleSize
Field Type
Description
Required. The left section or column of the dashboard.
The middle section or column of the dashboard.
Required. The right section or column of the dashboard.
string The username of the user whose role and sharing settings are used to determine the data shown in the dashboard.
When you deploy a dashboard and the value in this field is not defined or does not correspond to a valid user, the field is populated with the username of the user performing the deployment.
Regardless of their security settings, all users viewing a dashboard see exactly the same data, because dashboards are always run using the security settings of a particular user.
Tip: To avoid inappropriate exposure of sensitive data, save the dashboard to a folder that is visible only to appropriate users.
string string string int
Required. Color of the text on each chart in the dashboard. The color is in hexadecimal format; for example #FF6600.
Required. The dashboard title.
Required. Color of the titles on each dashboard component. The color is in hexadecimal format; for example #FF6600.
Required. Size of characters in title text. For example, a value of
12 indicates 12pt text.
DashboardComponentSection
DashboardComponentSection represents one of the sections or columns in a dashboard.
Field
columnSize components
Field Type
of type string)
[]
Description
Required. The size of the column in the dashboard. See
DashboardComponentSize for details on valid values.
The list of
DashboardComponent objects in the dashboard
column.
DashboardComponentSize
DashboardComponentSize is an enumeration of type string that lists different size categories. The valid values are listed in the table below:
328
Metadata Types Dashboard
Enumeration Value
medium narrow wide
Description
Medium component size.
Smallest component size.
Largest component size.
DashboardComponent
A dashboard consists of a group of different components or elements that display data. Each component can use a custom report or a custom s-control as their data source to display corporate metrics or key performance indicators. You can create several dashboard components and display them all in one dashboard aligned in up to three columns.
Field
chartAxisRange chartAxisRangeMax chartAxisRangeMin chartSummary componentType
(
Field Type Description
ChartRangeType (
of type string)
A manual or automatic axis range for bar or line charts.
The valid values are:
•
auto
•
manual double double
DashboardComponentType
of type string)
The maximum axis range to be displayed. This only applies to bar and line charts in which the manual
axis range
is selected for the chartAxisRange
field.
The minimum axis range to be displayed. This only applies to bar and line charts in which the manual
axis range
is selected for the chartAxisRange
field.
Specifies the summary field for the chart data. Required if isAutoSelectFromReport
is set to false
.
This field is available in API version 25.0 and later.
Required. Dashboard component type. The valid values are:
•
Bar
•
BarGrouped
•
BarStacked
•
BarStacked100
•
Column
•
ColumnGrouped
•
ColumnLine
•
ColumnLineGrouped
•
ColumnLineStacked
•
ColumnLineStacked100
•
ColumnStacked
•
ColumnStacked100
329
Metadata Types Dashboard
Field
dashboardFilterColumns
dashboardTableColumn
[] displayUnits
ChartUnits ( enumeration of type
string) drillDownUrl drillEnabled
Field Type
string boolean
Description
•
Donut
•
Funnel
•
Gauge
•
Line
•
lineCumulative
•
LineGrouped
•
lineGroupedCumulative
•
Metric
•
Pie
•
Scatter
•
ScatterGrouped
•
Scontrol
•
Table
A list of dashboard filter columns. Each report-based component must have a dashboard filter column that defines the column that the filter applies to.
This field is available in API version 23.0 and later.
Represents a list of columns on a customized dashboard table component.
Chart Units. The valid values are:
•
Auto
•
Integer
•
Hundreds
•
Thousands
•
Millions
•
Billions
•
Trillions
For charts, specifies a URL that users go to when they click the dashboard component. Use this option to send users to another dashboard, report, record detail page, or other system that uses a Web interface. This field overrides the
fields.
Specifies whether to take users to the full or filtered source report when they click the dashboard component. Set to false
to drill to the full source report; set to true
to drill to the source report filtered by what they clicked. If
330
Metadata Types
Field Field Type
drillToDetailEnabled boolean enableHover expandOthers boolean boolean footer gaugeMax gaugeMin groupingColumn string double double string header string indicatorBreakpoint1 double indicatorBreakpoint2 double
331
Dashboard
Description
set to true
, users can click individual groups, axis values, or legend entries.
This overrides the
This field is available in API version 17.0 and later.
When enabled, users are taken to the record detail page when they click a record name, record owner, or feed post in a table or chart. When set to true
users can click axis and legend values, chart elements, and table entries. The
fields override this field. This field is available in API version 20.0 and later.
Specifies whether to display values, labels, and percentages when hovering over charts. Hover details depend on chart type. Percentages apply to pie, donut, and funnel charts only. This field is available in API version
17.0 and later.
Specifies whether to combine all groups less than or equal to 3% of the total into a single 'Others' wedge or segment.
This only applies to pie, donut, and funnel charts. Set to true
to show all values individually on the chart; set to false
to combine small groups into 'Others.' This field is available in API version 17.0 and later.
Footer displayed at the bottom of the dashboard component. Maximum of 255 characters.
The maximum value on a gauge. A gauge is used to see how far you are from reaching a goal. It looks like a speedometer in a car.
The minimum value on a gauge.
Specifies the field by which to group data. This data is displayed on the X-axis for vertical column charts and on the Y-axis for horizontal bar charts.
This field is available in API version 25.0 and later.
Header displayed at the top of the dashboard component.
Maximum of 80 characters.
The value that separates the indicatorLowColor from the indicatorMiddleColor
on the dashboard.
The value that separates the
from the
Metadata Types Dashboard
Field
indicatorHighColor indicatorLowColor indicatorMiddleColor legendPosition maxValuesDisplayed metricLabel page pageHeightInPixels report scontrol scontrolHeightInPixels showPercentage showPicturesOnCharts
Field Type
string
Description
The color representing a high number range on the gauge.
string string
The color representing a low number range on the gauge.
The color representing a medium number range on the gauge.
ChartLegendPosition (
of type string)
The location of the legend with respect to the chart. The valid values are:
•
Bottom
•
OnChart
•
Right int string string int string string int boolean boolean
The maximum number of elements to include in the top-level grouping of the horizontal axis of a horizontal chart, vertical axis of a vertical chart, or selected axis of a stacked bar chart. For example, if you want to list only your top five salespeople, create an opportunity report that lists total opportunity amounts by owner and enter
5
in this field.
Descriptive label for the metric. This is relevant if metric
is the value of the componentType
field.
Visualforce page associated with the component.
Display height of the Visualforce page in pixels.
Name of the report associated with the component.
S-control associated with component if scontrol
is
the value of the componentType
field. For more information, see “Defining Custom S-Controls” in the
Salesforce online help.
Display height of the s-control in pixels.
Indicates if percentages are displayed for regions of gauges and wedges and segments of pie, donut, and funnel charts ( true
), or not ( false
).
Display Chatter photos for up to 20 records in a horizontal bar chart component whose source report is grouped by a user or group name field. If there are more than 20 records with photos, record names are shown instead of photos. Set
Grouping Display
to
None
to show photos. Set the
Drill Down to
option to
Record
Detail Page
to take users directly to user profile or group pages when they click photos. Chatter must be enabled for photos to be displayed. Depending on your
332
Metadata Types Dashboard
Field
showTotal showValues sortBy title useReportChart
Field Type
showPicturesOnTables boolean boolean boolean
(
of type string) string boolean
DashboardFilters
DashboardFilters represents a filter in a dashboard.
Field Field Type
dashboardFilterOptions
[] name string
Description
The list of items you can select in the
Filter Options section of the Add Filter dialog.
Required. The filter label.
DashboardFilterColumns
DashboardFilterColumns represents a filter column in a dashboard.
Description
organization's setup, you may not see photos on tables and charts.
Display Chatter photos for up to 20 records in a horizontal bar chart component whose source report is grouped by a user or group name field. If there are more than 20 records with photos, record names are shown instead of photos. Set
Grouping Display
to
None
to show photos. Set the
Drill Down to
option to
Record
Detail Page
to take users directly to user profile or group pages when they click photos. Chatter must be enabled for photos to be displayed. Depending on your organization's setup, you may not see photos on tables and charts.
Indicates if the total of all wedges is displayed for gauges and donut charts ( true
), or not ( false
).
Indicates if the values of individual records or groups are displayed for charts ( true
), or not ( false
).
The sort option for the dashboard component.
The title of the dashboard component. Maximum of 40 characters.
Specifies whether to use the chart defined in the source report on this dashboard component. The chart settings in the source report determine how the chart displays in the dashboard, and any chart settings you define for the dashboard are overridden. If you defined a combination chart in the source report, use this option to use that combination chart on this dashboard.
333
Metadata Types
Field
column
Field Type
string
Description
Required. The report column code for the filter.
Dashboard
DashboardFilterOptions
DashboardFilterOptions represents a filter option in a dashboard.
Field
operator
Field Type
of type string) value values string string[]
Description
Required. Represents the filter operation for this filter item. Valid
values are enumerated in DashboardFilterOperation
. This field is available in API version 24.0 and later.
With API version 23.0, valid values are enumerated in
Required. The value in the
Filter Options
area of the
Add Filter
dialog. This field is available in API version 23.0.
Required. One or more values in the
Filter Options
area of the
Add Filter
dialog. This field is available in API version
24.0 and later.
DashboardFilterOperation
This is an enumeration of type string that lists dashboard filter operations. Valid values are:
•
equals
•
notEqual
•
lessThan
•
greaterThan
•
lessOrEqual
•
greaterOrEqual
•
contains
•
notContain
•
startsWith
•
includes
•
excludes
•
between
Note: The “between” operator takes two operands (for example, “between MinimumValue, MaximumValue”). Note also that the minimum value is inclusive, while the maximum value is exclusive. All other dashboard filter operations take a single operand only.
334
Metadata Types Dashboard
DashboardTableColumn
DashboardTableColumn represents a column in a customized table component in a dashboard.
Field
aggregateType column showTotal sortBy
Field Type
of type string) string boolean
of type string)
Description
Specifies the aggregation type for the table column.
Required. The label of the column to use in the table.
Displays the totals for each summarizable column in the dashboard table. This field is available in API version 19.0 and later.
The sort option for the dashboard table component. Sort on just one column per table.
DashboardComponentFilter
DashboardComponentFilter is an enumeration of type string that lists the sort values for dashboard components. The valid values are:
Enumeration Value
RowLabelAscending
RowLabelDescending
RowValueAscending
RowValueDescending
Description
Sorts in alphabetical order by the label.
Sorts in reverse alphabetical order by the label.
Sorts lowest to highest by the value.
Sorts highest to lowest by the value.
DashboardGridComponent
Lightning Experience features dashboards with more than three columns and components that span multiple columns and multiple rows in size. DashboardGridComponent specifies location and size of a given dashboard component.
Field
colSpan columnIndex dashboardComponent rowIndex
Field Type
int int
int
Description
Required. The width of the dashboard component in columns.
For example, if colSpan
is 5, then the dashboard component spans five columns.
Required. The left-most column that is occupied by the dashboard component.
Required. The dashboard component that is being sized and placed.
Required. The top-most row that is occupied by the dashboard component.
335
Metadata Types
Field
rowSpan
Field Type
int
Description
Required. The height of the dashboard component in rows.
Dashboard
DashboardGridLayout
Lightning Experience features dashboards with more than three columns and components that span multiple columns and multiple rows in size. DashboardGridLayout lists the included dashboard components, specifies the number of dashboard columns, and sets each dashboard row’s height in pixels.
Field Field Type
dashboardGridComponents
numberOfColumns rowHeight int int
Description
List of
objects in the dashboard.
Required. Total number of columns in the dashboard.
Required. Height of each row in pixels.
Declarative Metadata Sample Definition — Filtered Dashboard
A sample XML definition of a filtered dashboard is shown below. Note that this example is supported in API version 24.0 and later. The file name matches the dashboard title and the extension is
.dashboard
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Dashboard xmlns= "http://soap.sforce.com/2006/04/metadata">
<backgroundEndColor >#FFFFFF </backgroundEndColor >
<backgroundFadeDirection >Diagonal </backgroundFadeDirection >
<backgroundStartColor >#FFFFFF </backgroundStartColor >
<dashboardFilters >
<dashboardFilterOptions >
<operator >equals </operator >
<values >Media </values >
</dashboardFilterOptions >
<dashboardFilterOptions >
<operator >lessThan </operator >
<values >Working </values >
</dashboardFilterOptions >
<dashboardFilterOptions >
<operator >between </operator >
<values >ABC </values >
<values >XYZ </values >
</dashboardFilterOptions >
<name >Industry </name >
</dashboardFilters >
<dashboardFilters >
<dashboardFilterOptions >
<operator >equals </operator >
<values >Analyst,Partner </values >
</dashboardFilterOptions >
<dashboardFilterOptions >
<operator >startsWith </operator >
<values >Integrator </values >
336
Metadata Types
</dashboardFilterOptions >
<name >Account Type </name >
</dashboardFilters >
<dashboardType >SpecifiedUser </dashboardType >
<leftSection >
<columnSize >Medium </columnSize >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Bar </componentType >
<dashboardFilterColumns >
<column >INDUSTRY </column >
</dashboardFilterColumns >
<dashboardFilterColumns >
<column >TYPE </column >
</dashboardFilterColumns >
<displayUnits >Auto </displayUnits >
<drillEnabled >false </drillEnabled >
<drillToDetailEnabled >false </drillToDetailEnabled >
<enableHover >false </enableHover >
<expandOthers >false </expandOthers >
<legendPosition >Bottom </legendPosition >
<report >unfiled$public/SampleReportofAccounts </report >
<showPercentage >false </showPercentage >
<showPicturesOnCharts >false </showPicturesOnCharts >
<showValues >false </showValues >
<sortBy >RowLabelAscending </sortBy >
<useReportChart >false </useReportChart >
</components >
</leftSection >
<middleSection >
<columnSize >Medium </columnSize >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Funnel </componentType >
<dashboardFilterColumns >
<column >ACCOUNT_INDUSTRY </column >
</dashboardFilterColumns >
<dashboardFilterColumns >
<column >ACCOUNT.TYPE
</column >
</dashboardFilterColumns >
<displayUnits >Auto </displayUnits >
<drillEnabled >false </drillEnabled >
<drillToDetailEnabled >false </drillToDetailEnabled >
<enableHover >false </enableHover >
<expandOthers >false </expandOthers >
<legendPosition >Bottom </legendPosition >
<report >unfiled$public/SampleReportofCases </report >
<showPercentage >false </showPercentage >
<showValues >true </showValues >
<sortBy >RowLabelAscending </sortBy >
<useReportChart >false </useReportChart >
</components >
</middleSection >
<rightSection >
337
Dashboard
Metadata Types Dashboard
<columnSize >Medium </columnSize >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Column </componentType >
<dashboardFilterColumns >
<column >INDUSTRY </column >
</dashboardFilterColumns >
<dashboardFilterColumns >
<column >ACCOUNT_TYPE </column >
</dashboardFilterColumns >
<displayUnits >Auto </displayUnits >
<drillEnabled >false </drillEnabled >
<drillToDetailEnabled >false </drillToDetailEnabled >
<enableHover >false </enableHover >
<expandOthers >false </expandOthers >
<legendPosition >Bottom </legendPosition >
<report >unfiled$public/SampleReportofOpportunities </report >
<showPercentage >false </showPercentage >
<showValues >false </showValues >
<sortBy >RowLabelAscending </sortBy >
<useReportChart >false </useReportChart >
</components >
</rightSection >
<runningUser >admin@TESTORGNUM </runningUser >
<textColor >#000000 </textColor >
<title >My Dashboard </title >
<titleColor >#000000 </titleColor >
<titleSize >12 </titleSize >
</Dashboard >
Declarative Metadata Sample Definition — Unfiltered Dashboard
A sample XML definition of a dashboard is shown below. The file name matches the dashboard title and the extension is
.dashboard
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Dashboard xmlns= "http://soap.sforce.com/2006/04/metadata">
<backgroundEndColor >#FFFFFF </backgroundEndColor >
<backgroundFadeDirection >LeftToRight </backgroundFadeDirection >
<backgroundStartColor >#FFFFFF </backgroundStartColor >
<description >Dashboard with all possible chart types </description >
<leftSection >
<columnSize >Medium </columnSize >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >BarStacked100 </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<componentType >Table </componentType >
<dashboardTableColumn >
338
Metadata Types
<column >CLOSE_DATE </column >
<sortBy >RowLabelAscending </sortBy >
</dashboardTableColumn >
<dashboardTableColumn >
<aggregateType >Sum </aggregateType >
<column >AMOUNT </column >
<showTotal >true </showTotal >
</dashboardTableColumn >
<dashboardTableColumn >
<column >STAGE_NAME </column >
</dashboardTableColumn >
<dashboardTableColumn >
<column >PROBABILITY </column >
<aggregateType >Maximum </aggregateType >
</dashboardTableColumn >
<displayUnits >Integer </displayUnits >
<header >Opportunities Table </header >
<indicatorHighColor >#54C254 </indicatorHighColor >
<indicatorLowColor >#C25454 </indicatorLowColor >
<indicatorMiddleColor >#C2C254 </indicatorMiddleColor >
<maxValuesDisplayed >10 </maxValuesDisplayed >
<report >testFolder/sourceRep </report >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Bar </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Column </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<legendPosition >Bottom </legendPosition >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
<useReportChart >true </useReportChart >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Funnel </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<expandOthers >true </expandOthers >
<legendPosition >Bottom </legendPosition >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
</leftSection >
339
Dashboard
Metadata Types
<middleSection >
<columnSize >Medium </columnSize >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >ColumnStacked100 </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >ColumnStacked </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >ColumnStacked </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >ColumnGrouped </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Column </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
</middleSection >
<rightSection >
<columnSize >Medium </columnSize >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Bar </componentType >
<displayUnits >Auto </displayUnits >
340
Dashboard
Metadata Types
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Pie </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<expandOthers >true </expandOthers >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >LineGroupedCumulative </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >LineGrouped </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >LineCumulative </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
<components >
<chartAxisRange >Auto </chartAxisRange >
<componentType >Donut </componentType >
<displayUnits >Auto </displayUnits >
<drillEnabled >true </drillEnabled >
<enableHover >true </enableHover >
<expandOthers >true </expandOthers >
<report >testFolder/sourceRep </report >
<sortBy >RowLabelAscending </sortBy >
</components >
</rightSection >
<runningUser >admin@TESTORGNUM </runningUser >
341
Dashboard
Metadata Types Dashboard
<textColor >#000000 </textColor >
<title >Db Title </title >
<titleColor >#000000 </titleColor >
<titleSize >12 </titleSize >
</Dashboard >
Declarative Metadata Sample Definition — Lightning Experience Dashboard with
isGridLayout
Equals
true
A sample XML definition of a Lightning Experience dashboard with isGridLayout
equals true
is shown below. Note that this example is supported in API version 35.0 and later. The file name matches the dashboard title and the extension is
.dashboard
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Dashboard xmlns= "http://soap.sforce.com/2006/04/metadata">
<backgroundEndColor >#FFFFFF </backgroundEndColor >
<backgroundFadeDirection >Diagonal </backgroundFadeDirection >
<backgroundStartColor >#FFFFFF </backgroundStartColor >
<dashboardType >SpecifiedUser </dashboardType >
<gridLayout >
<dashboardGridComponents >
<colSpan >3 </colSpan >
<columnIndex >0 </columnIndex >
<dashboardComponent >
<autoselectColumnsFromReport >false </autoselectColumnsFromReport >
<chartAxisRange >Auto </chartAxisRange >
<chartSummary >
<axisBinding >y </axisBinding >
<column >RowCount </column >
</chartSummary >
<componentType >Donut </componentType >
<drillEnabled >false </drillEnabled >
<drillToDetailEnabled >false </drillToDetailEnabled >
<enableHover >false </enableHover >
<expandOthers >false </expandOthers >
<groupingColumn >TITLE </groupingColumn >
<legendPosition >Bottom </legendPosition >
<report >unfiled$public/lead_rpt </report >
<showPercentage >false </showPercentage >
<showTotal >false </showTotal >
<showValues >true </showValues >
<sortBy >RowLabelAscending </sortBy >
<useReportChart >false </useReportChart >
</dashboardComponent >
<rowIndex >0 </rowIndex >
<rowSpan >3 </rowSpan >
</dashboardGridComponents >
<dashboardGridComponents >
<colSpan >3 </colSpan >
<columnIndex >0 </columnIndex >
<dashboardComponent >
<autoselectColumnsFromReport >false </autoselectColumnsFromReport >
<chartAxisRange >Auto </chartAxisRange >
<chartSummary >
342
Metadata Types
<axisBinding >y </axisBinding >
<column >RowCount </column >
</chartSummary >
<componentType >Pie </componentType >
<drillEnabled >false </drillEnabled >
<drillToDetailEnabled >false </drillToDetailEnabled >
<enableHover >false </enableHover >
<expandOthers >false </expandOthers >
<groupingColumn >TITLE </groupingColumn >
<legendPosition >Bottom </legendPosition >
<report >unfiled$public/lead_rpt </report >
<showPercentage >false </showPercentage >
<showValues >true </showValues >
<sortBy >RowLabelAscending </sortBy >
<useReportChart >false </useReportChart >
</dashboardComponent >
<rowIndex >3 </rowIndex >
<rowSpan >3 </rowSpan >
</dashboardGridComponents >
<dashboardGridComponents >
<colSpan >3 </colSpan >
<columnIndex >0 </columnIndex >
<dashboardComponent >
<autoselectColumnsFromReport >false </autoselectColumnsFromReport >
<chartAxisRange >Auto </chartAxisRange >
<chartSummary >
<axisBinding >y </axisBinding >
<column >RowCount </column >
</chartSummary >
<componentType >Column </componentType >
<drillEnabled >false </drillEnabled >
<drillToDetailEnabled >false </drillToDetailEnabled >
<enableHover >false </enableHover >
<expandOthers >false </expandOthers >
<groupingColumn >TITLE </groupingColumn >
<legendPosition >Bottom </legendPosition >
<report >unfiled$public/lead_rpt </report >
<showPercentage >false </showPercentage >
<showValues >false </showValues >
<sortBy >RowLabelAscending </sortBy >
<useReportChart >false </useReportChart >
</dashboardComponent >
<rowIndex >9 </rowIndex >
<rowSpan >3 </rowSpan >
</dashboardGridComponents >
<numberOfColumns >9 </numberOfColumns >
<rowHeight >90 </rowHeight >
</gridLayout >
<isGridLayout >true </isGridLayout >
<runningUser >[email protected]
</runningUser >
<textColor >#000000 </textColor >
<title >sfx </title >
<titleColor >#000000 </titleColor >
Dashboard
343
Metadata Types DataCategoryGroup
<titleSize >12 </titleSize >
</Dashboard >
SEE ALSO:
DataCategoryGroup
Represents a data category group.
This type extends the
Metadata metadata type and inherits its
fullName
field.
Warning:
Using Metadata API to deploy category changes from one organization to another permanently removes categories and record categorizations that are not specified in your XML file. Salesforce recommends that you manually create data categories and record associations in an organization from Setup by entering
Data Categories
in the
Quick Find
box, then selecting Data Categories rather than deploying changes from a sandbox to a production organization. For more information,
Data category groups are provided to:
•
Classify and filter data.
•
Share data among users.
Every data category group contains items or data categories that can be organized hierarchically.
The example below shows the
Geography
data category group and its data categories.
Geography
Worldwide
North America
United States of America
Canada
Mexico
Europe
Asia
Note: See "Data Categories in Salesforce.com" in the Salesforce online help for more information on data category groups, data categories, parent and sub categories.
File Suffix and Directory Location
The file suffix is
.datacategorygroup
. There is one file for each data category group stored in the datacategorygroups folder in the corresponding package directory.
Version
Data category groups are available in API version 18.0 and later.
344
Metadata Types
Fields
This metadata type contains the following fields:
Field Name
active
Field Type
boolean dataCategory description fullName
string string label objectUsage string
DataCategoryGroup
Description
Required. The status of the category group. Indicates whether this category group is active, ( true
), or not active ( false
).
Required. The top-level category within the data category group.
The description of the data category group.
Required. The unique name of the data category group. When creating a data category group, the fullName
field and the file name (without its suffix) must match.The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
component.
Required. Label that represents the object in Salesforce.
The objects that are associated with the data category group.
DataCategory
Represents an item (or data category) in the data category group. A data category can recursively contain a list of other data categories.
Field Name
dataCategory label name
Field Type
[] string string
Description
A recursive list of sub data categories. For example, a list of countries within a continent. You can create up to 100 categories in a data category group and have up to 5 levels in a data category group hierarchy.
Required. Label for the data category throughout the Salesforce user interface.
Required. The developer name of the data category used as a unique identifier for API access. The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
Important:
The value for this field is defined once and cannot be changed later.
Warning: If you deploy a category group that already exists in an organization, any category that is not defined in the XML file is permanently removed from your organization. For more
.
345
Metadata Types DataCategoryGroup
ObjectUsage
Represents the objects that can be associated with the data category group. This association allows the object to be classified and filtered using the data categories.
Field Name
object
Field Type
string[]
Description
A list of the object names that can be associated with the data category group. Valid values are:
•
KnowledgeArticleVersion
—to associate articles. See
"Modify Default Category Group Assignments for Articles" in the
Salesforce online help for more information on data category groups association to articles.
•
Question
—to associate questions. You can associate the
Question
object with at most one category group. See "Assigning
Data Categories to Answers" in the Salesforce online help for more information on data category groups association to questions.
Warning:
If you deploy a category group that already exists in an organization, any object association that is not defined in the
XML file is permanently removed from your organization. Ensure that your XML file specifies all the records associated with your category group in the organization. For more information see
Declarative Metadata Sample Definition
This sample is the definition of the
Geography
data category group and its data categories:
<?xml
version= "1.0" encoding= "UTF-8"?>
<DataCategoryGroup xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >Geography </label >
<description >Geography structure of service center locations </description >
<fullName >geo </fullName >
<dataCategory > <name >WW </name > <label >Worldwide </label >
<dataCategory > <name >AMER </name > <label >North America </label >
<dataCategory >
<name >USA </name >
<label >United States of America </label >
</dataCategory >
<dataCategory >
<name >CAN </name >
<label >Canada </label >
</dataCategory >
<dataCategory >
<name >MEX </name >
<label >Mexico </label >
</dataCategory >
</dataCategory >
<dataCategory > <name >EMEA </name > <label >Europe, Middle East, Africa </label >
346
Metadata Types DataCategoryGroup
<dataCategory >
<name >FR </name >
<label >France </label >
</dataCategory >
<dataCategory >
<name >SP </name >
<label >Spain </label >
</dataCategory >
<dataCategory >
<name >UK </name >
<label >United-Kingdom </label >
</dataCategory >
</dataCategory >
<dataCategory >
<name >APAC </name >
<label >Asia </label >
</dataCategory >
</dataCategory >
<objectUsage >
<object >KnowledgeArticleVersion </object >
<objectUsage >
</DataCategoryGroup >
Usage
When you deploy a category group XML file, Metadata API checks whether the category group exists in the target organization. If the category group does not exist, it is created. If the category group already exists, then Metadata API:
•
Adds any new category or object defined in the XML file.
•
Deletes any category that is not defined in the XML file. Records associated with the deleted categories are re-associated with the parent category.
•
Deletes any object association that is not defined in the XML file.
•
Moves any category if its hierarchical position differs from the position specified in the XML file.
Note:
When a category moves to a new parent category, users that have no visibility on the new parent category lose their visibility to the repositioned category.
Note: For more information about category deletion, category repositioning and its impact on record categorization and visibility see "Delete a Data Category" and "Modify and Arrange Data Categories" in the Salesforce online help.
Using Metadata API to deploy category changes from one organization to another permanently removes categories and record categorizations that are not specified in your XML file. Salesforce recommends that you manually create data categories and record associations in an organization from Setup by entering
Data Categories
in the
Quick Find
box, then selecting Data
Categories rather than deploying changes from a sandbox to a production organization.
The following example illustrates what happens if you deploy an XML representation of a
Geography
data category group hierarchy to an organization that already has this data category group defined. Note that the organization contains a
US
category, while the XML file includes a
USA
category in the same hierarchical position. The Metadata API deployment process deletes the
US
category from the organization and moves associations for any records from
US
to the parent
AMER
category. It also adds the
USA
category under
AMER
. Note that all records that were previously categorized with
US
are now associated with the
AMER
category.
347
Metadata Types DataCategoryGroup
The next example illustrates what can happen when you delete or move a category in a data category group and deploy its XML representation from a sandbox to a production organization that already has this data category group defined. Hierarchy 1 shows the initial data category group in the sandbox organization. In hierarchy 2, we add an
EU
category under
EMEA
and move
FR
,
SP
and
UK
below
EU
. In hierarchy 3, we delete
FR
and associate its records with its new parent,
EU
. Finally, we deploy the changes from the sandbox to the production organization.
348
Metadata Types DelegateGroup
Metadata API has no concept of the order of the changes made to the sandbox organization. It just deploys the changes from one organization to another. During the deployment, it first notices the deletion of the
FR
category and removes it from the production organization. Consequently, it moves associations for any records from
FR
to its parent on the production organization,
EMEA
. Metadata
API then adds the
EU
category and moves
SP
and
UK
below it. Although the category group hierarchy looks the same in both organizations, record categorization in production is different from the sandbox organization. The records that were originally associated with
FR
in hierarchy 1 are associated with
EU
in the sandbox organization, but are associated with
EMEA
in the production organization.
DelegateGroup
Represents a group of users who have the same administrative privileges. These groups are different from public groups used for sharing.
This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
DelegateGroup components have the suffix
.delegateGroup
and are stored in the delegateGroups
folder. The file prefix must match the developer name of the delegate group. For example, a delegate group with a developer name of MyDelegateGroup would have a file name of
MyDelegateGroup.delegateGroup
.
Version
DelegateGroup components are available in API version 36.0 and later.
Special Access Rules
Only users with the “View Setup and Configuration” permission can be delegated administrators.
349
Metadata Types
Fields
Field Name
customObjects
DelegateGroup groups label loginAccess permissionSets profiles roles
Field Type
string[] string[] string boolean string[] string[] string[]
Description
The custom objects associated with the group. Delegated administrators can customize nearly every aspect of each of those custom objects, including creating a custom tab. However, they cannot create or modify relationships on the objects or set organization-wide sharing defaults.
Delegated administrators must have access to custom objects to access the merge fields on those objects from formulas.
The groups with users assigned by delegated administrators.
Required. The delegated group’s non-API name.
Required. Allows users in this group to log in as users in the role hierarchy that they administer ( true
) or not ( false
). Depending on your organization settings, individual users must grant login access to allow their administrators to log in as them.
The permission sets assignable to users in specified roles and all subordinate roles by delegated administrators.
The profiles assignable to users by delegated administrators.
The roles and subordinates for which delegated administrators of the group can create and edit users.
Declarative Metadata Sample Definition
The following is an example of a DelegateGroup component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<DelegateGroup xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >MyDelegateGroup </label >
<loginAccess >true </loginAccess >
<name >MyDelegateGroup </name >
<profiles >Chatter Free User </profiles >
<profiles >Chatter Moderator User </profiles >
<profiles >Marketing User </profiles >
<permissionSets >My Permset </permissionSets >
<roles >LesserBossMan </roles >
</DelegateGroup >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >DelegateGroup </name >
</types >
<version >41.0
</version >
</Package >
350
Metadata Types Document
Document
Represents a Document. All documents must be in a document folder, for example sampleFolder/TestDocument
. This type extends the
MetadataWithContent metadata type and inherits its
content
and fullName
fields.
Currently, users are not able to export document metadata to a local file system using the Force.com IDE.
Retrieving Documents
You can’t use the wildcard (*) symbol with documents in package.xml
. To retrieve the list of documents for populating package.xml
with explicit names, call listMetadata()
and pass in
DocumentFolder
as the type. Note that DocumentFolder is not returned as a type in describeMetadata()
. Document is returned from describeMetadata()
with an associated attribute of inFolder
set to true. If that attribute is set to true, you can construct the type by using the component name with the word Folder, such as DocumentFolder.
The following example shows folders in package.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyDBFolder/MyDBName </members >
<name >Dashboard </name >
</types >
<types >
<members >MyDocumentFolder/MyDocumentName </members >
<name >Document </name >
</types >
<types >
<members >unfiled$public/MarketingProductInquiryResponse </members >
<members >unfiled$public/SalesNewCustomerEmail </members >
<name >EmailTemplate </name >
</types >
<types >
<members >MyReportFolder/MyReportName </members >
<name >Report </name >
</types >
<version >41.0
</version >
</Package >
For each document an accompanying metadata file named
DocumentFilename-meta.xml
is created in the document folder.
For example, for a document
TestDocument.png
in the sampleFolder folder, there’s a
TestDocument.png-meta.xml
in the documents/sampleFolder
of the package.
Version
Documents are available in API version 10.0 and later.
In API version 17.0 and later, you can delete a folder containing documents moved to the Recycle Bin. When you delete the folder, any related documents in the Recycle Bin are permanently deleted.
In API version 18.0 and later, documents do not need an extension.
351
Metadata Types
Fields
This metadata type contains the following fields:
Field Name
content
Field Type
base64 description fullName internalUseOnly keywords name public string string boolean string string boolean
Document
Description
Content of the document. Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled for you by a SOAP client. This field is inherited from the
component.
A description of the document. Enter a description to distinguish this document from others.
The name of the document, including the folder name. In version 17.0
and earlier, the fullName
included the document extension. In version
18.0 and later, the fullName
does not include the file extension. The fullName
can contain only underscores and alphanumeric characters.
It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. If this field contained characters before version 14.0 that are no longer allowed, the characters were stripped out of this field, and the previous value of the
field. This field is inherited from the Metadata
component.
Required. Indicates whether the document is confidential ( true
) or not
( false
are mutually exclusive; you cannot
set both to true
.
Contains one or more words that describe the document. A check for matches to words in this field is performed when doing a search.
The list of characters allowed in the
field has been reduced for versions 14.0 and later. This field contains the value contained in the
field before version 14.0. This field is only populated if the value of the fullName
field contained characters that are no longer
accepted in that field.
Required. Indicates whether the document is an image available for
HTML email templates and does not require a Salesforce username and password to view in an email ( true
) or not ( false
). If the images will be used as a custom app logo or custom tab icon, both of which require a Salesforce username and password to view, set this field to false
.
This field and internalUseOnly
are mutually exclusive; you cannot set both to true
.
352
Metadata Types DuplicateRule
Declarative Metadata Sample Definition
The following is the definition of a document:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Document xmlns= "http://soap.sforce.com/2006/04/metadata">
<internalUseOnly >false </internalUseOnly >
<name >Q2 Campaign Analysis </name >
<public >false </public >
<description >Analyze Q2 campaign effectiveness </description >
</Document >
SEE ALSO:
DuplicateRule
metadata type and inherits its fullName
field.
File Suffix and Directory Location
DuplicateRule components have the
.duplicateRule
suffix and are stored in the duplicateRules/
directory. The name of the component file is based on the name of the object associated with the rule. For example, the component file name duplicateRules/Account.Standard_Account_Duplicate_Rule.duplicateRule
describes a duplicate rule component associated with the Account object.
Version
DuplicateRule components are available in API version 41.0 and later.
Fields
Field Name
actionOnInsert
Field Type
DupeActionType
(
type string)
Description
Required. Determines what the duplicate rule does when users or the
DuplicateRule API try to insert a record that is a duplicate. Valid values are:
Allow
For users, if operationsOnInsert
is set to alert
, the UI displays the value of alertText
in a dialog. The dialog prompts users to continue or cancel. If the user chooses to continue, the insertion proceeds. If the user chooses to cancel, the record isn’t inserted.
353
Metadata Types
Field Name
actionOnUpdate alertText description duplicateRuleFilter
DuplicateRule
Field Type Description
The DuplicateRule API returns an error code and a message. To complete the insertion, the code must set the allowSave
field in DuplicateRuleHeader to true
and reissue the request.
If operationsOnInsert isn’t set to alert
, the UI inserts the record without issuing an alert. The API inserts the record and doesn’t return an error code.
Block
For users, the UI displays an error message and prevents them from inserting the new record. The DuplicateRule API returns an error and doesn’t insert the record.
(
DupeActionType
type string) string
Required. Determines what the duplicate rule does when users or the
DuplicateRule API try to update a record, and the result is a duplicate.
Valid values are:
Allow
For users, if operationsOnUpdate
is set to alert
, the UI displays the value of alertText
in a dialog. The dialog prompts users to continue or cancel. If the user chooses to continue, the update proceeds. If the user chooses to cancel, the record isn’t updated.
The DuplicateRule API returns a message. To complete the update, the code must set the allowSave
field in DuplicateRuleHeader to true
and reissue the request.
If operationsOnUpdate isn’t set to alert
, the UI updates the record without issuing an alert. The API updates the record and doesn’t return an error code.
Block
For users, the UI displays an error message and prevents them from continuing. The DuplicateRule API returns an error.
Text that’s sent when the duplicate rule is triggered. The text is only sent if isActive
is true
. In the UI, the text displays as a message. The
DuplicateRule API returns the message in its response.
You can set a value for alertText
only when you have actionOnInsert
or actionOnUpdate
(or both) set to
Allow
.
Otherwise, you receive a validation error when you add or update this component.
string Required. Text that describes the duplicate rule. The value is customer-supplied, but is not visible in the UI.
Required. Criteria that define how to find records to consider when looking for duplicates. For example, use duplicateRuleFilter to exclude records from the match when looking for duplicates.
354
Metadata Types DuplicateRule
Field Name
duplicateRuleMatchRules isActive masterLabel operationsOnInsert
Field Type Description
[]
Required. One or more MatchingRule components for the DuplicateRule.
A
MatchingRule
controls what constitutes a match between records.
boolean Required. If true
, the DuplicateRule detects duplicate records.
Otherwise, the rule has no effect.
string string[]
Required. Master label for this DuplicateRule. This value is the internal label for the rule.
Required. Controls the action to take when actionOnInsert
is set to
Allow
and the duplicate rule is triggered. Either one or both of these values can be set in the array:
alert
If set, the action specified in actionOnInsert
occurs; otherwise, the insert proceeds.
report
If set, the insert operation is added to the report of duplicates.
operationsOnUpdate securityOption sortOrder string[] Required. Controls the action to take when actionOnUpdate
is set to
Allow
and the duplicate rule is triggered. Either one or both of these values can be set in the array:
alert
If set, the action specified in actionOnUpdate
occurs; otherwise, the update proceeds.
report
If set, the update operation is added to the report of duplicates.
DupeSecurityOptionType
(
type string)
Required. Determines how record sharing rules affect duplicate management. Valid values are:
EnforceSharingRules
Sharing rules affect duplicate management. If a duplicate rule is triggered because an insert or update duplicates an existing record, but the running user doesn’t have sharing access to that record, the insert or update proceeds. The sharing rule doesn’t prevent the user from creating or updating the record because the record is hidden from the user. No message is issued.
BypassSharingRules
Sharing rules don’t affect duplicate management. If a duplicate rule is triggered because an insert or update duplicates an existing record, sharing rules are ignored, but other access restrictions apply.
int Required. Determines the order in which duplicate rules are applied.
DuplicateRuleMatchRule
Describes the MatchingRule associated with the
DuplicateRule
. The
MatchingRule
identifies duplicate records.
355
Metadata Types DuplicateRule
Field Name
matchRuleSObjectType matchingRule objectMapping
Field Type
string string
Description
Required. The name of the target object of the matching rule. For example, if you define a duplicate rule for Contact records, and you want to match with Lead records, the value of matchRuleSObjectType is Lead.
Required. Value that corresponds to the value of developerName
for this duplicate rule.
Required. Foreign key to an
ObjectMapping that maps fields from the
duplicate rule’s object to fields in the target object specified by matchRuleSObjectType
.
DuplicateRuleFilter
Specifies filter criteria for a DuplicateRule. Salesforce only applies the DuplicateRule if the record matches the criteria.
Field Name
booleanFilter
Field Type
string
Description
Required. A string of boolean operators that establishes the filter logic for the filter items specified in duplicateRuleFilterItems
.
duplicateRuleFilterItems
Required. A list of
DuplicateRuleFilterItem components.
DuplicateRuleFilterItem
This type extends the
FilterItem type and inherits all its fields.
Field Name
sortOrder table
Field Type
int string
Description
Required. The order of this item in the duplicate rule filter.
Required. The object that has the field specified in the field
field of
for the definition of field
.
ObjectMapping
Represents a map of fields in the input object of the DuplicateRule to fields in the output object of DuplicateRule. The input object is the object associated with the DuplicateRule. The output object can be the same object or a different object with similar fields.
For example, you can have a DuplicateRule that looks for duplicates between the Contact object and the Lead object. In this case, the input object is Contact, and the output object is Lead.
Field Name
inputObject
Field Type
string
Description
Required. The input object for the duplicate rule. The DuplicateRule is associated with this object. For example, if you define a duplicate rule
356
Metadata Types DuplicateRule
Field Name
mappingFields outputObject
Field Type Description
for Contact records, and you want to match with Lead records, the value of inputObject
is Contact.
[] Required. The mapping of source object fields to target object fields for the duplicate rule.
string Required. The output object for the duplicate rule. This value is the same as the value of the matchRuleSObjectType
field in
. Any duplicate rules that this object has are ignored when the DuplicateRule API uses the ObjectMapping.
ObjectMappingField
A field name in the input object of the DuplicateRule, and the corresponding field name in the output object.
Field Name
inputField outputField
Field Type
string string
Description
Required. Field in the object specified by the inputObject
field in
ObjectMapping . This field is mapped to the field in
outputField
, which is assumed to be a field in the object specified by the outputObject
Required. Field in the object specified by the outputObject
field
. The field is mapped to the field name in inputField
, which is assumed to be a field in the object specified by the inputObject
in
.
Declarative Metadata Sample Definition
The following is an example of a DuplicateRule component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<DuplicateRule xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance">
<actionOnInsert >Allow </actionOnInsert >
<actionOnUpdate >Allow </actionOnUpdate >
<alertText >You are creating a duplicate record. Use an existing record instead.
</alertText >
<description >Detects a contact that duplicates a Lead </description >
<duplicateRuleFilter >
<booleanFilter xsi:nil= "true"/>
<duplicateRuleFilterItems >
<field >Username </field >
<operation >equals </operation >
<value >[email protected]
</value >
<sortOrder >1 </sortOrder >
<table >User </table >
</duplicateRuleFilterItems >
</duplicateRuleFilter >
357
Metadata Types EclairGeoData
<duplicateRuleMatchRules >
<matchRuleSObjectType >Lead </matchRuleSObjectType >
<matchingRule >ContactToLeadDuplicate_matching_rule </matchingRule >
<objectMapping >
<inputObject >Contact </inputObject >
<mappingFields >
<inputField >FirstName </inputField >
<outputField >FirstName </outputField >
</mappingFields >
<mappingFields >
<inputField >LastName </inputField >
<outputField >LastName </outputField >
</mappingFields >
<outputObject >Lead </outputObject >
</objectMapping >
</duplicateRuleMatchRules >
<isActive >true </isActive >
<masterLabel >ContactToLeadDuplicate </masterLabel >
<operationsOnInsert >Alert </operationsOnInsert >
<operationsOnInsert >Report </operationsOnInsert >
<operationsOnUpdate >Alert </operationsOnUpdate >
<operationsOnUpdate >Report </operationsOnUpdate >
<securityOption >EnforceSharingRules </securityOption >
<sortOrder >1 </sortOrder >
</DuplicateRule >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >ContactToLeadDuplicate </members >
<name >DuplicateRule </name >
</types >
<version >38.0
</version >
</Package >
EclairGeoData
Represents a Wave custom map chart. Custom maps are user-defined maps that are uploaded to Wave and are used just as standard maps are. Custom maps are accessed in Wave from the list of maps available with the map chart type.
File Suffix and Directory Location
EclairGeoData components have the suffix geodata
and are stored in the eclair
folder.
Version
EclairGeoData components are available in API version 39.0 and later.
358
Metadata Types
Fields
Field Name
maps masterLabel
EclairMap
Field Name
boundingBoxBottom boundingBoxLeft boundingBoxRight
Field Type
double double double boundingBoxTop mapLabel double string mapName projection string string
EclairGeoData
Field Type
string
Description
A list of EclairMap objects. Each EclairMap object specifies the bounding box (if any) and the map name that appears in the user interface.
Required. Master label for this object. This display value is the internal label that is not translated.
Description
When bounding-box coordinates are used, this contains the bottom coordinate.
When bounding-box coordinates are used, this contains the left side coordinate.
When bounding-box coordinates are used, this contains the right side coordinate.
When bounding-box coordinates are used, this contains the top coordinate.
Required. The user-interface name of the map. This name appears in the maps list for the map chart in Wave.
Required. Label for this object. This display value is the internal label that is not translated.
Required. The type of map projection used to create the map. Valid values are:
•
Equirectangular
•
Mercator
•
AlbersUSA
Declarative Metadata Sample Definition
The following is an example of an EclairGeoData component:
<EclairGeoData xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance">
<content xsi:nil= "true"/>
<maps >
<boundingBoxBottom >0.0
</boundingBoxBottom >
<boundingBoxLeft >100.0
</boundingBoxLeft >
<boundingBoxRight >100.0
</boundingBoxRight >
<boundingBoxTop >0.0
</boundingBoxTop >
<mapLabel >WorldMap0 Label </mapLabel >
<mapName >WorldMap0 </mapName >
<projection >Equirectangular </projection >
359
Metadata Types
</maps >
<maps >
<boundingBoxBottom >1.0
</boundingBoxBottom >
<boundingBoxLeft >101.0
</boundingBoxLeft >
<boundingBoxRight >101.0
</boundingBoxRight >
<boundingBoxTop >1.0
</boundingBoxTop >
<mapLabel >WorldMap1 Label </mapLabel >
<mapName >WorldMap1 </mapName >
<projection >Mercator </projection >
</maps >
<masterLabel >WorldMapGeoDataToCreate Label </masterLabel >
</EclairGeoData >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >EclairGeoData </name >
</types >
<version >39.0
</version >
</Package >
EmailTemplate
EmailTemplate
Represents an email template. This type extends the
metadata type and inherits its content
and fullName fields.
File Suffix and Directory Location
The file suffix is
for the template file. The accompanying metadata file is named
EmailTemplateName-meta.xml
.
EmailTemplate components are stored in the email
folder in the corresponding package directory. For example, for an email template named SampleTemplate in the sampleFolder folder, there’s a
SampleTemplate-meta.xml
in the email/sampleFolder of the package.
Retrieving Email Templates
You can’t use the wildcard (*) symbol with email templates in package.xml
. To retrieve the list of email templates for populating package.xml
with explicit names, call listMetadata()
and pass in
EmailTemplate
as the type.
The following example shows folders in package.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyDBFolder/MyDBName </members >
<name >Dashboard </name >
360
Metadata Types EmailTemplate
</types >
<types >
<members >MyDocumentFolder/MyDocumentName </members >
<name >Document </name >
</types >
<types >
<members >unfiled$public/MarketingProductInquiryResponse </members >
<members >unfiled$public/SalesNewCustomerEmail </members >
<name >EmailTemplate </name >
</types >
<types >
<members >MyReportFolder/MyReportName </members >
<name >Report </name >
</types >
<version >41.0
</version >
</Package >
Version
Email templates are available in API version 12.0 and later.
Fields
This metadata type contains the following fields:
Field Name
apiVersion
Field Type
double attachedDocuments string[] attachments available content
[] boolean base64Binary
Description
The API version if this is a Visualforce email template. Every Visualforce email template has an API version specified at creation. This field is available in API version 16.0 and later.
A list of references to documents in your organization. These documents are included as attachments in the email template. Each document is referenced by its path, for example
MyFolder/MyDocument.txt
.
A list of attachments for the email template.
Required. Indicates whether this template is offered to users when sending an email ( true
) or not ( false
).
Content of the email template. Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64.
Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled for you by a SOAP client. This field contains:
•
Binary content of the email body if
is set to text
•
is set to html
•
custom
•
Visualforce body if
visualforce
This field is inherited from the MetadataWithContent
component.
361
Metadata Types EmailTemplate
Field Name
description encodingKey fullName letterhead name packageVersions
Field Type
string
of type string)
Description
The email template description. This can be useful to describe the reason for creating the template.
Required. The default encoding setting is Unicode:
UTF-8
. Change it if your template requires data in a different format.
Valid values include:
•
UTF-8
—Unicode (UTF-8)
•
ISO-8859-1
—General US & Western Europe (ISO-8859–1, ISO-LATIN-1)
•
Shift_JIS
—Japanese (Shift-JIS)
•
ISO-2022-JP
—Japanese (JIS)
•
EUC-JP
—Japanese (EUC-JP)
•
x-SJIS_0213
—Japanese (Shift-JIS_2004)
•
ks_c_5601-1987
—Korean (ks_c_5601-1987)
•
Big5
—Traditional Chinese (Big5)
•
GB2312
—Simplified Chinese (GB2312)
•
Big5-HKSCS
—Traditional Chinese Hong Kong (Big5–HKSCS) string string string
[]
The email template developer name used as a unique identifier for API access.
The fullName
can contain only underscores and alphanumeric characters.
It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. If this field contained characters before version 14.0 that are no longer allowed, the characters were stripped out of this field, and the previous value of the field was saved in the
field. This field is inherited from the Metadata
component.
The letterhead name associated with this email template. Only available when
html
.
Required. Email template name. The list of characters allowed in the fullName
field has been reduced for versions 14.0 and later. This field contains the value contained in the
field before version 14.0.
The list of package versions for any managed packages containing components that are referenced by this email template. This field is only relevant for Visualforce email templates.
For more information about managed packages, see the Force.com Quick
Reference for Developing Packages . For more information about package versions, see “About Package Versions” in the Salesforce online help. This field is available in API version 16.0 and later.
relatedEntityType
Object Name
(
of type string)
Required to create, package, or move Lightning Experience Email Templates.
When
UIType
is SFX (Lightning Experience) or SFX_Sample (Lightning
Experience Sample),
RelatedEntityType
indicates which entities this template can be used with.
362
Metadata Types
Field Name
style subject textOnly type
UiType
EmailTemplate
(
Field Type
EmailTemplateStyle
string) string string
of type
EmailTemplateType
(
of type string)
EmailTemplateUiType
(
of type string)
Description
RelatedEntityType
can be a custom object name. Other valid values are the entity API name: "Account" for account, "Contact" for contact, "Opportunity" for opportunity, "Lead" for lead, and so on. The value can be any entity the user has read access to (including custom entities) but not virtual entities, setup entities, or platform entities.
Required. The style of the template. This field is only available when
is set to html
.
Valid style values include:
•
none
•
freeForm
•
formalLetter
•
promotionRight
•
promotionLeft
•
newsletter
•
products
The email subject.
The text of the email body if type
is set to html
or custom
.
Required. The email template type.
The valid values are:
•
text
-all users can create or change text email templates.
•
html
- administrators and users with the “Edit HTML Templates” permission can create HTML email templates based on a letterhead.
•
custom
- administrators and users with the “Edit HTML Templates” permission can create custom HTML email templates without using a letterhead. You must either know HTML or obtain the HTML code to insert in your email template.
•
visualforce
- administrators and users with the “Customize Application” permission can create email templates using Visualforce.
Indicates the user interface where this template is usable. Valid values are:
•
Aloha (Salesforce Classic)
•
SFX (Lightning Experience)
•
SFX_Sample (Lightning Experience Sample)
If
UiType
is SFX, type
must be custom
.
363
Metadata Types EmailTemplate
Example:
<EmailTemplate >
<available >true </available >
<description >Notification that user has been added to a community.
</description >
<encodingKey >UTF-8 </encodingKey >
<name >Communities: New Member Welcome Email </name >
<style >none </style >
<subject >Welcome to {!Community_Name} </subject >
<type >custom </type >
<uiType >SFX </uiType >
<relatedEntityType >Contact </relatedEntityType >
</EmailTemplate >
Attachment
Attachment represents an email attachment.
Field
content
Field Type
base64Binary name string
Description
Required. The attachment content. Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled for you by a SOAP client.
Required. The attachment file name.
Declarative Metadata Sample Definition
A sample XML definition of an email template is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<EmailTemplate xmlns= "http://soap.sforce.com/2006/04/metadata">
<available >true </available >
<description >Sample Email Template </description >
<encodingKey >ISO-8859-1 </encodingKey >
<name >Sample Email Template </name >
<style >none </style >
<subject >Sample email subject </subject >
<textOnly >Your case has been resolved.
</textOnly >
<type >custom </type >
</EmailTemplate >
SEE ALSO:
364
Metadata Types EntitlementProcess
EntitlementProcess
Represents the settings for an entitlement process. This type extends the Metadata
metadata type and inherits its fullName
field.
File Suffix and Directory Location
Entitlement process values are stored in files in the entitlementProcesses
directory. Each file has the name of a process and the suffix
.entitlementProcess
. Each file contains one entitlement process or, if entitlement versioning is enabled, one version of an entitlement process. The name of the file is the name of the entitlement process with the version appended to the end, if applicable
(for example, an entitlement process named ”gold_support” might have the file name “gold_support_v2.entitlementProcess”). This file name corresponds to the slaProcess.NameNorm
field exposed through the SOAP API. This file name is distinct from the name field, which represents what displays in the user interface and, if versioning is enabled, might be shared among multiple versions of the same entitlement process.
Version
Entitlement processes are available in API version 27.0 and later.
Fields
Field Name
active
Field Type
boolean businessHours description entryStartDateField string string string exitCriteriaBooleanFilter string exitCriteriaFilterItems
Description
Indicates whether the entitlement process is active
( true
) or not ( false
).
The business hours that apply to the entitlement process.
This field is available in API version 30.0 and later.
The description of the entitlement process.
For milestone processes on which a case enters the process based on a custom date/time field on the case, specifies which date and time are used. Valid values are:
•
SlaStartDate (entitlement process start date)
•
CreatedDate (date case was opened)
•
ClosedDate (date case was closed)
•
LastModifiedDate (date case was last modified)
•
StopStartDate (date case was stopped)
For milestone processes on which a case exits the process when custom criteria are met, and for which filter logic is added, specifies that logic.
For milestone processes on which a case exits the process when custom criteria are met, specifies those criteria.
365
Metadata Types EntitlementProcess
Field Name
exitCriteriaFormula isVersionDefault milestones name
SObjectType versionMaster versionNotes versionNumber
Field Type
string boolean
EntitlementProcessMilestoneItem
[] string string string string int
Description
For milestone processes on which a case exits the process when a custom formula evaluates to true, specifies that formula.
Indicates whether the entitlement process is the default version ( true
) or not ( false
).
This field is available in API version 28.0 and later.
Represents a milestone on the entitlement process.
The name of the entitlement process as it displays in the user interface.
Indicates the type of record that the entitlement process can run on.
Identifies the sequence of versions to which this entitlement process belongs. This field’s contents can be any value as long as it is identical among all versions of the entitlement process.
This field is available in API version 28.0 and later.
The description of the entitlement process version.
This field is available in API version 28.0 and later.
The version number of the entitlement process. Must be
1 or greater.
This field is available in API version 28.0 and later.
EntitlementProcessMilestoneItem
Represents a milestone item on an entitlement process.
Fields
Field Name
businessHours
Field Type
string criteriaBooleanFilter string milestoneCriteriaFilterItems
Description
The business hours that apply to the milestone.
This field is available in API version 30.0 and later.
For milestones that apply only when criteria are met and for which filter logic is added, specifies that logic.
For milestones that apply only when criteria are met, specifies those criteria.
366
Metadata Types EntitlementProcess
Field Name
milestoneCriteriaFormula milestoneName minutesCustomClass minutesToComplete successActions timeTriggers useCriteriaStartTime
Field Type
string string string
Description
For milestones that apply only when a formula evaluates to true, specifies that formula.
The name of the milestone.
The name of the Apex class that is used to calculate the trigger time. This field is available in API version
30.0 and later.
int The number of minutes from when the case enters the entitlement process that the milestone occurs.
The actions triggered when the milestone is completed.
[]
EntitlementProcessMilestoneTimeTrigger []
The time triggers on an entitlement process milestone.
boolean When the milestone starts: when the milestone criteria are met (true) or when the case enters the entitlement process (false).
EntitlementProcessMilestoneTimeTrigger
Represents the time trigger on an entitlement process milestone.
Fields
Field Name
actions timeLength
Field Type Description
The actions to take when the time trigger is reached, if, at that time, the milestone is not completed.
int The length of time between the time trigger activation and the milestone target completion date. This may be a negative or positive value. Negative values indicate that the target completion date has not yet arrived and correspond to warning time triggers. Positive values indicate that the target completion date has passed and correspond to violation time triggers.
workflowTimeTriggerUnit
MilestoneTimeUnits
(
of type string)
Specifies the type of unit used to determine when a workflow should be triggered. Valid values are:
•
Minutes
•
Hours
•
Days
367
Metadata Types
Declarative Metadata Sample Definition
This is a sample entitlement process.
<?xml
version= "1.0" encoding= "UTF-8"?>
<EntitlementProcess xmlns= "http://soap.sforce.com/2006/04/metadata">
<active >true </active >
<description >eppersone </description >
<entryStartDateField >SlaStartDate </entryStartDateField >
<exitCriteriaBooleanFilter >1 OR 2 </exitCriteriaBooleanFilter >
<exitCriteriaFilterItems >
<field >Case.IsClosed
</field >
<operation >equals </operation >
<value >true </value >
</exitCriteriaFilterItems >
<exitCriteriaFilterItems >
<field >Case.Description
</field >
<operation >startsWith </operation >
<value >foo </value >
</exitCriteriaFilterItems >
<milestones >
<milestoneName >m1 </milestoneName >
<minutesToComplete >1 </minutesToComplete >
<successActions >
<name >emailBob </name >
<type >Alert </type >
</successActions >
<timeTriggers >
<actions >
<name >emailAlice </name >
<type >Alert </type >
</actions >
<actions >
<name >setEscalateToTrue </name >
<type >FieldUpdate </type >
</actions >
<timeLength >1 </timeLength >
<workflowTimeTriggerUnit >Minutes </workflowTimeTriggerUnit >
</timeTriggers >
<timeTriggers >
<actions >
<name >setStopToTrue </name >
<type >FieldUpdate </type >
</actions >
<timeLength >2 </timeLength >
<workflowTimeTriggerUnit >Minutes </workflowTimeTriggerUnit >
</timeTriggers >
<useCriteriaStartTime >false </useCriteriaStartTime >
</milestones >
<milestones >
<milestoneCriteriaFilterItems >
<field >Case.Priority
</field >
<operation >equals </operation >
<value >High </value >
</milestoneCriteriaFilterItems >
368
EntitlementProcess
Metadata Types EntitlementTemplate
<milestoneName >m2 </milestoneName >
<minutesToComplete >120 </minutesToComplete >
<useCriteriaStartTime >true </useCriteriaStartTime >
<successActions >
<name >emailBob </name >
<type >Alert </type >
</successActions >
</milestones >
</EntitlementProcess >
EntitlementTemplate
Represents an entitlement template. Entitlement templates are predefined terms of customer support that you can quickly add to products. For example, you can create entitlement templates for Web or phone support so that users can easily add entitlements to products offered to customers. EntitlementTemplate extends the
metadata type and inherits its fullName
field.
Declarative Metadata File Suffix and Directory Location
EntitlementTemplate components are stored in the entitlementTemplates
directory of the corresponding package directory.
The file name matches the unique name of the entitlement template, and the extension is
.entitlementTemplate
.
Version
Force.com EntitlementTemplate components are available in API version 18.0 and higher.
Fields
Field
businessHours casesPerEntitlement entitlementProcess isPerIncident term type
Field Type
string int string boolean int string
Description
The entitlement's supported business hours.
Lets you limit the number of cases the entitlement supports.
The entitlement process associated with the entitlement.
true
if entitlements created from this template service a limited number of cases; false
otherwise.
The number of days the entitlement is in effect.
The type of entitlement, such as Web or phone support.
Declarative Metadata Sample Definition
A sample XML definition of an entitlement template is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<EntitlementTemplate xmlns= "http://soap.sforce.com/2006/04/metadata">
<businessHours >AlternateBusinessHours </businessHours >
369
Metadata Types EscalationRules
<casesPerEntitlement >12 </casesPerEntitlement >
<entitlementProcess >Process1 </entitlementProcess >
<isPerIncident >true </isPerIncident >
<term >33 </term >
<type >Phone Support </type >
</EntitlementTemplate >
EscalationRules
Represents case escalation rules to escalate cases automatically if they are not resolved within a certain period of time. You can access rules metadata for all applicable objects, for a specific object, or for a specific rule on a specific object. The package.xml
syntax for accessing all escalation rules for all objects is:
<types>
<members>*</members>
<name>EscalationRules</name>
</types>
All rules for a specific object uses a similar syntax without the wildcard. For example, all escalation rules for the Case object would use this syntax:
<types>
<members>Case</members>
<name>EscalationRules</name>
</types>
You can also access specific escalation rules for an object. The following example only accesses the “samplerule” and “newrule” escalation rules on the Case object. Notice that for this example the type name syntax is
EscalationRule
and not
EscalationRules
.
<types>
<members>Case.samplerule</members>
<members>Case.newrule</members>
<name>EscalationRule</name>
</types>
File Suffix and Directory Location
EscalationRules for an object have the suffix
.escalationRules
and are stored in the escalationRules
folder. For example, all Case escalation rules are stored in the
Case.escalationRules
file.
Version
EscalationRules components are available in API version 27.0 and later.
370
Metadata Types
Fields
Field Name
escalationRule
EscalationRules
Field Type
Description
Represents one escalation rule and specifies whether it is active or not. Escalation rules are processed in the order they appear in the
EscalationRules container.
EscalationRule
Field Name
active fullname ruleEntry
Field Type
boolean string
Description
Indicates whether the escalation rule is active ( true
) or not ( false
).
Inherited from Metadata , this field is not defined in the
WSDL for this metadata type. It must be specified when
creating, updating, or deleting. See create()
example of this field specified for a call.
This value cannot be null
.
Contains the definitions of the rule entries in the escalation rule.
RuleEntry
Represents the fields used by the rule.
Field Name
booleanFilter businessHours businessHoursSource
Field Type
string
Description
Advanced filter conditions that were specified for the rule.
string The hours at which escalation actions are performed. Specify only if businessHoursSource
is set to
Static
.
BusinessHoursSourceType
(
of type string)
Valid values are:
•
None
•
Case
•
Static criteriaItems
The items in the list that define the assignment criteria.
disableEscalationWhenModified escalationAction boolean Indicates whether the escalation is disabled when the record is modified true
) or not ( false
).
on page 372
The actions to perform when the escalation criteria are met.
371
Metadata Types
Field Name
escalationStartTime formula
EscalationRules
Field Type Description
EscalationStartTimeType
(
of type string)
Indicates the start time for the escalation. Valid values are:
•
CaseCreation
•
CaseLastModified string The validation formula.
Note:
Specify either formula
or criteriaItems
, but not both fields.
EscalationAction
Describes the action to take for an escalation rule.
Field Name
assignedTo assignedToTemplate assignedToType minutesToEscalation notifyCaseOwner notifyEmail notifyTo notifyToTemplate
Field Type
string
Description
The name of the user or queue the item is assigned to.
string Specifies the template to use for the email that is automatically sent to the new owner specified by the escalation rule.
AssignToLookupValueType
(
of type string)
Valid values are:
•
User
•
Queue int boolean string string string
The number of minutes until the escalation occurs.
Indicates that the owner of the case is notified when the case is escalated true
) or not ( false
).
Specifies the email address of the user to notify.
Specifies the user to notify.
Specifies the template to user for the notification email.
Declarative Metadata Sample Definition
The following is an example EscalationRules component:
<EscalationRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<escalationRule >
<fullName >samplerule </fullName >
<active >false </active >
<ruleEntry >
<businessHours >test </businessHours >
<businessHoursSource >Static </businessHoursSource >
<criteriaItems >
<field >Case.Description
</field >
372
Metadata Types EventDelivery
<operation >contains </operation >
<value >test </value >
</criteriaItems >
<escalationAction >
<assignedTo >[email protected]
</assignedTo >
<assignedToTemplate >emailtemplatename </assignedToTemplate >
<assignedToType >User </assignedToType >
<minutesToEscalation >1440 </minutesToEscalation >
<notifyCaseOwner >false </notifyCaseOwner >
</escalationAction >
<escalationStartTime >CaseLastModified </escalationStartTime >
</ruleEntry >
</escalationRule >
</EscalationRules >
EventDelivery
Represents how an event instance maps to a target payload. This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
Event delivery components have the suffix file path
.delivery
, and are stored in the eventDeliveries
folder.
Version
Event delivery components are available in API version 41.0 and later.
Limits
Your org can have a maximum of 2500 EventDelivery object instances.
Fields
Field Name Field Type Description
eventParameters
An array of parameters to deliver in addition to the published event’s data.
eventSubscription referenceData type string string
Required. The ID of the subscription to deliver the data to.
User-defined non-unique identifier.
EventDeliveryType
string)
Required. Determines what action occurs when the event is delivered to the listeners on behalf of the subscribers.
Valid values are:
•
StartFlow
—When the event occurs, it’s delivered to a flow of type CustomEvent.
Those flows are built through Process Builder.
•
ResumeFlow
—Reserved for future use.
373
Metadata Types EventSubscription
EventParameterMap
Parameters to deliver in addition to the published event’s data.
If type
is
StartFlow
, you must include a parameter where parameterName
is
FlowVersionName
and parameterValue is the name of the flow that you want to start. The flow name must include its version number. For example, myFlow-3
.
Each event delivery can have up to 10 parameters.
Field Name Field Type
parameterName string parameterValue string
Description
The parameter name.
The parameter value.
Declarative Metadata Sample Definition
The following is an example of an event delivery file.
<?xml version="1.0" encoding="UTF-8"?>
<EventDelivery xmlns="http://soap.sforce.com/2006/04/metadata">
<eventParameters>
<parameterName>FlowVersionName</parameterName>
<parameterValue>My_Event_Based_Process-1</parameterValue>
</eventParameters>
<eventSubscription>MySubscription</eventSubscription>
<referenceData>My_Event_Based_Process_1</referenceData>
<type>StartFlow</type>
</EventDelivery>
The following is an example package.xml
that deploys or retrieves all the available event delivery metadata in your org.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >EventDelivery </members >
<name >* </name >
</types >
</Package >
EventSubscription
Represents a subscription to an event type. This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
EventSubscription components have the suffix file path
.subscription
, and are stored in the eventSubscriptions
folder.
Version
Event subscription components are available in API version 41.0 and later.
374
Metadata Types EventSubscription
Limits
Your org can have a maximum of:
•
500 total event subscriptions
•
50 active event subscriptions
Fields
Field Name
active
Field Type
boolean
Description
If the subscription isn’t active, it never receives any events.
eventParameters
An array of parameters that must be true for published events.
eventType string Required. The name of the platform event.
referenceData string Required. If the subscriber is a flow of type CustomEvent, referenceData
is
flowName_versionNumber
. For example,
Printer_Management_2
.
EventParameterMap
An array of parameters that must be true for published events. For example, subscribe to Vendor Response events only if
Status__c is
Shipped
.
Each event subscription can have up to 10 parameters.
Field Name Field Type
parameterName string parameterValue string
Description
Required. The published event’s field name.
The value that must be true.
Declarative Metadata Sample Definition
The following is an example of an active event subscription.
<?xml
version= "1.0" encoding= "UTF-8"?>
<EventSubscription xmlns= "http://soap.sforce.com/2006/04/metadata">
<active >true </active >
<eventType >Printer_Status__e </eventType >
<referenceData >Printer_Management </referenceData >
</EventSubscription >
The following is an example of an inactive event subscription that sets event parameters.
<?xml version="1.0" encoding="UTF-8"?>
<EventSubscription xmlns="http://soap.sforce.com/2006/04/metadata">
<name>MySubscription</name>
<active>false</active>
<eventParameters>
<parameterName>Ink_Status__c</parameterName>
375
Metadata Types ExternalDataSource
<parameterValue>low</parameterValue>
</eventParameters>
<eventParameters>
<parameterName>Serial_Number__c</parameterName>
<parameterValue>00123456789</parameterValue>
</eventParameters>
<eventType>Printer_Status__e</eventType>
<referenceData>My_Event_Based_Process_1</referenceData>
</EventSubscription>
The following is an example package.xml
that deploys or retrieves all the available event subscription metadata in your org.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >EventSubscription </members >
<name >* </name >
</types >
ExternalDataSource
Represents the metadata associated with an external data source. Create external data sources to manage connection details for integration with data and content that are stored outside your Salesforce org.
This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
ExternalDataSource components are stored in the dataSources
directory of the corresponding package directory. ExternalDataSource components have the suffix
.dataSource
, and the prefix is the name of the external data source.
Version
ExternalDataSource components are available in API version 28.0 and later.
Fields
Field Name
authProvider
Field Type
string certificate customConfiguration string string
Description
The authentication provider that is represented by the AuthProvider component.
If you specify a certificate, your Salesforce org supplies it when establishing each two-way SSL connection with the external system.
The certificate is used for digital signatures, which verify that requests are coming from your Salesforce org.
A string of configuration parameters that are specific to the external data source’s type
.
•
customConfiguration for Salesforce Connect—Cross-Org Adapter
376
Metadata Types
Field Name
endpoint isWritable label oauthRefreshToken oauthScope oauthToken password principalType
ExternalDataSource
Field Type
string
Description
•
customConfiguration for Salesforce Connect—OData 2.0 or 4.0
•
customConfiguration for Salesforce Connect—Custom Adapter
The URL of the external system, or if that URL is defined in a named credential, the named credential URL. Corresponds to
URL
in the user interface.
A named credential URL contains the scheme callout:
, the name of the named credential, and an optional path. For example: callout:My_Named_Credential/some_path
.
You can append a query string to a named credential URL. Use a question mark (?) as the separator between the named credential URL and the query string. For example: callout:My_Named_Credential/some_path?format=json
.
boolean string
Lets the Force.com platform and users in this org create, update, and delete records for external objects associated with the external data source. The external object data is stored outside the org. By default, external objects are read only. Corresponds to
Writable External
Objects
in the user interface.
Available in API version 35.0 and later. However, with the cross-org adapter for Salesforce Connect, you can set this field to true
only in
API version 39.0 and later.
A user-friendly name for the external data source. The label is displayed in the Salesforce user interface, such as in list views.
Examples include Acme Team Marketing Site, or Acme SharePoint.
string string
The OAuth refresh token. Used to obtain a new access token for an end user when a token expires.
Specifies the scope of permissions to request for the access token.
Corresponds to
Scope
in the user interface.
The access token issued by the external system.
string string The password to be used by your org to access the external system.
Ensure that the credentials you use have adequate privileges to access the external system, perform searches, return data, and return information about the external system’s metadata.
External
PrincipalType
(
type string)
Determines whether you're using one set or multiple sets of credentials to access the external system. Corresponds to
Identity Type
in the user interface. The valid values are:
•
Anonymous
•
PerUser
377
Metadata Types
Field Name
protocol repository type username version
ExternalDataSource
Field Type
Authentication
Protocol
(
type string)
The authentication protocol that’s required to access the external system.
The valid values are:
•
NoAuthentication
•
Oauth
•
Password
For cloud-based Files Connect external systems, select Oauth 2.0. For on-premises systems, select Password Authentication.
For Simple URL data sources, select No Authentication.
string Used for SharePoint Online. If metadata is not accessible, use this field to create tables and default table fields.
ExternalData
SourceType
(
type string)
For Salesforce Connect, specifies the adapter that connects to the external system. The valid values are:
•
OData
—OData 2.0 adapter
•
OData4
—OData 4.0 adapter
•
SfdcOrg
—cross-org adapter
•
ApexClassId
—
DataSource.Provider
class that defines the custom adapter created via the Apex Connector Framework
For Files Connect, specifies the data source type. The valid values are:
•
ContentHubSharepoint
—SharePoint 2010 or 2013
•
ContentHubSharepointOffice365
—SharePoint Online
•
ContentHubSharepointOneDrive
—OneDrive for Business
•
ContentHubGDrive
—Google Drive
If Chatter is enabled, you can also specify
SimpleURL
to access data hosted on a web server that doesn’t require authentication.
•
outgoingemail
—A data source used for sending an email through a quick action.
The
Identity
and
Wrapper
types are reserved for future use.
For the federated search external data source type, the valid value is
OpenSearch
.
string string
Description
•
NamedUser
The username to be used by your org to access the external system.
Ensure that the credentials you use have adequate privileges to access the external system, perform searches, return data, and return information about the external system’s metadata.
Reserved for future use.
378
Metadata Types ExternalDataSource
customConfiguration
for Salesforce Connect—Cross-Org Adapter
The following sample JSON-encoded configuration string defines parameters that apply when the external data source’s type
is set to
SfdcOrg
.
{"apiVersion":"32.0","environment":"CUSTOM",
"searchEnabled":"true","timeout":"120"}
The parameters correspond to these fields in the user interface:
•
apiVersion
—
API Version
•
environment
—
Connect to
•
searchEnabled
—
Enable Search
•
timeout
—
Connection Timeout
customConfiguration
for Salesforce Connect—OData 2.0 or 4.0 Adapter
The following JSON-encoded configuration string defines parameters that apply when the external data source’s type
is set to
OData or
OData4
.
{"inlineCountEnabled":"true","csrfTokenName":"X-CSRF-Token",
"requestCompression":"false","pagination":"CLIENT",
"noIdMapping":"false","format":"ATOM",
"searchFunc":"","compatibility":"DEFAULT",
"csrfTokenEnabled":"true","timeout":"120",
"searchEnabled":"true"}
The parameters correspond to these fields in the user interface.
•
compatibility
—
Special Compatibility
•
csrfTokenEnabled
—
CSRF Protection
•
csrfTokenName
—
Anti-CSRF Token Name
•
format
—
Format
•
inlineCountEnabled
—
Request Row Counts
•
noIdMapping
—
High Data Volume
•
pagination
—
Server Driven Pagination
•
requestCompression
—
Compress Requests
•
searchEnabled
—
Enable Search
•
searchFunc
—
Custom Query Option for Salesforce Search
•
timeout
—
Connection Timeout
customConfiguration
for Salesforce Connect—Custom Adapter
The following sample JSON-encoded configuration string defines the parameter that applies when the external data source’s type
is set to the ID of a
DataSource.Provider
class.
{"noIdMapping":"false"}
The noIdMapping
parameter corresponds to the
High Data Volume
field in the user interface.
379
Metadata Types ExternalServiceRegistration
Declarative Metadata Sample Definition
The following is the definition of an external data source for Salesforce Connect—OData 2.0 or 4.0 adapter.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ExternalDataSource xmlns= "http://soap.sforce.com/2006/04/metadata">
<authProvider >FacebookAuth </authProvider >
<customConfiguration >{"compatibility":"DEFAULT",
"noIdMapping":"false","inlineCountEnabled":"true",
"searchEnabled":"true","format":"ATOM",
"requestCompression":"false","pagination":"SERVER",
"timeout":"120"} </customConfiguration >
<endpoint >http://myappname.herokuapp.com/DataHub.svc
</endpoint >
<label >DataHub </label >
<principalType >NamedUser </principalType >
<protocol >Oauth </protocol >
<type >OData </type >
</ExternalDataSource >
ExternalServiceRegistration
Represents the External Service configuration for an org. This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
ExternalServiceRegistration components have the suffix
.externalServiceRegistration
and are stored in the externalServiceRegistrations
folder.
Version
ExternalServiceRegistration components are available as a Beta release in API version 39.0.
Note: This release contains a beta version of External Services, which means it’s a high-quality feature with known limitations.
This feature isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for External
Services in the IdeaExchange Platform Integration group in the Success Community.
Fields
Field Name
description label namedCredential
Field Type
string string string
Description
Required. The external service description defined when the service is created.
The service name as it appears on the External Services wizard.
Required. The reference of the named credential to be used for the service.
380
Metadata Types FlexiPage
Field Name
schema schemaType schemaUrl status
Field Type
string string string string
Description
Required. The content of the JSON schema in the Interagent format.
Nillable.
Required. ID format of the schema, which is InteragentHyperSchema.
Nillable.
Required. The schema URL defined when registering a service. The path should begin with “/” and be a relative path.
Indicates whether the service registration is finished (complete) or not
(incomplete).
Declarative Metadata Sample Definition
The following is an example of an ExternalServiceRegistration component that references an external credit service.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ExternalServicesRegistration xmlns= "http://soap.sforce.com/2016/11/metadata">
<label >creditService </label >
<namedCredential >AcmeCreditService </namedCredential >
<schema >/schema </schema >
<schemaType >InteragentHyperSchema </schemaType >
<schemaUrl >http://interagent.github.io/interagent-hyper-schema </schemaUrl >
<status >complete </status >
</ExternalServicesRegistration >
FlexiPage
Represents the metadata associated with a Lightning page. A Lightning page represents a customizable screen made up of regions containing Lightning components.
Note: A Lightning page region can contain up to 25 components.
This type extends the
Metadata metadata type and inherits its
fullName
field.
Note: These pages are known as FlexiPages in the API, but are referred to as Lightning pages in the rest of the Salesforce documentation and UI.
Lightning pages are used in several places.
•
In Salesforce1, a Lightning page is the home page for an app that appears in the navigation menu.
•
In Lightning Experience, Lightning pages can be used as the home page for an app, to customize the layout of record pages and the Home page, and as the utility bar for a Lightning app.
For more information on Lightning pages, see the Salesforce Help.
File Suffix and Directory Location
FlexiPage components have the suffix
.flexipage
and are stored in the flexipages
folder.
381
Metadata Types FlexiPage
Version
FlexiPage components are available in API version 29.0 and later.
Fields
Field Name
description flexiPageRegions masterLabel pageTemplate parentFlexiPage platformActionList quickActionList sobjectType template type
Field Type
string
string string string
Description
The optional description text of the Lightning page.
Required. The list of regions of a page.
Required. The label for the Lightning page, which displays in
Setup.
Deprecated. Use this field in API versions 33.0 to 38.0 only. In later versions, use template
.
Required. The template associated with the Lightning page.
The name of the Lightning page that this page inherits behavior from.
This field is available in API version 37.0 or later.
The list of all actions, and their order, that display on the
Lightning page. In Salesforce1, the actions appear in the action bar.
This field is available in API version 34.0 and later.
string
The list of quick actions associated with the Lightning page.
The object the Lightning page is associated with. For Lightning pages of type
AppPage
or
HomePage
, this field is null
.
After the value of this field is set, it can’t be changed.
This field is available in API version 37.0 or later.
Required. The template associated with the Lightning page.
This field is available in API version 39.0 and later.
FlexiPageType (
of type string)
Required. The type of a page. In API versions 32.0 through 36.0, this field can only have a value of
AppPage
.
Valid values are:
•
AppPage
—A Lightning page that is used as the home page for a custom app.
•
CommAppPage
—A Lightning page that is used to represent a custom page, as created in the Community
Builder, in Communities. This value is available in API version 37.0 and later.
382
Metadata Types
Field Name Field Type
383
FlexiPage
Description
•
CommForgotPasswordPage
—A Lightning page that’s used to override a forgot-password page, as created in Community Builder, in Communities. This value is available in API version 39.0 and later.
•
CommLoginPage
—A Lightning page that’s used to override the login page, as created in Community Builder, in Communities. This value is available in API version 39.0
and later.
•
CommObjectPage
—A Lightning page used to override an object page, as created in Community Builder, in
Communities. This value is available in API version 38.0
and later.
•
CommQuickActionCreatePage
—A Lightning page used to override the create record page, as created in Community Builder, in Communities. This value is available in API version 38.0 and later.
•
CommRecordPage
—A Lightning page used to override a record page, as created in the Community Builder, in
Communities. This value is available in API version 38.0
and later.
•
CommRelatedListPage
—A Lightning page used to override a related list page, as created in the Community
Builder, in Communities. This value is available in API version 38.0 and later.
•
CommSearchResultPage
—A Lightning page used to override the search result page, as created in
Community Builder, in Communities. This value is available in API version 38.0 and later.
•
CommSelfRegisterPage
—A Lightning page used to override the self-registration page, as created in
Community Builder, in Communities. This value is available in API version 39.0 and later.
•
CommThemeLayoutPage
—A Lightning page used to override a theme layout page, as created in the
Community Builder, in Communities. This value is available in API version 38.0 and later.
•
HomePage
—A Lightning page that is used to override the Home page in Lightning Experience. This value is available in API version 37.0 and later.
•
MailAppAppPage
—An email application pane used to override the default layout for Lightning for Outlook.
This value is available in API version 38.0 and later.
•
RecordPage
—A Lightning page used to override an object record page in Lightning Experience. This value is available in API version 37.0 and later.
Metadata Types
Field Name Field Type
FlexiPage
Description
•
UtilityBar
—A Lightning page used as the utility bar in Lightning Experience apps. This value is available in API version 38.0 and later.
This field is available in API version 32.0 and later.
FlexiPageRegion
FlexiPage Region represents the properties of a region of a page. A region can contain a record list component or a recent items component that can be scoped to a set of entities.
Field Name
appendable componentInstances mode name prependable replaceable
Field Type
RegionFlagStatus
of type string)
Description
This field is reserved for future use.
Valid values are:
•
disabled
•
enabled
This field is available in API version 35.0 or later.
[]
FlexiPageRegionMode
of type string)
Properties and name of the component instance.
This field is reserved for future use.
Valid values are:
•
Append
•
Prepend
•
Replace
This field is available in API version 35.0 or later.
string
RegionFlagStatus
of type string)
Required. Unique name of the FlexiPage region.
This field is reserved for future use.
Valid values are:
•
disabled
•
enabled
This field is available in API version 35.0 or later.
RegionFlagStatus
of type string)
This field is reserved for future use.
Valid values are:
•
disabled
•
enabled
This field is available in API version 35.0 or later.
384
Metadata Types
Field Name
type
Field Type
FlexiPageRegionType
of type string)
Description
Required. The type of FlexiPage region.
Valid values are:
•
Facet
•
Region
This field is available in API version 35.0 or later.
FlexiPage
ComponentInstance
Instance of a component in a page, such as a filter list.
Field Name Field Type
componentInstanceProperties
componentName visibilityRule string
Description
The value of a single property in a component instance.
A component instance can have no properties.
Required. The name of a single instance of a component.
A set of one or more filters that define the conditions under which the component displays on the page.
If the rule evaluates to true
, the component displays on the page. If false
, it doesn't display. If this field is null
, the component displays by default.
This field is available in API version 41.0 and later.
ComponentInstanceProperty
Value of a single property in a component instance.
Field Name
name type
Field Type
string
Description
Name of the property, unique within the component instance.
For Lightning components, this value is the
<aura:attribute>
as defined in the
.cmp
file.
ComponentInstancePropertyTypeEnum
(
of type string)
If this field value is null
, then the
ComponentInstanceProperty values apply to the Lightning component. If this field value is decorator
, then the
ComponentInstanceProperty values apply to the component
decorator for the Lightning component.
The component decorator is a wrapper around a Lightning component. The decorator can apply more capabilities to the component when it renders on a specific page in Lightning
Experience. For example, you can configure a component
385
Metadata Types
Field Name
value
Field Type
string
FlexiPage
Description
decorator around a component on the Lightning Experience utility bar to set the component’s height or width when opened. The
UtilityBar
is the only page type that supports component decorators.
Valid values are:
•
decorator
This field is available in API version 38.0 or later.
Reference or value of the property.
When defining a Related List component, to use a parent record set the parentFieldApiName
value to
object.field_name
. If you don’t want to use a parent record, set the value to
object.Id
.
When you give a standard label to a tab in a Tabs component—such as Activity, Collaborate, or Details—and when the name
field is set to title
, the value
field uses a system-defined value instead of the label. Here are some examples of the system-defined values:
•
Standard.Tab.activity
•
Standard.Tab.collaborate
•
Standard.Tab.detail
•
Standard.Tab.feed
•
Standard.Tab.preview
•
Standard.Tab.relatedLists
For example, let’s say you have a Lightning page that contains a tab with the standard label “Activity”. If you query the definition that page, you see the system-defined name of the tab, not the label, in value
.
<componentInstances>
<componentInstanceProperties>
<name>title</name>
<value>Standard.Tab.activity</value>
</componentInstanceProperties>
<componentName>flexipage:tab</componentName>
</componentInstances>
FlexiPageTemplateInstance
FlexiPageTemplateInstance represents an instance of a Lightning page template.
Field Name
name properties
Field Type
string
Description
Required. The name of a single instance of a template.
The value of a single property in a template instance.
Valid only for
CommThemeLayoutPage
. Contains a name and value pair for each theme layout property
386
Metadata Types
Field Name Field Type
FlexiPage
Description
associated with the page template. In Community
Builder, the theme layout and its properties appear in the Theme area.
PlatformActionList
PlatformActionList represents the list of actions, and their order, that display on the Lightning page. Available in API version 34.0 and later.
Field Name
actionListContext
Field Type Description
PlatformActionListContext
(
type string)
Required. The context of the action list. Valid values are:
•
Assistant
•
BannerPhoto
•
Chatter
•
Dockable
•
FeedElement
•
FlexiPage
•
Global
•
ListView
•
ListViewDefinition
•
ListViewRecord
•
Lookup
•
MruList
•
MruRow
•
ObjectHomeChart
•
Photo
•
Record
•
RecordEdit
•
RelatedList
•
RelatedListRecord platformActionListItems relatedSourceEntity
The actions in the PlatformActionList.
string When the
ActionListContext
is RelatedList or RelatedListRecord, this field represents the API name of the related list to which the action belongs.
PlatformActionListItem
PlatformActionListItem represents an action in the PlatformActionList. Available in API version 34.0 and later.
387
Metadata Types FlexiPage
Field Name
actionName actionType sortOrder subtype
Field Type
string
Description
The API name for the action in the list.
PlatformActionType
string)
The type of action. Valid values are:
•
ActionLink web page, or a file, represented by a button in the Salesforce Chatter feed
UI.
—An indicator on a feed element that targets an API, a
•
CustomButton
—When clicked, opens a URL or a Visualforce page in a window or executes JavaScript.
•
InvocableAction
•
ProductivityAction
—Productivity actions are predefined by
Salesforce and are attached to a limited set of objects. You can’t edit or delete productivity actions.
•
QuickAction
—A global or object-specific action.
•
StandardButton
—A predefined Salesforce button such as New, Edit, and Delete.
int string
The placement of the action in the list.
The subtype of the action. For quick actions, the subtype is
QuickActionType
. For custom buttons, the subtype is
WebLinkTypeEnum
. For action links, subtypes are
Api
,
ApiAsync
,
Download
, and
Ui
. Standard buttons and productivity actions have no subtype.
UiFormulaRule
A set of one or more filters that define the conditions under which a component displays on a Lightning page. For example, you could construct a filter that causes a rich text component on an opportunity page to display only when the Amount is greater than $1,000,000.
Available in API version 41.0 and later.
Field Name
booleanFilter criteria
Field Type
string
Description
Specifies advanced filter conditions.
List of one or more filters that, when evaluated, determine component visibility.
UiFormulaCriterion
A single filter that when evaluated, helps define component visibility on a Lightning page. Available in API version 41.0 and later.
Field Name
leftValue
Field Type
string
Description
Required. The field upon which the filter should be based. For example,
AMOUNT
.
388
Metadata Types
Field Name
operator rightValue
Field Type
string string
Description
Required. Defines the operator used to filter the data.
Valid values are:
•
contains
•
equals
•
notEqual
•
greaterThan
•
greaterOrEqual
•
lessOrEqual
•
lessThan
The value by which you want to evaluate the component’s visibility. For example,
1000000
.
Declarative Metadata Sample Definition
Here’s a sample XML FlexiPage component definition for a travel app that tracks the user’s trips, expense reports, and other relevant data:
<?xml
version= "1.0" encoding= "UTF-8"?>
<FlexiPage xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >Page to view recent trips </description >
<flexiPageRegions >
<componentInstances >
<componentInstanceProperties >
<name >entityName </name >
<value >Trips__c </value >
</componentInstanceProperties >
<componentInstanceProperties >
<name >filterName </name >
<value >My_Trips </value >
</componentInstanceProperties >
<componentName >flexipage:filterListCard </componentName >
</componentInstances >
<componentInstances >
<componentInstanceProperties >
<name >entityName </name >
<value >Expense_Report__c </value >
</componentInstanceProperties >
<componentInstanceProperties >
<name >filterName </name >
<value >My_Reports </value >
</componentInstanceProperties >
<componentName >flexipage:filterListCard </componentName >
</componentInstances >
<componentInstances >
<componentInstanceProperties >
<name >entityNames </name >
<value >["User","Trips__c","Expense__c","Receipt__c"] </value >
FlexiPage
389
Metadata Types
</componentInstanceProperties >
<componentName >flexipage:recentItems </componentName >
</componentInstances >
<name >main </name >
</flexiPageRegions >
<masterLabel >My Travel, Inc.
</masterLabel >
<quickActionList >
<quickActionListItems >
<quickActionName >customAction1 </quickActionName >
</quickActionListItems >
<quickActionListItems >
<quickActionName >customAction2 </quickActionName >
</quickActionListItems >
</quickActionList >
<type >AppPage </type >
</FlexiPage >
And, here’s the sample package.xml
file that references the FlexiPage component definition:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<fullName >Travel, Inc.
</fullName >
<types >
<members >TravelIncFlexiPage </members >
<name >CustomTab </name >
</types >
<types >
<members >TravelIncFlexiPage </members >
<name >FlexiPage </name >
</types >
<types >
<members >TravelIncQuickActions </members >
<name >QuickAction </name >
</types >
<version >29.0
</version >
</Package >
Flow
Represents the metadata associated with a flow. With Flow, you can create an application that navigates users through a series of screens to query and update records in the database. You can also execute logic and provide branching capability based on user input to build dynamic applications. For information about the corresponding UI-based flow building tool, see “Cloud Flow Designer” in the Salesforce
Help.
When using the file-based Metadata API to work with flows, consider that:
•
You can’t use Metadata API to access a flow installed from a managed package.
•
Flow filenames shouldn’t contain spaces, which can cause errors at deployment. Heading and trailing spaces are allowed, but are trimmed during deployment.
•
You can’t overwrite an active flow or one that was once active when deploying a flow using Metadata API.
•
You can create a new version of a flow by giving the file a new version number and deploying it.
Flow
390
Metadata Types
Warning: Don't edit the metadata of retrieved Process Builder processes (Flow components whose processType is Workflow or
InvocableProcess.) If you deploy process metadata that you've edited, you might not be able to open the process in the target org.
Declarative Metadata File Suffix and Directory Location
Flows are stored in the
Flow
directory of the corresponding package directory. The file name matches the flow’s unique full name, and the extension is
.flow
.
Version
The flow Metadata API is available in API version 24.0 and later.
Flow
This metadata type represents a valid definition of a flow. This type extends the
Metadata metadata type and inherits its
fullName field.
Field Name
actionCalls apexPluginCalls assignments choices constants decisions description dynamicChoiceSets formulas fullName
Field Type
[]
[]
[]
[]
[]
string
[]
[] string
Description
An array of nodes that define calls to actions. This field is available in API version 31.0 and later.
An array of nodes that define calls to Apex plug-ins.
An array of assignment nodes.
An array of static choice options.
An array of constants.
An array of decision nodes.
Description of the flow.
An array that constructs a set of choice options based on a database lookup.
An array of formulas.
Required; inherited from the Metadata component. Name of the file in Metadata API.
The fullName
consists of two parts, separated by a hyphen:
•
Unique name for the flow that contains only underscores and alphanumeric characters. It must be unique across the organization, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
•
Version number for the flow.
For example, “sampleFlow-3” specifies version 3 of the flow whose unique name is sampleFlow.
Flow
391
Metadata Types
Field Name Field Type
recordCreates recordDeletes recordLookups recordUpdates screens startElementReference
[]
[]
[]
string
Description
The version number must be 1 or higher.
interviewLabel label loops processMetadataValues processType string string
Label for the interview. This label helps users and administrators differentiate interviews from the same flow.
In the user interface, this label appears in the Paused Flow
Interviews component on the user’s Home tab and in the Paused and Waiting Interviews list on the flow management page.
Required. Label for the flow.
An array of nodes for iterating through collections. This field is available in API version 30.0 and later.
Metadata values for the flow.
This field is available in API version 31.0 and later.
FlowProcessType (enumeration of type string)
The type of the flow, as determined by the active version (or latest version, if there’s no active version). Valid values are:
•
AutoLaunchedFlow
—A flow that doesn’t require user interaction
•
Flow
—A flow that requires user interaction because it contains one or more screens, choices, or dynamic choices
•
InvocableProcess
—A process that can be invoked by another process. This value is available in API version 38.0
and later.
•
Workflow
—A process created by using Process Builder
These values are reserved for future use.
•
ActionPlan
•
JourneyBuilderIntegration
•
LoginFlow
•
UserProvisioningFlow
Across versions, you can change the type from
Flow
to
AutolaunchedFlow
or vice versa.
This field is available in API version 31.0 and later.
An array of nodes for creating records in the database.
An array of nodes for deleting records in the database.
An array of nodes for looking up records in the database.
An array of nodes for updating records in the database.
An array of screen nodes.
Specifies which node or element is the starting point in the flow.
Flow
392
Metadata Types
Field Name
steps subflows textTemplates variables waits
Field Type
Description
An array of step nodes.
An array of subflows. This field is available in API version 25.0
and later.
An array of text templates.
An array of variable definitions.
An array of wait nodes. This field is available in API version 32.0
and later.
FlowActionCall
Defines a call to an action from the flow. It extends FlowNode
.
Available in API version 31.0 and later.
Field Name
actionName actionType
Field Type
string
Description
Required. Name for the action. Must be unique across actions with the same actionType
.
InvocableActionType (enumeration of type string)
Required. The action type. Valid values are:
•
activateSessionPermSet
—activates a session-based permission set for the running user.
•
apex
—invokes an Apex method that has the
@invocableMethod annotation
•
chatterPost
—posts to Chatter
•
contentWorkspaceEnableFolders
—enables folders in a library
•
deactivateSessionPermSet
—deactivates a session-based permission set for the running user.
•
emailAlert
—sends an email by referencing a workflow email alert
•
emailSimple
—sends an email by using flow resources
•
flow
—invokes an autolaunched flow. This action type isn’t available for flows with a processType of “Flow” or
“AutolaunchedFlow”. To invoke an autolaunched flow from one of those types, use FlowSubflow. Available in
API version 32.0 and later.
•
quickAction
—invokes a
•
submit
—submits a record for approval
These values are reserved for future use.
•
thanks
Flow
393
Metadata Types
Field Name Field Type
connector faultConnector
inputParameters outputParameters
[]
[]
Description
•
metricRefresh
Specifies which node to execute after this action call.
Specifies which node to execute if the action call results in an error.
An array of input parameters from the flow to the action.
An array of output parameters from the action to the flow.
FlowActionCallInputParameter
Defines an input parameter from the flow to the action. It extends
and inherits all its fields. Available in API version
31.0 and later.
Field Name
name value
Field Type
string
Description
Required. Unique name for the input parameter.
Defines the value of the input parameter.
FlowActionCallOutputParameter
31.0 and later.
Field Name
assignToReference name
Field Type
string string
Description
Required. Specifies the variable to which you want to assign the output parameter value.
Required. Unique name for the output parameter.
FlowApexPluginCall
Defines a call to an Apex plug-in from the flow. It extends FlowNode
and inherits all its fields.
Field Name
apexClass connector faultConnector inputParameters
Field Type
string
FlowApexPluginCallInputParameter
[]
Description
Required. The name of the Apex class.
Specifies which node to execute after this Apex plug-in call.
Specifies which node to execute if the Apex plug-in call results in an error.
An array of input parameters from the flow to the Apex plug-in.
Flow
394
Metadata Types
Field Name
outputParameters
Field Type
FlowApexPluginCallOutputParameter
[]
Description
An array of output parameters from the Apex plug-in to the flow.
FlowApexPluginCallInputParameter
Defines an input parameter from the flow to the Apex plug-in. It extends
and inherits all its fields.
Field Name
name value
Field Type
string
Description
Required. Unique name for the input parameter.
Defines the value of the input parameter.
Flow
FlowApexPluginCallOutputParameter
Defines an output parameter from the Apex plug-in to the flow. It extends
FlowBaseElement and inherits all its fields.
Field Name
assignToReference name
Field Type
string string
Description
Required. Specifies the variable to which you want to assign the output parameter value.
Required. Unique name for the output parameter.
FlowAssignment
and inherits all of its fields.
Field Name
assignmentItems connector
Field Type
[]
Description
An array of assignment operations that is executed in the given order, starting from the index 0.
Specifies which node to execute after this assignment node.
FlowAssignmentItem
Defines an operation to apply to a variable. It extends
and inherits all its fields.
Field Name
assignToReference
Field Type
string
Description
Required. Reference to the variable to which you want to apply the specified operator.
395
Metadata Types
Field Name
operator value
Field Type
FlowAssignmentOperator
(enumeration of type string)
Description
Required. Operation to apply to the variable reference in the assignToReference field. Valid values are:
•
Assign
–assigns the specified value to the variable in the assignToReference field.
•
Add
–adds the specified value to the variable in the assignToReference field.
•
AddItem
–adds the specified value as a new item to the variable in the assignToReference field. Supported for only variables that have a data type of Multipicklist.
This operator automatically adds the semi-colon required to mark a value as a separate item. This operator is available in API version 34.0 and later.
•
Subtract
–subtracts the specified value from the variable in the assignToReference field.
Defines the value that you want the operator to apply to the variable reference in the assignToReference field.
FlowChoice
all of its fields.
Field Name
choiceText dataType userInput value
Field Type
string
FlowDataType (enumeration of type string)
Description
Required. Choice label to display in the screen.
Required. Valid types are:
•
Currency
•
Date
•
Number
•
String
•
Boolean
Enables the choice to allow user input when the choice is selected. Not supported for choices in multi-select fields.
Actual value that’s used during flow execution, for example, in assignments, calls to Apex plug-ins, and record elements. If null, this choice always has the value of null.
FlowChoiceUserInput
Allows the choice to include a user input field that appears when the choice is selected by the user. User input isn’t supported for choices in multi-select fields. It extends
and inherits all its fields.
396
Flow
Metadata Types
Field Name
isRequired promptText validationRule
Field Type
boolean string
Description
Indicates whether users are required to enter something into the field when they select the choice.
Text that is displayed to prompt the user for input at runtime.
Supports merge fields.
Rule used at runtime to validate the user input.
FlowCondition
Defines a condition for a rule. It extends
and inherits all its fields.
Field Name
leftValueReference operator rightValue
Field Type
string
FlowComparisonOperator
(enumeration of type string)
Description
Required. Unique name of the element that serves as the left side of the condition expression.
Required. Valid values are:
•
EqualTo
•
NotEqualTo
•
GreaterThan
•
LessThan
•
GreaterThanOrEqualTo
•
LessThanOrEqualTo
•
StartsWith
•
EndsWith
•
Contains
•
IsNull
•
WasSet
—This value is available in API version 30.0 and later.
•
WasSelected
—Requires a choice on the left side.
•
WasVisited
—Requires a node on the left side.
Unique name of an element or the actual value (such as text or a number) for the right side of the condition expression.
FlowConnector
Connectors determine the order in which the nodes of the flow are executed. A connector defines and links to the subsequent node. It extends
and inherits all its fields.
Flow
397
Metadata Types
Field Name
targetReference
Field Type
string
Description
Required. Which node to execute after completing the current node.
FlowConstant
and inherits all of its fields.
Field Name
dataType value
Field Type Description
FlowDataType (enumeration of type string)
Required. Valid types are:
•
Currency
•
Date
•
Number
•
String
•
Boolean
Default value of the constant. This field can't have merge fields, nor can it reference another resource besides
$GlobalConstant.EmptyString
.
FlowDecision
and inherits all its fields.
Field Name
defaultConnector
Field Type
defaultConnectorLabel rules string
Description
Specifies which node to execute if none of the rules evaluate to true.
Label for the default connector.
An array of rules for the decision. The rules are evaluated in the order they're listed, and the connector of the first true rule is used.
If no rules are true, then the default connector is used. In the Cloud
Flow Designer, rules are referred to as “outcomes.”
FlowDynamicChoiceSet
all of its fields. Depending on the fields that are set, this element represents either a record choice or a picklist choice.
•
A record choice dynamically generates choices based on records that meet specified filter criteria. If a dynamic choice doesn’t have the picklistField
and picklistObject
parameters set, it is a record choice and can’t have a data type of
Picklist or
Multipicklist
.
Flow
398
Metadata Types
•
A picklist choice dynamically generates choices based on the available values for a picklist or multi-select picklist field. If a dynamic choice has the picklistField
and picklistObject
parameters set, it is a picklist choice and must have a data type of
Picklist
or
Multipicklist
.
Field Name
dataType displayField filters limit object
Field Type Description
FlowDataType (enumeration of type string)
Required. Valid types are:
•
Currency
•
Date
•
Number
•
String
•
Boolean
•
Picklist
—Picklist choices only
•
Multipicklist
—Picklist choices only
Picklist
and
Multipicklist
are available in API version 35.0 and later.
string
int string
[]
Required for record choices. Which field from the sObject to display to the user as choice labels.
For example, for an account, use the DisplayField “Name” if you want the dynamically generated choices to be displayed as the account names from the records that are retrieved from the database.
Not supported for picklist choices. Picklist choices always display the labels for the retrieved picklist values.
An array of filters to apply to the records that are retrieved from the database. For example, filter accounts to include only the accounts that were created in the past three months.
Not supported for picklist choices.
Maximum number of choices to include in the generated set of choices. Maximum and default: 200.
If sortField
and sortOrder
are also specified, the records are sorted before the limit
takes effect.
This field is available in API version 25.0 and later.
Required for record choices. The sObject whose fields you want to retrieve from the database and use to generate the set of choices. For example, use “Account” to dynamically generate choices from the information in account records in the database.
Not supported for picklist choices.
Flow
399
Metadata Types
Field Name
outputAssignments picklistField picklistObject sortField sortOrder valueField
Field Type
Description
An array that assigns fields from the user-selected record to variables that can be used elsewhere in the flow. For example, when the user selects an account name from the dynamically generated list of choice options, outputAssignments can assign the Id and AnnualRevenue from the user-selected account to variables that you specify.
Not supported for picklist choices.
string string string
Required for picklist choices. The field whose available values you want to retrieve from the database and use to generate the picklist choice. For example, use “Industry” to dynamically generate one choice for each available value on the Industry picklist field.
Not supported for record choices.
This field is available in API version 35.0 and later.
Required for picklist choices. The sObject whose field metadata you want to retrieve from the database and use to generate the picklist choice. For example, use “Account” to dynamically generate choices from a picklist field on the
Account object.
Not supported for record choices.
This field is available in API version 35.0 and later.
Field that is used for sorting the records that meet the filter criteria. If this field isn’t specified then the returned records are not sorted.
You can only sort records by fields that have the
Sort
API field property, as specified in SOAP API .
Not supported for picklist choices.
This field is available in API version 25.0 and later.
SortOrder (enumeration of type string) Order in which to sort the records. If this field isn’t specified, then the results are not sorted.
Valid values are:
•
Asc
—Ascending
•
Desc
—Descending
Not supported for picklist choices.
This field is available in API version 25.0 and later.
string Stored value for the choice, which can differ from what is displayed to the user as the choice options
( displayField
). For example, the displayField
Flow
400
Metadata Types
Field Name Field Type Description
might be the account “Name” while the valueField is the account “Id.”
Not supported for picklist choices. Picklist choices always store the API value for the retrieved picklist values.
FlowElement
Base class for all flow elements. This is an abstract class. It extends
FlowBaseElement and inherits all its fields.
Field Name
description name
Field Type
string string
Description
Description of the flow element.
Required. Unique name of the flow element.
FlowBaseElement
Base class for all flow elements that require contextual information in metadata values. This is an abstract class. FlowBaseElement is available in API version 32.0 and later.
Field Name
processMetadataValues
Field Type
Description
Contextual information for the element.
FlowMetadataValue
Defines contextual information that can be passed between elements in a flow. Flow metadata values can be used in an application that produces or consumes flows. FlowMetadataValue is available in API version 31.0 and later.
Field Name
name value
Field Type
string
Description
Required. Name for the metadata value. This name doesn’t need to be unique across all elements.
Reference or value for the metadata value.
FlowElementReferenceOrValue
Defines a reference to an existing element or a particular value that you specify. Make sure that you specify only one of the fields.
Field Name
booleanValue
Field Type
boolean
Description
Use this field to specify a boolean value. Do not use this field if you want to specify a different data type or an element reference.
Flow
401
Metadata Types
Field Name
dateTimeValue
Field Type
dateTime dateValue elementReference numberValue stringValue date string double string
Description
Use this field to specify a dateTime value. Do not use this field if you want to specify a different data type or an element reference. This field is available in API version 30.0 and later.
Use this field to specify a date value. Do not use this field if you want to specify a different data type or an element reference.
Use this field to specify the name of an existing element. Do not use this field if you want to specify a value instead of an element reference.
Use this field to specify a double value. Do not use this field if you want to specify a different data type or an element reference.
Use this field to specify a string value. Do not use this field if you want to specify a different data type or an element reference.
FlowFormula
Field Name
dataType expression scale
Field Type Description
FlowDataType (enumeration of type string)
The data type for the formula. Valid values are:
•
Boolean
•
Currency
•
Date
•
DateTime
•
Number
•
String dataType
defaults to
Number
if it isn’t defined in a formula.
This field is available in API version 31.0 and later.
string int
Required. Salesforce formula expression. The return value must match the data type. See “Limitations for Flow Formulas” in the
Salesforce Help.
For API version 30.0 and earlier, the return value must be numeric.
Scale of the return value, specifically, the number of digits to the right of the decimal point. Only supported for Currency and Number data types.
FlowInputFieldAssignment
Assigns the value for a record field based on a resource or static value. It extends
and inherits all its fields.
Flow
402
Metadata Types
Field Name
field value
Field Type
string
Description
Required. Name of the field that is to be assigned a value while a record is being created or updated.
Value that is to be assigned to the field.
FlowInputValidationRule
Validation rules verify that the data entered by the user meets the specified requirements. If the validation rule evaluates to false, then the specified error message is displayed.
Field Name
errorMessage formulaExpression
Field Type
string string
Description
Required. Error message to display when formulaExpression evaluates to false.
Required. Boolean formula used to validate the user input. See
“Limitations for Flow Formulas” in the Salesforce Help.
FlowLoop
A construct for iterating through a collection. It extends
FlowNode and inherits all of its fields. FlowLoop is available in API version 30.0
and later.
Field Name
nextValueConnector noMoreValuesConnector collectionReference assignNextValueToReference iterationOrder
Field Type
string string iterationOrder
(enumeration of type string)
Description
Points to the element that the flow navigates to for each of the entries in the collection. This is where the flow goes for the next value in the collection.
Points to the element to navigate to when all entries in the collection have been looped through.
Required. The collection being looped through.
Required. The variable to which the current value in the collection is assigned before navigating to the target of nextValueConnector
.
Valid values are:
•
Asc
—Iterate through the collection in the order the values are listed (first to last).
•
Desc
—Iterate through the collection in the reverse order the values are listed (last to first).
Flow
FlowNode
403
Metadata Types
Field Name
label locationX locationY
Field Type
string int int
Description
Required. Name of the node. This non-unique label is different from the unique name of the node, which is inherited from
.
Required. Horizontal location of the node, in pixels from the left.
Required. Vertical location of the node, in pixels from the top.
FlowOutputFieldAssignment
Assigns a record field’s value from a record to a variable that can be used elsewhere in the flow. The record may be selected by a record lookup or via a user selection for a choice. It extends
and inherits all its fields.
Field Name
assignToReference field
Field Type
string string
Description
Required. Reference to the variable where you want to store the value of the record field.
Required. Name of the field whose value is to be assigned after a record lookup.
FlowRecordCreate
Create a new record in the database using values from the flow. It extends
and inherits all its properties.
Note: The flow record create, lookup, update, and delete operations are different from the CRUD-based metadata calls
,
,
. The flow record methods apply to record operations from within a flow, which
aren’t the same as doing any metadata calls to CRUD setup entities.
Field Name Field Type
assignRecordIdToReference string connector faultConnector inputAssignments object inputReference
[] string string
Description
Reference to the variable where you want to store the
ID after the record is created.
Specifies which node to execute after creating the record.
Specifies which node to execute if the attempt to create a record results in an error.
An array that assigns values to the specified fields of the record being created.
Required. sObject for the record to be created by this element
Specifies the sObject variable whose field values are used to populate the new record’s fields.
Flow
404
Metadata Types
FlowRecordDelete
Deletes one or more records in the database. It extends
FlowNode and inherits all its fields.
Note: The flow record create, lookup, update, and delete operations are different from the CRUD-based metadata calls
,
,
. The flow record methods apply to record operations from within a flow, which
aren’t the same as doing any metadata calls to CRUD setup entities.
Field Name
connector faultConnector filters object inputReference
Field Type
[] string string
Description
Specifies which node to execute after deleting the record.
Specifies which node to execute if the attempt to delete a record results in an error.
An array that specifies the criteria used to select which records to delete from the database. For example, delete accounts whose last activity was older than a specified date.
Required. The name of the object whose records are deleted.
Specifies the sObject variable whose record ID is used to identify which record to delete in the database.
Flow
FlowRecordFilter
Sets the criteria for searching records in the database. It extends
and inherits all its fields.
Field Name
field operator value
Field Type
string
Description
Required. The field to be used for filtering records.
FlowRecordFilterOperator (enumeration of type string)
Required. Valid values are:
•
EqualTo
•
NotEqualTo
•
GreaterThan
•
LessThan
•
GreaterThanOrEqualTo
•
LessThanOrEqualTo
•
StartsWith
•
EndsWith
•
Contains
•
IsNull
Reference or value used with the field and operator to filter records.
405
Metadata Types
FlowRecordLookup
Note: The flow record create, lookup, update, and delete operations are different from the CRUD-based metadata calls
,
,
. The flow record methods apply to record operations from within a flow, which
aren’t the same as doing any metadata calls to CRUD setup entities.
Field Name Field Type
assignNullValuesIfNoRecordFound boolean connector faultConnector filters limit object outputAssignments outputReference queriedFields sortField
int string
[] string string[] string
Description
Specifies that all values are set to null
if the record is not found. This field is available in API version 30.0 and later.
Specifies which node to execute after completing the record lookup.
Specifies which node to execute if the attempt to look up a record results in an error.
An array that specifies the criteria used to select the record from the database.
If the filters return more than one record, they are sorted according to the specified sortField
and sortOrder
.
The first record in the sorted list is then selected.
If either the sortField
or sortOrder
is not specified, then the first record returned is selected. Note, however, that records are not returned in any particular order.
The maximum number of records to return, to limit the amount of data received. This field is available in API version
30.0 and later.
Required. Name of the sObject from which to select the record.
An array that assigns fields from the selected record to variables that can be used elsewhere in the flow.
Specifies the sObject variable that stores the queried fields’ values.
An array that specifies which fields from the selected record is saved to the specified sObject variable.
Field that is used for sorting the records that meet the filter criteria. If this field isn’t specified then the returned records are not sorted.
You can only sort records by fields that have the
Sort
API field property, as specified in SOAP API .
This field is available in API version 25.0 and later.
Flow
406
Metadata Types
Field Name
sortOrder
Field Type
SortOrder (enumeration of type string)
Description
Order in which to sort the records. If this field isn’t specified, then the results are not sorted.
Valid values are:
•
Asc
—Ascending
•
Desc
—Descending
This field is available in API version 25.0 and later.
FlowRecordUpdate
Finds records in the database and updates them with values from the flow. It extends
FlowNode and inherits all of its fields.
Note:
The flow record create, lookup, update, and delete operations are different from the CRUD-based metadata calls
,
,
. The flow record methods apply to record operations from within a flow, which
aren’t the same as doing any metadata calls to CRUD setup entities.
Field Name
connector faultConnector filters inputAssignments object inputReference
Field Type
[] string string
Description
Specifies which node to execute after completing the record update.
Specifies which node to execute if the attempt to update a record results in an error.
An array that specifies the criteria used to select the records to update in the database.
An array that assigns values to the specified fields of the record being updated.
Required. Name of the sObject whose records are updated.
Specifies the sObject variable whose field values are used to update the record’s fields.
FlowRule
Field Name
conditionLogic
Field Type
string
Description
Specifies logic for the conditions. Value can be:
•
and
—evaluates to true only if all its conditions evaluate to true
•
or
—evaluates to true if any of its conditions evaluate to true
Flow
407
Metadata Types
Field Name
conditions connector label
Field Type
string
Description
•
Advanced logic like
1 AND (2 OR 3)
—evaluates to true if the first condition is true and either the second or third condition is true
When you use advanced logic, the string must consist of 1,000 or fewer characters.
Advanced logic is available in API version 33.0 and later.
An array of conditions for the rule.
Specifies which node to execute if this is the first rule that evaluates to true in a decision.
Required. Label for the connector.
FlowScreen
and inherits all its fields.
Field Name
allowBack allowFinish
Field Type
boolean boolean
Description
Indicates whether to show (true) or hide (false) the Previous button on the screen at runtime. When true, the Previous button appears only if the user visited a previous screen in the flow path. Set this to false when revisiting the previous screen would trigger an action that should not be repeated, such as a credit card transaction.
This field is available in API version 26.0 and later.
Default: true
You can set either allowBack
or allowFinish
to false, but not both.
Indicates whether to show (true) or hide (false) the Finish button on the screen at runtime. When true, the Finish button appears only if the screen element is the end of a flow path. Set this to false if you need the user to go back to a previous screen to continue or complete the flow. For example, you wouldn’t want to offer a Finish button on a screen that tells the user to go back and make corrections on a previous screen.
This field is available in API version 26.0 and later.
Default: true
You can set either allowBack
or allowFinish
to false, but not both.
Flow
408
Metadata Types
Field Name
allowPause connector fields helpText pausedText rules
Field Type
boolean
string string
FlowScreenRule[][]
Description
Indicates whether to show (true) or hide (false) the Pause button on the screen at runtime.
A flow screen displays the Pause button if all the following conditions are true.
•
In the organization’s process automation settings, “Enable Users to Pause Flows” is enabled.
•
allowPause
for the screen is set to true.
•
If the flow is embedded in a Visualforce page, the
<flow:interview> component has its showAllowPause attribute set to true.
This field is available in API version 33.0 and later.
Default: true
Specifies which node to execute after the screen node.
An array of fields to display on the screen.
Text that appears if the end user clicks the “Help for this form” link.
Supports merge fields in API version 26.0 and later.
Confirmation message that appears when an end-user clicks Pause.
This field is available in API version 33.0 and later.
Reserved for future use.
FlowScreenField
Configurable field on a screen. It extends
and inherits all its fields.
Field Name
choiceReferences
Field Type
string[]
Description
An array of references to FlowChoices or
FlowDynamicChoiceSets. The resulting choice options appear in the order specified in this array, where the element at index 0 provides the top-most choice option. Supported for the following screen field types:
•
RadioButtons
•
DropdownBox
•
MultiSelectCheckboxes
•
MultiSelectPicklist
Multi-select checkboxes and multi-select picklist fields are available in API version 26.0
and later.
Flow
409
Metadata Types
Field Name
dataType
Field Type Description
FlowDataType (enumeration of type string)
Required. Data type of this screen field. Only supported for the InputField, RadioButtons, and
DropdownBox screen field types. Valid types are:
•
Currency
•
Date
•
Number
•
String
•
Boolean
A boolean InputField appears as a checkbox field at runtime. Checkbox input fields are available in API version 26.0 and later.
Only the string data type is supported for multi-select checkboxes and multi-select picklist fields. Multi-select fields are available in API version 26.0 and later.
defaultSelectedChoiceReference string The name of the FlowChoice element to use as the default value for the screen field.
Supported for the following screen field types:
•
RadioButtons
•
DropdownBox
•
MultiSelectCheckboxes
•
MultiSelectPicklist
For DropdownBox field types only, if the defaultSelectedChoiceReference is empty or null, the reference at index 0 of choiceReferences are used as the default value.
You can specify only one FlowChoice element as the default value for multi-select checkboxes and multi-select picklist fields. Multi-select fields are available in API version 26.0 and later.
defaultValue extensionName fieldText fieldType
string
The value that is used by default when this screen field requires users to provide input.
Only supported for InputField, LargeTextArea, and PasswordField.
Reserved for future use.
string Field label that is displayed on the screen.
Supports merge fields.
FlowScreenFieldType (enumeration of type string)
Required. Valid values are:
•
DisplayText
410
Flow
Metadata Types
Field Name
helpText inputParameters isRequired isVisible outputParameters scale validationRule
Field Type
string
Description
•
InputField
•
LargeTextArea
•
PasswordField
•
RadioButtons
•
DropdownBox
•
MultiSelectCheckboxes
•
MultiSelectPicklist
At runtime, each multi-select field stores its field value as a concatenation of the user-selected choice values, separated by semicolons. Any semicolons in the selected choice values are removed when added to the multi-select field value.
Multi-select checkboxes and multi-select picklist fields are available in API version 26.0
and later.
Required. Text that appears if the end user clicks the help icon ( ) for the screen field.
Supports merge fields in API version 26.0 and later.
FlowScreenFieldInputParameter[] boolean
Reserved for future use.
Indicates whether the user must select a choice or provide input. Not supported for DisplayText or boolean inputField.
boolean
FlowScreenFieldOutputParameter[]
Reserved for future use.
Reserved for future use.
int
The scale of this screen field if its data type is number or currency. The scale sets the number of digits to the right of the decimal point.
Rule used to validate the user input when this screen field is of type InputField, LargeTextArea, or PasswordField.
FlowStep
Flow
411
Metadata Types
Field Name
connectors
Field Type
[]
Description
Specifies which node to execute after the step node.
FlowSubflow
A subflow element references another flow, which it calls at run time. The flow that contains the subflow element is referred to as the master flow. FlowSubflow extends
FlowNode and inherits all of its fields. It is available in API version 25.0 and later.
Field Name
connector flowName inputAssignments outputAssignments
Field Type
string
[]
Description
Specifies which node to execute after the subflow.
References the flow to call at runtime. The value must be a unique name of a flow and can’t contain an appended hyphen and version number. The referenced flow must have been created in the Cloud Flow Designer.
An array of input variable assignments that are set at the start of the referenced flow.
An array of output variable assignments that are set at the end of the referenced flow.
FlowSubflowInputAssignment
Assigns an element or value from the master flow to a variable in the referenced flow. Input assignments occur when the subflow calls the referenced flow. It extends
and inherits all its fields. It is available in API version 25.0 and later.
Field Name
name value
Field Type
string
Description
Required. Unique name for the variable in the referenced flow.
Defines the value to assign to the variable.
FlowSubflowOutputAssignment
Assigns the value of a variable from the referenced flow to a variable in the master flow. Output assignments occur when the referenced flow is finished running. It extends
and inherits all its fields. It is available in API version 25.0 and later.
Field Name
assignToReference name
Field Type
string string
Description
Required. Unique name for the variable in the master flow.
Required. Unique name for the variable in the referenced flow.
Flow
412
Metadata Types
FlowTextTemplate
Defines a text template that can be used throughout the flow. It extends
and inherits all its fields.
Field Name
text
Field Type
string
Description
Actual text of the template. Supports merge fields.
FlowVariable
Field Name
dataType isCollection isInput
Field Type Description
FlowDataType (enumeration of type string) Required. Valid types are:
•
Boolean
•
Currency
•
Date
•
DateTime
—This value is available in
API version 30.0 and later.
•
Number
•
Multipicklist
—This value is available in API version 34.0 and later.
•
Picklist
—This value is available in
API version 34.0 and later.
•
String
•
sObject boolean Indicates whether the variable is a collection of values. This field is available in API version
30.0 and later. In API version 32.0 and later, a collection variable can be of any data type.
Default value is
False
.
boolean Indicates whether the variable can be set at the start of the flow using URL parameters,
Visualforce controllers, or subflow inputs.
This field is available in API version 25.0 and later.
Default value:
•
False
for a variable created in API version 25.0 and later or in the Cloud
Flow Designer in Summer ’12 and later.
•
True
for a variable created in API version 24.0 or in the Cloud Flow
Designer in Spring ’12 and earlier.
413
Flow
Metadata Types
Field Name
isOutput objectType scale value
Field Type
boolean string int
Description
Warning: Disabling input or output access for an existing variable can break the functionality of applications and pages that call the flow and access the variable. For example, you can access variables from URL parameters, Visualforce controllers, subflows, and processes.
Indicates whether the variable’s value can be accessed from Visualforce controllers and other flows. This field is available in API version 25.0 and later.
Default value:
•
False
for a variable created in API version 25.0 and later or in the Cloud
Flow Designer in Summer ’12 and later.
•
True
for a variable created in API version 24.0 or in the Cloud Flow
Designer in Spring ’12 and earlier.
Warning:
Disabling input or output access for an existing variable can break the functionality of applications and pages that call the flow and access the variable. For example, you can access variables from URL parameters, Visualforce controllers, subflows, and processes.
Object type of this variable if its data type is sObject
.
Scale of this variable if its data type is
Number or Currency.
Default value of this variable.
Default values aren’t supported if the variable’s data type is
Picklist
or
Multipicklist
.
FlowWait
32.0 and later.
Flow
414
Metadata Types
Field Name
defaultConnector defaultConnectorLabel faultConnector waitEvents
Field Type
string
Description
Specifies which node to execute if the conditions are false for every event in the
Wait element.
Label for the default connector.
Specifies which node to execute if the attempt to wait results in an error. If any of the wait events fail, the flow takes the fault connector.
An array of events that the Wait element is waiting for.
If the conditions for every event evaluate to false
, the defaultConnector
is used.
FlowWaitEvent
An event that a FlowWait element is waiting for. FlowWaitEvent extends
FlowElement and inherits all its fields. FlowWaitEvent is available
in API version 32.0 and later.
Field Name
conditionLogic conditions connector
Field Type
string
[]
Description
Specifies logic for the conditions. Value can be:
•
and
—evaluates to true only if all its conditions evaluate to true
•
or
—evaluates to true if any of its conditions evaluate to true
•
Advanced logic like
1 AND (2 OR
3)
—evaluates to true if the first condition is true and either the second or third condition is true
When you use advanced logic, the string must consist of 1,000 or fewer characters.
Advanced logic is available in API version
33.0 and later.
An array of conditions that must be true for the flow to wait for this event.
Specifies which node to execute if this is the first event that occurs.
Flow
415
Metadata Types
Field Name
eventType inputParameters label outputParameters
Field Type
string
[] string
[]
Description
Required. The event’s type. The type determines which input parameters are available to define this event. Valid values are:
•
AlarmEvent
—This event is an alarm based off of an absolute date/time value.
•
DateRefAlarmEvent
—This event is an alarm based off of a date/time field on a record.
An array of the event’s input parameters.
The parameter values are set by using values from the flow.
Required. Label for the wait event.
An array of the event’s output parameters.
The parameter values are assigned from the event to variables in the flow.
FlowWaitEventInputParameter
inherits all its fields. FlowWaitEventInputParameter is available in API version 32.0 and later.
Field Name
name value
Field Type
string
Description
Required. Unique name for the input parameter.
Defines the value of the input parameter.
FlowWaitEventOutputParameter
An output parameter for FlowWaitEvent. The parameter’s value is assigned to a variable in the flow so that it can be referenced in another part of the flow. It extends
and later.
Field Name
assignToReference name
Field Type
string string
Description
Required. Specifies the variable to which you want to assign the output parameter value.
Required. Unique name for the output parameter.
Flow
416
Metadata Types
Declarative Metadata Sample Definition
A sample XML definition of a flow is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Flow xmlns= "http://soap.sforce.com/2006/04/metadata">
<choices >
<name >Bad </name >
<choiceText >Bad </choiceText >
<dataType >Number </dataType >
<value >
<numberValue >0.0
</numberValue >
</value >
</choices >
<choices >
<name >Excellent </name >
<choiceText >Excellent </choiceText >
<dataType >Number </dataType >
<value >
<numberValue >20.0
</numberValue >
</value >
</choices >
<choices >
<name >Fair </name >
<choiceText >Fair </choiceText >
<dataType >Number </dataType >
<value >
<numberValue >10.0
</numberValue >
</value >
</choices >
<choices >
<name >Good </name >
<choiceText >Good </choiceText >
<dataType >Number </dataType >
<value >
<numberValue >15.0
</numberValue >
</value >
</choices >
<description >Simple Flow app to calculate a Tip according to corporate policies </description >
<formulas >
<name >fTipAmount </name >
<dataType >Number </dataType >
<expression >{!Bill_Amount} * {!Service_Quality} / 100 </expression >
<scale >0 </scale >
</formulas >
<formulas >
<name >fTotalAmount </name >
<dataType >Number </dataType >
<expression >{!fTipAmount} + {!Bill_Amount} </expression >
<scale >0 </scale >
</formulas >
<label >Tip Calculator App </label >
<screens >
<name >Simple_Tip_Calculator </name >
417
Flow
Metadata Types
<label >Simple Tip Calculator </label >
<locationX >513 </locationX >
<locationY >112 </locationY >
<connector >
<targetReference >TipAmount </targetReference >
</connector >
<fields >
<name >Bill_Amount </name >
<dataType >Currency </dataType >
<fieldText >Bill Amount </fieldText >
<fieldType >InputField </fieldType >
<isRequired >false </isRequired >
<scale >2 </scale >
</fields >
<fields >
<name >Service_Quality </name >
<choiceReferences >Excellent </choiceReferences >
<choiceReferences >Good </choiceReferences >
<choiceReferences >Fair </choiceReferences >
<choiceReferences >Bad </choiceReferences >
<dataType >Number </dataType >
<fieldText >Service Quality </fieldText >
<fieldType >RadioButtons </fieldType >
<isRequired >false </isRequired >
<scale >2 </scale >
</fields >
</screens >
<screens >
<name >TipAmount </name >
<label >Tip Amount </label >
<locationX >518 </locationX >
<locationY >266 </locationY >
<fields >
<name >TipSUmmary </name >
<fieldText ><TEXTFORMAT
LEADING= "2"><P
ALIGN= "LEFT"><FONT
FACE= "Arial"
STYLE= "font-size:12px"
COLOR= "#000000"
LETTERSPACING= "0"
KERNING= "0">If you think the quality of service is <FONT
KERNING= "1">{!Service_Quality},
</FONT>for a meal of {!Bill_Amount} you should tip
{!fTipAmount}, so the total recommended amount should be
{!fTotalAmount}</FONT></P></TEXTFORMAT> </fieldText >
<fieldType >DisplayText </fieldType >
</fields >
</screens >
<startElementReference >Simple_Tip_Calculator </startElementReference >
</Flow >
Flow
418
Metadata Types FlowDefinition
FlowDefinition
Represents the flow definition’s description and active flow version number.
To activate a flow, modify the metadata object and set the activeVersionNumber
to the version number to activate. To deactivate an active flow version, set the activeVersionNumber
to 0 (zero) or omit the value.
Declarative Metadata File Suffix and Directory Location
FlowDefinitions are stored in the flowDefinitions
directory of the corresponding package directory. The file name matches the flow definition’s unique full name, and the extension is
.flowDefinition
.
Version
FlowDefinition is available in API version 34.0 and later.
Field Name
activeVersionNumber description masterLabel
Field Type
int string string
Description
The version number of the active flow.
Description of the flow definition.
Label for the flow definition.
Folder
Represents a folder. This type extends the Metadata
metadata type and inherits its fullName
field. Four folder types currently exist in Salesforce:
•
Document folder
•
Email folder
•
Report folder
•
Dashboard folder
Folder type names end with the “Folder” suffix. For example, the type name of an email folder is “EmailFolder”.
File Suffix and Directory Location
Folders are stored in the corresponding component directory of the package. These directories are named documents
, reports
, and dashboards
. Folders do not have a text file representation—they are containers for files. For each folder, an accompanying metadata file named
FolderName-meta.xml
is created at the same directory level. The
FolderName-meta.xml
metadata file contains the metadata information for that folder, such as the accessType
. For example, for a documents folder named sampleFolder, there’s a
sampleFolder-meta.xml
within the documents
folder of the package.
Version
Folders are available in API version 11.0 and later.
419
Metadata Types
Fields
This metadata type contains the following fields:
Field Name
accessType fullName name publicFolderAccess sharedTo
Field Type Description
FolderAccessTypes
(
type string)
Required. The type of access for this folder. Valid values are:
•
Shared
. This folder is accessible only by the specified set of users.
•
Public
. This folder is accessible by all users, including portal users.
•
PublicInternal
. This folder is accessible by all users, excluding portal users. This setting is available for report and dashboard folders in organizations with a partner portal or Customer Portal enabled.
•
Hidden
. This folder is hidden from all users.
string The name used as a unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
component.
Required. The name of the document folder.
string
PublicFolderAccess
(
type string)
If
Public
, this field indicates the type
of access all users will have to the contents of the folder. Valid values include:
•
ReadOnly
. All users can read the contents of the folder, but no user can change the contents.
•
ReadWrite
. All users can read or change the contents of the folder.
Sharing access for the folder. See “Sharing Considerations” in the
Salesforce online help.
Folder
Declarative Metadata Sample Definition
The following is the package manifest definition of a document folder that contains a document:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<fullName >basic </fullName >
<types >
<members >sampleFolder </members >
<members >sampleFolder/TestDocument.txt
</members >
<name >Document </name >
</types >
<version >41.0
</version >
</Package >
420
Metadata Types FolderShare
The following is an example of the sampleFolder-meta.xml
metadata file for the sampleFolder document folder:
<?xml
version= "1.0" encoding= "UTF-8"?>
<DocumentFolder xmlns= "http://soap.sforce.com/2006/04/metadata">
<accessType >Public </accessType >
<name >sampleFolder </name >
<publicFolderAccess >ReadWrite </publicFolderAccess >
</DocumentFolder >
SEE ALSO:
FolderShare
Represents the settings for enhanced analytics folder sharing. Users can control access to reports or dashboards by giving others Viewer,
Editor or Manager access to the folder that contains the report or dashboard.
File Suffix and Directory Location
FolderShare objects are stored in the reports
and dashboards
directories. For each report or dashboard folder it contains, there is a metadata file named
FolderName-meta.xml
. The
FolderName-meta.xml
metadata file contains the metadata information for that folder, such as the accessLevel
. For example, if the reports
directory contains a reports folder named myReportsFolder
, it also has a
myReportsFolder-meta.xml
file at the same level as myReportsFolder
.
Version
FolderShare components are available in API version 28 and later.
Fields
Field Name
accessLevel
Field Type
FolderShareAccessLevel
(
Description
Required. Specifies the combination of actions that can be taken on the folder. Valid values are:
•
View
. User can run a report or refresh a dashboard, but can’t edit them. All users have at least Viewer access to report and dashboard folders that have been shared with them. (Some users may have administrative permissions that give them greater access.)
•
EditAllContents
. Users can view and modify the reports or dashboards in the folder, and move them to and from any other folders that they have equivalent access to.
•
Manage
. Users can do everything Viewers and Editors can do, plus control other users’ access to a folder.
421
Metadata Types FolderShare
Field Name
sharedTo sharedToType
Field Type
string
Description
Required. Specifies the user, group, or role that has the specified access level to the folder.
FolderSharedToType(
of type string)
Required. Specifies the type of entity that the folder is shared with.
Valid values are:
•
Group
. Users in a specified public group have the specified access level to the folder.
•
Manager
. Available in API version 29.0 and later.
•
ManagerAndSubordinatesInternal
. Available in API version 29.0 and later.
•
Role
. Users with a specified role have the specified access level to the folder.
•
RoleAndSubordinates
. Users with a specified role, and users with a role subordinate to that role, have the specified access level to the folder.
•
RoleAndSubordinatesInternal
. Users with a specified role and users with a role subordinate to that role, except public portal users, have the specified access level to the folder.
•
Organization
. All internal users have the specified access level to the folder.
•
Territory
. Users in a specified territory have the specified access level to the folder.
•
TerritoryAndSubordinates
. Users in a specified territory, and users in territories subordinate to that, have the specified access level to the folder.
•
AllPrmUsers
. All PRM Portal users have the specified level of access to the folder.
•
User
. The specified individual user has the specified level of access to the folder.
•
PartnerUser
. The specified individual user of a partner portal has the specified level of access to the folder.
•
AllCspUsers
. All Customer Success Portal users have the specified level of access to the folder.
•
CustomerPortalUser
. The specified individual user of a customer portal has the specified level of access to the folder.
•
PortalRole
. Users with a specified role in a portal have the specified access level to the folder.
•
PortalRoleAndSubordinates
. Portal users with a specified role, and portal users with a role subordinate to that role, have the specified access level to the folder.
422
Metadata Types GlobalPicklist
Declarative Metadata Sample Definition
The following is an example of a FolderShare component for a dashboard folder:
<?xml
version= "1.0" encoding= "UTF-8"?>
<DashboardFolder xmlns= "http://soap.sforce.com/2006/04/metadata">
<folderShares >
<accessLevel >View </accessLevel >
<sharedTo >R1 </sharedTo >
<sharedToType >Role </sharedToType >
</folderShares >
</DashboardFolder >
This is an example of a FolderShare component for a report folder:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ReportFolder xmlns= "http://soap.sforce.com/2006/04/metadata">
<folderShares >
<accessLevel >View </accessLevel >
<sharedTo >R1 </sharedTo >
<sharedToType >Role </sharedToType >
</folderShares >
</ReportFolder >
GlobalPicklist
Represents a global picklist, or the set of shared picklist values that custom picklist fields can use. (In contrast, the custom picklist fields
that are based on a global picklist are of type CustomValue.) This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
GlobalPicklist components have the suffix
.globalPicklist
and are stored in the globalPicklist
folder.
Version
on page 427 type.
Fields
Field Name
description
Field Type
string
Description
It’s useful to state the global picklist’s purpose, and which objects it’s intended for. Limit: 255 characters.
globalPicklistValues
on page 424[]
Requires at least one value. The list of values (or “picklist value set”) that’s defined for a global picklist. The picklist value set is inherited by any custom picklist field that’s based on that global picklist. Each value is of type GlobalPicklistValue.
A global picklist can have up to 1,000 total values (inclusive of inactive values).
423
Metadata Types GlobalPicklistValue
Field Name
masterLabel sorted
Field Type
string string
Description
Required. A global picklist’s name, which is defined when the global picklist is created. Appears as Label in the user interface.
Indicates whether a global picklist’s value set is sorted in alphabetical order.
By default this value is false
.
Declarative Metadata Sample Definition
The following Territories.globalPicklist is an example of a GlobalPicklist component.
<?xml version="1.0" encoding="UTF-8"?>
<GlobalPicklist xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Updated:This is a basic global picklist</description>
<globalPicklistValues>
<fullName>Northwest</fullName>
<default>false</default>
</globalPicklistValues>
<globalPicklistValues>
<fullName>Northeast</fullName>
<default>false</default>
</globalPicklistValues>
<globalPicklistValues>
<fullName>South</fullName>
<default>true</default>
</globalPicklistValues>
<globalPicklistValues>
<fullName>Southwest</fullName>
<default>false</default>
<isActive>false</isActive>
</globalPicklistValues>
<masterLabel>Territories</masterLabel>
<sorted>true</sorted>
</GlobalPicklist>
The following is an example package.xml
that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Territories</members>
<name>GlobalPicklist</name>
</types>
<version>37.0</version>
</Package>
GlobalPicklistValue
Represents the definition of a value used in a global picklist. Custom picklist fields can inherit the picklist value set from a global picklist.
This type extends the
Metadata metadata type and inherits its
fullName
field.
424
Metadata Types GlobalPicklistValue
Note: GlobalPicklistValue components don’t have file suffixes or directories because they’re lists of values and not custom fields.
For file-based operations they can be accessed through GlobalPicklist (which is in API v37.0 only).
Version
GlobalPicklistValue components are available in API version 37.0 only. In API version 38.0 and later, GlobalPicklistValue is replaced by
on page 322.
Fields
Field Name
color
Field Type
string default description isActive boolean string boolean
Description
The color assigned to the picklist value when it’s used in charts on reports and dashboards. The color is in hexadecimal format; for example,
#FF6600. If a color is not specified, it’s assigned dynamically upon chart generation.
Required. Indicates whether this value is the default selection for the global picklist and the custom picklists that share its picklist value set.
This field is set to
true
by default.
The global picklist value’s description. It’s useful to include a description for a global picklist value so the reason for creating it can be tracked.
Limit: 255 characters.
Indicates whether this value is currently active or inactive. The default value is
true
. Users can select only active values from a picklist. An API retrieve operation for global picklist values returns all active and inactive values in the picklist. (Meanwhile, retrieving the values of a non-global, unrestricted picklist returns only the active values.)
PicklistValue
This metadata type defines a value in the picklist and specifies whether this value is the default value. This type extends the
inherits its fullName
field.
Note the following when working with picklist values:
•
When you retrieve a standard object, all picklist values are retrieved, not just the customized picklist values.
•
When you deploy changes to standard picklist fields, picklist values are added as needed.
•
To deactivate a global picklist value, you can invoke an update()
call on GlobalPicklist with the value omitted, or with the value’s isActive
field set to false
. Or, you can invoke an update()
call directly on GlobalPicklistValue with the isActive
field set to false
.
•
If picklist values are missing from a component definition, they get deactivated when deployed. Deactivation occurs for picklist values of both standard and custom fields.
425
Metadata Types GlobalPicklistValue
Field Name
allowEmail closed controllingFieldValues converted cssExposed forecastCategory
Field Type
boolean boolean string[]
Description
Indicates whether this value lets users email a quote PDF ( true
), or not
( false
). This field is only relevant for the
Status
field in quotes. This field is available in API version 18.0 and later.
Indicates whether this value is associated with a closed status ( true
), or not ( false
). This field is only relevant for the standard
Status field in cases and tasks. This field is available in API version 16.0 and up to version 36.0. In version 37.0, this field is in GlobalPicklistValue.
A list of values in the controlling field that are linked to this picklist value.
The controlling field can be a checkbox or a picklist. This field is available in API version 14.0 and later. The values in the list depend on the field type:
•
Checkbox
: checked
or unchecked
.
•
Picklist
: The fullname
of the picklist value in the controlling field.
boolean boolean
Indicates whether this value is associated with a converted status ( true
), or not ( false
). This field is relevant for only the standard
Lead
Status
field in leads. Your organization can set its own guidelines for determining when a lead is qualified, but typically, you want to convert a lead as soon as it becomes a real opportunity that you want to forecast.
For more information, see “Convert Qualified Leads” in the Salesforce online help. This field is available in API version 16.0 and later.
Indicates whether this value is available in your Self-Service Portal ( true
), or not ( false
). This field is only relevant for the standard
Case
Reason
field in cases.
Self-Service provides an online support channel for your customers allowing them to resolve their inquiries without contacting a customer service representative. For more information about Self-Service, see
“Setting Up Your Self-Service Portal” in the Salesforce online help.
Note: Starting with Spring ’12, the Self-Service portal isn’t available for new orgs. Existing orgs continue to have access to the Self-Service portal.
This field is available in API version 16.0 and later.
ForecastCategories
(
type string)
Indicates whether this value is associated with a forecast category
( true
), or not ( false
). This field is only relevant for the standard
Stage
field in opportunities. For more information about forecast categories, including the valid string values listed below, see “Working with Forecast Categories” in the Salesforce online help.
•
Omitted
•
Pipeline
•
BestCase
•
Forecast
426
Metadata Types GlobalValueSet
Field Name
highPriority probability reverseRole reviewed won
Field Type
boolean int string boolean boolean
Description
•
Closed
This field is available in API version 16.0 and later.
Indicates whether this value is a high priority item ( true
), or not
( false
). This field is only relevant for the standard
Priority
field in tasks. For more information about tasks, see “Guidelines for Using
Tasks” in the Salesforce online help. This field is available in API version
16.0 and later.
Indicates whether this value is a probability percentage ( true
), or not
( false
). This field is only relevant for the standard
Stage
field in opportunities. This field is available in API version 16.0 and later.
A picklist value corresponding to a reverse role name for a partner. If the role is “subcontractor”, then the reverse role might be “general contractor”. Assigning a partner role to an account in Salesforce creates a reverse partner relationship so that both accounts list the other as a partner. This field is only relevant for partner roles.
For more information, see “Partner Fields” in the Salesforce online help.
This field is available in API version 18.0 and later.
Indicates whether this value is associated with a reviewed status ( true
), or not ( false
). This field is only relevant for the standard
Status field in solutions. For more information about opportunities, see “Creating
Solutions” in the Salesforce online help. This field is available in API version 16.0 and later.
Indicates whether this value is associated with a closed or won status
( true
), or not ( false
). This field is only relevant for the standard
Stage
field in opportunities. This field is available in API version 16.0
and later.
Declarative Metadata Sample Definition
For an example of GlobalPicklistValue components with a package.xml
that references them, see GlobalPicklist
.
GlobalValueSet
Represents the metadata for a global picklist value set, which is the set of shared values that custom picklist fields can use. A global value set isn't a field itself. (In contrast, the custom picklist fields that are based on a global picklist are of type ValueSet.) This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
GlobalValueSet components have the suffix
.globalValueSet
and are stored in the globalValueSets
folder.
427
Metadata Types GlobalValueSet
Version
GlobalValueSet components are available in API version 38.0 and later. In API version 37.0, this is the GlobalPicklist type.
Fields
Field Name
customValue
Field Type
description masterLabel sorted string string boolean
Description
Requires at least one value. The list of values (or “global value set”) that’s defined for a global picklist. The global value set is inherited by any custom picklist field that uses that value set. Each value is of type customValue. A global value set can have up to 1,000 total values (inclusive of inactive values).
It’s useful to state the global value set’s purpose, and which objects it’s intended for. Limit: 255 characters.
Required. A global value set’s name, which is defined when the global value set is created. Appears as Label in the user interface.
Required. Indicates whether a global value set is sorted in alphabetical order.
By default this value is false
.
Declarative Metadata Sample Definition
The following UpsellGlobal.globalValueSet is an example of a GlobalValueSet component.
<?xml version="1.0" encoding="UTF-8"?>
<GlobalValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Updated:This is a basic global value set.</description>
<masterLabel>UpsellGlobal</masterLabel>
<customValue>
<fullName>Maybe</fullName>
<default>false</default>
<label>Maybe</label>
</customValue>
<customValue>
<fullName>No</fullName>
<default>false</default>
<label>No</label>
</customValue>
<customValue>
<fullName>Yes</fullName>
<default>false</default>
<label>Yes</label>
</customValue>
<sorted>false</sorted>
</GlobalValueSet>
The following is an example package.xml
that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
428
Metadata Types GlobalValueSetTranslation
<types>
<members>UpsellGlobal</members>
<name>GlobalValueSet</name>
</types>
<version>40.0</version>
</Package>
GlobalValueSetTranslation
Contains details for a global value set translation. Global value sets are lists of values that can be shared by multiple custom picklist fields, optionally across objects.This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
GlobalValueSetTranslation components have the suffix
.globalValueSetTranslation
and are stored in the globalValueSetTranslations
folder.
Translations are stored in a file with a format of
ValueSetName-lang.globalValueSetTranslation
, where
ValueSetName
is the global value set’s name, and lang is the translation language.
Version
GlobalValueSetTranslation components are available in API version 38.0 and later.
Fields
Field
valueTranslation
Field Type
Description
The translated name of a value in a translated global value set.
Each valueTranslation
is paired with a masterLabel
, which is the original (untranslated) name of the value.
ValueTranslation
The original value name and the translated value name in a translated global value set.
Field
masterLabel translation
Field Type
string string
Description
Required. The original (untranslated) name of a value in a global value set. Each valueTranslation
has a masterLabel paired with its translation
..
The translated name of a value in a translated global value set.
429
Metadata Types
Declarative Metadata Sample Definition
The following is an example of a GlobalValueSetTranslation component. When a value isn’t translated, its translation becomes a comment that’s paired with its masterLabel.
<?xml version="1.0" encoding="UTF-8"?>
<GlobalValueSetTranslation xmlns="http://soap.sforce.com/2006/04/metadata">
<valueTranslation>
<masterLabel>Three</masterLabel>
<translation>Trois</translation>
</valueTranslation>
<valueTranslation>
<masterLabel>Four</masterLabel>
<translation>Quatre</translation>
</valueTranslation>
<valueTranslation>
<masterLabel>Five</masterLabel>
<translation><!-- Five --></translation>
</valueTranslation>
</GlobalValueSetTranslation>
The following is an example package.xml
that references the previous definition.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Numbers-fr</members>
<name>GlobalValueSetTranslation</name>
</types>
<version>38.0</version>
</Package>
SEE ALSO:
Group
Represents a set of public groups, which can have users, roles, and other groups.
Declarative Metadata File Suffix and Directory Location
The file suffix for group components is
.group
and components are stored in the groups
directory of the corresponding package directory.
Version
Group components are available in API version 24.0 and later.
Group
430
Metadata Types HomePageComponent
Fields
This metadata type represents the valid values that define a group:
Field Name
doesIncludeBosses fullName name
Field Type
boolean string string
Description
Indicates whether the managers have access ( true
) or do not have access ( false
) to records shared with members of the group. This field is only available for public groups.
The unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain
two consecutive underscores. This field is inherited from the Metadata
component. Corresponds to Group Name in the user interface.
Required. The name of the group. Corresponds to Label in the user interface.
Declarative Metadata Sample Definition
The following is the definition of a group.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Group xmlns= "http://soap.sforce.com/2006/04/metadata">
<doesIncludeBosses >true </doesIncludeBosses >
<fullName >admin </fullName >
<name >test </name >
</Group >
HomePageComponent
Represents the metadata associated with a home page component. You can customize the Home tab in Salesforce Classic to include components such as sidebar links, a company logo, a dashboard snapshot, or custom components that you create. For more information, see “Customize Salesforce Classic Home Tab Page Layouts” in the Salesforce online help. This type extends the
and inherits its fullName
field. Use to create, update, or delete home page component definitions.
Declarative Metadata File Suffix and Directory Location
The file suffix for home page components is
.homePageComponent
and components are stored in the homepagecomponents directory of the corresponding package directory.
Version
Home page components are available in API version 12.0 and later.
431
Metadata Types HomePageComponent
HomePageComponent
This metadata type represents the valid values that define a home page component:
Field Name
body fullName height links page pageComponentType showLabel showScrollbars
Field Type
string string int string[]
Description
If this is an HTML page component, this is the body of the HTML.
The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
component, this field is not defined in the
WSDL for this component. It must be specified when creating, updating, or deleting. See
to see an example of this field specified for a call.
Required for Visualforce Area components. Indicates the height (in pixels) of the component.
This field is available in API version 31.0 and later.
If the pageComponentType
is links
, then zero or more names of custom page links can be specified.
•
ObjectWebLink
•
CustomPageWebLink string
PageComponentType
(
string)
Required. Valid values are:
•
links
•
htmlArea
•
imageOrNote
•
visualforcePage
(This value is available in API version 31.0
and later.) boolean
This field is only available for Visualforce Area components and indicates the API name of the Visualforce page that is associated with the component.
This field is available in API version 31.0 and later.
boolean
This field is only available for Visualforce Area components and specifies whether the component displays with a label ( true
) or not ( false
).
This field is available in API version 31.0 and later.
This field is only available for Visualforce Area components and specifies whether the component displays with scrollbars ( true
) or not ( false
).
This field is available in API version 31.0 and later.
432
Metadata Types
Field Name
width
HomePageLayout
Field Type Description
PageComponentWidth
(
string)
This field is only available for HTML and Visualforce Area components, and indicates whether this is a narrow or wide home page component.
Valid values are:
•
narrowComponents
•
wideComponents
Declarative Metadata Sample Definition
The following is the definition of a home page component. See HomePageLayout and
<?xml
version= "1.0" encoding= "UTF-8"?>
<HomePageComponent xmlns= "http://soap.sforce.com/2006/04/metadata">
<height >200 </height >
<page >MyVisualforcePage </page >
<pageComponentType >visualforcePage </pageComponentType >
<showLabel >true </showLabel >
<showScrollbars >true </showScrollbars >
<width >wideComponents </width >
</HomePageComponent >
SEE ALSO:
HomePageLayout
Represents the metadata associated with a home page layout. You can customize home page layouts and assign the layouts to users based on their user profile. For more information, see “Customize Salesforce Classic Home Tab Page Layouts” in the Salesforce online help.
File Suffix and Directory Location
Home page layouts are stored in the homePageLayouts
directory of the corresponding package directory. The extension is
.homePageLayout
.
Version
Home page components are available in API version 12.0 and later. This type extends the
Metadata metadata type and inherits its
fullName
field.
Fields
This metadata type represents the valid values that define a home page layout:
433
Metadata Types InstalledPackage
Field Name
fullName narrowComponents wideComponents
Field Type
string string[] string[]
Description
The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
component, this field is not defined in the
WSDL for this component. It must be specified when creating, updating, or deleting. See
to see an example of this field specified for a call.
The list of elements in the narrow column on the left side of the home page.
The list of elements in the wide column on the right side of the home page.
Declarative Metadata Sample Definition
The following is the definition of a home page layout. See
on page 433 and
on page 295 for related samples.
<?xml
version= "1.0" encoding= "UTF-8"?>
<HomePageLayout xmlns= "http://soap.sforce.com/2006/04/metadata">
<narrowComponents >google </narrowComponents >
</HomePageLayout >
SEE ALSO:
InstalledPackage
Represents a package to be installed or uninstalled. Deploying a newer version of a currently installed package upgrades the package.
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.
File Suffix and Directory Location
The package is specified in the installedPackages
directory, in a file named after the package’s namespace prefix. The file extension is
.installedPackage
.
Version
InstalledPackage is available in API version 28.0 and later.
434
Metadata Types
Fields
Field Name
versionNumber
KeywordList password
Field Type
string string
Description
The version number of the package. This has the format
majorNumber.minorNumber.patchNumber
(for example,
2.1.3).
An optional field specifying the package password.
Declarative Metadata Sample Definition
This specifies a sample package to be installed or uninstalled.
<?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 >
KeywordList
Represents a list of keywords used in community moderation. This keyword list is a type of moderation criteria that defines offensive
metadata type and inherits its fullName
field.
Keep the following things in mind when creating keyword list criteria:
•
Your org can have up to 30 keyword list criteria. This limit is per org, not per community.
•
A keyword list can have up to 2,000 keywords.
•
Capitalization and trailing punctuation are ignored when matching your keywords to user-generated content. For example, if your criteria includes
BadWord
, it’s matched when a user types
BADWORD
or
badword.
File Suffix and Directory Location
KeywordList components have the suffix
.keywords
and are stored in the moderation
directory of the corresponding package directory. The file name format follows
community_name.keyword_list_developer_name.keywords
.
Version
KeywordList components are available in API version 36.0 and later.
Special Access Rules
To view, create, edit, and delete a keyword list, you need the Manage Communities or Create and Set Up Communities permission.
435
Metadata Types
Fields
Field Name
Description keywords masterLabel
Keyword
Keywords in the keyword list.
Field Name
keyword
Field Type
string
Field Type
string
string
Description
A description of the keyword list.
The keywords you want moderate in your community.
Required. Label for the keyword list.
Description
Required. Keywords you want to moderate.
•
Keywords can only be up to 100 characters and can include letters, numbers, spaces, and special characters.
•
Wildcard characters aren’t supported.
KeywordList
Declarative Metadata Sample Definition
The following is an example of a KeywordList component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<KeywordList xmlns= "http://soap.sforce.com/2006/04/metadata">
<masterLabel >Bad Word List </masterLabel >
<description >List of bad words updated by Joe in Nov 2015.
</description >
<keywords >
<keyword >bad-word </keyword >
</keywords >
<keywords >
<keyword >b a d w o r d </keyword >
</keywords >
<keywords >
<keyword >b@dword </keyword >
</keywords >
</KeywordList >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<name >KeywordList </name >
<members >community1.badword_list
</members >
</types >
<version >36.0
</version >
</Package >
436
Metadata Types
Layout
Represents the metadata associated with a page layout. For more information, see “Page Layouts” in the Salesforce online help. This type extends the
Metadata metadata type and inherits its
fullName
field.
Note:
To edit the Ideas layout, specify it by name in the package.xml
file. In package.xml
, use the following code to retrieve the Ideas layout:
<types >
<members >Idea-Idea Layout </members >
<name >Layout </name >
</types >
Layout
File Suffix and Directory Location
Layouts are stored in the layouts
directory of the corresponding package directory. The extension is
.layout
.
Note: Retrieving a component of this metadata type in a project makes the component appear in any Profile and PermissionSet components that are retrieved in the same package.
Version
Layouts are available in API version 13.0 and later.
Fields
This metadata type represents the valid values that define a page layout.
Field Name
customButtons customConsoleComponents emailDefault excludeButtons feedLayout
Field Type
string[]
Represents custom console components (Visualforce pages, lookup fields, or related lists; Force.com Canvas apps not available) on a page layout. Custom console components only display in the Salesforce console.
boolean
Only relevant if showEmailCheckbox
the default value of that checkbox.
string[]
Description
The custom buttons for this layout. Each button is a reference to a
WebLink on the same object. For example,
a ButtonLink refers to a Weblink on the same standard or custom object named 'ButtonLink'.
List of standard buttons to exclude from this layout. For example,
<excludeButtons >Delete </excludeButtons > excludes the Delete button from this layout.
Represents the values that define the feed view of a feed-based page layout. Feed-based layouts are available
437
Metadata Types
Field Name
headers layoutSections miniLayout multilineLayoutFields platformActionList quickActionList relatedContent relatedLists relatedObjects runAssignmentRulesDefault showEmailCheckbox showHighlightsPanel
Field Type Description
on Account, Case, Contact, Lead, Opportunity, custom, and external objects. They include a feed view and a detail view.
LayoutHeader[]
(
Layout headers are currently only used for tagging, and only appear in the UI if tagging is enabled. Valid string values are:
•
PersonalTagging
—tag is private to user.
•
PublicTagging
—tag is viewable any other user who can access the record.
string[]
The main sections of the layout containing fields, s-controls, and custom links. The order here determines the layout order.
A mini layout is used in the mini view of a record in the
Console tab, hover details, and event overlays.
Fields for the special multiline layout fields which appear in OpportunityProduct layouts. These fields are otherwise similar to miniLayoutFields
The list of actions, and their order, that display in the
Salesforce1 action bar for the layout.
This field is available in API version 34.0 and later.
string[] boolean boolean boolean
[]
The list of quick actions that display in the full Salesforce site for the page layout. This field is available in API version
28.0 and later.
The Related Content section of the page layout. This field is available in API version 29.0 and later.
The related lists for the layout, listed in the order they appear in the user interface.
The list of related objects that appears in the mini view of the console. In database terms, these objects are foreign key fields on the object for the layout. For more information, see “Choose Related Objects for the Agent Console's Mini
View” in the Salesforce online help.
Only relevant if
showRunAssignmentRulesCheckbox
is set; indicates the default value of that checkbox.
Only allowed on Case, CaseClose, and Task layouts. If set, a checkbox appears to show email.
If set, the highlights panel displays on pages in the
Salesforce console. This field is available in API version 22.0
and later.
Layout
438
Metadata Types
Field Name
showInteractionLogPanel showKnowledgeComponent
Field Type
boolean boolean showRunAssignmentRulesCheckbox boolean showSolutionSection boolean showSubmitAndAttachButton boolean
Description
If set, the interaction log displays on pages in the Salesforce console. This field is available in API version 22.0 and later.
Only allowed on Case layouts. If set, the Knowledge sidebar displays on cases in the Salesforce console. This field is available in API version 20.0 and later.
Only allowed on Lead and Case objects. If set, a checkbox appears on the page to show assignment rules.
Only allowed on CaseClose layout. If set, the built-in solution information section shows up on the page.
Only allowed on Case layout. If set, the Submit & Add
Attachment button displays on case edit pages to portal users in the Customer Portal.
CustomConsoleComponents
Represents custom console components (Visualforce pages, lookup fields, or related lists; Force.com Canvas apps not available) on a page layout. Custom console components only display in the Salesforce console. Available in API version 25.0 and later.
Field Name
primaryTabComponents subtabComponents
Field Type Description
Represents custom console components on primary tabs in the Salesforce console. Available in API version 25.0 and later.
Represents custom console components on subtabs in the Salesforce console. Available in API version 25.0 and later.
PrimaryTabComponents
Represents custom console components on primary tabs in the Salesforce console. Available in API version 25.0 and later.
Field Name
component containers
Field Type Description
Represents a custom console component (Visualforce page, lookup field, or related lists; Force.com Canvas apps not available) on a section of a page layout. Custom console components only display in the Salesforce console. This field is available in API version 29.0 and earlier.
[] Represents a location and style in which to display more than one custom console component on the sidebars of the Salesforce console. You can specify up to five components for each of the four locations (left, right, top, and bottom). This field is available in API version 30.0 and later.
Layout
439
Metadata Types
ConsoleComponent
Represents a custom console component (Visualforce page, lookup field, or related lists; Force.com Canvas apps not available) on a section of a page layout. Custom console components only display in the Salesforce console. Available in API version 25.0 and later.
Field Name
height location visualforcePage width
Field Type
int string string int
Description
Required for components with a location of top or bottom. The height of the custom console component. The value must be specified in pixels and be greater than 0 but less than 999.
Required. The location of the custom console component on the page layout. Valid values are right, left, top, and bottom. A component can have one location for each page layout.
Required. The unique name of the custom console component. For example, ConsoleComponentPage.
Required for components with a location of left or right. The width of the custom console component. The value must be specified in pixels and be greater than 0 but less than 999.
Layout
Container
Represents a location and style in which to display more than one custom console component in the sidebars of the Salesforce console.
For example, you can display multiple components in the right sidebar of the console with a style of either stack, tabs, or accordion.
Available in API version 30.0 and later.
Field Name
height isContainerAutoSizeEnabled region sidebarComponents style
Field Type
int boolean string
Description
Required for components with a location of top or bottom. The height of the components’ container. The
measurement, in pixels or percent.
Required. If set to true
, stacked console components in the sidebars autosize vertically. Set to true
by default for newly created console components. Available in API version 32.0 and later.
Required. The location of the components’ container. Valid values include:
•
right
•
left
•
top
•
bottom
string
Represents a specific custom console component to display in the components’ container.
Required. The style of the container in which to display multiple components. Valid values include:
•
stack
—a content area with multiple frames.
440
Metadata Types
Field Name
unit width
Field Type
string int
Description
•
tabs
—a single content area with a list of multiple panels.
•
accordian
—a collapsible content area.
Required. The unit of measurement, in pixels or percent, for the height or width of the components’ container.
Pixel values are simply the number of pixels, for example,
500
, and must be greater than 0 but less than 999. Percentage values must include the percent sign, for example,
20%
, and must be greater than 0 but less than
100.
Required for components with a location of right or left. The width of the components’ container. The
measurement, in pixels or percent.
SidebarComponent
Represents a specific custom console component to display in a container that hosts multiple components in one of the sidebars of the
Salesforce console. You can specify up to five components for each of the four container locations (left, right, top, and bottom). Available in API version 30.0 and later.
Field Name
componentType
Field Type
string
Description
Specifies the component type. Valid values are
KnowledgeOne
,
Lookup
,
Milestones
,
RelatedList
,
Topics
,
Files
, and
CaseExperts
. This field is available in API version 31.0 and later. The
Files
and
CaseExperts
values are available in API version 32.0
and later.
Note: Case Experts is available through a pilot program.
height label lookup page relatedlists unit int string string string
[] string
Required for components with a location of top or bottom. The height
of the component in the container. The unit
field determines the unit of measurement, in pixels or percent.
The name of the component as it displays to console users. Available for components in a container with the style of tabs or accordion.
If the component is a lookup field, the name of the field.
If the component is a Visualforce page, the name of the Visualforce page.
If the component is a related list, the name of the list. This field is available in API version 31.0 and later.
The unit of measurement, in pixels or percent, for the height or width of the component in the container.
Pixel values are simply the number of pixels, for example,
500
, and must be greater than 0 but less than 999. Percentage values must include the
Layout
441
Metadata Types
Field Name
width
Field Type
int
Description
percent sign, for example,
20%
, and must be greater than 0 but less than
100.
Required for components with a location of right or left. The width of the
component in the container. The unit
measurement, in pixels or percent.
RelatedList
Represents related list custom components on the sidebars of the Salesforce console. Available in API version 31.0 and later.
Field Name
hideOnDetail name
Field Type
boolean string
Description
If set to true
, the related list is hidden from detail pages where it appears as a component to prevent duplicate information from showing.
The name of the component as it appears to console users.
SubtabComponents
Represents custom console components on subtabs in the Salesforce console. Available in API version 25.0 and later.
Field Name
component containers
Field Type Description
Represents a custom console component (Visualforce page, lookup field, or related lists; Force.com Canvas apps not available) on a section of a page layout. Custom console components only display in the Salesforce console. This field is available in API version 29.0 and earlier.
[] Represents a location and style in which to display more than one custom console component on the sidebars of the Salesforce console. You can specify up to five components for each of the four locations (left, right, top, and bottom). This field is available in API version 30.0 and later.
FeedLayout
Represents the values that define the feed view of a feed-based page layout. Feed-based layouts are available on Account, Case, Contact,
Lead, Opportunity, custom, and external objects. They include a feed view and a detail view. Available in API version 30.0 and later.
Field Name
autocollapsePublisher
Field Type
boolean compactFeed boolean
Description
Specifies whether the publisher is automatically collapsed when the page loads ( true
) or not ( false
).
Specifies whether the feed-based page layout uses a compact feed
( true
) or not ( false
). If set to true
, feed items on the page are collapsed by default, and the feed view has an updated design.
Layout
442
Metadata Types
Field Name
feedFilterPosition feedFilters fullWidthFeed hideSidebar leftComponents rightComponents
Field Type Description
FeedLayoutFilterPosition
of type string)
Where the feed filters list is included in the layout. Valid values are:
•
centerDropDown
—as a drop-down list in the center column.
•
leftFixed
—as a fixed list in the left column.
•
leftFloat
—as a floating list in the left column.
boolean
[] The individual filters displayed in the feed filters list.
Specifies whether the feed expands horizontally to take up all available space on the page ( true
) or not ( false
).
Specifies whether the sidebar is hidden ( true
) or not ( false
).
boolean
The individual components displayed in the left column of the feed view.
The individual components displayed in the right column of the feed view.
FeedLayoutComponent
Represents a component in the feed view of a feed-based page layout. Available in API version 30.0 and later.
Field Name
componentType height page
Field Type Description
FeedLayoutComponentType
string)
Required. The type of component. Valid values are:
•
HelpAndToolLinks
—icons that link to the help topic for the page, the page layout, and, the printable view of the page. Available only on Case layouts.
•
CustomButtons
—a custom button.
•
Following
—an icon that toggles between a Follow button (if the user viewing a record doesn’t already follow it) and a Following indicator (if the user viewing a record does follow it).
•
Followers
—a list of users who follow the record.
•
CustomLinks
—a custom link.
•
Milestones
—the milestone tracker, which lets users see the status of a milestone on a case. Available only on Case layouts.
•
Topics
—a list of topics related to the record.
•
CaseUnifiedFiles
—a list of all files that are attached to the case.
•
Visualforce
—a custom Visualforce component.
int string
The height, in pixels, of the component. Doesn’t apply to standardComponents
The name of a Visualforce page being used as a custom component.
Layout
443
Metadata Types
FeedLayoutFilter
Represents a feed filter option in the feed view of a feed-based page layout. A filter must have only standardFilter
or feedItemType
set. Available in API version 30.0 and later.
Field Name
feedFilterName feedFilterType feedItemType
Field Type
string
FeedLayoutFilterType
string)
Description
The name of a CustomFeedFilter component. Names are prefixed with the name of the parent object. For example,
Case.MyCustomFeedFilter
.
The type of filter. Valid values are:
•
AllUpdates
—shows all feed items on a record.
•
FeedItemType
—shows feed items only for a particular type of activity on the record.
FeedItemType
string)
The type of feed item to display. Valid values are:
•
ActivityEvent
—feed items related to activity on tasks and events associated with a case. Available only on Case layouts.
•
AdvancedTextPost
–feed items related to group announcements posted on a feed. This value is available in API version 31.0 and later.
•
AnnouncementPost
–Not used.
•
ApprovalPost
—feed items related to approvals that are submitted on a feed.
•
AttachArticleEvent
—feed items for activity related to attaching articles to cases. Available only on Case layouts.
•
BasicTemplateFeedItem
—Not used.
•
CallLogPost
—feed items for activity from the Log a Call action.
Available only on layouts for objects that support Activities (tasks and events).
•
CanvasPost
—feed items related to posts a canvas app makes on a feed.
•
CaseCommentPost
—feed items for activity from the Case Note action. Available only on Case layouts.
•
ChangeStatusPost
—feed items for activity from the Change
Status action. Available only on Case layouts.
•
ChatTranscriptPost
—feed items for activity related to attaching Live Agent chat transcripts to cases. Available only on Case layouts.
•
CollaborationGroupCreated
—feed items related to creating a public group.
•
CollaborationGroupUnarchived
—Not used.
•
ContentPost
—feed items related to attaching a file to a post.
•
CreatedRecordEvent
—feed items related to creating a record from the publisher.
Layout
444
Metadata Types
Field Name Field Type Description
•
DashboardComponentSnapshot
—feed items related to posting a dashboard snapshot on a feed.
•
EmailMessageEvent
—feed items for activity from the Email action. Available only on Case layouts.
•
FacebookPost
—Not used.
•
LinkPost
—feed items related to attaching a URL to a post.
•
MilestoneEvent
—feed items for changes to the milestone status on a case. Available only on Case layouts.
•
PollPost
—feed items related to posting a poll on a feed.
•
ProfileSkillPost
—feed items related to skills added to a user’s Chatter profile. This value is available in API version 31.0 and later.
•
QuestionPost
—feed items related to posting a question on a feed. This value is available in API version 31.0 and later.
•
ReplyPost
—feed items for activity from the Portal action.
Available only on Case layouts.
•
RypplePost
—feed items related to creating a Thanks badge in
Work.com.
•
SocialPost
—feed items for activity on Twitter from the Social
Post action.
•
TextPost
—feed items for creating a text post from the publisher.
•
TrackedChange
—feed items related to a change or group of changes to a tracked field.
•
UserStatus
—Not used.
MiniLayout
Represents a mini view of a record in the Console tab, hover details, and event overlays.
Field Name
fields relatedLists
Field Type
string[]
[]
Description
The fields for the mini-layout, listed in the order they appear in the UI.
Fields that appear here must appear in the main layout.
The mini related list, listed in the order they appear in the UI. You cannot set sorting on mini related lists. Fields that appear here must appear in the main layout.
LayoutSection
LayoutSection represents a section of a page layout, such as the Custom Links section.
Layout
445
Metadata Types
Field Name
customLabel detailHeading editHeading label layoutColumns style summaryLayout
Field Type
boolean boolean
Description
Indicates if this section's label is custom or standard (built-in). Custom labels can be any text, but must be translated. Standard labels have a predefined set of valid values, for example 'System Information', which are automatically translated.
Controls if this section appears in the detail page. In the UI, this setting corresponds to the checkbox in the section details dialog.
boolean string
Controls if this section appears in the edit page.
The label; either standard or custom, based on the customLabel flag.
[]
LayoutSectionStyle
(
string)
The columns of the layout, depending on the style. 1, 2, or 3 columns, ordered left to right, are possible.
The style of the layout:
•
TwoColumnsTopToBottom
- Two columns, tab goes top to bottom
•
TwoColumnsLeftToRight
- Two columns, tab goes left to right
•
OneColumn
- One column
•
CustomLinks
- Contains custom links only
Reserved for future use.
LayoutColumn
LayoutColumn represents the items in a column within a layout section.
Field Name
layoutItems reserved
Field Type
string
Description
The individual items within a column (ordered from top to bottom).
This field is reserved for Salesforce. The field resolves an issue with some
SOAP libraries. Any value entered in the field is ignored.
LayoutItem
LayoutItem represents the valid values that define a layout item. An item must have only one of the following values set: component, customLink, field, scontrol, page, analyticsCloudComponent, or reportChartComponent.
Field Name
behavior
Field Type Description
of type string) Determines the field behavior. Valid string values:
•
Edit
—The layout field can be edited but is not required
Layout
446
Metadata Types
Field Name
canvas component
Field Type
string string
Description
•
Required
—The layout field can be edited and is required
•
Readonly
—The layout field is read-only
Reference to a canvas app.
This field is available in API version 31.0 and later.
Reference to a component. Value must be
sfa:socialCard
.
This field is available in API version 30.0 and later. This is only allowed inside a
RelatedContentItem
.
sfa:socialCard
is only supported on page layouts for contacts, accounts, and leads.
customLink string The customLink
reference. This is only allowed inside a
CustomLink layoutSection
.
Controls if this layout item is a blank space.
emptySpace field height page boolean string int string
The field name reference, relative to the layout object, for example
Description
or
MyField__c
.
For s-control and pages only, the height in pixels.
Reference to a Visualforce page.
analyticsCloudComponent
AnalyticsCloudComponentLayoutItem
Refers to a Analytics dashboard that you can add to a standard or custom object page.
This field is available in API version 34.0 and later.
reportChartComponent
ReportChartComponentLayoutItem
scontrol showLabel showScrollbars width string boolean boolean string
Refers to a report chart that you can add to a standard or custom object page.
Reference to an s-control.
For s-control and pages only, whether to show the label.
For s-control and pages only, whether to show scrollbars.
For s-control and pages only, the width in pixels or percent. Pixel values are simply the number of pixels, for example,
500
. Percentage values must include the percent sign, for example,
20%
.
AnalyticsCloudComponentLayoutItem
Represents the settings for a Analytics dashboard on a standard or custom page. Available in API version 34.0 and later.
Layout
447
Metadata Types
Field Name
assetType devName error filter height hideOnError showSharing showTitle width
Field Type
string string string string int boolean boolean boolean string
Description
Required. Specifies the type of Analytics asset to add. The available asset type is dashboard
.
Required. Unique development name of the dashboard to add.
Error string; only populated if an error occurred in the underlying dashboard.
Communicates initial dashboard filters for mapping data fields in the dashboard to the object’s fields, so that the dashboard shows only the data that’s relevant for the record being viewed.
Specifies the height of the dashboard, in pixels. The default is
400
.
Controls whether users see a dashboard that has an error. When this attribute is set to true
, if the dashboard has an error, the dashboard doesn’t appear on the page. When set to false
, the dashboard appears but doesn’t show any data except the error. An error can happen when a user doesn’t have access to Analytics or to the dashboard. The default is true
.
If set to true
, and the dashboard is shareable, then the dashboard shows the Share icon. Users can click the icon to open the Share dialog and post or download from the dashboard. If set to false
, the dashboard doesn't show the Share icon. This field is available in API version 37.0 and later.
If true
, includes the dashboard’s title above the dashboard. If false
, the dashboard appears without a title. The default is true
.
Specifies the width of the dashboard, in pixels or percent. Pixel values are simply the number of pixels, for example,
500
. Percentage values must include the percent sign, for example,
20%
. The default is
100%
.
ReportChartComponentLayoutItem
Represents the settings for a report chart on a standard or custom page.
Field Name
cacheData
Field Type
boolean contextFilterableField string
Description
Indicates whether to use cached data when displaying the chart. When the attribute is set to true
, data is cached for 24 hours. If the attribute is set to false
, the report is run every time the page is refreshed.
This field is available in API version 29.0 and later.
Unique development name of the field by which a report chart is filtered to return data relevant to the page. If set, the ID field for the parent object of the page or report type is the chart data filter. The parent object for the report type and the page must match for a chart to return relevant data.
Layout
448
Metadata Types
Field Name
error hideOnError includeContext reportName showTitle size
Field Type
string boolean
Description
Error string; only populated if an error occurred in the underlying report.
This field is available in API version 31.0 and later.
Controls whether users see a chart that has an error. When there’s an error and this attribute is not set, the chart doesn’t show any data except the error. An error can happen for many reasons, such as when a user doesn’t have access to fields used by the chart or a chart has been removed from the report. Set the attribute to true
to hide the chart from a page on error.
This field is available in API version 29.0 and later.
boolean string
If true
, filters the report chart to return data that’s relevant to the page.
Unique development name of a report that includes a chart.
boolean If true
, applies the title from the report to the chart.
(
ReportChartComponentSize
The chart size is medium when no value is specified. Valid values:
string)
•
SMALL
•
MEDIUM
•
LARGE
PlatformActionList
PlatformActionList represents the list of actions, and their order, that display in the Salesforce1 action bar for the layout. Available in API version 34.0 and later.
Field Name
actionListContext
Field Type Description
PlatformActionListContext
(
type string)
Required. The context of the action list. Valid values are:
•
Assistant
•
BannerPhoto
•
Chatter
•
Dockable
•
FeedElement
•
FlexiPage
•
Global
•
ListView
•
ListViewDefinition
•
ListViewRecord
•
Lookup
•
MruList
•
MruRow
449
Layout
Metadata Types
Field Name Field Type Description
•
ObjectHomeChart
•
Photo
•
Record
•
RecordEdit
•
RelatedList
•
RelatedListRecord platformActionListItems relatedSourceEntity
The actions in the PlatformActionList.
string When the
ActionListContext
is RelatedList or RelatedListRecord, this field represents the API name of the related list to which the action belongs.
PlatformActionListItem
PlatformActionListItem represents an action in the PlatformActionList. Available in API version 34.0 and later.
Field Name
actionName actionType sortOrder subtype
Field Type
string
Description
The API name for the action in the list.
PlatformActionType
string)
The type of action. Valid values are:
•
ActionLink web page, or a file, represented by a button in the Salesforce Chatter feed
UI.
—An indicator on a feed element that targets an API, a
•
CustomButton
—When clicked, opens a URL or a Visualforce page in a window or executes JavaScript.
•
InvocableAction
•
ProductivityAction
—Productivity actions are predefined by
Salesforce and are attached to a limited set of objects. You can’t edit or delete productivity actions.
•
QuickAction
—A global or object-specific action.
•
StandardButton
—A predefined Salesforce button such as New, Edit, and Delete.
int string
The placement of the action in the list.
The subtype of the action. For quick actions, the subtype is
QuickActionType
. For custom buttons, the subtype is
WebLinkTypeEnum
. For action links, subtypes are
Api
,
ApiAsync
,
Download
, and
Ui
. Standard buttons and productivity actions have no subtype.
Layout
450
Metadata Types
QuickActionList
QuickActionList represents the list of actions associated with the page layout. Available in API version 28.0 and later.
Field Name
quickActionListItems
Field Type
Description
Array of zero or more QuickActionList objects.
QuickActionListItem
QuickActionListItem represents an action in the QuickActionList. Available in API version 28.0 and later.
Field Name
quickActionName
Field Type
string
Description
The API name of the action.
RelatedContent
RelatedContent represents the Mobile Cards section of the page layout. Available in API version 29.0 and later.
Field Name
relatedContentItems
Field Type
[]
Description
A list of layout items in the Mobile Cards section of the page layout.
RelatedContentItem
RelatedContentItem represents an individual item in the RelatedContentItem
list. Available in API version 29.0 and later.
Field Name
layoutItem
Field Type
Description
An individual
LayoutItem in the Mobile Cards section.
RelatedListItem
RelatedListItem represents a related list in a page layout.
Field Name
customButtons
Field Type
string[] excludeButtons fields string[] string[]
Description
A list of custom buttons used in the related list. For more information, see “Define Custom Buttons and Links” in the Salesforce online help.
A list of excluded related-list buttons.
A list of fields displayed in the related list.
Retrieval of standard fields on related lists uses aliases instead of field or
API names. For example, the
Fax
,
Mobile
, and
Home Phone
fields are retrieved as Phone2, Phone3, and Phone4, respectively.
Layout
451
Metadata Types
Field Name
relatedList sortField sortOrder
Field Type
string string
SortOrder
(
string)
Description
Required. The name of the related list.
The name of the field that is used for sorting.
If the sortField
is set, the sortOrder
field determines the sort order.
•
Asc
- sort in ascending order
•
Desc
- sort in descending order
SummaryLayout
Controls the appearance of the highlights panel, which summarizes key fields in a grid at the top of a page layout, when Case Feed is enabled. Available in API version 25.0 and later.
Field Name
masterLabel sizeX sizeY sizeZ summaryLayoutItems summaryLayoutStyle
Field Type
string int
Description
Required. The name of the layout label.
Required. Number of columns in the highlights pane, between 1 and 4
(inclusive).
Required. Number of rows in each column, either 1 or 2.
int int Reserved for future use. If provided, the setting is not visible to users.
[] Controls the appearance of an individual field and its column and row position within the highlights panel grid, when Case Feed is enabled. At least one is required.
SummaryLayoutStyle
(
string)
Highlights panel style. Valid string values are:
•
Default
•
QuoteTemplate
•
DefaultQuoteTemplate
•
CaseInteraction
•
QuickActionLayoutLeftRight (Available in API version 28.0 and later.)
•
QuickActionLayoutTopDown (Available in API version 28.0 and later.)
SummaryLayoutItem
Controls the appearance of an individual field and its column and row position within the highlights panel grid, when Case Feed is enabled. You can have two fields per each grid in a highlights panel. Available in API version 25.0 and later.
Field Name
customLink
Field Type
string
Description
If the item is a custom link, this is the customLink
reference.
Layout
452
Metadata Types
Field Name
field posX posY posZ
Field Type
string int int int
Description
The field name reference, relative to the page layout. Must be a standard or custom field that also exists on the detail page.
Required. The item's column position in the highlights panel grid. Must
Required. The item's row position in the highlights panel grid. Must be
Reserved for future use. If provided, the setting is not visible to users.
Declarative Metadata Sample Definition
The following is the definition of a page layout:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Layout xmlns= "http://soap.sforce.com/2006/04/metadata">
<customConsoleComponents >
<primaryTabComponents >
<container >
<region >left </region >
<style >Stack </style >
<unit >Pixel </unit >
<width >101 </width >
<sidebarComponent >
<width >60 </width >
<page >simplepage1 </page >
<unit >Percentage </unit >
</sidebarComponent >
<sidebarComponent >
<width >40 </width >
<page >Hello_World </page >
<unit >Percentage </unit >
</sidebarComponent >
</container >
</primaryTabComponents >
<subtabComponents >
<component >
<location >top </location >
<visualforcePage >ConsoleComponentPage2 </visualforcePage >
<height >200 </height >
</component >
</subtabComponents >
</customConsoleComponents >
<customButtons >ButtonLink </customButtons >
<layoutSections >
<editHeading >true </editHeading >
<label >Information </label >
<layoutColumns >
<layoutItems >
<behavior >Required </behavior >
<field >Name </field >
Layout
453
Metadata Types
</layoutItems >
<layoutItems >
<height >180 </height >
<scontrol >LayoutSControl </scontrol >
<showLabel >true </showLabel >
<showScrollbars >true </showScrollbars >
<width >50% </width >
</layoutItems >
<layoutItems >
<reportChartComponent >
<contextFilterableField >CUST_ID </contextFilterableField >
<includeContext >true </includeContext >
<reportName >Open_Accounts_by_Cases </reportName >
<showTitle >false </showTitle >
<size >LARGE </size >
<reportChartComponent >
</layoutItems >
</layoutColumns >
<layoutColumns >
<layoutItems >
<behavior >Edit </behavior >
<field >OwnerId </field >
</layoutItems >
<layoutItems >
<behavior >Edit </behavior >
<field >CurrencyIsoCode </field >
</layoutItems >
</layoutColumns >
<style >TwoColumnsTopToBottom </style >
</layoutSections >
<layoutSections >
<editHeading >true </editHeading >
<label >System Information </label >
<layoutColumns >
<layoutItems >
<behavior >Readonly </behavior >
<field >CreatedById </field >
</layoutItems >
<layoutItems >
<behavior >Readonly </behavior >
<field >Alpha1__c </field >
</layoutItems >
<layoutItems >
<height >200 </height >
<page >mcanvasPage </page >
<showLabel >true </showLabel >
<showScrollbars >false </showScrollbars >
<width >100% </width >
</layoutItems >
</layoutColumns >
<layoutColumns >
<layoutItems >
<behavior >Readonly </behavior >
<field >LastModifiedById </field >
454
Layout
Metadata Types
</layoutItems >
<layoutItems >
<behavior >Edit </behavior >
<field >TextArea__c </field >
</layoutItems >
</layoutColumns >
<style >TwoColumnsTopToBottom </style >
</layoutSections >
<layoutSections >
<customLabel >true </customLabel >
<detailHeading >true </detailHeading >
<label >Custom Links </label >
<layoutColumns >
<layoutItems >
<customLink >CustomWebLink </customLink >
</layoutItems >
</layoutColumns >
<style >CustomLinks </style >
</layoutSections >
<quickActionList >
<quickActionListItems >
<quickActionName >FeedItem.TextPost
</quickActionName >
</quickActionListItems >
<quickActionListItems >
<quickActionName >FeedItem.ContentPost
</quickActionName >
</quickActionListItems >
<quickActionListItems >
<quickActionName >FeedItem.LinkPost
</quickActionName >
</quickActionListItems >
<quickActionListItems >
<quickActionName >FeedItem.PollPost
</quickActionName >
</quickActionListItems >
</quickActionList >
<relatedContent >
<relatedContentItems >
<layoutItem >
<component >sfa:socialPanel </component >
</layoutItem >
<relatedContentItems >
</relatedContent >
<miniLayoutFields >Name </miniLayoutFields >
<miniLayoutFields >OwnerId </miniLayoutFields >
<miniLayoutFields >CurrencyIsoCode </miniLayoutFields >
<miniLayoutFields >Alpha1__c </miniLayoutFields >
<miniLayoutFields >TextArea__c </miniLayoutFields >
<miniRelatedLists >
<relatedList >RelatedNoteList </relatedList >
</miniRelatedLists >
<relatedLists >
<fields >StepStatus </fields >
<fields >CreatedDate </fields >
<fields >OriginalActor </fields >
<fields >Actor </fields >
<fields >Comments </fields >
455
Layout
Metadata Types
<fields >Actor.Alias
</fields >
<fields >OriginalActor.Alias
</fields >
<relatedList >RelatedProcessHistoryList </relatedList >
</relatedLists >
<relatedLists >
<relatedList >RelatedNoteList </relatedList >
</relatedLists >
</Layout >
The following is an example of a layout using
<summaryLayout >
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Layout xmlns= "http://soap.sforce.com/2006/04/metadata">
<layoutSections >
<editHeading >true </editHeading >
<label >System Information </label >
<layoutColumns >
<layoutItems >
<behavior >Readonly </behavior >
<field >CreatedById </field >
</layoutItems >
<layoutItems >
<behavior >Required </behavior >
<field >Name </field >
</layoutItems >
</layoutColumns >
<layoutColumns >
<layoutItems >
<behavior >Readonly </behavior >
<field >LastModifiedById </field >
</layoutItems >
</layoutColumns >
<style >TwoColumnsTopToBottom </style >
</layoutSections >
<summaryLayout >
<masterLabel >Great Name </masterLabel >
<sizeX >4 </sizeX >
<sizeY >2 </sizeY >
<summaryLayoutItems >
<posX >0 </posX >
<posY >0 </posY >
<field >Name </field >
</summaryLayoutItems >
</summaryLayout >
</Layout >
The following is an example of a feed-based layout:
<Layout >
...
<feedLayout >
<leftComponents >
<componentType >customLinks </componentType >
</leftComponents >
<rightComponents >
456
Layout
Metadata Types Letterhead
<componentType >follow </componentType >
</rightComponents >
<rightComponents >
<componentType >followers </componentType >
</rightComponents >
<rightComponents >
<componentType >visualforce </componentType >
<page >accountCustomWidget </page >
<height >200 </height >
</rightComponents >
<hideSidebar >true </hideSidebar >
<feedFilterPosition >centerDropDown </feedFilterPosition >
<feedFilters >
<feedFilerType >allUpdates </feedFilerType >
</feedFilters >
<feedFilters >
<feedFilerType >feedItemType </feedFilerType >
<feedItemType >CallLogPost </feedItemType >
</feedFilters >
<feedFilters >
<feedFilerType >feedItemType </feedFilerType >
<feedItemType >TextPost </feedItemType >
</feedFilters >
</feedLayout >
...
</Layout >
Letterhead
Represents formatting options for the letterhead in an email template. A letterhead defines the logo, page color, and text settings for your HTML email templates. Use letterheads to ensure a consistent look and feel in your company’s emails. For more information, see
“Create Letterheads for Email Templates” in the Salesforce online help. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
The file suffix for letterheads is
.letter
and components are stored in the letterhead
directory of the corresponding package directory.
Version
Letterheads are available in API version 12.0 and later.
Fields
With the exception of logo, and horizontal and vertical alignment, all of these fields are required.
457
Metadata Types Letterhead
Field Name
available backgroundColor bodyColor bottomLine
Field Type
boolean string string
of type string)
Description
Required. Indicates whether this letterhead can be used
( true
) or not ( false
), for example, in an email template.
Required. The background color, in hexadecimal, for example
#FF6600
.
Required. The body color in hexadecimal.
Required. The style for the bottom line. Valid style values include:
•
color
. The color of the line in hexadecimal, as a string value.
•
height
. The height of the line, as an int value.
description string fullName footer header middleLine name topLine string
string
Text description of how this letterhead differs from other letterheads.
The internal name of the letterhead, based on the name
, but with white spaces and special characters escaped out for validity.
Required. The style for the footer.
Required. The style for the header.
Required. The style for the middle border line in your letterhead. Valid style values include:
•
color
. The color of the line in hexadecimal, as a string value.
•
height
. The height of the line, as an int value.
Required. The name of the letterhead.
Required. The style for the top horizontal line below the header. Valid style values include:
•
color
. The color of the line in hexadecimal, as a string value.
•
height
. The height of the line, as an int value.
LetterheadHeaderFooter
LetterheadHeaderFooter represents the properties of a header or footer.
Field
backgroundColor height
Field Type
string
[]
Description
Required. The background color of the header or footer in hexadecimal format.
Required. The height of the header or footer.
458
Metadata Types Letterhead
Field
horizontalAlignment logo verticalAlignment
Field Type Description
LetterheadHorizontalAlignment
of type string)
The horizontal alignment of the header or footer. Valid values are:
•
None
•
Left
•
Center
•
Right string
LetterheadVerticalAlignment
of type string)
The logo which is a reference to a document, for example
MyFolder/MyDocument.gif
.
The vertical alignment of the header or footer. Valid values are:
•
None
•
Top
•
Middle
•
Bottom
LetterheadLine
LetterheadLine represents the properties of a line.
Field
color height
Field Type
string int
Description
Required. The color of the line in hexadecimal format.
Required. The height of the line.
Declarative Metadata Sample Definition
<?xml
version= "1.0" encoding= "UTF-8"?>
<Letterhead xmlns= "http://soap.sforce.com/2006/04/metadata">
<available >true </available >
<backgroundColor >#CCCCCC </backgroundColor >
<bodyColor >#33FF33 </bodyColor >
<bottomLine >
<color >#3333FF </color >
<height >5 </height >
</bottomLine >
<description >INITIAL </description >
<footer >
<backgroundColor >#FFFFFF </backgroundColor >
<height >100 </height >
<horizontalAlignment >Left </horizontalAlignment >
<verticalAlignment >Top </verticalAlignment >
</footer >
<header >
<backgroundColor >#FFFFFF </backgroundColor >
459
Metadata Types LiveChatAgentConfig
<height >100 </height >
<horizontalAlignment >Left </horizontalAlignment >
<verticalAlignment >Top </verticalAlignment >
</header >
<middleLine >
<color >#AAAAFF </color >
<height >5 </height >
</middleLine >
<name >SimpleLetterheadLabel </name >
<topLine >
<color >#FF99FF </color >
<height >5 </height >
</topLine >
</Letterhead >
LiveChatAgentConfig
Represents the configuration of an organization’s Live Agent deployment, such as how many chats can be assigned to an agent and whether or not chat sounds are enabled. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
LiveChatAgentConfig configurations are referenced in the
<developer_name>.liveChatAgentConfig
file in the liveChatAgentConfigs
directory.
Version
LiveChatAgentConfig is available in API version 28.0 and later.
Fields
Field Name
assignments autoGreeting capacity criticalWaitTime enableAgentSneakPeek
Field Type Description
Specifies how agent configurations are assigned to Live
Agent users. Agent configurations can be assigned to sets of users or sets of profiles.
string int
Specifies the greeting that displays when a customer begins a chat with an agent.
Specifies the maximum number of chats in which an agent can be engaged at a time.
int boolean
Specifies the number of seconds an agent can wait to answer an engaged chat before the chat tab flashes to alert the agent to answer it.
Specifies whether a supervisor can see the content of an agent’s message before they send it to a customer ( true
) or not ( false
).
460
Metadata Types LiveChatAgentConfig
Field Name
enableAssistanceFlag enableAutoAwayOnDecline enableAutoAwayOnPushTimeout enableAgentFileTransfer
Field Type
boolean boolean boolean boolean
Description
Indicates whether agents can raise an assistance flag to notify a supervisor that they need help. Available in API version
35.0 and later.
Indicates whether an agent appears as “away” ( true
) or not ( false
) when an agent declines a chat with a customer.
Indicates whether an agent appears as “away” ( true
) or not ( false
) when a chat request that's been pushed to the agent times out. Available in API version 34.0 and later.
Indicates whether file transfer is enabled for agents ( true
) or not ( false
). Available in API version 31.0 and later.
enableChatConferencing enableChatTransfer enableLogoutSound enableNotifications boolean boolean boolean boolean
Indicates whether chat conferencing is enabled for agents
( true
) or not ( false
). Available in API version 34.0 and later.
Indicates whether chat transfer is enabled for agents ( true
) or not ( false
). Available in API version 31.0 and later.
Indicates whether a sound will play ( true
) or not ( false
) when an agent logs out of Live Agent.
Indicates whether notifications of incoming chats appear for agents ( true
) or not ( false
).
enableRequestSound enableSneakPeek enableVisitorBlocking label boolean boolean boolean string
Indicates whether a sound will play ( true
) or not ( false
) when a customer requests to chat with an agent.
Indicates whether previews of customers’ messages are displayed as customers type ( true
) or not ( false
) in the agent’s Live Agent window. Available in API version 29.0 and later.
Indicates whether an agent can block a visitor by IP address
( true
) or not ( false
). Available in API version 34.0 and later.
Specifies the name of the configuration for agents’ default chat settings.
supervisorDefaultAgentStatusFilter
SupervisorAgentStatusFilter
of type string)
Specifies the Live Agent status for filtering the Agent Status list in the Supervisor Panel. Valid values are:
•
Online
•
Away
•
Offline
Available in API version 29.0 and later.
461
Metadata Types LiveChatAgentConfig
Field Name
supervisorDefaultButtonFilter
Field Type
string supervisorDefaultSkillFilter supervisorSkills string Specifies the default skill for filtering the Agent Status list in the Supervisor Panel. Available in API version 29.0 and later.
Specifies the list of agent skills that are assigned to a supervisor, as specified in their assigned Live Agent configuration. Available in API version 29.0 and later.
transferableButtons
Description
Specifies the default button for filtering the Agent Status list in the Supervisor Panel. Available in API version 29.0 and later.
transferableSkills
Specifies the list of chat buttons that agents can transfer chats to. Available in API version 31.0 and later.
Specifies the list of skill groups that agents can transfer chats to. Available in API version 31.0 and later.
AgentConfigAssignments
Represents the assignments of an organization’s profiles and users to a Live Agent configuration.
Fields
Field Name
profiles users
Field Type
Description
Specifies the profiles that are associated with a specific agent configuration.
Specifies the users that are associated with a specific agent configuration.
AgentConfigButtons
Represents the chat buttons that agents who are associated with the Live Agent configuration can transfer chats to.
Fields
Field Name
button
Field Type
string[]
Description
Specifies the chat buttons that agents can transfer chats to.
AgentConfigProfileAssignments
Represents the profiles associated with a specific Live Agent configuration.
462
Metadata Types
Fields
Field Name
profile
LiveChatAgentConfig
Field Type
string
Description
Specifies the custom name of the profile associated with a specific agent configuration.
AgentConfigSkills
Represents the skill groups that agents who are associated with the Live Agent configuration can transfer chats to.
Fields
Field Name
skill
Field Type
string[]
Description
Specifies the skill groups that agents can transfer chats to.
AgentConfigUserAssignments
Represents the users associated with a specific Live Agent configuration.
Fields
Field Name
user
Field Type
string
Description
Specifies the username of the user associated with a specific agent configuration.
SupervisorAgentConfigSkills
Represents the agent skills associated with a supervisor’s Live Agent configuration. Available in API version 29.0 and later.
Fields
Field Name
skill
Field Type
string
Description
Specifies the agent skills available for filtering the Agent
Status list in the Supervisor Panel.
463
Metadata Types LiveChatButton
Declarative Metadata Sample Definition
This is a sample of a liveChatAgentConfig
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<LiveChatAgentConfig xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >My Agent Configuration 1 </label >
<autoGreeting >Hi, how can I help you?
</autoGreeting >
<capacity >5 </capacity >
<enableAutoAwayOnDecline >true </enableAutoAwayOnDecline >
<enableLogoutSound >true </enableLogoutSound >
<enableNotifications >true </enableNotifications >
<enableRequestSound >true </enableRequestSound >
<enableSneakPeek >true </enableSneakPeek >
<assignments >
<profiles >
<profile >standard </profile >
</profiles >
<users >
<user >[email protected]
</user >
</users >
</assignments >
</LiveChatAgentConfig >
LiveChatButton
Represents a Live Agent deployment’s settings for the button that customers click to chat with an agent and the chat window, such as
metadata type and inherits its fullName
field.
Note:
Live Agent chats routed with Omni-Channel aren’t supported in the Metadata API.
File Suffix and Directory Location
LiveChatButton configurations are stored in the
<developer_name>.liveChatButton
file in the liveChatButtons directory.
Version
LiveChatButton is available in API version 28.0 and later.
Fields
Field Name
animation
Field Type
LiveChatButtonPresentation ( enumeration
of type string)
Description
The type of animation for a chat invitation. Valid values are:
•
Slide
464
Metadata Types
Field Name
autoGreeting chasitorIdleTimeout chasitorIdleTimeoutWarning chatPage customAgentName deployments enableQueue inviteEndPosition inviteImage
Field Type
string int int string string
boolean
LiveChatButtonInviteEndPosition
of type string) string
LiveChatButton
Description
•
Fade
•
Appear
•
Custom
The customized greeting message that the customer receives when an agent accepts a chat request from the chat button or invitation.
Available in API version 29.0 and later.
Specifies the amount of idle time before the chat times out. The idle time starts being counted after the agent sends the last chat message.
Available in API version 35.0 and later.
Specifies the amount of idle time before a warning appears. The idle time starts being counted after the agent sends the last chat message. Available in API version 35.0 and later.
Specifies the page that hosts your chat if that page differs from the Live Agent chat window.
The agent’s name as it appears to customers in the chat window.
Available in API version 29.0 and later.
Specifies the deployments associated with the button.
Indicates whether queuing is enabled ( true
) or not ( false
).
The end position of the chat invitation. Valid values include:
•
TopLeft
•
Top
•
TopRight
•
Left
•
Center
•
Right
•
BottomLeft
•
Bottom
•
BottomRight
The custom button graphic that appears for the invitation.
465
Metadata Types
Field Name
inviteStartPosition
Field Type
LiveChatButtonInviteStartPosition
of type string) isActive label string numberOfReroutingAttempts int offlineImage boolean string onlineImage string optionsCustomRoutingIsEnabled boolean optionsHasChasitorIdleTimeout boolean optionsHasInviteAfterAccept boolean
LiveChatButton
Description
The start position of the chat invitation. Valid values include:
•
TopLeft
•
TopLeftTop
•
Top
•
TopRightTop
•
TopRight
•
TopRightRight
•
Right
•
BottomRightRight
•
BottomRight
•
BottomRightBottom
•
Bottom
•
BottomLeftBottom
•
BottomLeft
•
BottomLeftLeft
•
Left
•
TopLeftLeft
Specifies whether the chat button or invitation is active.
Specifies the text that appears on the button.
Specifies the number of times a chat request can be rerouted to available agents if all agents reject the chat request. Available in API version 30.0
and later.
Specifies the image that appears on the button when no agents are available to chat.
Specifies the image that appears on the button when agents are available to chat.
Indicates whether custom routing is enabled for incoming chat requests ( true
) or not ( false
).
Available in API version 30.0 and later.
Indicates whether the visitor idle timeout feature is enabled. Available in API version 35.0 and later.
Indicates whether a new chat invitation triggers after a customer accepts a previous chat invitation ( true
) or not ( false
).
466
Metadata Types LiveChatButton
Field Name
optionsHasInviteAfterReject optionsHasRerouteDeclinedRequest optionsIsAutoAccept
Field Type
boolean boolean boolean
Description
Indicates whether a new chat invitation triggers after a customer rejects a previous chat invitation
( true
) or not ( false
).
Indicates whether a chat request, which has been rejected by all available agents, should be rerouted to available agents again ( true
) or not
( false
). Available in API version 30.0 and later.
Indicates whether a chat request should be automatically accepted by the agent it’s assigned to ( true
) or not ( false
). For chat buttons and automated chat invitations with routingType
set to
MostAvailable
or
LeastActive
. Available in API version 30.0
and later.
optionsIsInviteAutoRemove overallQueueLength perAgentQueueLength postChatPage postChatUrl preChatFormPage preChatFormUrl pushTimeOut routingType boolean int int string string string string int
Indicates whether a chat invitation is set to automatically disappear from a customer’s screen after a certain amount of time ( true
) or not
( false
).
Specifies the maximum number of chat requests that are allowed to queue.
Specifies the number of chat requests that are allowed to queue for an agent with the required skills.
Specifies the name of the post-chat form to which customers are routed when the chat ends.
Specifies the URL of the post-chat form to which customers are routed when the chat ends.
Specifies the name of the pre-chat form to which customers are routed before a chat begins.
Specifies the URL of the pre-chat form to which customers are routed when the chat begins.
Specifies the number of seconds an agent has to answer an incoming chat request before the request is routed to another agent.
LiveChatButtonRoutingType ( enumeration
of type string)
Specifies how incoming chats should be routed to agents when a customer pushes a button.
Valid values are:
•
Choice
•
LeastActive
•
MostAvailable
467
Metadata Types
Description
Specifies the name of the deployment.
LiveChatButton
Field Name
site skills timeToRemoveInvite type windowLanguage
Field Type
string
Description
Specifies the Force.com site that hosts your custom chat button images or custom chat page.
Note: You must have the
“CustomDomain” permission enabled in your organization before you can use a
Force.com site with Live Agent.
int
LiveChatButtonType (
string)
Specifies the skills associated with the button.
When a customer clicks the button to chat, they are automatically routed to agents with those skills.
Specifies how long the invitation is displayed (in seconds) to customers before it disappears.
Required. The chat button type. Valid values are:
•
Standard
•
Invite
Specifies the language preferences for the chat window associated with the button.
LiveChatButtonSkills
Represents the skills associated with a chat button or invitation.
Fields
Field Name
skill
Field Type
string
Description
Specifies the name of the skill.
LiveChatButtonDeployments
Represents the deployments associated with a chat button or invitation.
Fields
Field Name
deployment
Field Type
string
468
Metadata Types LiveChatDeployment
Declarative Metadata Sample Definition
This is a sample of a liveChatButton
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<LiveChatButton xmlns= "http://soap.sforce.com/2006/04/metadata">
<deployments/ >
<enableQueue >false </enableQueue >
<isActive >true </isActive >
<label >CustomerSupportButton </label >
<optionsCustomRoutingIsEnabled >false </optionsCustomRoutingIsEnabled >
<optionsHasChasitorIdleTimeout >false </optionsHasChasitorIdleTimeout >
<optionsHasInviteAfterAccept >false </optionsHasInviteAfterAccept >
<optionsHasInviteAfterReject >false </optionsHasInviteAfterReject >
<optionsHasRerouteDeclinedRequest >false </optionsHasRerouteDeclinedRequest >
<optionsIsAutoAccept >false </optionsIsAutoAccept >
<optionsIsInviteAutoRemove >false </optionsIsInviteAutoRemove >
<postChatUrl >http://help.salesforce.com
</postChatUrl >
<routingType >Choice </routingType >
<skills >
<skill >Chat </skill >
</skills >
<type >Standard </type >
</LiveChatButton >
Note:
If you update your chat button through the Metadata API, be sure to update all Web pages that use the same chat button code.
LiveChatDeployment
Represents the configuration settings for a specific Live Agent deployment, such as the branding image for the deployment and whether or not chat transcripts are automatically saved. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
LiveChatDeployment values are stored in the
<developer_name>.liveChatDeployment
file in the liveChatDeployments
directory.
Version
LiveChatDeployment is available in API version 28.0 and later.
Fields
Field Name
brandingImage
Field Type
string
Description
Specifies the branding image for the deployment.
469
Metadata Types LiveChatDeployment
Field Name
connectionTimeoutDuration
ConnectionWarningDuration displayQueuePosition domainWhiteList enablePrechatApi enableTranscriptSave label mobileBrandingImage site windowTitle
Field Type
int int boolean
LiveChatDeploymentDomainWhiteList
boolean boolean string string string string
Description
Indicates the amount of time before the chat times out, in seconds.
Indicates the amount of time before a time-out warning is displayed to the agent, in seconds.
(Pilot) Determines whether a customer’s queue position is displayed in a standard chat window while the customer waits for an agent to respond to the chat request ( true
) or not
( false
). This field is available as a pilot in API version 32.0. To enable this field, contact
Salesforce.
Specifies the list of domains that can host the deployment.
Indicates whether or not the pre-chat API is enabled for the deployment ( true
) or not
( false
).
Indicates whether chat transcripts are automatically saved after a chat ends ( true
) or not ( false
).
Specifies the name of the deployment.
Specifies the branding image for the deployment that appears when customers access the deployment on a mobile device.
Specifies the site that hosts the images for the deployment.
Note: You must have the
“CustomDomain” permission enabled in your organization before you can use a Force.com site with Live Agent.
Specifies the title of the window associated with the deployment.
LiveChatDeploymentDomainWhiteList
Represents a Live Agent deployment’s domain whitelist.
470
Metadata Types
Fields
Field Name
domain
LiveChatSensitiveDataRule
Field Type
string
Description
Specifies a domain that can host the deployment.
Declarative Metadata Sample Definition
This is a sample of a liveChatDeployment
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<LiveChatDeployment xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >My Deployment 1 </label >
<brandingImage >pkb_image_bannerBg </brandingImage >
<mobileBrandingImage >pkb_image_bgBottom </mobileBrandingImage >
<domainWhiteList >
<domain >mydomain </domain >
<domain >test </domain >
</domainWhiteList >
<enableTranscriptSave >true </enableTranscriptSave >
<site >GL_Knowledge_Base </site >
<windowTitle >My window title </windowTitle >
</LiveChatDeployment >
Note: If you update your deployment through the Metadata API, be sure to update all Web pages that use the same deployment code.
LiveChatSensitiveDataRule
Represents a rule for masking or deleting data of a specified pattern. Written as a regular expression (regex).
Use this object to mask or delete data of specified patterns, such as credit card, social security, phone and account numbers, or even
profanity. This type extends the Metadata
metadata type and inherits its fullName
field.
File Suffix and Directory Location
LiveChatSensitiveDataRule components have the suffix
.liveChatSensitiveDataRule
and are stored in the liveChatSensitiveDataRule
folder.
Version
LiveChatSensitiveDataRule components are available in API version 35.0 and later.
471
Metadata Types
Fields
Field Name
actionType
LiveChatSensitiveDataRule description enforceOn isEnabled pattern replacement
Field Type Description
SensitiveDataActionType
(
type string)
Required. The action to take on the text when the sensitive data rule is triggered. Possbile values are:
•
Remove
•
Replace string int boolean string string
The description of the sensitive data rule—for example, “Block social security numbers.”
Required. Determines the roles on which the rule is enforced. The value is determined using bitwise OR operation. There are seven possible values:
1. Rule enforced on Agent
2. Rule enforced on Visitor
3. Rule enforced on Agent and Visitor
4. Rule enforced on Supervisor
5. Rule enforced on Agent and Supervisor
6. Rule enforced on Visitor and Supervisor
7. Rule enforced on Agent, Visitor, and Supervisor
Required. Specifies whether a sensitive data rule is active ( true
) or not
( false
). Default value (if none is provided) is false
.
Required. The pattern of text blocked by the rule. Written as a JavaScript regular expression (regex).
The string of characters that replaces the blocked text (if
ActionType
Replace
is selected).
Declarative Metadata Sample Definition
The following is an example of a LiveChatSensitiveDataRule component.
<LiveChatSensitiveDataRule xmlns= "http://soap.sforce.com/2006/04/metadata">
<actionType >REPLACE </actionType >
<enforceOn >7 </enforceOn >
<isEnabled >true </isEnabled >
<pattern >[aeiou] </pattern >
<replacement >œ </replacement >
</LiveChatSensitiveDataRule >
The following is an example package.xml
that references the previous definition.
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<!-- To be used from
472
Metadata Types ManagedTopics support.liveagent.testsuite.unifiedouting.testDeployButtonMDAPIWithExistingQueue -->
<apiAccessLevel >Unrestricted </apiAccessLevel >
<types >
<members >Change_For_all </members >
<name >LiveChatSensitiveDataRule </name >
</types >
<version >35.0
</version >
</Package >
ManagedTopics
Represents navigational and featured topics managed in a community. A specific community is represented by the
component.
Note: The related network must exist before you deploy managed topics. (This occurs automatically when deploying an entire organization.)
File Suffix and Directory Location
Components have the suffix managedTopics and are stored in the managedTopics folder. In that folder, you’ll find separate files for each network (for example,
NetworkNameA.managedTopics
and
NetworkNameB.managedTopics
).
Version
ManagedTopics components are available in API version 32.0 and later.
Fields
Field Name
ManagedTopic
Field Type
Description
Represents a specific navigational or featured topic.
ManagedTopic
Field Name
name managedTopicType topicDescription parentName
Field Type
string string string string
Description
The topic name.
The topic type: “Navigational” or “Featured”
An optional description of topic contents. This field is accessible only via the API; there is no corollary in the user interface.
The name of a parent topic for which this topic is a child. Child topics are accessible from the subtopics section of the parent topic page and their feeds are added to the parent topic feed.
Only navigational topics support parent-child relationships.
473
Metadata Types
Field Name
position
Field Type
int
ManagedTopics
Description
The placement of this topic relative to others of the same type. The results differ depending on topic type:
•
For top-level navigational topics, position
arranges the Topics menu in the community.
•
For child navigational topics, it arranges sibling topics in the subtopics section.
•
For featured topics, it arranges topic thumbnail images on the community home page.
Enter a number between 0 and 24. (The maximum amount of navigational or featured topics is 25.)
Declarative Metadata Sample Definition
The following example retrieves or deploys managed topics for all networks:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >ManagedTopics </name >
</types >
<version >32.0
</version >
</Package >
The following example shows a package.xml file referencing the ManagedTopics component:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >NetworkName </members >
<name >ManagedTopics </name >
</types >
<version >32.0
</version >
</Package >
The following example shows the ManagedTopics component itself:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ManagedTopics >
<ManagedTopic >
<name >Running </name >
<managedTopicType >Navigational </managedTopicType >
<topicDescription >Training advice </topicDescription >
<parentName > </parentName >
<position >0 </position >
</ManagedTopic >
<ManagedTopic >
<name >Hiking </name >
<managedTopicType >Navigational </managedTopicType >
<topicDescription >Routes and gear </topicDescription >
474
Metadata Types MatchingRule
<parentName > </parentName >
<position >1 </position >
</ManagedTopic >
<ManagedTopic >
<name >Trails </name >
<managedTopicType >Navigational </managedTopicType >
<topicDescription >Maps for local favorites </topicDescription >
<parentName >Hiking </parentName >
<position >0 </position >
</ManagedTopic >
<ManagedTopic >
<name >Backpacks </name >
<managedTopicType >Navigational </managedTopicType >
<topicDescription >Recommended models </topicDescription >
<parentName >Hiking </parentName >
<position >1 </position >
</ManagedTopic >
<ManagedTopic >
<name >Footwear </name >
<managedTopicType >Featured </managedTopicType >
<topicDescription >Suggested types for each sport </topicDescription >
<parentName > </parentName >
<position >0 </position >
</ManagedTopic >
<ManagedTopic >
<name >Conditioning </name >
<managedTopicType >Featured </managedTopicType >
<topicDescription >How to get fit for any activity </topicDescription >
<parentName > </parentName >
<position >1 </position >
</ManagedTopic >
</ManagedTopics >
MatchingRule
Represents a matching rule that is used to identify duplicate records. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
Matching rule components have the
.matchingRule
suffix and are stored in the matchingRules
folder. The name of the component file is the standard or custom object name that is associated with the matching rule.
In API version 39.0 and later, MatchingRule supports the Person Account object.
•
The component file name is
PersonAccount.matchingRule
.
•
The component directory is matchingRules
.
Version
MatchingRule is available in API version 33.0 and later.
475
Metadata Types
Fields
Field Name
booleanFilter description label matchingRuleItems ruleStatus
Field Type
string string
Description
Specifies filter logic conditions.
The description of the matching rule.
string
Required. The name of the matching rule.
The criteria that make up a matching rule.
MatchingRuleStatus
(
type string)
Required. The activation status of the matching rule. Values are:
•
Inactive
•
Deactivating
•
DeactivationFailed
•
Active
•
Activating
•
ActivationFailed
Important: The only valid values you can declare when deploying a package are
Active
and
Inactive
.
MatchingRule
MatchingRuleItem
Field Name
blankValueBehavior
Field Type Description
BlankValueBehavior
string)
Specifies how blank fields affect whether the fields being compared are considered matches. Valid values are:
•
MatchBlanks
•
NullNotAllowed
(default) fieldName matchingMethod string Required. Indicates which field to compare when determining if a record is similar enough to an existing record to be considered a match.
MatchingMethod
string)
Required. Defines how the fields are compared. Choose between the exact matching method and various fuzzy matching methods. Valid values are:
•
Exact
•
FirstName
•
LastName
•
CompanyName
•
Phone
•
City
•
Street
•
Zip
•
Title
476
Metadata Types MatchingRule
Field Name Field Type Description
For details on each matching method, see “Matching Methods Used with
Matching Rules” in the Salesforce Help.
Declarative Metadata Sample Definition
The following is a sample XML definition of a matching rule. A matching rule can be associated with either a standard or a custom object.
<?xml
version= "1.0" encoding= "UTF-8"?>
<MatchingRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<matchingRules >
<fullName >AccountMatchingRule </fullName >
<label >Matching rule for accounts </label >
<description >this is sample rule description </description >
<matchingRuleItems >
<blankValueBehavior >NullNotAllowed </blankValueBehavior >
<fieldName >BillingCity </fieldName >
<matchingMethod >City </matchingMethod >
</matchingRuleItems >
<matchingRuleItems >
<blankValueBehavior >NullNotAllowed </blankValueBehavior >
<fieldName >Name </fieldName >
<matchingMethod >CompanyName </matchingMethod >
</matchingRuleItems >
<ruleStatus >Inactive </ruleStatus >
</matchingRules >
</MatchingRules >
The following package.xml
shows how to reference a matching rule by name. It specifies the type name of MatchingRule.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Account.AccountMatchingRule
</members >
<name >MatchingRule </name >
</types >
<version >41.0
</version >
</Package >
The following package.xml
shows how to reference all matching rules by specifying the plural MatchingRules type name and using a wildcard to include all members.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >MatchingRules </name >
</types >
<version >41.0
</version >
</Package >
477
Metadata Types Metadata
Metadata
This is the base class for all metadata types. You cannot edit this object. A component is an instance of a metadata type.
Metadata is analogous to sObject, which represents all standard objects. Metadata represents all components and fields in Metadata
API. Instead of identifying each component with an ID, each custom object or custom field has a unique fullName
, which must be distinct from standard object names, as it must be when you create custom objects or custom fields in the Salesforce user interface.
Version
Metadata components are available in API version 10.0 and later.
Fields
Field Name
fullName
Field Type
string
Description
Required. The name of the component. If a field, the name must specify the parent object, for example
Account.FirstName
. The __c suffix must be appended to custom object names and custom field names when you are setting the fullName
. For example, a custom field in a custom object could have a fullName
of
MyCustomObject__c.MyCustomField__c
.
To reference a component in a package, prepend the package’s namespace prefix to the component name in the fullName
field. Use the following syntax:
namespacePrefix__ComponentName
.
For example, for the custom field component
MyCustomObject__c.MyCustomField__c
and the namespace
MyNS
, the full name is
MyNS__MyCustomObject__c.MyCustomField__c
.
Note: A namespace prefix is a 1 to 15-character alphanumeric identifier that distinguishes your package and its contents from other publishers’ packages. For more information, see “Register a
Namespace Prefix” in the Salesforce Help.
SEE ALSO:
MetadataWithContent
This is the base type for all metadata types that contain content, such as documents or email templates. It extends
edit this object.
478
Metadata Types MilestoneType
Version
MetadataWithContent components are available in API version 14.0 and later.
Fields
Field Name
content
Field Type
base64Binary fullName string
Description
Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled for you by a SOAP client.
Required. The name of the component. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
Inherited from the
Metadata component, this field is not defined in the
WSDL for this component. It must be specified when creating, updating,
to see an example of this field specified for a call.
SEE ALSO:
MilestoneType
Represents the name and description of a milestone, which you can use in an entitlement process to track important steps in cases. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
Milestone types are stored in the milestoneTypes
directory of the corresponding package directory. The extension is
.milestoneType
.
Version
MilestoneType is available in API version 27.0 and later.
Fields
Field Name
description
Field Type
string
Description
The description of the milestone.
479
Metadata Types
Field Name
RecurrenceType
ModerationRule
Field Type Description
MilestoneTypeRecurrenceType
(
type string)
The type of recurrence for the milestone. Available in API version 29.0
and later. Valid values are:
•
none
—Specifies no recurrence for the milestone. The milestone occurs only once until the entitlement process exits.
•
recursIndependently
—Specifies independent recurrence for the milestone.
•
recursChained
—Specifies sequential recurrence for the milestone.
Declarative Metadata Sample Definition
This is a sample milestone type.
<?xml
version= "1.0" encoding= "UTF-8"?>
<MilestoneType xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >First Response Time </description >
</MilestoneType >
And, here’s the sample package.xml
file that references the MilestoneType component definition:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* or a valid name of a milestone type </members >
<name >MilestoneType </name >
</types >
<version >29.0
</version >
</Package >
ModerationRule
Represents a rule used in your community to moderate member-generated content.Each rule specifies the member-generated content the rule applies to, the criteria to enforce the rule on, and the moderation action to take. Moderation rules help protect your community
fullName field.
Community moderation rules created with the Metadata API are more powerful than moderation rules set up in the Community
Management UI. For example, in the UI you could create a rule that moderates posts and comments. In the Metadata API you could create a rule that moderates only the Link Name of a Link feed type. Use the Metadata API to express complex moderation rules.
Important: Don’t update moderation rules you create using the Metadata API in the Community Management UI. If you do, you overwrite relevant Metadata API fields or the fields are ignored.
Keep the following things in mind when creating moderation rules:
•
Your org can have up to 30 rules. This limit is per org, not per community. This limit includes both content rules and rate rules.
•
Each rule can have up to three keyword criteria.
480
Metadata Types ModerationRule
•
Rules that block content run first, followed by rules to review and approve content, then rules that replace content, and last by rules that flag content. If two or more rules perform the same action, the oldest rule runs first, based on the date the rule was created.
Rules to replace content don’t run when the content also applies to a review rule—we want community managers to review the original content.
File Suffix and Directory Location
ModerationRule components have the suffix
.rule
and are stored in the moderation
directory of the corresponding package directory. The file name format follows
community_name.moderation_rule_developer_name.rule
.
Version
ModerationRule components are available in API version 36.0 and later.
Special Access Rules
To view, create, edit, and delete moderation rules, you need the Manage Communities or Create and Set Up Communities permission.
Fields
Field Name
action actionLimit active description entitiesAndFields masterLabel notifyLimit userCriteria
Field Type Description
ModerationRuleAction
(
type string)
Required. Indicates the moderation action that you want to take. The valid values are:
•
Block
•
Review
•
Replace
•
Flag
•
FreezeAndNotify
(Reserved for future use.) int boolean string
Indicates the moderation action limit. Available in API 39.0 and later.
Required. Indicates whether the moderation rule is active ( true
) or inactive ( false
).
A description of the moderation rule.
string
[] Indicates the types of user-generated content this moderation rule applies to.
string Required. Label for the moderation rule.
int Indicates the notification limit of the moderation rule. Available in API
39.0 and later.
Represents the member criteria to use in community moderation rules.
Available in API 39.0 and later.
481
Metadata Types ModerationRule
Field Name
userMessage
Field Type
string
Description
The message you want your community members to see when their content is blocked. Use the
%BLOCKED_KEYWORD%
variable to display up to five blocked words in the user message. If you don’t specify a message, the member sees the standard message: “You can’t use
%BLOCKED_KEYWORD%
or other inappropriate words in this community. Review your content and try again.”
ModeratedEntityField
The fields and entities you want to moderate.
Field Name
entityName fieldName keywordList
Field Type
string string
string
Description
Required. Indicates the types of user-generated content the moderation rule applies to. Post and comments only apply to content created in groups and user profiles. All feed types, such as polls and links, are supported.
Indicates the field the moderation rule applies to.
Note:
To moderate feed posts, use entityName FeedItem
with fieldName RawBody
. To moderate feed comments, use entityName FeedComment
with fieldName
RawCommentBody
. The
RawBody
and
RawCommentBody fields aren’t available in any other API.
Indicates the keyword list that you want to moderate against.
ModerationRuleType
Required. Indicates the type of rule to run on user-generated content.
Field Name
type
Field Type Description
string)
Required. Indicates the type of rule to run on user-generated content. Valid values are:
•
Content
•
Rate
Available in API 39.0 and later.
RateLimitTimePeriod
Required. Indicates the time period that is applied to the rate limit.
482
Metadata Types ModerationRule
Field Name
timePeriod
Field Type Description
string)
Required. Indicates the time period that is applied to the rate limit. Valid values are:
•
Short
•
Medium
Available in API 39.0 and later.
Declarative Metadata Sample Definition
The following is an example of a ModerationRule component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ModerationRule xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >Blocks Bad Word List in posts, comments, Link URLs, titles, and poll choices.
</description >
<masterLabel >Blocking Rule </masterLabel >
<action >Block </action >
<active >true </active >
<userMessage >You can't use %BLOCKED_KEYWORD% or other inappropriate words in this community. Review your content and try again.
</userMessage >
<!-- Applies the rule to FeedComment.RawCommentBody (an internal only field), if it contains words from the keyword list specified -->
<entitiesAndFields >
<entityName >FeedComment </entityName >
<fieldName >RawCommentBody </fieldName >
<keywordList >community1.badword_list
</keywordList >
</entitiesAndFields >
<entitiesAndFields >
<entityName >FeedItem </entityName >
<fieldName >LinkUrl </fieldName >
<keywordList >community1.badword_list
</keywordList >
</entitiesAndFields >
<!-- Applies the rule to FeedItem.RawBody (an internal only field), if it contains words from the keyword list specified -->
<entitiesAndFields >
<entityName >FeedItem </entityName >
<fieldName >RawBody </fieldName >
<keywordList >community1.badword_list
</keywordList >
</entitiesAndFields >
<entitiesAndFields >
<entityName >FeedItem </entityName >
<fieldName >Title </fieldName >
<keywordList >community1.badword_list
</keywordList >
</entitiesAndFields >
<entitiesAndFields >
<entityName >FeedPollChoice </entityName >
<fieldName >ChoiceBody </fieldName >
<keywordList >community1.badword_list
</keywordList >
</entitiesAndFields >
</ModerationRule >
483
Metadata Types NamedCredential
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<name >ModerationRule </name >
<members >community1.blocking_rule
</members >
</types >
<version >36.0
</version >
</Package >
NamedCredential
Represents a named credential, which specifies the URL of a callout endpoint and its required authentication parameters in one definition.
A named credential can be specified as an endpoint to simplify the setup of authenticated callouts.
This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
NamedCredential components have the suffix
.namedCredential
and are stored in the namedCredentials
folder.
Version
NamedCredential components are available in API version 33.0 and later.
Fields
Field Name
allowMergeFieldsInBody
Field Type
boolean allowMergeFieldsInHeader boolean authProvider certificate string string
Description
Specifies whether Apex code can use merge fields to populate the HTTP request body with org data when a callout is made. Corresponds to
Allow Merge Fields in HTTP Body in the user interface. Defaults to false
.
This field is available in API version 41.0 and later.
Specifies whether Apex code can use merge fields to populate the HTTP header with org data when a callout is made. Corresponds to Allow
Merge Fields in HTTP Header in the user interface. Defaults to false
.
This field is available in API version 41.0 and later.
The authentication provider that the AuthProvider component represents.
If you specify a certificate, your Salesforce org supplies it when establishing each two-way SSL connection with the external system.
The certificate is used for digital signatures, which verify that requests are coming from your Salesforce org.
484
Metadata Types NamedCredential
Field Name
endpoint generateAuthorizationHeader label oauthRefreshToken oauthScope oauthToken password principalType protocol username
Field Type
string boolean
Description
The URL or root URL of the callout endpoint. Corresponds to URL in the user interface.
Specifies whether Salesforce generates an authorization header and applies it to each callout that references the named credential.
Corresponds to Generate Authorization Header in the user interface.
Defaults to true
.
This field is available in API version 41.0 and later.
string string
A user-friendly name for the named credential that appears in the
Salesforce user interface, such as in list views.
The OAuth refresh token. Used to obtain a new access token for an end user when a token expires.
string Specifies the scope of permissions to request for the access token.
Corresponds to Scope in the user interface.
The access token that’s issued by your authorization server.
string string The password to be used by your org to access the external system.
Ensure that the credentials have adequate privileges to access the external system. Depending on how you set up access, you might need to provide the administrator password.
External
PrincipalType
(
type string)
Determines whether you're using one set or multiple sets of credentials to access the external system. Corresponds to Identity Type in the user interface. The valid values are:
•
Anonymous
•
PerUser
•
NamedUser
Authentication
Protocol
(
type string)
The authentication protocol for accessing the external system. The valid values are:
•
NoAuthentication
•
Oauth
•
Password string The username to be used by your org to access the external system.
Ensure that the credentials have adequate privileges for performing callouts to the external system. Depending on how you set up access, you might need to provide the administrator username.
485
Metadata Types Network
Declarative Metadata Sample Definition
The following is an example of a NamedCredential component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<NamedCredential xmlns= "http://soap.sforce.com/2006/04/metadata">
<allowMergeFieldsInBody >false </allowMergeFieldsInBody >
<allowMergeFieldsInHeader >false </allowMergeFieldsInHeader >
<endpoint >https://my_endpoint.example.com
</endpoint >
<generateAuthorizationHeader >true </generateAuthorizationHeader >
<label >My Named Credential </label >
<principalType >Anonymous </principalType >
<protocol >NoAuthentication </protocol >
</NamedCredential >
Network
Represents a community. Communities are branded spaces for your employees, customers, and partners to connect. You can customize and create communities to meet your business needs, then transition seamlessly between them. Use the Network component for
Salesforce Communities. If you want to create zones that contain Chatter Answers and Ideas, use the Community (Zone) component.
This type extends the
Metadata metadata type and inherits its
fullName
field.
Declarative Metadata File Suffix and Directory Location
Network components are stored in the networks
directory of the corresponding package directory. The file name matches the community name, and the extension is
.network
.
Version
This object is available in API version 28.0 and later.
Fields
Field
allowedExtensions
Field Type
string allowInternalUserLogin allowMembersToFlag boolean boolean
Description
Specifies the types of files allowed in your community.
This whitelist of file types lets you control what your community members upload and also prevents spammers from polluting your community with inappropriate files.
Available in API version 36.0 and later.
Determines whether internal users can log in with their internal credentials on the community login page.
Available in API version 40.0 and later.
Determines whether users in the community can flag posts or comments as inappropriate. Flagged items are sent to a community moderator for review. Available in
API version 29.0 and later.
486
Metadata Types
Field
branding
Field Type
caseCommentEmailTemplate string changePasswordTemplate communityRoles string
description string disableReputationRecordConversations boolean emailFooterLogo emailFooterText emailSenderAddress emailSenderName enableCustomVFError
PageOverrides enableDirectMessages enableGuestChatter enableGuestFileAccess enableInvitation string string string string boolean boolean boolean boolean boolean
Description
The color scheme, header, and footer used in the community. Deprecated in API version 41.0 and later.
Replaced by the NetworkBranding type.
Email template used when notifying community members when a case comment has been modified or added to a case.
Email template used when notifying a user that their password has been reset.
Identifies users with Customer, Partner or Employee roles in a community. Available in API version 41.0 and later.
Description of the community.
Determines whether to exclude contributions to records when counting points toward reputation levels, if reputation levels are enabled for the community. Available in API version 41.0 and later.
The document name of the logo that appears in the footer of community emails. Available in API version 41.0 and later.
The text that appears in the footer of community emails.
Available in API version 41.0 and later.
Email address from which community emails are sent.
Name from which community emails are sent.
Determines whether to use custom Visualforce error pages instead of the default Visualforce error pages. Available in
API version 41.0 and later.
Determines whether community users can send direct messages to start a private conversation with one or more members. Available in API version 41.0 and later.
Specifies whether guest users can access public Chatter groups in the community without logging in.
Determines whether guest users view asset files shared with the community on publicly accessible pages and login pages. If public access is enabled in Community
Builder at the page or community level, this property is automatically enabled. Available in API version 41.0 and later.
Determines whether users can invite others to the community.
Network
487
Metadata Types
Field
enableKnowledgeable
Field Type
boolean enableNicknameDisplay enablePrivateMessages enableReputation boolean boolean boolean enableShowAllNetworkSettings enableSiteAsContainer enableTalkingAboutStats enableTopicAssignmentRules enableTopicSuggestions forgotPasswordTemplate boolean boolean boolean boolean boolean string gatherCustomerSentimentData boolean
Description
Determines if community members can see who’s knowledgeable on topics and endorse people for their knowledge on a topic. Available in API version 30.0 and later.
Determines if user nicknames display instead of their first and last names in most places in the community. Set to false
by default. Available in API version 32.0 and later.
Determines if community members can send and receive private messages. Available in API version 30.0 and later.
Determines if reputation is calculated and displayed for community members. Available in API version 31.0 and later.
If enabled, reputationLevels
and reputationPointsRules
are used. If no reputationLevels
or reputationPointsRules
are not defined in the data file, the default values are used.
Shows settings that are hidden by default based on how the community is set up. Available in API version 41.0 and later.
Determines whether the community uses Site.com pages instead of Visualforce tabs.
Determines whether community users see how many people are discussing a topic. The number of people discussing the topic appears as the user types the topic and the system gives topic suggestions. Available in API version 41.0 and later.
Enables the org to use rules to automatically assign topics to articles in a community. After it’s enabled, admins set up rules in a community to map topics to Salesforce
Knowledge data categories. This field is available in API version 40.0 and later.
Enables topic suggestions when users write posts.
Available in API version 41.0 and later.
The email template used when a user forgets their password.
Gathers data when a customer looks at articles and cases in communities, for use in the Community 360 feature.
This field is available in API version 40.0 and later.
Network
488
Metadata Types
Field
maxFileSizeKb navigationLinkSet networkMemberGroups networkPageOverrides newSenderAddress picassoSite recommendationAudience recommendationDefinition reputationLevels reputationPointsRules
Field Type
int
Description
Specifies the maximum file size (in KBs) that members can upload in your community. Available in API version 36.0
and later. Enter a number between 3072 KB and your org’s maximum file size. To use the default limit of 2 GB, leave this field empty.
Represents the navigation menu in a community. A navigation menu consists of items that users can click to go to other parts of the community. This field is available in API version 37.0 and later.
The profiles and permission sets that have access to the community. Users with these profiles or permission sets are members of the community.
Note: If a Chatter customer (from a customer group) is assigned a permission set that is also associated with a community, the Chatter customer isn’t added to the community.
string
The settings in the Administration area (in Community
Management or Community Workspaces) that control which page type Change Password, Forgot Password,
Home, and Login each point to. Available in API version
40.0 and later.
Email address that has been entered as the new value for
EmailSenderAddress
but has not been verified yet. After a user has requested to change the sender email address and has successfully responded to the verification email, the
NewSenderAddress
value overwrites the value in
EmailSenderAddress
. This becomes the email address from which community emails are sent.
string Name of the Site.com site linked to the community.
Creates an audience of new community members, or can be used to manage customized lists of audience members to organize and target recommendations. Available in API version 41.0 and later.
Represents a custom recommendation to drive engagement for a community. Targets a specific audience and uses channels to specify a location for the recommendation. Available in API version 41.0 and later.
The reputation levels assigned to members when they accrue points by performing certain actions.
The points members accrue when they perform certain defined actions.
Network
489
Metadata Types
Field
selfRegProfile selfRegistration sendWelcomeEmail site status tabs urlPathPrefix welcomeTemplate
Field Type
string boolean boolean string
NetworkStatus[]
string string
Description
The profile assigned to users who self register. This value is used only if selfRegistration
is enabled for the community. Available in API version 29.0 and later.
Determines whether self-registration is available for the community.
Determines whether a welcome email is sent when a new user is added to the community.
The CustomSite associated with the community.
Status of the community. Available values are:
•
Live—The community is online and members can access it.
•
DownForMaintenance—The community was previously published, but was taken offline. Members with “Create and Set Up Communities” can still access the setup for offline communities regardless of profile or membership. Members are not able to access offline communities, but they still appear in the user interface drop-down as
CommunityName (Offline)
.
•
UnderConstruction—The community has not yet been published. Users with “Create and Set Up
Communities” can access communities in this status if their profile is associated with the community.
Once a community is published, it can never be in this status again.
The tabs that are available in the community. The user that created the community selected these tabs.
The first part of the path on the site's URL that distinguishes this site from other sites. For example, if your site URL is mycompany.force.com/partners
, then partners
is the urlPathPrefix
.
The email template used when sending welcome emails to new community members.
Branding
Represents the branding and color scheme applied to the community. Available in API version 40.0 and earlier. Replaced by
NetworkBranding in API version 41.0 and later.
Network
490
Metadata Types
Field
loginFooterText loginLogo pageFooter pageHeader primaryColor primaryComplementColor quaternaryColor string string string quaternaryComplementColor string secondaryColor tertiaryColor tertiaryComplementColor zeronaryColor zeronaryComplementColor string string string string string
Field Type
string string string string
Description
The text that appears in the footer of the community login page.
The logo that appears on the community login page for external users.
An image that appears on the footer of the community pages. Must be an .html file.
An image that appears on the header of the community pages. Can be an .html, .gif, .jpg, or .png file.
The color used for the active tab.
Font color used with primaryColor
.
The background color for pages in the community.
Font color used with quaternaryColor
.
The color used for the top borders of lists and tables.
The background color for section headers on edit and detail pages.
Font color used with tertiaryColor
.
The background color for the header.
Font color used with zeronaryColor
.
Network
CommunityRoles
The labels used to identify users with Customer, Partner, or Employee roles in a community. Available in API version 41.0 and later.
Field
customerUserRole employeeUserRole partnerUserRole
Field Type
string string string
Description
The label for the Customer user role in a community.
The label for the Employee user role in a community.
The label for the Partner user role in a community.
491
Metadata Types
NavigationLinkSet
Represents the navigation menu in a community. A navigation menu consists of items that users can click to go to other parts of the community.
Field
navigationMenuItem
Field Type
Description
A list of menu items in a NavigationLinkSet.
Use this object to create, delete, or update menu items in your community’s navigation menu.
Network
NavigationMenuItem
Represents a single menu item in a NavigationLinkSet. Use this object to create, delete, or update menu items in your community’s navigation menu.
Field
defaultListViewId label position publiclyAvailable subMenu target
Field Type
string string int boolean
string
Description
If the value of the type
field is
SalesforceObject
, the value is the
ID of the default list view for the object.
Required. The text that appears in the navigation menu for this item.
Required. The location of the menu item in the navigation menu.
When set to true
, gives access to guest users.
A list of child menu items. This field is available in API 39.0 and later.
Required if type
is
ExternalLink
,
InternalLink
, or
SalesforceObject
. If type
is
ExternalLink
or
InternalLink
, the target is the URL that the link points to.
For
ExternalLink
, your entry looks like this:
http://www.salesforce.com
.
For
InternalLink
, use a relative URL, such as
/contactsupport
. If type is
MenuLabel
or
NavigationalTopic
, target
is not used.
492
Metadata Types
Field
targetPreference type
Field Type
string string
Description
Backed by a picklist that includes preferences for the target field. Valid values are:
•
None
•
OpenInExternalTab
—Used for external links to determine whether to open in an external tab.
Required. The type of navigation menu item.
Valid values are:
•
SalesforceObject
—Available objects include accounts, cases, contacts, and custom objects.
•
ExternalLink
—Links to a URL outside of your community. For example,
http://www.salesforce.com
.
•
InternalLink
—Links to a relative
URL inside your community. For example,
/contactsupport
.
•
MenuLabel
—A parent heading for your navigation menu. See
NavigationSubMenu for how to nest
items underneath the menu label. This value is available in API 39.0 and later.
•
NavigationalTopic
—A drop-down list with links to the navigational topics in your community.
You cannot nest other items of type
MenuLabel
or items of type
NavigationalTopic
under
MenuLabel
.
Network
NavigationSubMenu
A list of child menu items. Only NavigationMenuItem items of type
MenuLabel
can have items in a NavigationSubMenu. Available in API 39.0 and later.
Field
navigationMenuItem
Field Type
Description
A list of menu items in a
NavigationSubMenu. Use navigationMenuItem
to create,
493
Metadata Types Network
Field Field Type Description
delete, or update child items under a parent heading.
NetworkMemberGroup
Represents the profiles and permission sets that are assigned to the community. Users with one of the profiles or permission sets are members of the community, unless the user is a Chatter customer (from a customer group).
Field
permissionSet profile
Field Type
string string
Description
A permission set that is assigned to the community.
Note:
If a Chatter customer (from a customer group) is assigned a permission set that is also associated with a community, the Chatter customer isn’t added to the community.
A profile that is part of the community.
NetworkPageOverride
Represents settings in the Administration area (in Community Management or Community Workspaces) that control which page type the Change Password, Forgot Password, Home, and Login pages each point to.
Field Field Type Description
changePasswordPageOverrideSetting
NetworkPageOverrideSetting (enumeration of type string)
Required. Specifies the page type that the
Change Password page setting applies to.
The valid values are:
•
Designer
—a Community Builder page
•
Standard
—the default page
•
VisualForce
—a Visualforce page forgotPasswordPageOverrideSetting
NetworkPageOverrideSetting (enumeration of type string)
Required. Specifies the page type that the
Forgot Password page setting applies to.
The valid values are:
•
Designer
—a Community Builder page
•
Standard
—the default page
•
VisualForce
—a Visualforce page
494
Metadata Types
Field
homePageOverrideSetting
Field Type Description
NetworkPageOverrideSetting (enumeration of type string)
Required. Specifies the page type that the
Community Home page setting applies to.
The valid values are:
•
Designer
—a Community Builder page
•
Standard
—the default page
•
VisualForce
—a Visualforce page loginPageOverrideSetting
NetworkPageOverrideSetting (enumeration of type string)
Required. Specifies the page type that the
Login page setting applies to. The valid values are:
•
Designer
—a Community Builder page
•
Standard
—the default page
•
VisualForce
—a Visualforce page selfRegProfilePageOverrideSetting
NetworkPageOverrideSetting (enumeration of type string)
Required. Specifies the page type that the
Self Registration page setting applies to. The valid values are:
•
Designer
—a Community Builder page
•
Standard
—the default page
•
VisualForce
—a Visualforce page
Network
RecommendationAudience
Creates an audience of new community members, or can be used to manage customized lists of audience members to organize and target recommendations. Available in API version 41.0 and later.
Field Field Type
recommendationAudienceDetails
Description
The specific details of an audience for recommendations.
RecommendationAudienceDetail
The specific details of an audience for recommendations. Available in API version 41.0 and later.
Field
audienceCriteriaType
Field Type Description
AudienceCriteriaType (enumeration of type string)
The criteria for the recommendation audience type. Values are:
•
CustomList
495
Metadata Types
Field
audienceCriteriaValue setupName
Field Type
string string
Description
•
MaxDaysInCommunity
For new member criteria, the maximum number of days since a user became a community member. Null in case of custom list criteria.
Name of the recommendation audience.
RecommendationDefinition
Represents a list of custom recommendations to drive engagement for a community. Available in API version 41.0 and later.
Field Field Type
recommendationDefinitionDetails
RecommendationDefinitionDetail
[]
Description
A list of custom recommendations and their details.
RecommendationDefinitionDetail
The specific details of a custom recommendation. Available in API version 41.0 and later.
Field
actionUrl
Field Type
string description linkText scheduledRecommendations setupName title string string
string string
Description
The URL for the button that lets users act on the recommendation.
An explanation of the recommendation that suggests what users can do.
The text label for the button.
A list of scheduled recommendations.
The name of the recommendation, which appears in Setup.
The title of the recommendation.
ReputationBranding
Branding for the reputation level.
Field
smallImage
Field Type
string
Description
Custom image associated with a reputation level. Use files with these extensions: .jpeg,
.png, or .gif. Images are stored as
Network
496
Metadata Types
Field Field Type Description
documents. If not specified, the default reputation level image is used. Available in
API version 32.0 and later.
ReputationLevelDefinitions
Represents reputation levels members can achieve by performing certain defined actions in a community.
Field
level
Field Type
Description
Represents reputation levels.
ReputationLevel
Represents the name and lower value of the reputation level. The upper value is calculated by the application.
Field
branding label lowerThreshold
Field Type
string double
Description
Represents any branding associated with the reputation level, specifically, the custom image for the reputation level.
This field is optional. If not specified, the default reputation level image is used.
Available in API version 32.0 and later.
Name of the reputation level.
This field is optional. If not specified, one of the 10 defaults are used.
•
Level 1
•
Level 2
•
Level 3
•
Level 4
•
Level 5
•
Level 6
•
Level 7
•
Level 8
•
Level 9
•
Level 10
Required. The lower value in the range for this reputation level. For example, if this reputation level is for points 1–50, 1 is the lowerThreshold
.
Network
497
Metadata Types
ReputationPointsRules
Represents points rules in a community’s point system.
Field
pointsRule
Field Type
Description
Represents events and their associated points.
ReputationPointsRule
Represents the event and associated point value for a points rule. When a user acts, they accrue the associated points.
Field
eventType points
Field Type
string int
Description
Required. The type of event a member has to perform to get points.
The available values are:
•
FeedItemWriteAPost
•
FeedItemWriteAComment
•
FeedItemReceiveAComment
•
FeedItemLikeSomething
•
FeedItemReceiveALike
•
FeedItemMentionSomeone
•
FeedItemSomeoneMentionsYou
•
FeedItemShareAPost
•
FeedItemSomeoneSharesYourPost
•
FeedItemPostAQuestion
•
FeedItemAnswerAQuestion
•
FeedItemReceiveAnAnswer
•
FeedItemMarkAnswerAsBest
•
FeedItemYourAnswerMarkedBest
•
FeedItemEndorseSomeoneForKnowledgeOnATopic
•
FeedItemEndorsedForKnowledgeOnATopic
Required. The number of points a member gets for performing the event. The default number of points per event is:
•
FeedItemWriteAPost +1
•
FeedItemWriteAComment: +1
•
FeedItemReceiveAComment: +5
•
FeedItemLikeSomething: +1
•
FeedItemReceiveALike: +5
•
FeedItemMentionSomeone: +1
•
FeedItemSomeoneMentionsYou: +5
Network
498
Metadata Types
Field Field Type Description
•
FeedItemShareAPost: +1
•
FeedItemSomeoneSharesYourPost: +5
•
FeedItemPostAQuestion: +1
•
FeedItemAnswerAQuestion: +5
•
FeedItemReceiveAnAnswer: +5
•
FeedItemMarkAnswerAsBest: +5
•
FeedItemYourAnswerMarkedBest: +20
•
FeedItemEndorseSomeoneForKnowledgeOnATopic: +5
•
FeedItemEndorsedForKnowledgeOnATopic: +20
ScheduledRecommendation
Represents a list of scheduled recommendations. Available in API version 41.0 and later.
Field Field Type
scheduledRecommendationDetails
ScheduledRecommendationDetail []
Description
A list of scheduled recommendations.
ScheduledRecommendationDetail
The specific details of a scheduled recommendation. Available in API version 41.0 and later.
Field
channel
Field Type Description
RecommendationChannel (enumeration of type string)
A way to group recommendations together to determine where they show up in the community. The valid values are:
•
DefaultChannel
—The default recommendation channel.
Recommendations in the default channel appear in predefined locations, such as directly in the feed in the
Salesforce1 mobile browser app and on the Home and Question Detail pages in communities using the Summer ’15 or later version of the Customer Service
(Napili) template.
•
CustomChannel1
—A custom recommendation channel. Choose where you want recommendations to appear by adding the
Recommendations Carousel component to the page in Community Builder.
Network
499
Metadata Types
Field
enabled rank
Field Type
boolean int recommendationAudience string
NetworkTabSet
Field
customTab defaultTab
Field Type
string string
500
Description
•
CustomChannel2
—A custom recommendation channel.
•
CustomChannel3
—A custom recommendation channel.
•
CustomChannel4
—A custom recommendation channel.
•
CustomChannel5
—A custom recommendation channel.
Indicates whether scheduling is enabled. If true
, the recommendation is enabled and appears in communities.
If false
, recommendations in feeds in the
Salesforce1 mobile browser app aren’t removed, but no new recommendations appear. In communities, disabled recommendations no longer appear.
The rank of the recommendation within the channel, which determines the order in which it’s displayed.
The scheduled recommendation is inserted into the position specified by the rank. The rank of all the scheduled recommendations after it are pushed down. If the specified rank is larger than the size of the list, the scheduled recommendation is put at the end of the list.
If a rank isn’t specified, the scheduled recommendation is put at the end of the list.
The name of the audience for this scheduled recommendation.
Network
Description
Custom tab that is part of the community.
The Home tab for the community. When members log in, this tab is the first page they see.
Metadata Types
Field
standardTab
Field Type
string
Description
Standard tab that is part of the community.
Network
Declarative Metadata Sample Definition
A sample XML definition of a network.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Network xmlns= "http://soap.sforce.com/2006/04/metadata">
<allowMembersToFlag >true </allowMembersToFlag >
<changePasswordTemplate >unfiled$public/CommunityChangePasswordEmailTemplate </changePasswordTemplate >
<description >Metadata Community </description >
<emailSenderAddress >[email protected]
</emailSenderAddress >
<emailSenderName >Admin User </emailSenderName >
<enableInvitation >false </enableInvitation >
<enableKnowledgeable >true </enableKnowledgeable >
<enableNicknameDisplay >false </enableNicknameDisplay >
<enablePrivateMessages >true </enablePrivateMessages >
<enableReputation >true </enableReputation >
<forgotPasswordTemplate >unfiled$public/CommunityForgotPasswordEmailTemplate </forgotPasswordTemplate >
<networkMemberGroups >
<permissionSet >Admin </permissionSet >
<permissionSet >Standard </permissionSet >
<permissionSet >ReadOnly </permissionSet >
<profile >Admin </profile >
<profile >Standard </profile >
<profile >ReadOnly </profile >
</networkMemberGroups >
<recommendationDefinition >
<recommendationDefinitionDetails >
<actionUrl >https://www.apple.com/iphone </actionUrl >
<description >New iPhone 7 with Better specs and high performance </description >
<linkText >iPhone 7 </linkText >
<scheduledRecommendations >
<scheduledRecommendationDetails >
<channel >DefaultChannel </channel >
<enabled >false </enabled >
<rank >1 </rank >
<recommendationAudience >New Member Audience </recommendationAudience >
</scheduledRecommendationDetails >
</scheduledRecommendations >
<setupName >Apple iPhone </setupName >
<title >iPhone7 </title >
</recommendationDefinitionDetails >
<recommendationDefinitionDetails >
<actionUrl >https://www.bose.com/qc35 </actionUrl >
<description >New Amazing Noise cancellation Headphones </description >
501
Metadata Types
<linkText >Bose QC35 </linkText >
<scheduledRecommendations >
<scheduledRecommendationDetails >
<channel >DefaultChannel </channel >
<enabled >true </enabled >
<rank >2 </rank >
<recommendationAudience >Custom Audience </recommendationAudience >
</scheduledRecommendationDetails >
</scheduledRecommendations >
<setupName >Bose Headphones </setupName >
<title >Bose QC35 </title >
</recommendationDefinitionDetails >
</recommendationDefinition >
<reputationLevels >
<level >
<branding >
<smallImage >communities_shared
_document_folder/replevel_beginner.png
</smallImage >
</branding >
<label >Beginner </label >
<lowerThreshold >0 </lowerThreshold >
</level >
<level >
<branding >
<smallImage >communities_shared
_document_folder/replevel_apprentice.png
</smallImage >
</branding >
<label >Apprentice </label >
<lowerThreshold >51 </lowerThreshold >
</level >
<level >
<branding >
<smallImage >communities_shared
_document_folder/replevel_gettingthere.png
</smallImage >
</branding >
<label >Getting There </label >
<lowerThreshold >101 </lowerThreshold >
</level >
<level >
<branding >
<smallImage >communities_shared
_document_folder/replevel_skilled.png
</smallImage >
</branding >
<label >Skilled </label >
<lowerThreshold >151 </lowerThreshold >
</level >
<level >
<branding >
<smallImage >communities_shared
_document_folder/replevel_expert.png
</smallImage >
</branding >
<label >Expert </label >
<lowerThreshold >201 </lowerThreshold >
</level >
Network
502
Metadata Types
<level >
<branding >
<smallImage >communities_shared
_document_folder/replevel_mentor.png
</smallImage >
</branding >
<label >Mentor </label >
<lowerThreshold >251 </lowerThreshold >
</level >
<level >
<branding >
<smallImage >communities_shared
_document_folder/replevel_guru.png
</smallImage >
</branding >
<label >Guru </label >
<lowerThreshold >301 </lowerThreshold >
</level >
</reputationLevels >
<reputationPointsRules >
<pointsRule >
<eventType >FeedItemWriteAPost </eventType >
<points >5 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemWriteAComment </eventType >
<points >3 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemReceiveAComment </eventType >
<points >10 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemLikeSomething </eventType >
<points >3 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemReceiveALike </eventType >
<points >5 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemMentionSomeone </eventType >
<points >5 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemSomeoneMentionsYou </eventType >
<points >10 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemShareAPost </eventType >
<points >5 </points >
</pointsRule >
<pointsRule >
<eventType >FeedItemSomeoneSharesYourPost </eventType >
<points >10 </points >
</pointsRule >
503
Network
Metadata Types NetworkBranding
</reputationPointsRules >
<selfRegistration >false </selfRegistration >
<sendWelcomeEmail >true </sendWelcomeEmail >
<site >Network_11 </site >
<status >UnderConstruction </status >
<tabs >
<defaultTab >Chatter </defaultTab >
<standardTab >Chatter </standardTab >
<standardTab >Account </standardTab >
<standardTab >Campaign </standardTab >
<standardTab >Case </standardTab >
<standardTab >Console </standardTab >
<standardTab >Contact </standardTab >
<standardTab >Contract </standardTab >
<standardTab >Dashboard </standardTab >
<standardTab >JigsawSearch </standardTab >
<standardTab >File </standardTab >
<standardTab >CollaborationGroup </standardTab >
<standardTab >home </standardTab >
<standardTab >Idea </standardTab >
<standardTab >Lead </standardTab >
<standardTab >Opportunity </standardTab >
<standardTab >Product2 </standardTab >
<standardTab >UserProfile </standardTab >
<standardTab >report </standardTab >
<standardTab >Solution </standardTab >
</tabs >
<urlPathPrefix >network1 </urlPathPrefix >
<welcomeTemplate >unfiled$public/CommunityWelcomeEmailTemplate </welcomeTemplate >
</Network >
SEE ALSO:
NetworkBranding
This type extends the
MetadataWithContent type and inherits its
content
and fullName
fields.
Declarative Metadata File Suffix and Directory Location
NetworkBranding components have the suffix
.networkBranding
and are stored in the networkBranding
folder.
Version
This object is available in API version 41.0 and later. It replaces the Branding subtype in the Network component.
504
Metadata Types
Fields
Field
loginFooterText loginLogo loginLogoName loginLogoStaticImageUrl
Field Type
string string string string loginQuaternaryColor loginRightFrameUrl string string network pageFooter pageHeader primaryColor primaryComplementColor quaternaryColor string string string quaternaryComplementColor string string string string
505
NetworkBranding
Description
The text that appears in the footer of the community login page.
The logo that appears on the community login page for external users.
The name of the logo that appears on the community login page for external users.
The path to the logo that appears on the community’s login page. This URL can be fixed, dynamic, or an uploaded image. A dynamic URL contains the experience ID parameter,
{expid}
. If the URL contains
{expid}
, the URL is resolved dynamically at runtime depending on the parameter's value.
The background color for the community’s login page.
The path to the content of the right frame of the community login page. This URL can be either fixed or dynamic. A dynamic URL contains the experience ID parameter,
{expid}
. If the URL contains
{expid}
, the URL is resolved dynamically at runtime depending on the parameter's value.
The name of the community associated with the branding.
An image that appears on the footer of the community pages. Must be an .html file.
An image that appears on the header of the community pages. Can be an .html, .gif, .jpg, or .png file.
Required. The color used for the active tab.
Required. Font color used with primaryColor
.
Required. The background color for pages in the community.
Required. Font color used with quaternaryColor
.
Metadata Types
Field
secondaryColor tertiaryColor tertiaryComplementColor zeronaryColor zeronaryComplementColor
Field Type
string string string string string
Description
Required. The color used for the top borders of lists and tables.
Required. The background color for section headers on edit and detail pages.
Required. Font color used with tertiaryColor
.
Required. The background color for the header.
Required. Font color used with zeronaryColor
.
Declarative Metadata Sample Definition
A sample XML definition of networkBranding.
<?xml
version= "1.0" encoding= "UTF-8"?>
<NetworkBranding xmlns= "http://soap.sforce.com/2006/04/metadata">
<loginFooterText >salesforce.com
</loginFooterText >
<loginLogo >Communities_Shared_Document_Folder/header2_png.png
</loginLogo >
<loginLogoName >header2.png
</loginLogoName >
<loginQuaternaryColor >#B1BAC1 </loginQuaternaryColor >
<loginRightFrameUrl >http://www.test.com/test </loginRightFrameUrl >
<network >Network 1 </network >
<pageFooter >Branding/footer_html.html
</pageFooter >
<pageHeader >Branding/header_Image.jpg
</pageHeader >
<primaryColor >#AF5800 </primaryColor >
<primaryComplementColor >#FFFFFF </primaryComplementColor >
<quaternaryColor >#286FB8 </quaternaryColor >
<quaternaryComplementColor >#FFFFFF </quaternaryComplementColor >
<secondaryColor >#000000 </secondaryColor >
<tertiaryColor >#FFFFFF </tertiaryColor >
<tertiaryComplementColor >#222222 </tertiaryComplementColor >
<zeronaryColor >#0A3764 </zeronaryColor >
<zeronaryComplementColor >#FFFFFF </zeronaryComplementColor >
</NetworkBranding >
Package
Specifies which metadata components to retrieve as part of a retrieve()
call or defines a package of components.
Name
apiAccessLevel
Type
of type string)
Description
Package components have access via dynamic Apex and the
API to standard and custom objects in the organization where they are installed. Administrators who install packages may
Package
506
Metadata Types
Name
description fullName setupWeblink types uninstallClass
Type
string string namespacePrefix objectPermissions packageType postInstallClass string
[] string string string
PackageTypeMembers[] string
Description
wish to restrict this access after installation for improved security. The valid values are:
•
Unrestricted—Package components have the same API access to standard objects as the user who is logged in when the component sends a request to the API.
•
Restricted—The administrator can select which standard objects the components can access. Further, the components in restricted packages can only access custom objects in the current package if the user's permissions allow access to them.
For more information, see “About API and Dynamic Apex Access in Packages” in the Salesforce online help.
A short description of the package.
The package name used as a unique identifier for API access.
The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited
component.
The namespace of the developer organization where the package was created.
Indicates which objects are accessible to the package, and the kind of access available (create, read, update, delete).
Reserved for future use.
The name of the Apex class that specifies the actions to execute after the package has been installed or upgraded. The Apex class must be a member of the package and must implement the Apex
InstallHandler
interface. In patch upgrades, you can't change the class name in this field but you can change the contents of the Apex class. The class name can be changed in major upgrades.
This field is available in API version 24.0 and later.
The weblink used to describe package installation.
The type of component being retrieved.
The name of the Apex class that specifies the actions to execute after the package has been uninstalled. The Apex class must be a member of the package and must implement the Apex
UninstallHandler
interface. In patch upgrades, you can't change the class name in this field but you can change
Package
507
Metadata Types PathAssistant
Name
version
Type
string
Description
the contents of the Apex class. The class name can be changed in major upgrades.
This field is available in API version 25.0 and later.
Required. The version of the component type.
PackageTypeMembers
Use to specify the name and type of components to be retrieved in a package.
Name
members
Type
string
Description
One or more named components, or the wildcard character
(
*
) to retrieve all metadata components of the type specified in the
<name >
element. To retrieve a standard object, specify it by name. For example,
<members >Account </members >
retrieves the standard
Account object.
name string
The type of metadata component to be retrieved. For example,
<name >CustomObject </name >
retrieves one or more custom objects as specified in the
<members >
element.
SEE ALSO:
Sample package.xml Manifest Files
PathAssistant
Represents Path records.This type extends the Metadata
metadata type and inherits its fullName
field.
Note the following when working with PathAssistant:
•
Only one path can be created per record type for each object, including __Master__ record type.
•
Rich text guidance information cannot be retrieved or deployed from or to translation workbench.
•
The preference does not need to be on to retrieve or deploy PathAssistant.
File Suffix and Directory Location
PathAssistant components have the suffix
.pathAssistant
and are stored in the pathAssistants
folder.
Version
PathAssistant components are available in API version 34.0 and later.
508
Metadata Types
Fields
Field Name
active entityName fieldName masterLabel pathAssistantSteps recordTypeName
PathAssistant
Field Type
boolean
Description
Indicates whether the path is active ( true
) or not ( false
).
string string
Required. The entity name. This is hard coded for Opportunity, Lead, and
Quote. For a custom object, this field must be specified and should be the name of the custom object. This field is not updateable.
Required. The field name. This is hard coded for StageName and Status.
For a custom object, this field must be specified and should be the name of the picklist field that determines the steps in the path. This field is not updateable.
Required. The master label of the path.
string
on page 509
List of all the steps that have been configured with fields and guidance information. Note that a missing step in the .xml file means it has not been configured, not that it doesn’t exist.
string Required. The name of the record type associated with the path. This field is not updateable.
PathAssistantStep
Represents the steps or stages in a Path.
Field Name
fieldNames info picklistValueName
Field Type
string string string
Description
All the fields in entityName
that will display in this step.
The guidance information displayed in this step.
Required. The picklist value associated with the step.
Declarative Metadata Sample Definition
The following is an example of a PathAssistant component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<PathAssistant xmlns= "http://soap.sforce.com/2006/04/metadata">
<active >true </active >
<entityName >Opportunity </entityName >
<fieldName >StageName </fieldName >
<masterLabel >Test Path </masterLabel >
<pathAssistantSteps >
<fieldNames >Amount </fieldNames >
<fieldNames >CloseDate </fieldNames >
<info >Some Text </info >
<picklistValueName >Id. Decision Makers </picklistValueName >
</pathAssistantSteps >
509
Metadata Types PermissionSet
<pathAssistantSteps >
<fieldNames >Amount </fieldNames >
<fieldNames >CloseDate </fieldNames >
<info >Some Text </info >
<picklistValueName >Proposal/Price Quote </picklistValueName >
</pathAssistantSteps >
<recordTypeName >Test_Record_Type </recordTypeName >
</PathAssistant >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Opportunity.Test_Busines_Process
</members >
<name >BusinessProcess </name >
</types >
<types >
<members >Opportunity.StageName
</members >
<members >Lead.LeadSource
</members >
<members >Opportunity.Type
</members >
<name >CustomField </name >
</types >
<types >
<members >Test_Path </members >
<name >PathAssistant </name >
</types >
<types >
<members >Opportunity.Test_Record_Type
</members >
<name >RecordType </name >
</types >
<types >
<members >PathAssistant </members >
<name >Settings </name >
</types >
<version >41.0
</version >
</Package >
PermissionSet
Represents a set of permissions that's used to grant additional access to one or more users without changing their profile or reassigning
metadata type and inherits its fullName
field.
Important: In API version 40.0 and later, when you retrieve or deploy permission set metadata, all content exposed in Metadata
API for the permission sets is included. The metadata includes Apex associated with the permission set, CRUD, and so on.
In API version 39.0 and earlier, retrieving or deploying permission set metadata returns only app and system permissions assigned to the permission set. Junction metadata (such as Apex, CRUD) are included only if the metadata for the related component is also included in the package definition.
In API version 29.0 and later, you can retrieve and deploy access settings for the following managed components in profiles and permission sets:
510
Metadata Types PermissionSet
•
Apex classes
•
Apps
•
Custom field permissions
•
Custom object permissions
•
Custom tab settings
•
External data sources
•
Record types
•
Visualforce pages
For more information, see Managed Component Access in Sample package.xml
on page 22.
Declarative Metadata File Suffix and Directory Location
Permission sets are stored in the permissionsets
directory. The file name matches the permission set API name and the extension is
.permissionset
. For example, a permission set with the name User_Management_Perms is stored in permissionsets/User_Management_Perms.permissionset
.
Version
Permission sets are available in API version 22.0 and later.
Fields
Field Field Type
applicationVisibilities
PermissionSetApplicationVisibility
[]
Description
Indicates which apps are visible to users assigned to this permission set. Available in API version 29.0 and later. In
API version 29.0, this field supports custom apps only. In
API version 30.0 and later, this field supports both standard and custom apps.
classAccesses customPermissions fieldPermissions
PermissionSetApexClassAccess []
PermissionSetCustomPermissions []
Indicates which top-level Apex classes have methods that users assigned to this permission set can execute.
Available in API version 23.0 and later.
Indicates which custom permissions are available to users assigned to this permission set. Available in API version
31.0 and later.
description string externalDataSourceAccesses
[]
The permission set description. Limit: 255 characters.
Indicates which data sources with identity type of
Per
User
are available to users assigned to this permission set. Available in API version 27.0 and later.
Indicates which fields are accessible to a user assigned to this permission set, and the kind of access available
(readable or editable). Available in API version 23.0 and later.
511
Metadata Types PermissionSet
Field
hasActivationRequired label license objectPermissions pageAccesses recordTypeVisibilities tabSettings userLicense userPermissions
Field Type
boolean string string
PermissionSetObjectPermissions
[]
Description
Indicates whether the permission set requires an associated active session ( true
) or not ( false
).
Available in API version 37.0 and later.
Required. The permission set label. Limit: 80 characters.
Either the related permission set license or the user license associated with this permission set. Available in
API version 38.0 and later. Use this field instead of userLicense
, which is deprecated and only available up to API Version 37.0.
Indicates the objects that are accessible to a user assigned to this permission set, and the kind of access available
(create, read, edit, delete, and so on). Available in API version 23.0 and later.
PermissionSetApexPageAccess []
PermissionSetRecordTypeVisibility []
Indicates which record types are visible to users assigned to this permission set. Available in API version 29.0 and later. This field is never retrieved or deployed for inactive record types.
Indicates which Visualforce pages that users assigned to this permission set can execute. Available in API version
23.0 and later.
string
Indicates the tab visibility settings for this permission set.
Available in API version 26.0 and later.
Deprecated. The user license for the permission set. A user license determines the baseline of features that the user can access. Every user must have exactly one user license. Available up to API version 37.0. In API version
38.0 and later, use license
.
[] Specifies an app or system permission (such as “API
Enabled”) and whether it's enabled for this permission set. In API version 28.0 and earlier, this field retrieves all user permissions, enabled or disabled. In API version 29.0
and later, this field retrieves only enabled user permissions.
PermissionSetApplicationVisibility
PermissionSetApplicationVisibility determines whether an app is visible to a user assigned to this permission set.
Field Name
application
Field Type
string
Description
Required. The app name.
512
Metadata Types PermissionSet
Field Name
visible
Field Type
boolean
Description
Required. Indicates whether this app is visible to users assigned to this permission set ( true
) or not ( false
).
PermissionSetApexClassAccess
PermissionSetApexClassAccess represents the Apex class access for users assigned to a permission set.
Field
apexClass enabled
Field Type
string boolean
Description
Required. The Apex class name.
Required. Indicates whether users assigned to this permission set can execute methods in the top-level class ( true
) or not ( false
).
PermissionSetCustomPermissions
PermissionSetCustomPermissions represents the custom permissions access for users assigned to a permission set. Only enabled custom permissions are retrieved.
Field Name
enabled name
Field Type
boolean string
Description
Required. Indicates whether the custom permission is enabled ( true
) or not ( false
).
Required. The custom permission name.
PermissionSetExternalDataSourceAccess
PermissionSetExternalDataSourceAccess represents the data source access for users with identity type of
Per User
. Available in API version 27.0 and later.
Field
enabled externalDataSource
Field Type
boolean string
Description
Required. Indicates whether the data source is enabled ( true
) or not ( false
).
The name of the external data source.
PermissionSetFieldPermissions
PermissionSetFieldPermissions represents the field permissions for users assigned to a permission set. In API version 30.0 and later, permissions for required fields can’t be retrieved or deployed.
Note:
As of API version 38.0, you can change field permissions to make a field editable using the Metadata API for fields that you can't change through the user interface. For example, you can deploy
Asset.ProductCode
as an editable field even though you can't through the user interface.
513
Metadata Types PermissionSet
Field
editable field readable
Field Type
boolean string boolean
Description
Required. Indicates whether the field can be edited by the users assigned to this permission set ( true
) or not ( false
).
Required. The API name of the field (such as
Warehouse__c.Description__c
).
Indicates whether the field can be read by the users assigned to this permission set ( true
) or not ( false
).
PermissionSetObjectPermissions
PermissionSetObjectPermissions represents the object permissions for a permission set. Use one of these elements for each permission.
Field
allowCreate allowDelete allowEdit allowRead modifyAllRecords object viewAllRecords
Field Type
boolean boolean boolean boolean boolean string boolean
Description
Required. Indicates whether the object referenced by the object
field can be created by the users assigned to this permission set
( true
) or not ( false
).
Required. Indicates whether the object referenced by the object
field can be deleted by the users assigned to this permission set
( true
) or not ( false
).
Required. Indicates whether the object referenced by the object
field can be edited by the users assigned to this permission set
( true
) or not ( false
).
Required. Indicates whether the object referenced by the object
field can be viewed by the users assigned to this permission set
( true
) or not ( false
).
Required. Indicates whether the object referenced by the object
field can be viewed, edited, or deleted by the users assigned to this permission set ( true
) or not ( false
), regardless of the sharing settings for the object. This includes private records (records with no parent object). This is similar to the “Modify All Data” user permission, but limited to the individual object level.
Required. The API name of the object (such as
Warehouse__c
).
Required. Indicates whether the object referenced by the object
field can be viewed by the users assigned to this permission set
( true
) or not ( false
), regardless of the sharing settings for the object. This includes private records (records with no parent object).
The viewAllRecords field is similar to the “View All Data” user permission but limited to the individual object level.
514
Metadata Types PermissionSet
PermissionSetApexPageAccess
PermissionSetApexPageAccess represents the Visualforce page access for users assigned to a permission set.
Field
apexPage enabled
Field Type
string boolean
Description
Required. The Visualforce page name.
Required. Indicates whether users assigned to this permission set can execute the Visualforce page ( true
) or not ( false
).
PermissionSetRecordTypeVisibility
PermissionSetRecordTypeVisibility represents the visibility of record types for this permission set.
Field
recordType visible
Field Type
string boolean
Description
Required. The record type name, for example
Account.MyRecordType
.
Required. Indicates whether the record type is visible to users assigned to this permission set ( true
) or not ( false
).
PermissionSetTabSetting
PermissionSetTabSetting represents the tab settings for a permission set.
Field
tab visibility
Field Type
string
PermissionSetTabVisibility
Description
Required. The tab name.
Required. Indicates the visibility settings for the tab. Valid values are:
•
Available
—The tab is available on the All Tabs page.
Individual users can customize their display to make the tab visible in any app.
•
None
—The tab isn’t available on the All Tabs page or visible in any apps.
•
Visible
—The tab is available on the All Tabs page and appears in the visible tabs for its associated app. Individual users can customize their display to hide the tab or make it visible in other apps.
PermissionSetUserPermission
PermissionSetUserPermission represents an app or system permission for a permission set. Use one of these elements for each permission.
515
Metadata Types PermissionSet
Field
enabled name
Field Type
boolean string
Description
Required. Indicates whether the permission is enabled ( true
) or disabled ( false
).
Required. The name of the permission.
Declarative Metadata Sample Definition
When adding or changing a permission set, you don't need to include all permissions—you only need to include the permissions you're adding or changing.
<?xml
version= "1.0" encoding= "UTF-8"?>
<PermissionSet xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >Grants all rights needed for an HR administrator to manage employees.
</description >
<label >HR Administration </label >
<userLicense >Salesforce </userLicense >
<applicationVisibilities >
<application >JobApps__Recruiting </application >
<visible >true </visible >
</applicationVisibilities >
<userPermissions >
<enabled >true </enabled >
<name >APIEnabled </name >
</userPermissions >
<objectPermissions >
<allowCreate >true </allowCreate >
<allowDelete >true </allowDelete >
<allowEdit >true </allowEdit >
<allowRead >true </allowRead >
<viewAllRecords >true </viewAllRecords >
<modifyAllRecords >true </modifyAllRecords >
<object >Job_Request__c </object >
</objectPermissions >
<fieldPermissions >
<editable >true </editable >
<field >Job_Request__c.Salary__c
</field >
<readable >true </readable >
</fieldPermissions >
<pageAccesses >
<apexPage >Job_Request_Web_Form </apexPage >
<enabled >true </enabled >
</pageAccesses >
<classAccesses >
<apexClass >Send_Email_Confirmation </apexClass >
<enabled >true </enabled >
</classAccesses >
<tabSettings >
<tab >Job_Request__c </tab >
<visibility >Available </visibility >
</tabSettings >
<recordTypeVisibilities >
516
Metadata Types PlatformCachePartition
<recordType >Recruiting.DevManager
</recordType >
<visible >true </visible >
</recordTypeVisibilities >
</PermissionSet >
The following is an example package.xml manifest used to retrieve the PermissionSet metadata for an organization. When you retrieve permission sets, also retrieve the related components with assigned permissions. For example, to retrieve objectPermissions and fieldPermissions
for a custom object, you must also retrieve the CustomObject component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Job_Request__c </members >
<name >CustomTab </name >
</types >
<types >
<members >Job_Request__c </members >
<name >CustomObject </name >
</types >
<types >
<members >JobApps__Recruiting </members >
<name >CustomApplication </name >
</types >
<types >
<members >Recruiting.DevManager
</members >
<name >RecordType </name >
</types >
<types >
<members >* </members >
<name >PermissionSet </name >
</types >
<version >41.0
</version >
</Package >
PlatformCachePartition
Represents a partition in the Platform Cache. This type extends the Metadata
metadata type and inherits its fullName
field.
File Suffix and Directory Location
PlatformCachePartition components have the suffix
.cachePartition
and are stored in the cachePartitions
folder.
Version
PlatformCachePartition components are available in API version 35.0 and later.
Special Access Rules
The “Author Apex” permission is required to deploy and retrieve PlatformCachePartition components.
517
Metadata Types PlatformCachePartition
Fields
Field Name
description isDefaultPartition
Field Type
string boolean
Description
Describes the cache partition.
Required. Indicates whether this cache partition is the default partition in your organization ( true
) or not ( false
).
masterLabel string Required. The label of the cache partition that appears in the
Salesforce user interface.
platformCachePartitionTypes
An array of cache types that the partition can store.
PlatformCachePartitionType
Contains information about a partition type, including its minimum and allocated capacity.
Field Name
allocatedCapacity allocatedPurchasedCapacity allocatedTrialCapacity cacheType
Field Type
int int int
Description
Required. The total storage capacity, in MB, that is allocated for the cache type, including free, purchased, and trial cache. Purchased capacity includes organization-wide cache, which can be used in any partition, and namespace-specific cache, which can be used only in partitions associated with a namespace.
Required. The amount of namespace-specific purchased storage capacity, in MB, that is allocated for the cache type.
Required. The amount of trial cache space, in MB, that is allocated for the cache type.
PlatformCacheType
of type string)
The type of cache. Valid values are:
•
Session
—Session cache
•
Organization
—Org cache
Declarative Metadata Sample Definition
The following is an example of a PlatformCachePartition component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<PlatformCachePartition xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >Custom partition and marked as default.
</description >
<isDefaultPartition >true </isDefaultPartition >
<masterLabel >myPartition </masterLabel >
<platformCachePartitionTypes >
<allocatedCapacity>10</allocatedCapacity>
<allocatedPurchasedCapacity>5</allocatedPurchasedCapacity>
<cacheType >Session </cacheType >
</platformCachePartitionTypes >
518
Metadata Types
<platformCachePartitionTypes >
<allocatedCapacity>5</allocatedCapacity>
<allocatedPurchasedCapacity>5</allocatedPurchasedCapacity>
<cacheType >Organization </cacheType >
</platformCachePartitionTypes >
</PlatformCachePartition >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >myPartition </members >
<name >PlatformCachePartition </name >
</types >
<version >41.0
</version >
</Package >
If a namespace is defined in your organization, add the namespace prefix to your partition name. For example:
<members >Namespace.myPartition
</members >
To retrieve all cache partitions from your organization, use the wildcard character (*) as follows.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >PlatformCachePartition </name >
</types >
<version >41.0
</version >
</Package >
Portal
The Portal metadata type represents a partner portal or Customer 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” and “Enabling Your Customer Portal” in the Salesforce online help.
Declarative Metadata File Suffix and Directory Location
Force.com 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
Force.com Portal components are available in API version 15.0 and later.
Portal
519
Metadata Types
Fields
Field
active admin defaultLanguage
Field Type
boolean string string description emailSenderAddress string string emailSenderName string enableSelfCloseCase footerDocument forgotPassTemplate fullName boolean string string string headerDocument string isSelfRegistrationActivated boolean loginHeaderDocument logoDocument logoutUrl newCommentTemplate string string string string newPassTemplate newUserTemplate string string
520
Description
Required. Denotes whether this portal is active.
The full name of the user designated to administer the portal.
The default language for HTML messages for the portal. Use the abbreviation for the language, for example, en_US for United
States English.
The portal description.
Required. The email address used when sending emails using templates configured from the portal (for example, for resetting the password).
Required. The name to display when sending emails using templates configured from the portal (for example, for resetting the password).
For the Customer Portal, allows portal users to close their own cases.
The file to be used as the footer for this portal.
The email template to use when a user clicks the Forgot
Password link.
Required. The name of the portal.
Inherited from Metadata , this field is not defined in the WSDL
for this metadata type. It must be specified when creating,
updating, or deleting. See create()
to see an example of this field specified for a call.
The file to be used as the header for this portal.
Determines whether self-registration is active or not for this portal.
The file to be used as the header for this portal's login page.
The file to be used as the logo for this portal.
The URL that the user should be redirected to on logout.
The email template to be used for auto-notifications on new case comments.
The email template to be used for auto-notifications on password reset.
The email template to be used for auto-notifications on new user creation.
Portal
Metadata Types
Field
ownerNotifyTemplate selfRegNewUserUrl
Field Type
string string selfRegUserDefaultProfile string selfRegUserDefaultRole
PortalRoles (
type string)
Description
The email template to be used for auto-notifications on owner change.
The URL of the self-registration page.
The default profile for self-registered users.
The default role for self-registered users. The valid values are:
•
Executive
•
Manager
•
User
•
PersonAccount selfRegUserTemplate showActionConfirmation stylesheetDocument type string boolean
The email template to be used for auto-notifications on self-registration.
Determines whether or not confirmation messages are displayed for actions in the portal.
string The Document object to be used as the CSS stylesheet for this portal.
PortalType (
string)
Required. The type for this portal. The valid values are:
•
CustomerSuccess
•
Partner
Portal
Declarative Metadata Sample Definition
A sample XML definition of a portal is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Portal xmlns= "http://soap.sforce.com/2006/04/metadata">
<active >true </active >
<description >Customer Portal </description >
<emailSenderName >[email protected]
</emailSenderName >
<enableSelfCloseCase >false </enableSelfCloseCase >
<forgotPassTemplate >unfiled$public/ChangePwdEmail </forgotPassTemplate >
<isSelfRegistrationActivated >false </isSelfRegistrationActivated >
<newPassTemplate >unfiled$public/ChangePwdEmail </newPassTemplate >
<newUserTemplate >unfiled$public/NewUserEmail </newUserTemplate >
<selfRegUserTemplate >unfiled$public/SelfRegUserEmail </selfRegUserTemplate >
<showActionConfirmation >false </showActionConfirmation >
<type >CustomerSuccess </type >
</Portal >
SEE ALSO:
521
Metadata Types PostTemplate
PostTemplate
Represents the metadata associated with an approval post template for Approvals in Chatter. With approval post templates, you can
metadata type and inherits its fullName
field.
Note: Review Chatter Post Templates for Approval Requests in the Salesforce Help before you create a post template.
File Suffix and Directory Location
PostTemplate components have the suffix
.postTemplate
and are stored in the postTemplates
folder.
Version
PostTemplate components are available in API version 29.0 and later.
Fields
Field Name
default
Field Type
boolean description fields label string string[] string
Description
Required. Specifies whether this is the default post template for the given object.
When set to true
, this post template is used by approval processes that are associated with the same object and don’t specify a post template.
When an object has no default post template, each of its approval processes uses the system default post template, unless the approval process specifies its own post template.
Optional description of the post template.
Required. An array of up to four fields to include in approval request posts.
If the approval object is a detail object in a master-detail relationship,
Owner isn’t available for approval page layouts or approval post templates.
Required. Name of the post template. This non-unique label is different from the unique name of the post template.
Declarative Metadata Sample Definition
The following is an example of a PostTemplate component:
<PostTemplate xmlns= "http://soap.sforce.com/2006/04/metadata">
<default >false </default >
<fields >NumberOfEmployees </fields >
<fields >NumberofLocations__c </fields >
<fields >PartnerAccount </fields >
<fields >LeadCustomFieldNumber__c </fields >
522
Metadata Types
<label >My Lead Post Template </label >
</PostTemplate >
The following is an example package manifest that references the previous PostTemplate component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Lead.leadtemplate
</members >
<name >PostTemplate </name >
</types >
<version >29.0
</version >
</Package >
Profile
Represents a user profile. A profile defines a user’s permission to perform different functions within Salesforce. This type extends the
metadata type and inherits its fullName
field.
In API version 29.0 and later, you can retrieve and deploy access settings for the following managed components in profiles and permission sets:
•
Apex classes
•
Apps
•
Custom field permissions
•
Custom object permissions
•
Custom tab settings
•
External data sources
•
Record types
•
Visualforce pages
For more information, see Managed Component Access in Sample package.xml
on page 22.
Declarative Metadata File Suffix and Directory Location
The file suffix is
.profile
. There is one file for each profile, stored in the profiles
folder in the corresponding package directory.
Version
Profiles are available in API version 10.0 and later.
Fields
The content of a profile returned by Metadata API depends on the content requested in the
RetrieveRequest message. For example,
profiles only include field-level security for fields included in custom objects returned in the same RetrieveRequest as the profiles.
Note: As of API version 38.0, you can change field permissions to make a field editable using the Metadata API for fields that you can't change through the user interface. For example, you can deploy
Asset.ProductCode
as an editable field even though you can't through the user interface.
Profile
523
Metadata Types
The profile definition contains the following fields:
Field Name
applicationVisibilities classAccesses custom customPermissions description externalDataSourceAccesses
ProfileExternalDataSourceAccess []
fieldLevelSecurities fieldPermissions fullName layoutAssignments loginHours
Field Type
ProfileApplicationVisibility []
boolean
string
string
[]
[]
[]
[]
[]
Description
Indicates which apps are visible to users assigned to this profile. In API version 29.0 and earlier, this field supports custom apps only. In API version 30.0 and later, this field supports both standard and custom apps.
Indicates which top-level Apex classes have methods that users assigned to this profile can execute.
Indicates whether the profile is a custom ( true
) or standard ( false
) profile. Available in API version 30.0
and later.
Indicates which custom permissions are available to users assigned to this profile. Available in API version 31.0 and later.
The profile description. Limit: 255 characters. Available in API version 30.0 and later.
Indicates which data sources with identity type of
Per
User
are available to users assigned to this profile.
Available in API version 27.0 and later.
Indicates which fields are visible to a user assigned to this profile, and the kind of access available (editable or hidden). This field is available in API version 22.0 and earlier.
Indicates which fields are visible to a user assigned to this profile, and the kind of access available (editable or readable). This field is available in API version 23.0 and later.
The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
component, this field is not defined in the WSDL for this component. It must be specified when creating, updating, or deleting. See
to see an example of this field specified for
a call.
Indicates which layout to use for this profile.
Indicates the hours within which a user with this profile can log in. If not specified, the profile doesn’t restrict a user’s login hours.
This field is available in API version 25.0 and later.
Profile
524
Metadata Types
Field Name
loginIpRanges objectPermissions pageAccesses
[] profileActionOverrides
recordTypeVisibilities
ProfileRecordTypeVisibility []
tabVisibilities userLicense userPermissions
Field Type
[]
[]
[] string
[]
Description
The list of IP address ranges from which users with a particular profile can log in.
This field is available in API version 17.0 and later.
Indicates which objects are accessible to a user assigned to this profile, and the kind of access available (create, read, edit, delete, and so on). In API version 28.0 and later, this field is only retrieved when allowRead
is true
.
Indicates which Visualforce pages that users assigned to this profile can execute.
A list of the Lightning Experience Home page action overrides that are assigned to this profile. When a user logs in with a profile, a matching ProfileActionOverride assignment takes precedence over existing overrides for the Home tab specified in
.
This field is available in API version 37.0 and later.
Indicates the visibility of record types for users assigned to this profile. In API version 29.0 and later, this field is not retrieved or deployed for inactive record types.
Indicates which record types are visible to a user assigned to this profile, and therefore which tabs within an app are visible.
The
User License
for the profile. A user license determines the baseline of features that the user can access. Every user must have exactly one user license.
This field is available in API version 17.0 and later.
Specifies a user permission (such as “API Enabled”) and whether it’s enabled for this profile. This field retrieves only enabled user permissions. Available in API version
29.0 and later.
ProfileActionOverride
ProfileActionOverride represents a user profile-based override of an
on a standard Home tab in Lightning Experience.
Note: ProfileActionOverride settings aren’t retrieved in the
.profile
file unless a Lightning page is referenced in the package.xml
.
Profile
525
Metadata Types
Field Name
actionName content formFactor pageOrSobjectType recordType type
Field Type
string
Description
Required. The possible values are the same as the actions you can override:
•
accept
•
clone
•
delete
•
edit
•
list
•
new
•
tab
•
view string
FormFactor
(
of type string)
Set this field if type
is set to flexipage
, lightningcomponent
, scontrol
, or visualforce
. It refers to the name of the Lightning page, Lightning component, s-control, or
Visualforce page to use as the override. To reference installed components, use the format of
Component_namespace__Component_name
.
The size of the page being overridden. Only the
Large
value is supported. The other values,
Small
and
Medium
, are reserved for future use.
The
Large
value represents the Lightning Experience desktop environment, and is only valid for the flexipage
type. For other types, this field defaults to null
.
string string
ActionOverrideType
(
of type string)
The name of the sObject type being overridden. Valid values are standard
and custom
.
The record type assigned to the ProfileActionOverride. If the
PageOrSobjectType
is standard-home
, this field is null.
Required. Represents the type of action override. Valid values are described in
ProfileApplicationVisibility
ProfileApplicationVisibility determines whether an app is visible to a user assigned to this profile.
Field Name
application default
Field Type
string boolean
Description
Required. The name of the app.
Required. Indicates whether the app is the default app ( true
) or not
( false
). Only one app per profile can be set to true
.
Profile
526
Metadata Types
Field Name
visible
Field Type
boolean
Description
Required. Indicates whether this app is visible to users assigned to this profile ( true
) or not ( false
).
ProfileApexClassAccess
ProfileApexClassAccess determines which top-level Apex classes have methods that users assigned to this profile can execute.
Field Name
apexClass enabled
Field Type
string boolean
Description
Required. The Apex class name.
Required. Indicates whether users assigned to this profile can execute methods in the top-level class ( true
) or not ( false
).
ProfileCustomPermissions
ProfileCustomPermissions represents the custom permissions access for users assigned to a profile. Only enabled custom permissions are retrieved.
Field Name
enabled name
Field Type
boolean string
Description
Required. Indicates whether the custom permission is enabled ( true
) or not ( false
).
Required. The custom permission name.
ProfileExternalDataSourceAccess
ProfileExternalDataSourceAccess represents the data source access for users with identity type of
Per User
. Available in API version
27.0 and later.
Field Name
enabled externalDataSource
Field Type
boolean string
Description
Required. Indicates whether the data source is enabled ( true
) or not
( false
).
The name of the external data source.
ProfileFieldLevelSecurity
ProfileFieldLevelSecurity represents the field level security for users assigned to a profile. In API version 30.0 and later, permissions for required fields can’t be retrieved or deployed.
Profile
527
Metadata Types
Field Name
editable field hidden readable
Field Type
boolean string boolean boolean
Description
Required. Indicates whether this field is editable ( true
) or not ( false
).
In API version 30.0 and later, when deploying a new custom field, this field is false
by default.
Required. Indicates the name of the field.
Indicates whether this field is hidden ( true
) or not ( false
). This field is available in API version 22.0 and earlier.
For portal profiles, this field is set to true
by default in API version 19.0
and later.
Indicates whether this field is readable ( true
) or not ( false
). This field is available in API version 23.0 and later. It replaces the hidden
field.
In API version 30.0 and later, when deploying a new custom field, this field is false
by default.
For portal profiles, this field is set to false
by default.
ProfileLayoutAssignments
ProfileLayoutAssignments determines which layout to use for a profile and a given entity.
Field Name
layout recordType
Field Type
string string
Description
Required. Indicates the layout for this particular entity.
This field is optional. If the recordType
of the record matches a layout assignment rule, it will use the specified layout.
ProfileLoginHours
ProfileLoginHours restricts the days and times within which users with a particular profile can log in.
Field Name
weekdayStart
Field Type
string
Description
Specifies the earliest time on that day that a user with this profile can log in. If a start time for a particular day is specified, an end time for that day must be specified as well. Start can’t be greater than end for a particular day.
•
Valid values for weekday
: monday
, tuesday
, wednesday
, thursday
, friday
, saturday
, or sunday
. For example, mondayStart
indicates the beginning of the login period for
Monday.
•
Valid values for Start: the number of minutes since midnight. Must be evenly divisible by 60 (full hours). For example,
300
is 5:00 a.m.
Profile
528
Metadata Types
Field Name
weekdayEnd
Field Type
string
Description
Specifies the time on that day by which a user with this profile must log out.
•
Valid values for weekday
: monday
, tuesday
, wednesday
, thursday
, friday
, saturday
, or sunday
. For example, mondayEnd
indicates the close of the login period for Monday.
•
Valid values for End: the number of minutes since midnight. Must be evenly divisible by 60 (full hours). For example,
1020
is 5:00 p.m.
To delete login hour restrictions from a profile that previously had them, you must explicitly include an empty loginHours tag without any start or end times.
ProfileLoginIpRange
ProfileLoginIpRange IP defines an IP address range from which users with a particular profile can log in.
Field Name
description endAddress startAddress
Field Type
string string string
Description
Use this field to identify the purpose of the range, such as which part of a network corresponds to this range. This field is available in API version
31.0 and later.
Required. The end IP address for the range.
Required. The start IP address for the range.
ProfileObjectPermissions
ProfileObjectPermissions represents a user's access to objects.
Note: In API version 18.0 and later, these permissions are disabled in new custom objects for any profiles in which “View All Data” or “Modify All Data” is disabled.
Field Name
allowCreate
Field Type
boolean allowDelete boolean
Description
Indicates whether the object referenced by the object
field can be created by the users assigned to this profile ( true
) or not ( false
).
This field is named revokeCreate
before version 14.0 and the logic is reversed. The field name change and the update from true
to false
and the reverse is automatically handled between versions and does not require any manual editing of existing XML component files.
Indicates whether the object referenced by the object
field can be deleted by the users assigned to this profile ( true
) or not ( false
).
This field is named revokeDelete
before version 14.0 and the logic is reversed. The field name change and the update from true
to
Profile
529
Metadata Types
Field Name
allowEdit allowRead modifyAllRecords object viewAllRecords
Field Type
boolean boolean boolean string boolean
Description
false
and the reverse is automatically handled between versions and does not require any manual editing of existing XML component files.
Indicates whether the object referenced by the object
field can be edited by the users assigned to this profile ( true
) or not ( false
).
This field is named revokeEdit
before version 14.0 and the logic is reversed. The field name change and the update from true
to false and the reverse is automatically handled between versions and does not require any manual editing of existing XML component files.
Indicates whether the object referenced by the object
field can be seen by the users assigned to this profile ( true
) or not ( false
).
This field is named revokeRead
before version 14.0 and the logic is reversed. The field name change and the update from true
to false and the reverse is automatically handled between versions and does not require any manual editing of existing XML component files.
Indicates whether the object referenced by the object
field can be read, edited, or deleted by the users assigned to this profile ( true
) or not ( false
), regardless of the sharing settings for the object. This is equivalent to the “Modify All Data” user permission limited to the individual object level. This is a new field in API version 15.0.
Note: This field is not available for all objects. Refer to the profile in the user interface to determine which objects currently support these permissions. Profiles with "Modify All Data" ignore modifyAllRecords
entries in Metadata API and don't return an error if "Modify All Data" is enabled on the profile.
Required. The name of the object whose permissions are altered by this profile, for example,
MyCustomObject__c
.
Indicates whether the object referenced by the object
field can be read by the users assigned to this profile ( true
) or not ( false
), regardless of the sharing settings for the object. This includes private records (records with no parent object). This is equivalent to the “View
All Data” user permission limited to the individual object level. This is a new field in API version 15.0.
Note: This field is not available for all objects. Refer to the profile in the user interface to determine which objects currently support these permissions. Profiles with "View All Data" ignore viewAllRecords
entries in the Metadata API and don't return an error if "View All Data" is enabled on the profile.
Profile
530
Metadata Types
ProfileApexPageAccess
ProfileApexPageAccess determines which Visualforce pages that users assigned to this profile can execute.
Field Name
apexPage enabled
Field Type
string boolean
Description
Required. The Visualforce page name.
Required. Indicates whether users assigned to this profile can execute the Visualforce page ( true
) or not ( false
).
Profile
ProfileRecordTypeVisibility
ProfileRecordTypeVisibility represents the visibility of record types for this profile. Record types let you offer different business processes, picklist values, and page layouts to different users.
Field Name
default personAccountDefault recordType visible
Field Type
boolean boolean string boolean
Description
Required. Indicates whether the record type is the default for this pair of profile and object ( true
) or not ( false
). Only one default is allowed per object.
Indicates whether the record type is the default person account record type for this pair of profile and object ( true
) or not ( false
). Only one person account record type default is allowed per object. This field is only relevant for record types for account or contact objects.
For more information about person accounts, see “Person Accounts” in the Salesforce online help. Person accounts are not enabled by default in Salesforce. To request person accounts, contact Salesforce.
Required. The record type name, for example
Account.MyRecordType
.
Required. Indicates whether this record type is visible to users assigned to this profile ( true
) or not ( false
).
ProfileTabVisibility
ProfileTabVisibility represents the visibility of tabs for this profile. For version 17.0 and later, ProfileTabVisibility supports visibility of tabs for standard objects. The manifest file must include the standard object corresponding to a standard tab to retrieve the tab visibility in a profile.
Field Name
tab visibility
Field Type
string
TabVisibility
(
of type string)
Description
Required. The name of the tab.
Required. Indicates the visibility of the tab. Valid values are:
•
DefaultOff
—The tab is available on the All Tabs page. Users can individually customize their display to make the tab visible in any app.
531
Metadata Types
Field Name Field Type Description
•
DefaultOn
—The tab is available on the All Tabs page and appears in the visible tabs for its associated app. Users can individually customize their display to hide the tab or make it visible in other apps.
•
Hidden
—The tab isn’t available on the All Tabs page or visible in any apps.
Note: In version 36.0 and earlier,
Hidden
is returned only if visibility
was set using the API. If it was set to
Hidden from the profile in Salesforce, the API doesn’t return a visibility value. For version 37.0 and later, when tab visibility is set to hidden, the API returns
Hidden
, regardless of how the value was set.
ProfileUserPermission
ProfileUserPermission represents an app or system permission for a profile. Use one of these elements for each permission.
Field
enabled name
Field Type
boolean string
Description
Required. Indicates whether the permission is enabled ( true
) or disabled ( false
).
Required. The permission name.
Java Sample
The following sample uses picklists, profiles, record types, and a custom app: public void profileSample() { try {
// Create an expense report record, tab and app...
CustomObject expenseRecord = new CustomObject(); expenseRecord.setFullName( "ExpenseReport__c" ); expenseRecord.setLabel( "Expense Report" ); expenseRecord.setPluralLabel( "Expense Reports" ); expenseRecord.setDeploymentStatus(DeploymentStatus.Deployed); expenseRecord.setSharingModel(SharingModel.ReadWrite);
CustomField nameField = new CustomField(); nameField.setType(FieldType.AutoNumber); nameField.setLabel( "Expense Report Number" ); nameField.setDisplayFormat( "ER-{0000}" ); expenseRecord.setNameField(nameField);
AsyncResult[] arsExpenseRecord = metadataConnection.create( new Metadata[] {expenseRecord});
Profile
532
Metadata Types
Picklist expenseStatus = new Picklist();
PicklistValue unsubmitted = new PicklistValue(); unsubmitted.setFullName( "Unsubmitted" );
PicklistValue submitted = new PicklistValue(); submitted.setFullName( "Submitted" );
PicklistValue approved = new PicklistValue(); approved.setFullName( "Approved" );
PicklistValue rejected = new PicklistValue(); rejected.setFullName( "Rejected" ); expenseStatus.setPicklistValues( new PicklistValue[] { unsubmitted, submitted, approved, rejected}
);
CustomField expenseStatusField = new CustomField(); expenseStatusField.setFullName(
"ExpenseReport__c.ExpenseStatus__c"
); expenseStatusField.setLabel( "Expense Report Status" ); expenseStatusField.setType(FieldType.Picklist); expenseStatusField.setPicklist(expenseStatus);
AsyncResult[] arsStatusField = metadataConnection.create( new Metadata[]
{expenseStatusField});
CustomTab expenseTab = new CustomTab(); expenseTab.setFullName( "ExpenseReport__c" ); expenseTab.setMotif( "Custom70: Handsaw" ); expenseTab.setCustomObject(true);
AsyncResult[] arsTab = metadataConnection.create( new Metadata[] {expenseTab});
CustomApplication application = new CustomApplication(); application.setFullName( "ExpenseForce" ); application.setTab( new String[] {expenseTab.getFullName()});
AsyncResult[] arsApp = metadataConnection.create( new Metadata[] {application});
// Employees and managers have the same app visibility...
ProfileApplicationVisibility appVisibility = new ProfileApplicationVisibility(); appVisibility.setApplication( "ExpenseForce" ); appVisibility.setVisible(true);
Profile employee = new Profile(); employee.setFullName( "Employee" ); employee.setApplicationVisibilities( new ProfileApplicationVisibility[] {appVisibility}
);
AsyncResult[] arsProfileEmp = metadataConnection.create( new Metadata[] {employee});
Profile manager = new Profile(); manager.setFullName( "Manager" ); manager.setApplicationVisibilities(
533
Profile
Metadata Types new ProfileApplicationVisibility[] {appVisibility}
);
AsyncResult[] arsProfileMgr = metadataConnection.create( new Metadata[] {manager});
// But employees and managers have different access
// to the state of the expense sheet
RecordType edit = new RecordType(); edit.setFullName( "ExpenseReport__c.Edit" );
RecordTypePicklistValue editStatuses = new RecordTypePicklistValue(); editStatuses.setPicklist( "ExpenseStatus__c" ); editStatuses.setValues( new PicklistValue[]
{unsubmitted, submitted}); edit.setPicklistValues( new RecordTypePicklistValue[]
{editStatuses});
AsyncResult[] arsRecTypeEdit = metadataConnection.create( new Metadata[] {edit});
}
RecordType approve = new RecordType(); approve.setFullName( "ExpenseReport__c.Approve" );
RecordTypePicklistValue approveStatuses = new RecordTypePicklistValue(); approveStatuses.setPicklist( "ExpenseStatus__c" ); approveStatuses.setValues( new PicklistValue[]
{approved, rejected}); approve.setPicklistValues( new RecordTypePicklistValue[]
{approveStatuses});
AsyncResult[] arsRecTypeApp = metadataConnection.create( new Metadata[] {approve});
} catch (ConnectionException ce) { ce.printStackTrace();
}
Declarative Metadata Sample Definition
The following is the definition of a profile in an organization with a custom app, custom object, record type, tab, and user permission:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Profile xmlns= "http://soap.sforce.com/2006/04/metadata">
<applicationVisibilities >
<application >PubApps__Myriad_Publishing </application >
<default >false </default >
<visible >true </visible >
</applicationVisibilities >
<custom >true </custom >
<objectPermissions >
<object >TestWeblinks__c </object >
</objectPermissions >
<recordTypeVisibilities >
<default >true </default >
<recordType >TestWeblinks__c.My First Recordtype </recordType >
<visible >true </visible >
534
Profile
Metadata Types
</recordTypeVisibilities >
<tabVisibilities >
<tab >Myriad Publications </tab >
<visibility >DefaultOn </visibility >
</tabVisibilities >
<userPermissions >
<enabled >true </enabled >
<name >APIEnabled </name >
</userpermissions >
</Profile >
Usage
call to get information about profiles in your organization, the returned
.profile
files only include security settings for the other metadata types referenced in the retrieve request (except for user permissions, IP address ranges, and login hours, which are always retrieved). For example, the following package.xml
file contains a types
element that matches all custom objects, so the returned profiles contain object and field permissions for all custom objects in your organization, but do not include permissions for standard objects, such as Account, and standard fields.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >CustomObject </name >
</types >
<types >
<members >* </members >
<name >Profile </name >
</types >
<version >41.0
</version >
</Package >
The wildcard “*” on CustomObject does not match standard objects and this helps to avoid making unintended, high-impact profile changes. If you create a few custom objects in a Developer Edition organization,
the information, and subsequently
as Account, and standard fields are not overwritten unless you explicitly create separate types
elements for the standard objects or fields.
Metadata API intentionally makes it difficult to include standard fields in retrieve()
calls to prevent unexpected profile changes.
However, you can still retrieve and deploy profile permissions for custom and standard fields in standard objects, such as Account.
The next package.xml
file allows you to return profile permissions for Account standard and custom fields. Note how the standard
Account object is defined in a types
element by specifying it as a member of a CustomObject type.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Account </members >
<name >CustomObject </name >
</types >
<types >
<members >* </members >
<name >Profile </name >
</types >
Profile
535
Metadata Types ProfileActionOverride
<version >41.0
</version >
</Package >
The final package.xml
file allows you to return profile permissions for the
MyCustomField__c
custom field in the Account object.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Account.MyCustomField__c
</members >
<name >CustomField </name >
</types >
<types >
<members >* </members >
<name >Profile </name >
</types >
<version >41.0
</version >
</Package >
ProfileActionOverride
Represents an override of an ActionOverride by a user profile. You can use it to override an ActionOverride on a standard Home tab or object record page in Lightning Experience. When a user logs in with a profile, a matching ProfileActionOverride assignment takes precedence over existing overrides for the Home tab or record page specified in ActionOverride. You can only access ProfileActionOverride by accessing its encompassing CustomApplication or Profile. Available in API version 39.0 and later.
File Suffix and Directory Location
Profile-based action overrides are defined as part of a custom application or profile.
Version
ProfileActionOverrides are available in API version 39.0 and later.
Fields
Field Name
actionName
Field Type
string content string
Description
The name of the action. The only valid values are
Tab
.and
View
.
If pageOrSobjectType
is standard-home
, this field must be
Tab
. The
Tab
action is supported only when ProfileActionOverride is being specified as part of a Profile.
If pageOrSobjectType
is record-home
, this field must be
View
. The
View
action is supported only when ProfileActionOverride is being specified as part of a CustomApplication.
Read-only. Represents the name of the Lightning page being used as the override.
536
Metadata Types ProfileActionOverride
Field Name
formFactor pageOrSobjectType recordType type
Field Type
FormFactor
(
type string) string string
Description
The size of the page being overridden. Only the
Large
value is supported. The other values,
Small
and
Medium
, are reserved for future use. The
Large
value represents the Lightning Experience desktop environment.
The name of the page being overridden. The only valid values are record-home
and standard-home
.
The record type associated with the override. If pageOrSobjectType
is standard-home
, this field must be null
. This field is required when actionName
is set to
View
.
ActionOverrideType
(
type string)
Read-only. The type of action override. The only valid value is flexipage
.
Declarative Metadata Sample Definition
You can define a ProfileActionOverride like this.
<CustomApplication xmlns= "http://soap.sforce.com/2006/04/metadata">
<profileActionOverrides >
<actionName >View </actionName >
<content >CustomObjectFlexiPage </content >
<formFactor >Large </formFactor >
<pageOrSobjectType >TestObj__c </pageOrSobjectType >
<type >Flexipage </type >
<profile >standard </profile >
<recordType >TestObj__c.TestRecordType
</recordType >
</profileActionOverrides >
<defaultLandingTab >standard-home </defaultLandingTab >
<formFactors >Large </formFactors >
<label >My Custom App </label >
<tab >standard-Account </tab >
<tab >standard-Opportunity </tab >
<uiType >Lightning </uiType >
<navType >Standard </navType >
</CustomApplication >
Here is an example package.xml
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyCustomApp </members >
<name >CustomApplication </name >
</types >
<version >39.0
</version >
</Package >
537
Metadata Types ProfilePasswordPolicy
ProfilePasswordPolicy
Represents a profile’s password policies. Profile password policies override org-wide password policies for that profile’s users. Use
ProfilePasswordPolicy to retrieve password policies for a given profile. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
ProfilePasswordPolicy components have the suffix
.profilePasswordPolicy
and are stored in the profilePasswordPolicies
folder.
Version
ProfilePasswordPolicy components are available in API version 40.0 and later.
Fields
Field Name
lockoutInterval
Field Type
int maxLoginAttempts minimumPasswordLength minimumPasswordLifetime boolean obscure passwordComplexity int int boolean int
Description
Required. The duration of the login lockout, in minutes. If users are locked out, they must wait until the lockout period expires. Valid values:
0
,
15
,
30
,
60
.
Required. The number of times a user can enter a wrong password before getting locked out. Valid values:
0
,
3
,
5
,
10
.
Required. Minimum number of characters required for a password. Valid values:
5
–
50
.
If true
, a user cannot change a password more than once in a 24-hour period.
If true
, answers to security questions are hidden as the user types.
Required. Level of complexity required for the character types in a user’s password.
•
If
0
, the password can contain any type of character.
•
If
1
, the password must contain at least one alphabetic character and 1 number.
•
If
2
, the password must contain at least one alphabetic character, one number, and one of the following special characters: ! # $ % -
_ = + < >.
•
If
3
, the password must contain at least one number, one uppercase letter, and one lowercase letter.
•
If
4
, the password must contain at least one number, one uppercase letter, one lowercase letter, and one of the following special characters: ! # $ % - _ = + < >.
538
Metadata Types
Field Name
passwordExpiration passwordHistory passwordQuestion profile
Field Type
int int int string
Description
Required. Number of days until user passwords expire and must be changed. If set to
0
, the password never expires. Valid values:
0
,
30
,
60
,
90
,
365
.
Required. Number of previous passwords to save. Saving passwords is required to ensure that users reset their password to a new, unique password. This value must be set before a password reset succeeds. If
0
, passwordExpiration
must be set to
0
.
Required. If set to
1
, the answer to the password hint cannot contain the password itself. If
0
, the answer has no restrictions.
Required. Name of the user profile.
Declarative Metadata Sample Definition
The following is an example of a ProfilePasswordPolicy component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ProfilePasswordPolicy xmlns= "http://soap.sforce.com/2006/04/metadata">
<lockoutInterval >30 </lockoutInterval >
<maxLoginAttempts >0 </maxLoginAttempts >
<minimumPasswordLength >7 </minimumPasswordLength >
<minimumPasswordLifetime >false </minimumPasswordLifetime >
<obscure >false </obscure >
<passwordComplexity >1 </passwordComplexity >
<passwordExpiration >0 </passwordExpiration >
<passwordHistory >0 </passwordHistory >
<passwordQuestion >1 </passwordQuestion >
<profile >platformportal </profile >
</ProfilePasswordPolicy >
Queue
Represents a holding area for items before they are processed.
Declarative Metadata File Suffix and Directory Location
The file suffix for queue components is
.queue
and components are stored in the queues
directory of the corresponding package directory. This component supports cases, leads, service contracts (if Entitlements are enabled), and custom objects.
Version
Queue components are available in API version 24.0 and later.
Queue
539
Metadata Types
Fields
This metadata type represents the valid values that define a queue:
Field Name Field Type
doesSendEmailToMembers boolean email fullName name queueSobject string string string
Description
Indicates whether emails are sent to queue members ( true
) or not
( false
) when a new record is added to the queue.
The email address of the queue owner.
The unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain
two consecutive underscores. This field is inherited from the Metadata
component. Corresponds to Queue Name in the user interface.
Required. The name of the queue. Corresponds to Label in the user interface.
Indicates the supported entity types.
Queue
QueueSobject
QueueSobject represents an entity type that the queue supports.
Field Name
sobjectType
Field Type
string
Description
Valid values are:
•
Case
•
Lead
•
ServiceContract
•
Custom objects (e.g.
ObjA_c
)
Declarative Metadata Sample Definition
The following is the definition of a queue, which supports Case, Lead, and a custom object named ObjA.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Queue xmlns= "http://soap.sforce.com/2006/04/metadata">
<doesSendEmailToMembers >true </doesSendEmailToMembers >
<email >[email protected]
</email >
<fullName >Your Name </fullName >
<name >memberQueue </name >
<queueSobject >
<sobjectType >Case </sobjectType >
</queueSobject >
<queueSobject >
<sobjectType >Lead </sobjectType >
</queueSobject >
540
Metadata Types QuickAction
<queueSobject >
<sobjectType >ObjA_c </sobjectType >
</queueSobject >
</Queue >
QuickAction
Represents a specified create or update quick action for an object that then becomes available in the Chatter publisher. For example, you can create an action that, on the detail page of an account, allows a user to create a contact related to that account from the Chatter feed on that page. QuickAction can be created on objects that allow custom fields. The parent objects supported include:
•
Account
•
Campaign
•
Case
•
Contact
•
ContentNote
•
Custom objects
•
Group
•
Lead
•
Opportunity
File Suffix and Directory Location
QuickAction components have the suffix quickAction
and are stored in the quickActions
folder.
Version
QuickAction components are available in API version 28.0 and later.
Fields
Field Name
canvas description fieldOverrides
Field Type
string string
page 543[]
Description
If the custom action invokes a canvas app, the app name. Returns the fully qualified name of the canvas app in the format
<namespace>__<dev_name>
, if the quick action type is
Canvas
; otherwise, returns null
.
This field is available in API version 29.0 and later.
The description of the action.
The specific field that may be overridden within a QuickAction.
541
Metadata Types QuickAction
Field Name
flowDefinition height icon isProtected label lightningComponent optionsCreateFeedItem page quickActionLayout standardLabel
Field Type
string int string boolean string string boolean
Description
If the custom action invokes a flow, this field represents the unique name of the flow. Otherwise, this field is null
.
Available as a Beta in API version 41.0 and later.
If a custom action is created, this field represents the height in pixels of the action pane.
The icon used to identify the action.
API version 32.0 and later returns different icons than in earlier API versions.
Indicates whether this component is protected ( true
) or not ( false
).
Protected components cannot be linked to or referenced by components created in the installing organization.
Identifies the action and displays to users. This is also the default identifier used for the API and managed packages.
If the custom action invokes a Lightning component, this field represents the fully qualified name of the component. Otherwise, this field is null
.
Available in API version 38.0 and later.
Required. Indicates whether successful completion of the action creates a feed item ( true
) or not ( false
). Applies only to Create Record,
Update Record, and Log a Call quick action types.
Available in API version 36.0 and later.
string If the custom action invokes a Visualforce page, this field identifies the page.
The layout of fields on the action.
QuickActionLabel
(
type string)
Specifies the standard label to use for the action. The valid values are:
•
LogACall
•
LogANote
•
New
(A new record)
•
NewRecordType
(For example, a label with something like “New
Idea”)
•
Update
•
UpdateRecordType
•
NewChild
(A new child record)
•
NewChildRecordType
•
CreateNew
•
CreateNewRecordType
(For example, a label with something like “Create New Idea”)
•
SendEmail
(This value is available in API version 31.0 and later.)
542
Metadata Types QuickAction
Field Name
successMessage targetObject targetParentField targetRecordType type width
Field Type
string string
Description
•
QuickRecordType
•
Quick
(A quick record)
The message that displays to the user upon successful completion of the action.
Available in API version 36.0 and later.
The object for which the action is created and performed.
For example, you can create an action that, on the detail page of an account, allows a user to create a contact related to that account from the Chatter feed on that page. In this case, Contact is the targetObject
.
string string
QuickActionType
(
type string) int
The parent object type of the action. Links the target object to the parent object. For example, use Account if the target object is Contact and the parent object is Account.
Specifies which record type to create. Valid values are:
•
Business Account
•
Person Account
•
Master
Required. The type of quick action. Valid values are:
•
Canvas
•
Create
•
Flow
(This value is available as a Beta in API version 41.0 and later)
•
LightningComponent
(This value is available in API version
38.0 and later.)
•
LogACall
•
Post
•
SendEmail
(This value is available in API version 31.0 and later.)
•
SocialPost
•
Update
•
VisualforcePage
If a custom action is created, this field represents the width in pixels of the action pane.
FieldOverride
Represents the field names and their respective formulas and literal values that comprise overrides in a QuickAction.
543
Metadata Types QuickAction
Field Name
field formula literalValue
Field Type
string string string
Description
The name of the specific field to allow overrides on.
Specifies the formula to use when overriding a field.
The value of the field without overrides.
QuickActionLayout
The layout of fields on the action. There is no hard limit to the number of fields you can add to an action layout. However, for optimum usability, we recommend a maximum of eight fields. Adding more than 20 fields can severely affect user efficiency.
Field Name
layoutSectionStyle
Field Type
LayoutSectionStyle
(
of type string)
Description
The type of layout structure used. The valid values are:
•
TwoColumnsTopToBottom
•
TwoColumnsLeftToRight
•
OneColumn
•
CustomLinks quickActionLayoutColumns
QuickActionLayoutColumn[] Specifies columns in a QuickActionLayout.
QuickActionLayoutColumn
A column defined for a QuickActionLayout.
Field Name Field Type Description
quickActionLayoutItems
QuickActionLayoutItem
[]
Specifies row items in a QuickActionLayoutColumn.
QuickActionLayoutItem
A row item comprised of fields and defined for a QuickActionLayoutColumn.
Field Name
emptySpace field uiBehavior
Field Type
boolean string
UiBehavior
(
of type string)
Description
Controls if this layout item is a blank space ( true
) or not ( false
).
Represents a specific field in QuickActionLayoutItem. There is no hard limit to the number of fields you can add to an action layout. However, for optimum usability, we recommend a maximum of eight fields. Adding more than 20 fields can severely affect user efficiency.
Specifies user input behavior for specific fields in QuickActionLayoutItem.
The valid values are:
•
Edit
544
Metadata Types
Field Name Field Type Description
•
Required
•
Readonly
Declarative Metadata Sample Definition
The following is an example of a QuickAction component:
<?xml
version= "1.0" encoding= "UTF-8"?>
<QuickAction xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >testActionDefinitionTypesCreateTask </description >
<label >testActionDefinitionTypesCreateTask </label >
<optionsCreateFeedItem >true </optionsCreateFeedItem >
<quickActionLayout >
<layoutSectionStyle >TwoColumnsLeftToRight </layoutSectionStyle >
<quickActionLayoutColumns >
<quickActionLayoutItems >
<emptySpace >false </emptySpace >
<field >OwnerId </field >
<uiBehavior >Required </uiBehavior >
</quickActionLayoutItems >
<quickActionLayoutItems >
<emptySpace >false </emptySpace >
<field >WhoId </field >
<uiBehavior >Edit </uiBehavior >
</quickActionLayoutItems >
<quickActionLayoutItems >
<emptySpace >false </emptySpace >
<field >WhatId </field >
<uiBehavior >Edit </uiBehavior >
</quickActionLayoutItems >
<quickActionLayoutItems >
<emptySpace >false </emptySpace >
<field >ActivityDate </field >
<uiBehavior >Edit </uiBehavior >
</quickActionLayoutItems >
<quickActionLayoutItems >
<emptySpace >false </emptySpace >
<field >Subject </field >
<uiBehavior >Edit </uiBehavior >
</quickActionLayoutItems >
<quickActionLayoutItems >
<emptySpace >false </emptySpace >
<field >Status </field >
<uiBehavior >Required </uiBehavior >
</quickActionLayoutItems >
<quickActionLayoutItems >
<emptySpace >false </emptySpace >
<field >Priority </field >
<uiBehavior >Required </uiBehavior >
545
QuickAction
Metadata Types RemoteSiteSetting
</quickActionLayoutItems >
</quickActionLayoutColumns >
<quickActionLayoutColumns/ >
</quickActionLayout >
<successMessage >This is a success message </successMessage >
<targetObject >Task </targetObject >
<targetParentField >What </targetParentField >
<type >Create </type >
</QuickAction >
RemoteSiteSetting
Represents a remote site setting. 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. RemoteSiteSetting extends the
Metadata metadata type and inherits its
fullName
field.
Declarative Metadata File Suffix and Directory Location
RemoteSiteSetting components are stored in the remoteSiteSettings
directory of the corresponding package directory. The file name matches the unique name of the remote site setting, and the extension is
.remoteSite
.
Version
RemoteSiteSetting components are available in API version 19.0 and later.
Fields
Field
description
Field Type
string disableProtocolSecurity boolean fullName string
Description
The description explaining what this remote site setting is used for.
Required. Indicates whether code within Salesforce can access the remote site regardless of whether the user's connection is over HTTP or HTTPS ( true
) or not ( false
). When true
, code within Salesforce can pass data from an HTTPS session to an
HTTP session, and vice versa.
Warning: Only set to true
if you understand the security implications.
The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
Inherited from the
Metadata component, this field is not defined
in the WSDL for this component. It must be specified when
546
Metadata Types
Field
isActive url
Field Type
boolean string
Description
creating, updating, or deleting. See create()
example of this field specified for a call.
Required. Indicates if the remote site setting is active ( true
) or not ( false
).
Required. The URL for the remote site.
Declarative Metadata Sample Definition
A sample XML definition of a remote site setting is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<RemoteSiteSetting xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >Used for Apex callout to mapping web service </description >
<disableProtocolSecurity >false </disableProtocolSecurity >
<isActive >true </isActive >
<url >https://www.maptestsite.net/mapping1 </url >
</RemoteSiteSetting >
Report
Represents a custom report. This type extends the
Metadata metadata type and inherits its
fullName
field. This metadata type only supports custom reports; standard reports are not supported.
Declarative Metadata File Suffix and Directory Location
Reports are stored in the reports
directory of the corresponding package directory. The file name matches the report title and the extension is
.report
.
Retrieving Reports
You can’t use the wildcard (*) symbol with reports in package.xml
. To retrieve the list of reports for populating package.xml
with explicit names, call listMetadata()
and pass in
ReportFolder
as the type. Note that ReportFolder is not returned as a type in describeMetadata()
. Report is returned from describeMetadata()
with an associated attribute of inFolder set to true. If that attribute is set to true, you can construct the type by using the component name with the word Folder, such as
ReportFolder.
The following example shows folders in package.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MyDBFolder/MyDBName </members >
<name >Dashboard </name >
</types >
<types >
<members >MyDocumentFolder/MyDocumentName </members >
Report
547
Metadata Types
<name >Document </name >
</types >
<types >
<members >unfiled$public/MarketingProductInquiryResponse </members >
<members >unfiled$public/SalesNewCustomerEmail </members >
<name >EmailTemplate </name >
</types >
<types >
<members >MyReportFolder/MyReportName </members >
<name >Report </name >
</types >
<version >41.0
</version >
</Package >
Version
Report components are available in API version 14.0 and later.
Fields
The following information assumes that you are familiar with creating and running reports. For more information on these fields, see
“Create a Report” in the Salesforce online help.
Field
aggregates block blockInfo buckets chart colorRanges columns crossFilters currency
Field Type
[]
[]
[]
CurrencyIsoCode
of type string)
Description
List that defines custom summary formulas for summary, matrix, and joined reports.
Represents each block in a joined report where every block can be of a different report type.
Defines attributes for each block in a joined report.
Defines a bucket field to be used in the report.
This field is available in API version 24.0 and later.
.
Defines a chart for summary and matrix reports
List that specifies conditional highlighting for report summary data.
List that specifies the fields displayed in the report. Fields appear in the report in the same order as they appear in the Metadata API file.
Defines a cross filter's object, related object, and condition (WITH or WITHOUT). This field is available in API version 41.0 and later.
When using multiple currencies, some reports allow you to display converted amounts by
Report
548
Metadata Types
Field
description division filter folderName format fullName
Field Type
string string
string
(
of type string) string
Description
selecting the appropriate column to display. For example, in opportunity reports, you can include the Amount (converted) column on the report.
This field is an enumeration of type string that defines the currency in which to display converted amounts. Valid values: Must be one of the valid alphabetic, three-letter currency ISO codes defined by the ISO 4217 standard, such as
USD
,
GBP
, or
JPY
.
Specifies a general description, which is displayed with the report name. Maximum characters: 255 characters.
If your organization uses divisions to segment data and you have the “Affected by Divisions” permission, records in the report must match this division.
This field is available in API version 17.0 and later.
Limits report results to records with specific data.
For example, you can limit report results to opportunities for which the amount is greater than $1,000:
<filter >
<criteriaItems >
<column >AMOUNT </column >
<operator >greaterThan </operator >
<value >1000 </value >
</criteriaItems >
</filter >
Name of the folder that houses the report.
This field is available in API version 35.0 and later.
Defines the report format. For example,
Tabular
for a simple data list without subtotals.
The report unique developer name used as an identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
Report
549
Metadata Types
Field
groupingsAcross groupingsDown
Field Type
[]
[] historicalSelector
name numSubscriptions string int params
[] reportType string roleHierarchyFilter string
550
Description
This field is inherited from the Metadata
component.
List that defines the fields by which you want to group and subtotal data across a matrix report
(row headings). When grouping by a date field, you can further group the data by a specific time period such as days, weeks, or months.
Maximum: 2 fields.
For Summary and Matrix reports: List that defines the fields by which you want to group and subtotal. For summary reports, choosing more than one sort field allows you to subsort your data. For matrix reports, specifies summary fields for column headings. When grouping by a date field, you can further group the data by a specific time period such as days, weeks, or months.
Maximum for matrix reports: 2. Maximum for summary reports: 3
Defines a date range for which historical trend reporting data is to be captured. Default is “Any
Historical Date.”
Available in API version 29.0 and later.
Required. The report name. For example,
Opportunity Pipeline
Indicates whether a user has subscribed to this report Lightning Experience (1) or not (0). Tied to user context.
This field is available in API version 38.0 and later.
List that specifies settings specific to each report type, in particular options that let you filter a report to obtain useful subsets. For example, the
Activities report type lets you specify whether you want to see open or closed activities or both and whether you want to see tasks or events or both. Valid values depend on the report type.
Required. Defines the type of data in the report.
For example,
Opportunity
to create a report of opportunities data.
The role name for a report drill down. Some reports, such as opportunity and activity reports, display Hierarchy links that allow you to drill
Report
Metadata Types
Field
rowLimit scope showCurrentDate timeFrameFilter userFilter
Field Type
int string boolean showDetails sortColumn boolean string sortOrder
(
territoryHierarchyFilter string
string
Description
down to different data sets based on the role hierarchy.
This field is available in API version 17.0 and later.
Defines the maximum number of rows that can be returned for the report.
Defines the scope of data on which you run the report. For example, whether you want to run the report against all opportunities, opportunities you own, or opportunities your team owns. Valid values depend on the
. For example, for Accounts reports:
•
MyAccounts
•
MyTeamsAccounts
•
AllAccounts
Can be set to true
for historical trending reports in matrix format.
Available in API version 29.0 and later.
false
shows a collapsed view of the report with only the headings, subtotals, and total.
Default: true
Specifies the field on which to sort data in the report. Use
order.
Specifies the sort order. Use
to specify the field on which to sort.
The territory name for a report drill down. If your organization uses territory management, some reports display Hierarchy links that allow you to drill down to different data sets based on the territory hierarchy.
This field is available in API version 17.0 and later.
Limits report results to records within a specified time frame.
The user name for a report drill down. Some reports, such as opportunity and activity reports, display Hierarchy links that allow you to drill down to different data sets based on the user hierarchy.
Report
551
Metadata Types
Field Field Type Description
This field is available in API version 17.0 and later.
Report
ReportAggregate
ReportAggregate defines custom summary formulas on summary, matrix, and joined reports. For more information on these fields, see
“Build a Custom Summary Formula” in the Salesforce online help.
Field
acrossGroupingContext
Field Type
string calculatedFormula datatype description developerName downGroupingContext isActive isCrossBlock masterLabel reportType scale string
of type string) string string string booleanblo boolean string string int
Description
Defines the row grouping level at which you want your custom summary formula to be displayed. This is a new field in API version 15.0.
Required. The custom summary formula. For example,
AMOUNT:SUM + OPP_QUANTITY:SUM
Required. Specifies the data type for formatting and display of the custom summary formula results.
The custom summary formula description. Maximum: 255 characters.
Required. The internal development name of the custom summary formula, for example,
FORMULA1
. This is used to reference custom summary formulas from other report components, including conditional highlighting.
Defines the column grouping level at which you want your custom summary formula to be displayed. This field is available in API version 15.0 and later.
Required. true
displays the formula result in the report.
false
does not display the result in the report.
Determines whether the custom summary formula is a cross-block formula, which is available with joined reports.
true
indicates a cross-block custom summary formula.
false
indicates a standard custom summary formula.
This field is available in API version 25.0 and later.
Required. The custom summary formula label (name).
Required for joined reports. Specifies the
of the
can be added.
The formula result is calculated to the specified number of decimal places. Valid values
0
through
18
.
552
Metadata Types
ReportBlockInfo
ReportBlockInfo defines blocks in a joined report.
Field
aggregateReferences blockId joinTable
Field Type
string string
Description
Lists the aggregates
that represent the custom summary formulas used in a joined report block.
Required. blockId
is used in cross-block custom summary formulas and joined report charts to identify the block containing each summary field. blockId
is assigned automatically. Valid values are B1 through B5.
This field is available in API version 25.0 and later.
Required. Refers to the entity used to join blocks in a joined report. The entity provides a list of fields that are available for globally grouping across the blocks.
Report
ReportAggregateReference
ReportAggregateReference defines the developer name used for custom summary formulas in joined reports.
Field
aggregate
Field Type
string
Description
Required. The developerName
of the ReportAggregate, which specifies the custom summary formula used in a block of a joined report.
ReportBucketField
ReportBucketField defines a bucket to be used in the report.
Field
bucketType
Field Type
ReportBucketFieldType
of type string) developerName masterLabel string string
Description
Required. Specifies the type of bucket. Valid values:
•
text
•
number
•
picklist
Required. A unique name used as the
<field >
value to display a bucket field in the column list and other report components, including sort, filter, list, group, and chart. Must be of the format
BucketField_
name
. For example,
BucketField_BusinessSize
.
Required. The bucket field label. Maximum 40 characters. Any line breaks, tabs, or multiple spaces at the beginning or end of
553
Metadata Types
Field
nullTreatment otherBucketLabel sourceColumnName values
Field Type Description
the label are removed. Any of these characters within the label are reduced to a single space.
ReportBucketFieldNullTreatment
of type string)
For numeric bucket fields only. Specifies whether empty values are treated as zeros ( z
) or not ( n
).
string string
of type string)
The label of the container for unbucketed values.
Required. The source field that the bucket is applied to. For example,
SALES
or
INDUSTRY
.
Defines one bucket value used in the bucket field.
Note: While this name is plural, it represents a single bucket. In typical use, a bucket field contains multiple buckets.
ReportBucketFieldValue
ReportBucketFieldValue defines a bucket value used in the bucket field.
Field
sourceValues value
Field Type Description
ReportBucketFieldSourceValue
of type string)
The value of a bucket in the bucket field. Valid values:
•
sourceValue
—Used for picklist and text bucket fields.
For picklists, describes the picklist item in the bucket. For example, the sourceValue of a bucket on
TYPE
could be
Customer
. For text, the full string for the item in the bucket. For example, the sourceValue of a bucket on
ADDRESS_STATE1
could be
NY
.
•
from
—Used only on numeric bucket fields. A non-inclusive lower bound for a numeric bucket range. This value must be a number.
•
to
—Used only on numeric bucket fields. The inclusive upper bound for a numeric bucket range. This value must be a number.
In numeric buckets, the first value must only have to
and last value must only have from
. All other values must have both to
and from
.
string Required. The name of a specific bucket value within the bucket field.
ReportGrouping
ReportGrouping defines how to group, subtotal, and sort data for summary, matrix, and joined reports.
Report
554
Metadata Types
Field
aggregateType dateGranularity field sortByName sortOrder sortType
Field Type Description
ReportAggrType (
of type string)
The type of aggregate value to sort by. Valid values are:
•
Sum
•
Average
•
Maximum
•
Minimum
•
RowCount
string string
of type string)
ReportSortType (
of type string)
When grouping by a date field, the time period by which to group.
Required. The field by which you want to summarize data. For example,
CAMPAIGN_SOURCE
The API name of the column, aggregate or custom summary field used to order the grouping.
Required. Whether to sort data in ascending or descending alphabetical and numerical order.
Indicates if the grouping is sorted by a column, aggregate or custom summary field. Valid values are:
•
Column
•
Aggregate
•
CustomSummaryFormula
ReportHistoricalSelector
ReportHistoricalSelector defines a date range for historical data.
Field
snapshot
Field Type
string
Description
Represents the date value to apply a historical filter, either relative (in the format
N_DAYS_AGO:2
) or absolute (in the format yyyy-MM-dd
). If unspecified, it’s assumed that the filter will be applied to all the columns the user sees.
Available in API version 29.0 and later.
SortOrder
An enumeration of type string that defines the order in which data is sorted in the report fields. Valid values:
Field
Asc
Description
Sorts data in ascending alphabetical and numerical order.
Report
555
Metadata Types
Field
Desc
Description
Sorts data in descending alphabetical and numerical order.
UserDateGranularity
An enumeration of type string that defines the time period by which to group data. Valid values:
Enumeration Value
None
Day
Week
Month
Quarter
Year
FiscalQuarter
FiscalYear
MonthInYear
DayInMonth
FiscalPeriod
FiscalWeek
Description
No grouping by date
By day
By week
By month
By quarter
By year
By fiscal quarter. You can set the fiscal year for your organization. See “Set the Fiscal Year” in the
Salesforce online help.
By fiscal year
By calendar month in year
By calendar day in month
When custom fiscal years are enabled: By fiscal period
When custom fiscal years are enabled: By fiscal week
ReportSummaryType
An enumeration of type string that defines how report fields are summarized. Valid values:
Enumeration Value
Sum
Average
Maximum
Minimum
None
Description
Total
Average
Largest value
Smallest value
The field is not summarized.
ReportColorRange
ReportColorRange defines conditional highlighting for report summary data.
556
Report
Metadata Types
Field
aggregate columnName highBreakpoint highColor lowBreakpoint lowColor midColor
Field Type
of type string) string double string double string string
Description
Required. Defines how the field specified in columnName
is summarized. For example,
Sum
.
Required. Specifies the field whose value ranges are represented by colors.
Required. Specifies the number that separates the mid color from the high color.
Required. Specifies the color (in HTML format) to represent data that falls into the high number range. This color spans from the highBreakpoint
value.
Required. Specifies the number that separates the low color from the mid color.
Required. Specifies a color (in HTML format) to represent data that falls into the low value range, below the lowBreakpoint
value.
Required. Specifies a color (in HTML format) to represent data that falls into the mid value range.
ReportColumn
ReportColumn defines how fields (columns) are displayed in the report.
Field
aggregateTypes field
Field Type
of type string) string
Description
List that defines if and how each report field is summarized.
reverseColors showChanges boolean boolean
Required. The field name. For example,
AGE
or
OPPORTUNITY_NAME
In historical trend reports, displays greater Date values as green and greater Amount values as red, reversing the default colors.
Available in API version 29.0 and later.
In historical trend reports, adds a column displaying the difference between current and historical Date and Amount values.
Available in API version 29.0 and later.
Report
ReportFilter
ReportFilter limits the report results by filtering data on specified fields.
557
Metadata Types
Field
booleanFilter criteriaItems language
Field Type
string
Description
Specifies filter logic conditions.
The criteria by which you want to filter report data, either by comparing historical values or by applying a date range.
<criteriaItems > criteriaItems ReportFilterItem
<column >Opportunity.Opportunity__hd$Amount__hst </column >
<columnToColumn >false </columnToColumn >
<operator >equals </operator >
<snapshot >N_DAYS_AGO:90 </snapshot >
<value >100 </value >
</criteriaItems >
(
string)
The language used when a report filters against a picklist value using the operators contains
or startsWith
. For a list of valid language values, see
ReportFilterItem
ReportFilterItem limits the report results by filtering data on specified fields.
Field
column columnToColumn isUnlocked operator snapshot
Field Type
string boolean boolean
Description
Required. The field on which you want to filter data. For example,
AMOUNT
Indicates that the field contains data from a historical snapshot.
Available in API version 29.0 and later.
Optional. Indicates whether the report filter is unlocked ( true
) or locked ( false
). You can edit unlocked filters on the report run page in Lightning Experience. If unspecified, the default value is false
.
Available in API version 38.0 and later.
of type string)
Required. An enumeration of type string that defines the operator used to filter the data, for example, greaterThan
.
For valid values, see
string Represents the date value, either relative (in the format
N_DAYS_AGO:2
) or absolute (in the format yyyy-MM-dd
).
Available in API version 29.0 and later.
Report
558
Metadata Types
Field
value
Field Type
string
Description
The value by which you want to filter the data, for example,
1000
. Note that the Metadata API filter condition values do not always match those that you enter in the report wizard. For example, in the Metadata API dates are always converted to the
US date format and values entered in a non-US English language may be converted to a standard US English equivalent.
ReportFormat
An enumeration of type string that defines the report format. Valid values:
Enumeration Value
Matrix
Summary
Tabular
Joined
Description
Summarizes data in a grid. Use to compare related totals.
Lists, sorts, and subtotals data.
Lists data with no sorting or subtotals.
Joins data from different report types storing each report’s data in its own block.
ReportParam
ReportParam represents settings specific to a report type, especially options that let you filter a report to certain useful subsets.
Field
name value
Field Type
string string
Description
Required. Specifies a specific
setting.
Required. The setting value.
ReportAggregateDatatype
An enumeration of type string that specifies the data type for formatting and display of custom summary formula results. Valid values:
Enumeration Value
currency number percent
Report
ReportChart
ReportChart represents charts on summary, matrix, and joined reports.
559
Metadata Types
Field
backgroundColor1 backgroundColor2 backgroundFadeDir chartSummaries chartType enableHoverLabels expandOthers groupingColumn legendPosition location
Field Type
string string
ChartBackgroundDirection
of type string)
Description
Specifies the beginning color (in HTML format) for a gradient color background.
Specifies the end color (in HTML format) for a gradient color background.
Specifies the direction for a gradient color background. Use with
to specify the beginning color and backgroundColor2
to specify the end color for the gradient
design. Use white for both if you do not want a background design. Valid values:
•
diagonal
•
leftToRight
•
topToBottom
[]
(
of type string)
Required. Specifies the chart type. Available chart types depend on the
boolean
Specifies the summaries you want to use for the chart. Invalid summaries are ignored without notification. If there are no valid summaries, RowCount is used by default for the axis value. This field is available in API version 17.0 and later.
boolean
Specifies whether to display values, labels, and percentages when hovering over charts. Hover details depend on chart type.
Percentages apply to pie, donut, and funnel charts only. This field is available in API version 17.0 and later.
Specifies whether to combine all groups less than or equal to
3% of the total into a single 'Others' wedge or segment. This only applies to pie, donut, and funnel charts. Set to true
to show all values individually on the chart; set to false
to combine small groups into 'Others.' This field is available in API version 17.0 and later.
string
ChartLegendPosition
of type string)
Specifies the field by which to group data. This data is displayed on the X-axis for vertical column charts and on the Y-axis for horizontal bar charts.
Required.
The location of the legend with respect to the chart. The valid values are:
•
Bottom
•
OnChart
•
Right
(
of type string)
Required. Specifies whether the chart is displayed at the top or bottom of the report.
Report
560
Metadata Types
Field
secondaryGroupingColumn showAxisLabels showPercentage showTotal showValues
Field Type
string boolean boolean boolean boolean
Description
For grouped chart types: Specifies the field by which to group the data.
For bar and line charts: Specifies whether the chart displays names for each axis.
Indicates if percentages are displayed for wedges and segments of pie, donut, and funnel charts, as well as for gauges ( true
), or not ( false
).
Indicates if the total is displayed for donut charts and gauges
( true
), or not ( false
).
Indicates if the values of individual records or groups are displayed for charts ( true
), or not ( false
).
size summaryAggregate textSize
(
of type string)
Required. Specifies the chart size.
of type string)
Defines how to summarize the chart data. For example,
Sum
.
No longer supported in version API 17.0 and later. See
summaryAxisManualRangeEnd summaryAxisManualRangeStart summaryAxisRange summaryColumn textColor double double
When specifying the axis range manually: Defines the ending value.
When specifying the axis range manually: Defines the starting value.
(
of type string)
Required. For bar, line, and column charts: Defines whether to specify the axis range manually or automatically.
string string
Required. Specifies the field by which to summarize the chart data. Typically this field is displayed on the Y-axis. No longer supported in version API 17.0 and later. See
The color (in HTML format) of the chart text and labels.
int The size of the chart text and labels. Valid values:
•
8
•
9
•
10
•
12
•
14
•
18
•
24
•
36
The maximum size is 18. Larger values are shown at 18 points.
Report
561
Metadata Types
Field
title titleColor titleSize
Field Type
string string int
Description
The chart title. Max 255 characters.
The color (in HTML format) of the title text.
The size of the title text. Valid values:
•
8
•
9
•
10
•
12
•
14
•
18
•
24
•
36
The maximum size is 18. Larger values are shown at 18 points.
ChartType
An enumeration of type string that defines the chart type. For information on each of these chart types, see “Chart Types” in the Salesforce online help. Valid values:
Enumeration Value
None
HorizontalBar
HorizontalBarGrouped
HorizontalBarStacked
HorizontalBarStackedTo100
VerticalColumn
VerticalColumnGrouped
VerticalColumnStacked
VerticalColumnStackedTo100
Line
LineGrouped
LineCumulative
LineCumulativeGrouped
Pie
Donut
562
Report
Metadata Types
Enumeration Value
Funnel
Scatter
ScatterGrouped
VerticalColumnLine
VerticalColumnGroupedLine
VerticalColumnStackedLine
Plugin
Reserved for future use. This value is available in API version 31.0 and later.
ChartPosition
An enumeration of type string that specifies the position of the chart in the report. Valid values:
Enumeration Value
CHART_TOP
CHART_BOTTOM
ChartSummary
ChartSummary defines how data in the chart is summarized. Valid values:
Field
aggregate axisBinding column
Field Type
string
Description
Specifies the aggregation method—such as
Sum
,
Average
,
Min
, and
Max
—for the summary value. Use the
to specify the summary value to use for the aggregation. You don't need to specify this field for RowCount or custom summary formulas.
Specifies the axis or axes to use on the chart. Use the
field to specify the summary value to use for the axis.
Required. Specifies the summary field for the chart data. If all columns are invalid, RowCount is used by default for the axis value. For vertical column and horizontal bar combination charts, you can specify up to four values.
ChartAxis
An enumeration of type string that specifies the axis or axes to be used in charts. Valid values:
Report
563
Metadata Types
Enumeration Value
x y y2
Description
The summary value to use for the X-axis of a scatter chart.
The Y-axis for the chart.
The secondary Y-axis for vertical column combination charts with a line added.
ReportChartSize
An enumeration of type string that specifies the chart size. Valid values:
Enumeration Value
Tiny
Small
Medium
Large
Huge
ChartRangeType
An enumeration of type string that defines the report format. Valid values:
Enumeration Value
Auto
Manual
ReportTimeFrameFilter
ReportTimeFrameFilter represents the report time period.
Field
dateColumn endDate interval startDate
Field Type
string
Description
Required. The date field on which to filter data. For example,
CLOSE_DATE date
(
of type string)
Required. Specifies the period of time.
date
When
is
of the custom time period.
is
, specifies the start of the custom time period.
Report
564
Metadata Types
ReportCrossFilter
ReportCrossFilter represents the cross filter functionality in reports.
Field
criteriaItems
Field Type
operation primaryTableColumn relatedTable
ObjectFilterOperator.
Enumeration of type string string string relatedTableJoinColumn string
Description
Represents the subfilters of a cross filter. There can be up to five subfilters. This field requires the following attributes.
•
Column
•
Operator
•
Value
The action indicating whether to include or exclude an object.
Valid values: with
and without
.
The parent object used for the cross filter.
The child object used for the cross filter.
The field from the child object that is used to join the parent.
Report
Declarative Metadata Sample Definition
A sample XML snippet using cross filters to build an Accounts report for cases where case status is not closed:
<crossFilters >
<criteriaItems >
<column >Status </column >
<operator >notequal </operator >
<value >Closed </value >
</criteriaItems >
<operation >with </operation >
<primaryTableColumn >ACCOUNT_ID </primaryTableColumn >
<relatedTable >Case </relatedTable >
<relatedTableJoinColumn >Account </relatedTableJoinColumn >
</crossFilters >
Note: This sample was generated using the API version 23.0.
UserDateInterval
An enumeration of type string that defines the period of time. Valid values:
Enumeration Value
INTERVAL_CURRENT
INTERVAL_CURNEXT1
INTERVAL_CURPREV1
INTERVAL_NEXT1
Description
Current fiscal quarter
Current and next fiscal quarters
Current and previous fiscal quarters
Next fiscal quarter
565
Metadata Types
Enumeration Value
INTERVAL_PREV1
INTERVAL_CURNEXT3
INTERVAL_CURFY
INTERVAL_PREVFY
INTERVAL_PREV2FY
INTERVAL_AGO2FY
INTERVAL_NEXTFY
INTERVAL_PREVCURFY
INTERVAL_PREVCUR2FY
INTERVAL_CURNEXTFY
INTERVAL_CUSTOM
INTERVAL_YESTERDAY
INTERVAL_TODAY
INTERVAL_TOMORROW
INTERVAL_LASTWEEK
INTERVAL_THISWEEK
INTERVAL_NEXTWEEK
INTERVAL_LASTMONTH
INTERVAL_THISMONTH
INTERVAL_NEXTMONTH
INTERVAL_LASTTHISMONTH
INTERVAL_THISNEXTMONTH
INTERVAL_CURRENTQ
INTERVAL_CURNEXTQ
INTERVAL_CURPREVQ
INTERVAL_NEXTQ
INTERVAL_PREVQ
INTERVAL_CURNEXT3Q
INTERVAL_CURY
INTERVAL_PREVY
Description
Previous fiscal quarter
Current and next three fiscal quarters
Current fiscal year
Previous fiscal year
Previous two fiscal years
Two fiscal years ago
Next fiscal year
Current and previous fiscal years
Current and previous two fiscal years
Current and next fiscal year
A custom time period. Use
time period's start date and end date.
Yesterday
Today
Tomorrow
Last calendar week
This calendar week
Next calendar week
Last calendar month
This calendar month
Next calendar month
Current and previous calendar months
Current and next calendar months
Current calendar quarter
Current and next calendar quarters
Current and previous calendar quarters
Next calendar quarter
Previous calendar quarter
Current and next three calendar quarters
Current calendar year
Previous calendar year
566
Report
Metadata Types
Enumeration Value
INTERVAL_PREV2Y
INTERVAL_AGO2Y
INTERVAL_NEXTY
INTERVAL_PREVCURY
INTERVAL_PREVCUR2Y
INTERVAL_CURNEXTY
INTERVAL_LAST7
INTERVAL_LAST30
INTERVAL_LAST60
INTERVAL_LAST90
INTERVAL_LAST120
INTERVAL_NEXT7
INTERVAL_NEXT30
INTERVAL_NEXT60
Description
Previous two calendar years
Two calendar years ago
Next calendar year
Current and previous calendar years
Current and previous two calendar years
Current and next calendar years
Last 7 days
Last 30 days
Last 60 days
Last 90 days
Last 120 days
Next 7 days
Next 30 days
Next 60 days
INTERVAL_NEXT90
INTERVAL_NEXT120
LAST_FISCALWEEK
THIS_FISCALWEEK
NEXT_FISCALWEEK
LAST_FISCALPERIOD
THIS_FISCALPERIOD
NEXT_FISCALPERIOD
LASTTHIS_FISCALPERIOD
Next 90 days
Next 120 days
When custom fiscal years are enabled: Last fiscal week
When custom fiscal years are enabled: This fiscal week
When custom fiscal years are enabled: Next fiscal week
When custom fiscal years are enabled: Last fiscal period
When custom fiscal years are enabled: This fiscal period
When custom fiscal years are enabled: Next fiscal period
When custom fiscal years are enabled: This fiscal period and last fiscal period
THISNEXT_FISCALPERIOD
CURRENT_ENTITLEMENT_PERIOD
PREVIOUS_ENTITLEMENT_PERIOD
PREVIOUS_TWO_ENTITLEMENT_PERIODS
When custom fiscal years are enabled: This fiscal period and next fiscal period
Current entitlement period
Previous entitlement period
Previous two entitlement periods
TWO_ENTITLEMENT_PERIODS_AGO
Two entitlement periods ago
CURRENT_AND_PREVIOUS_ENTITLEMENT_PERIOD
Current and previous entitlement period
CURRENT_AND_PREVIOUS_TWO_ENTITLEMENT_PERIODS
Current and previous two entitlement periods
Report
567
Metadata Types
Declarative Metadata Sample Definition
A sample XML report definition:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Report xmlns= "http://soap.sforce.com/2006/04/metadata">
<aggregates >
<acrossGroupingContext >CRT_Object__c$Id </acrossGroupingContext >
<calculatedFormula >PREVGROUPVAL(CRT_Object__c.Currency__c:AVG, CRT_Object__c.Id)
*
PARENTGROUPVAL(CRT_Object__c.Number__c:MAX, CRT_Object__c.CreatedBy.Name,
COLUMN_GRAND_SUMMARY)/RowCount </calculatedFormula >
<datatype >number </datatype >
<developerName >FORMULA1 </developerName >
<downGroupingContext >CRT_Object__c$CreatedBy </downGroupingContext >
<isActive >true </isActive >
<masterLabel >CurrCSF </masterLabel >
<scale >2 </scale >
</aggregates >
<aggregates >
<acrossGroupingContext >CRT_Object__c$LastModifiedDate </acrossGroupingContext >
<calculatedFormula >IF(RowCount>10,
BLANKVALUE(ROUND(PREVGROUPVAL(CRT_Object__c.Currency__c:SUM,
CRT_Object__c.LastModifiedDate),3),
PARENTGROUPVAL(CRT_Object__c.Number__c:SUM, ROW_GRAND_SUMMARY,
CRT_Object__c.Id)) , 1000) </calculatedFormula >
<datatype >number </datatype >
<developerName >FORMULA2 </developerName >
<downGroupingContext >GRAND_SUMMARY </downGroupingContext >
<isActive >true </isActive >
<masterLabel >numCSF </masterLabel >
<scale >2 </scale >
</aggregates >
<buckets >
<bucketType >number </bucketType >
<developerName >BucketField_BusinessSize </developerName >
<masterLabel >NumericBucket </masterLabel >
<nullTreatment >z </nullTreatment >
<sourceColumnName >SALES </sourceColumnName >
<values >
<sourceValues >
<to >10000 </to >
</sourceValues >
<value >low </value >
</values >
<values >
<sourceValues >
<from >10000 </from >
<to >25000 </to >
</sourceValues >
<value >mid </value >
</values >
<values >
<sourceValues >
Report
568
Metadata Types
<from >25000 </from >
</sourceValues >
<value >high </value >
</values >
</buckets >
<buckets >
<bucketType >text </bucketType >
<developerName >BucketField_Region </developerName >
<masterLabel >TextBucket </masterLabel >
<nullTreatment >n </nullTreatment >
<otherBucketLabel >Other </otherBucketLabel >
<sourceColumnName >ADDRESS1_STATE </sourceColumnName >
<values >
<sourceValues >
<sourceValue >CA </sourceValue >
</sourceValues >
<value >west </value >
</values >
<values >
<sourceValues >
<sourceValue >NY </sourceValue >
</sourceValues >
<sourceValues >
<sourceValue >Ontario </sourceValue >
</sourceValues >
<value >east </value >
</values >
</buckets >
<chart >
<backgroundColor1 >#FFFFFF </backgroundColor1 >
<backgroundColor2 >#FFFFFF </backgroundColor2 >
<backgroundFadeDir >Diagonal </backgroundFadeDir >
<chartSummaries >
<axisBinding >y </axisBinding >
<column >FORMULA1 </column >
</chartSummaries >
<chartSummaries >
<axisBinding >y </axisBinding >
<column >FORMULA2 </column >
</chartSummaries >
<chartSummaries >
<aggregate >Maximum </aggregate >
<axisBinding >y </axisBinding >
<column >CRT_Object__c$Number__c </column >
</chartSummaries >
<chartSummaries >
<axisBinding >y </axisBinding >
<column >RowCount </column >
</chartSummaries >
<chartType >VerticalColumn </chartType >
<groupingColumn >CRT_Object__c$LastModifiedDate </groupingColumn >
<legendPosition >Right </legendPosition >
<location >CHART_TOP </location >
<size >Medium </size >
569
Report
Metadata Types
<summaryAxisRange >Auto </summaryAxisRange >
<textColor >#000000 </textColor >
<textSize >12 </textSize >
<titleColor >#000000 </titleColor >
<titleSize >18 </titleSize >
</chart >
<columns >
<field >CRT_Object__c$Name </field >
</columns >
<columns >
<aggregateTypes >Average </aggregateTypes >
<field >CRT_Object__c$Currency__c </field >
</columns >
<columns >
<aggregateTypes >Maximum </aggregateTypes >
<field >CRT_Object__c$Number__c </field >
</columns >
<columns >
<field >BucketField__Region </field >
</columns >
<format >Matrix </format >
<groupingsAcross >
<dateGranularity >Day </dateGranularity >
<field >CRT_Object__c$Id </field >
<sortOrder >Asc </sortOrder >
</groupingsAcross >
<groupingsAcross >
<dateGranularity >Year </dateGranularity >
<field >CRT_Object__c$LastModifiedDate </field >
<sortOrder >Asc </sortOrder >
</groupingsAcross >
<groupingsDown >
<dateGranularity >Day </dateGranularity >
<field >CRT_Object__c$CreatedBy </field >
<sortOrder >Asc </sortOrder >
</groupingsDown >
<groupingsDown >
<dateGranularity >Day </dateGranularity >
<field >CRT_Object__c$Currency__c </field >
<sortOrder >Desc </sortOrder >
</groupingsDown >
<name >CrtMMVC </name >
<reportType >CRT1__c </reportType >
<scope >organization </scope >
<showDetails >false </showDetails >
<timeFrameFilter >
<dateColumn >CRT_Object__c$CreatedDate </dateColumn >
<interval >INTERVAL_CUSTOM </interval >
</timeFrameFilter >
</Report >
570
Report
Metadata Types
Declarative Metadata Sample Definition for a Joined Report
A sample XML report definition:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Report xmlns= "http://soap.sforce.com/2006/04/metadata">
<!-- This is a cross-block custom summary formula. Note that the calculated formula reference for a blocks reference uses the BlockId#Aggregate. -->
<aggregates >
<calculatedFormula >B1#AMOUNT:SUM+B2#EMPLOYEES:SUM </calculatedFormula >
<datatype >number </datatype >
<developerName >FORMULA </developerName >
<isActive >true </isActive >
<isCrossBlock >true </isCrossBlock >
<masterLabel >Cross-Block CSF Example </masterLabel >
<scale >2 </scale >
</aggregates >
<!-- This is a standard custom summary formula. Note that the calculated formula reference does not have block reference but just the aggregate name of the report type associated
(Opportunity).-->
<aggregates >
<calculatedFormula >AMOUNT:SUM </calculatedFormula >
<developerName >FORMULA2 </developerName >
<isActive >true </isActive >
<isCrossBlock >false </isCrossBlock >
<masterLabel >Standard CSF Example </masterLabel >
<reportType >Opportunity </reportType >
<scale >2 </scale >
</aggregates >
<block >
<blockInfo >
<!-- This is how the block defines that the custom summary formula should be referenced.
In this example, it’s the in standard FORMULA 2 defined above. This block report has blockID
B1.-->
<aggregateReferences >
<aggregate >FORMULA2 </aggregate >
</aggregateReference >
<blockId >B1 </blockId >
<joinTable >a </joinTable >
</blockInfo >
<columns >
<field >TYPE </field >
</columns >
<format >Summary </format >
<name >Opportunities BLock 3 </name >
<params >
<name >role_territory </name >
<value >role </value >
</params >
<params >
<name >terr </name >
<value >all </value >
</params >
<params >
<name >open </name >
Report
571
Metadata Types
<value >all </value >
</params >
<params >
<name >probability </name >
<value >0 </value >
</params >
<params >
<name >co </name >
<value >1 </value >
</params >
<reportType >Opportunity </reportType >
<scope >organization </scope >
<timeFrameFilter >
<dateColumn >CLOSE_DATE </dateColumn >
<interval >INTERVAL_CUSTOM </interval >
</timeFrameFilter >
</block >
<block >
<blockInfo >
<!-- This is how the block defines that the custom summary formula should be referenced.
In this example, it’s the cross-block custom summary formula FORMULA 1 defined above. This block report has blockId B2.-->
<aggregateReferences >
<aggregate >FORMULA1 </aggregate >
</aggregateReferences >
<blockId >B2 </blockId >
<joinTable >a </joinTable >
</blockInfo >
<columns >
<field >USERS.NAME
</field >
</columns >
<columns >
<field >TYPE </field >
</columns >
<columns >
<field >DUE_DATE </field >
</columns >
<columns >
<field >LAST_UPDATE </field >
</columns >
<columns >
<field >ADDRESS1_STATE </field >
</columns >
<format >Summary </format
<name >Accounts block 5 </name >
<params >
<name >terr </name >
<value >all </value >
</params >
<params >
<name >co </name >
<value >1 </value >
</params >
<reportType >AccountList </reportType >
Report
572
Metadata Types
<scope >organization </scope >
<timeFrameFilter >
<dateColumn >CREATED_DATE </dateColumn >
<interval >INTERVAL_CUSTOM </interval >
</timeFrameFilter >
</block >
<blockInfo >
<blockId xsi:nil= "true"/>
<joinTable >a </joinTable >
</blockInfo >
<chart >
<backgroundColor1 >#FFFFFF </backgroundColor1 >
<backgroundColor2 >#FFFFFF </backgroundColor2 >
<backgroundFadeDir >Diagonal </backgroundFadeDir >
<chartSummaries >
<axisBinding >y </axisBinding >
<!-- This is how chart aggregates are designed in multiblock. We're using RowCount from
Block 1.-->
<column >B1#RowCount </column >
</chartSummaries >
<chartType >HorizontalBar </chartType >
<enableHoverLabels >false </enableHoverLabels >
<expandOthers >true </expandOthers >
<groupingColumn >ACCOUNT_NAME </groupingColumn >
<location >CHART_TOP </location >
<showAxisLabels >true </showAxisLabels >
<showPercentage >false </showPercentage >
<showTotal >false </showTotal >
<showValues >false </showValues >
<size >Medium </size >
<summaryAxisRange >Auto </summaryAxisRange >
<textColor >#000000 </textColor >
<textSize >12 </textSize >
<titleColor >#000000 </titleColor >
<titleSize >18 </titleSize >
</chart >
<format >MultiBlock </format >
<groupingsDown >
<dateGranularity >Day </dateGranularity >
<field >ACCOUNT_NAME </field >
<sortOrder >Asc </sortOrder >
</groupingsDown >
<name >mb_mbapi </name >
<reportType >Opportunity </reportType >
<showDetails >true </showDetails >
</Report >
SEE ALSO:
Report
573
Metadata Types ReportType
ReportType
Represents the metadata associated with a custom report type. This type extends the Metadata
metadata type and inherits its fullName field. Custom report types allow you to build a framework from which users can create and customize reports. For more information, see “Set Up a Custom Report Type” in the Salesforce online help.
Declarative Metadata File Suffix and Directory Location
The file suffix is
.reportType
for the custom report type definition. There is one file per custom report type. Report types are stored in the reportTypes
directory of the corresponding package directory.
Version
Custom report types are available in API version 14.0 and later.
Fields
Field Name
autogenerated baseObject category
Field Type
boolean string
ReportTypeCategory
(
of type string)
Description
Indicates that the report type was automatically generated when historical trending was enabled for an entity.
Available in API version 29 and later.
Required. The primary object for the custom report type, for example,
Account. All objects, including custom and external objects, are supported.
You cannot edit this field after initial creation.
Support for external objects is available in API version 38.0 and later.
Required. This field controls the category for the report. The valid values are:
•
accounts
•
opportunities
•
forecasts
•
cases
•
leads
•
campaigns
•
activities
•
busop
•
products
•
admin
•
territory
•
territory2
(This value is available in API version 31.0 and later.)
•
usage_entitlement
574
Metadata Types ReportType
Field Name
deployed description fullName join label sections
Field Type
boolean string string
string
Description
•
wdc
(This value is available in API version 29.0 and later.)
•
calibration
(This value is available in API version 29.0 and later.)
•
other
•
content
Required. Indicates whether the report type is available to users ( true
) or whether it's still in development ( false
).
The description of the custom report type.
The report type developer name used as a unique identifier for API access.
The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
The object joined to the baseObject
. For example, Contacts may be
joined to the primary Accounts object.
Required. The report type label.
The groups of columns available for the report type. Though columns are not strictly required, a report without columns is not very useful.
ObjectRelationship
ObjectRelationship represents a join to another object. For more information, see “Add Child Objects To Your Custom Report Type” in the Salesforce online help.
Field Name
join outerJoin relationship
Field Type
boolean string
Description
This field is a recursive reference that allows you to join more than two objects.
A maximum of four objects can be joined in a custom report type. When more than two objects are joined, an inner join is not allowed if there has been an outer join earlier in the join sequence. The
is first joined to the object specified in
; the resulting data set is then joined with any objects specified in this field.
Required. Indicates whether this is an outer join ( true
) or not ( false
). An outer join returns a row even if the joined table does not contain a matching value in the join column.
Required. The object joined to the primary object; for example, Contacts.
ReportLayoutSection
ReportLayoutSection represents a group of columns used in the custom report type.
575
Metadata Types ReportType
Field Name
columns masterLabel
Field Type
string
Description
The list of columns projected from the query, defined by this custom report type.
Required. The label for this group of columns in the report wizard.
ReportTypeColumn
ReportTypeColumn represents a column in the custom report type.
Field Name Field Type
checkedByDefault boolean displayNameOverride string field table string string
Description
Required. Indicates whether this column is selected be default ( true
) or not
( false
).
A customized column name, if desired.
Required. The field name associated with the report column.
Required. The table associated with the field; for example, Account.
Declarative Metadata Sample Definition
The definition of a custom report type is shown below. Account is joined to Contacts and the resulting data set is joined with Assets.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ReportType xmlns= "http://soap.sforce.com/2006/04/metadata">
<baseObject >Account </baseObject >
<category >accounts </category >
<deployed >true </deployed >
<description >Account linked to Contacts and Assets </description >
<join >
<join >
<outerJoin >false </outerJoin >
<relationship >Assets </relationship >
</join >
<outerJoin >false </outerJoin >
<relationship >Contacts </relationship >
</join >
<label >Account Contacts and Assets </label >
<sections >
<columns >
<checkedByDefault >true </checkedByDefault >
<field >obj_lookup__c.Id
</field >
<table >Account </table >
</columns >
<columns >
<checkedByDefault >false </checkedByDefault >
<field >obj_lookup__c.Name
</field >
<table >Account </table >
576
Metadata Types
</columns >
<columns >
<checkedByDefault >false </checkedByDefault >
<field >Opportunity__c.Amount
</field >
<table >Account </table >
</columns >
<columns >
<checkedByDefault >false </checkedByDefault >
<field >Owner.IsActive
</field >
<table >Account </table >
</columns >
<masterLabel >Accounts </masterLabel >
</sections >
<sections >
<columns >
<checkedByDefault >false </checkedByDefault >
<field >Owner.Email
</field >
<table >Account.Contacts
</table >
</columns >
<columns >
<checkedByDefault >false </checkedByDefault >
<field >byr__c </field >
<table >Account.Contacts
</table >
</columns >
<columns >
<checkedByDefault >true </checkedByDefault >
<field >ReportsTo.CreatedBy.Contact.Owner.MobilePhone
</field >
<table >Account.Contacts
</table >
</columns >
<masterLabel >Contacts </masterLabel >
</sections >
</ReportType >
Usage
The custom report type refers to fields by using their API names. For a historical field (one that has trackTrending
set to true
) the API name includes hst
, such as
Field2__c_hst
.
<sections >
<columns >
<checkedByDefault >false </checkedByDefault >
<field >Field2__c_hst </field >
<table >CustomTrendedObject__c.CustomTrendedObject__c_hst
</table >
</columns >
<masterLabel >History </masterLabel >
</sections >
For more information, see trackTrending
on page 264.
Role
Represents a role in your organization.
Role
577
Metadata Types RoleOrTerritory
Declarative Metadata File Suffix and Directory Location
The file suffix for role components is
.role
and components are stored in the roles
directory of the corresponding package directory.
Version
Role components are available in API version 24.0 and later.
Fields
This metadata type extends to subtype RoleOrTerritory on page 578.
Field Name
fullName parentRole
Field Type
string string
Description
The unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain
two consecutive underscores. This field is inherited from the Metadata
component. Corresponds to Role Name in the user interface.
The role above this role in the hierarchy.
Declarative Metadata Sample Definition
The following is the definition of a role.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Role xmlns= "http://soap.sforce.com/2006/04/metadata">
<caseAccessLevel >Edit </caseAccessLevel >
<contactAccessLevel >Edit </contactAccessLevel >
<description >Sample Role </description >
<mayForecastManagerShare >false </mayForecastManagerShare >
<name >R22 </name >
<opportunityAccessLevel >Read </opportunityAccessLevel >
</Role >
RoleOrTerritory
Represents the common base type and valid values for role or territory.
Version
RoleOrTerritory components are available in API version 24.0 and later.
Note: You can’t create a RoleOrTerritory component directly. Use the Role or Territory metadata types instead.
578
Metadata Types
Fields
Field Name
caseAccessLevel
RoleOrTerritory contactAccessLevel description fullName mayForecastManagerShare name opportunityAccessLevel
Field Type
string string string string boolean string string
Description
Specifies whether a user can access other users’ cases that are associated with accounts the user owns. Valid values are:
•
Read
•
Edit
•
None
This field is not visible if your organization’s sharing model for cases is
Public Read/Write.
If no value is set for this field, this field value uses the default access level that is specified in the Manage Territory page in Setup.
Specifies whether a user can access other users’ contacts that are associated with accounts the user owns. Valid values are:
•
Read
•
Edit
•
None
This field is not visible if your organization’s sharing model for contacts is Public Read/Write or Controlled by Parent.
If no value is set for this field, this field value uses the default access level that is specified in the Manage Territory page in Setup.
The description of the role or territory.
The unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain
two consecutive underscores. This field is inherited from the Metadata
component.
Indicates whether the forecast manager can manually share their own forecast.
Required. The name of the role or territory.
Specifies whether a user can access other users’ opportunities that are associated with accounts the user owns. Valid values are:
•
Read
•
Edit
•
None
This field is not visible if your organization’s sharing model for opportunities is Public Read/Write.
If no value is set for this field, this field value uses the default access level that is specified in the Manage Territory page in Setup.
579
Metadata Types SamlSsoConfig
Declarative Metadata Sample Definition
The following is the definition of a role.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Role xmlns= "http://soap.sforce.com/2006/04/metadata">
<caseAccessLevel >Edit </caseAccessLevel >
<contactAccessLevel >Edit </contactAccessLevel >
<description >Sample Role </description >
<mayForecastManagerShare >false </mayForecastManagerShare >
<name >R22 </name >
<opportunityAccessLevel >Read </opportunityAccessLevel >
</Role >
The following is the definition of a territory.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Territory xmlns= "http://soap.sforce.com/2006/04/metadata">
<accountAccessLevel >Edit </accountAccessLevel >
<caseAccessLevel >Edit </caseAccessLevel >
<contactAccessLevel >Edit </contactAccessLevel >
<description >Sample Territory </description >
<mayForecastManagerShare >false </mayForecastManagerShare >
<name >T22name </name >
<opportunityAccessLevel >Read </opportunityAccessLevel >
</Territory >
SEE ALSO:
SamlSsoConfig
Represents a SAML Single Sign-On configuration. This type extends the
metadata type and inherits its fullName
field.
Single sign-on (SSO) lets users access authorized network resources with one login. You validate usernames and passwords against your corporate user database or other client app rather than Salesforce managing separate passwords for each resource.
File Suffix and Directory Location
SamlSsoConfig components have the suffix
.samlssoconfig
and are stored in the samlssoconfigs
folder.
Version
SamlSsoConfig components are available in API version 28.0 and later.
580
Metadata Types SamlSsoConfig
Fields
Field Name
attributeName attributeNameIdFormat decryptionCertificate errorUrl executionUserId identityLocation
Field Type
string string string
Description
The name of the identity provider’s application. Get this from your identity provider.
For SAML 2.0 only and when identityLocation
is set to
Attribute
. Possible values include unspecified
, emailAddress
or persistent
. All legal values can be found in the “Name Identifier Format Identifiers” section of the Assertions and
Protocols SAML 2.0 specification .
The name of the certificate to use for decrypting incoming SAML assertions. This certificate is saved in the organization’s Certificate and
Key Management list. Available in API version 30.0 and later.
string string
The URL of the page users should be directed to if there’s an error during
SAML login. It must be a publicly accessible page, such as a public site
Visualforce page. The URL can be absolute or relative.
The user that runs the Apex handler class. The user must have the
“Manage Users” permission. A user is required if you specify a SAML JIT handler class.
SamlIdentityLocationType
(enumeration of type string)
The location in the assertion where a user should be identified. Valid values are:
•
SubjectNameId
— The identity is in the
<Subject> statement of the assertion.
•
Attribute
— The identity is specified in an
<AttributeValue>
, located in the
<Attribute>
of the assertion.
identityMapping
SamlIdentityType
(enumeration of type string)
The identifier the service provider uses for the user during
Just-in-Time user provisioning
. Valid values are:
•
Username
— The user’s Salesforce username.
•
FederationId
— The federation ID from the user object; the identifier used by the service provider for the user.
•
UserId
— The user ID from the user’s Salesforce organization.
issuer loginUrl logoutUrl name string string string string
The identification string for the Identity Provider.
For SAML 2.0 only: The URL where Salesforce sends a SAML request to start the login sequence.
For SAML 2.0 only: The URL to direct the user to when they click the
Logout link. The default is http://www.salesforce.com
.
The unique name used by the API and managed packages. The name must begin with a letter and use only alphanumeric characters and
581
Metadata Types SamlSsoConfig
Field Name
oauthTokenEndpoint redirectBinding
Field Type
string boolean
Description
underscores. The name cannot end with an underscore or have two consecutive underscores.
For SAML 2.0 only: The ACS URL used with enabling Salesforce as an identity provider in the Web single sign-on OAuth assertion flow.
If you’re using My Domain, chose the binding mechanism your identity provider requests for your SAML messages. Values are:
•
HTTP POST
— HTTP POST binding sends SAML messages using base64-encoded HTML forms.
•
HTTP Redirect
— HTTP Redirect binding sends base64-encoded and URL-encoded SAML messages within URL parameters.
requestSignatureMethod salesforceLoginUrl samlEntityId samlJitHandlerId samlVersion string string string string
The method that’s used to sign the SAML request. Valid values are
RSA-SHA1
and
RSA-SHA256
.
The URL associated with login for the Web single sign-on flow.
The issuer in SAML requests generated by Salesforce, and is also the expected audience of any inbound SAML Responses. If you don’t have domains deployed, this value is always https://saml.salesforce.com
. If you have domains deployed,
Salesforce recommends that you use your custom domain name.
The name of an existing Apex class that implements the
Auth.SamlJitHandler
interface.
SamlType (enumeration of type string)
The SAML version in use. Valid values are:
•
SAML1_1
— SAML 1.1
•
SAML2_0
— SAML 2.0
userProvisioning validationCert boolean string
If true
, Just-in-Time user provisioning is enabled, which creates users on the fly the first time they try to log in. Specify
Federation ID for the identityMapping
value to use this feature.
The certificate used to validate the request. Get this from your identity provider.
Declarative Metadata Sample Definition
The following is an example of a SamlSsoConfig component. The validation certificate string has been truncated for readability.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SamlSsoConfig xmlns= "http://soap.sforce.com/2006/04/metadata">
<identityLocation >SubjectNameId </identityLocation >
<identityMapping >FederationId </identityMapping >
<issuer >https://my-idp.my.salesforce.com
</issuer >
<loginUrl > https://my-idp.my.salesforce.com/idp/endpoint/HttpRedirect
582
Metadata Types
</loginUrl >
<logoutUrl >https://www.salesforce.com
</logoutUrl >
<name >SomeCompany </name >
<oauthTokenEndpoint > https://login.salesforce.com/services/oauth2/token?so= 00DD0000000JxeI
</oauthTokenEndpoint >
<redirectBinding >true </redirectBinding >
<requestSignatureMethod >RSA-SHA1 </requestSignatureMethod >
<salesforceLoginUrl > https://login.salesforce.com?so= 00DD0000000JxeI
</salesforceLoginUrl >
<samlEntityId > https://saml.salesforce.com/customPath
</samlEntityId >
<samlVersion >SAML2_0 </samlVersion >
<userProvisioning >false </userProvisioning >
<validationCert >
MIIEojCCA4qgAwIBAgIOATtxsoBFAAAAAD4...
</validationCert >
</SamlSsoConfig >
Scontrol
Important: Visualforce pages supersede s-controls. Organizations that haven’t previously used s-controls can’t create them.
Existing s-controls are unaffected, and can still be edited.
Deprecated. Represents an Scontrol component, corresponding to an s-control in the Salesforce user interface. For more information,
see “About S-Controls” in the Salesforce online help. This type extends the MetadataWithContent
metadata type and inherits its content and fullName
fields.
Declarative Metadata File Suffix and Directory Location
The file suffix is
.scf
for the s-control file. The accompanying metadata file is named
ScontrolName-meta.xml
.
Scontrol components are stored in the scontrols
folder in the corresponding package directory.
Version
Scontrols are available in API version 10.0 and later.
Fields
This metadata type contains the following fields:
Field Name
content
Field Type
base64Binary
Description
Content of the s-control. Base 64-encoded binary data. Prior to making an API call, client applications must encode the binary attachment data as base64. Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled
Scontrol
583
Metadata Types
Field Name Field Type Description
for you by a SOAP client. This field is inherited from the
component.
contentSource
SControlContentSource (
of type string)
Required. Determines how you plan to use the s-control:
•
HTML
: Select this option if you want to enter the content for your
.
•
URL
: Select this option if you want to enter the link or URL of an
.
•
Snippet
: Snippets are s-controls that are designed to be included in other s-controls. Select this option if you want to enter the content for your s-control snippet in
.
description encodingKey fileContent fileName fullName name supportsCaching string
Encoding (
Required. The default encoding setting is Unicode:
UTF-8
. Change it if you are passing information to a URL that requires data in a different format. This option is available when you select
URL
as the value for
.
base64 File contents displayed if you add this s-control to a custom link. The file can contain a Java applet, Active-X control, or any other type of content you want. This option only applies to s-controls with a value of
HTML
string string
Optional text that describes the s-control. This only displays to users with “View All Data” permission (administrator).
The unique name for the s-control. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field cannot be changed for components installed by a managed
package. It is only relevant if the fileContent
field also has a value.
This is a new field in API version 14.0.
The s-control developer name used as a unique identifier for API access.
The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. If this field contained characters before version 14.0 that are no longer allowed, the characters were stripped out of this field,
and the previous value of the field was saved in the name
field is inherited from the
string boolean
Required. The unique name for the s-control. It must contain alphanumeric characters only and begin with a letter. For example example_s_control
.
Required. Indicates whether the s-control supports caching ( true
) or not ( false
). Caching optimizes the page so that it remembers
Scontrol
584
Metadata Types
Field Name Field Type Description
which s-controls are on the page when it reloads. This option only applies to HTML s-controls.
Declarative Metadata Sample Definition
The following sample creates the
Myriad_Publishing.scf
s-control, which creates a link to the website specified in the s-control.
The corresponding
Myriad_Publishing.scf-meta.xml
metadata file follows the s-control file.
Myriad_Publishing.scf
file: http://www.myriadpubs.com
Myriad_Publishing.scf-meta.xml
:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Scontrol xmlns= "http://soap.sforce.com/2006/04/metadata">
<contentSource >URL </contentSource >
<description >s-control to open Myriad Publishing website.
</description >
<encodingKey >UTF-8 </encodingKey >
<name >Myriad Publishing </name >
<supportsCaching >true </supportsCaching >
</Scontrol >
Settings
Represents the organization settings related to a feature. For example, your password policies, session settings and network access controls are all available in the SecuritySettings component type. Not all feature settings are available in the Metadata API. See
Metadata Types on page 118 for information on which feature settings are not available.
Settings can be accessed using the specific component member or via wildcard. For example, in the package manifest file you would use the following section to access SecuritySettings:
<types >
<members >Security </members >
<name >Settings </name >
</types >
The member format when used in the package manifest is the component metadata type name without the “Settings” suffix, so in the preceding example “Security” is used instead of “SecuritySettings”.
File Suffix and Directory Location
Each settings component gets stored in a single file in the settings
directory of the corresponding package directory. The filename uses the format
Setting feature.settings
. For example, the SecuritySettings file would be
Security.settings
. See
“File Suffix and Directory Location” information for the individual settings components to determine the exact filename.
Settings
585
Metadata Types
Version
Settings is available in API version 27.0 and later. See the version information for the individual setting component to determine which
API version the settings component became available.
Declarative Metadata Sample Definition
The following is an example package manifest used to deploy or retrieve only the MobileSettings for an organization:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Mobile </members >
<name >Settings </name >
</types >
<version >27.0
</version >
</Package >
The following is an example package manifest used to deploy or retrieve all the available settings metadata for an organization, using a wildcard:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >Settings </name >
</types >
<version >27.0
</version >
</Package >
SEE ALSO:
Settings
586
Metadata Types AccountSettings
AccountSettings
Represents an organization’s account settings for account teams, account owner report, and the View Hierarchy link. This type extends the
metadata type and inherits its fullName
field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
AccountSettings values are stored in the
Account.settings
file in the settings
folder. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
AccountSettings is available in API versions 29.0 and later.
Fields
Field Name Field Type
enableAccountOwnerReport boolean enableAccountTeams showViewHierarchyLink boolean boolean
Description
Indicates whether Account Owner Report may ( true
) or may not
( false
) be run by all users.
Indicates whether Account Teams are enabled ( true
) or not ( false
).
The Metadata API cant’ be used to disable Account Teams.
Indicates whether the default View Hierarchy link on all business account detail pages is visible ( true
) or hidden ( false
).
Declarative Metadata Sample Definition
The following is an example of the Account.settings file:
<?xml
version= "1.0" encoding= "UTF-8"?>
<AccountSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableAccountOwnerReport >true </enableAccountOwnerReport >
<enableAccountTeams >true </enableAccountTeams >
<showViewHierarchyLink >true </showViewHierarchyLink >
</AccountSettings >
Example Package Manifest
The following is an example package manifest used to deploy or retrieve the Account settings metadata for an organization:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Account </members >
<name >Settings </name >
</types >
587
Metadata Types ActivitiesSettings
<version >29.0
</version >
</Package >
SEE ALSO:
ActivitiesSettings
Represents an organization’s activity settings, and its user interface settings for the calendar. Use the ActivitiesSettings component type to control the following activity settings:
•
Configure group and recurring tasks, recurring and multiday events, and email tracking
•
Relate multiple contacts to tasks and events (shared activities)
•
Display custom logos in meeting requests
Also use the ActivitiesSettings component type to control user interface settings for the calendar, including hover links and drag-and-drop editing.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
ActivitiesSettings values are stored in the
Activities.settings
file in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
ActivitiesSettings is available in API versions 28.0 and later.
Fields
Settings for all types listed below are controlled on the Activity settings page or the User Interface settings page as noted.
Field Name Field Type
allowUsersToRelateMultipleContactsToTasksAndEvents boolean enableActivityReminders boolean
Description
This read only field indicates whether Shared Activities is enabled. When the value is true, allows users to relate multiple contacts to a task or event.
Important: Beginning with API v36.0, this field is read-only in all versions of the API. You can’t change the value of this field.
Even though this field was updateable before Spring '16, changing this field’s value wasn't supported and could have resulted in an incorrect integration. If you have code in older API versions that changes the value of this field, ensure you update that code to prevent any errors.
Enables popup activity reminders for an organization.
Administrators control this field on the Activity settings page.
588
Metadata Types
Field Name
enableClickCreateEvents
Field Type
boolean enableDragAndDropScheduling enableEmailTracking enableGroupTasks enableListViewScheduling boolean enableMultidayEvents enableRecurringEvents enableRecurringTasks enableSidebarCalendarShortcut enableSimpleTaskCreateUI boolean boolean boolean boolean boolean boolean boolean boolean
ActivitiesSettings
Description
Lets users create events in day and weekly calendar views by double-clicking a specific time slot and entering the details of the event in an overlay. Hovering over an event displays an overlay where users can view the event details or delete the event without leaving the page.
Administrators use a mini page layout to configure the fields shown in the overlays. Does not support recurring events or multi-person events.
Administrators control this field on the User Interface settings page.
Lets users create events associated with records by dragging a record from a list view onto a calendar view and entering the details of the event in an overlay. Hovering over an event displays an overlay where users can view the event details or delete the event without leaving the page. Administrators use a mini page layout to configure the fields shown in the overlays.
Administrators control this field on the User Interface settings page.
Enables tracking of outbound HTML emails if an organization uses HTML email templates.
Administrators control this field on the Activity settings page.
Lets users assign independent copies of a new task to multiple users.
Administrators control this field on the Activity settings page.
Extends the functionality of enableDragAndDropScheduling and enableClickCreateEvents
to list view calendars.
Administrators control this field on the User Interface settings page.
Enables creation of events that end more than 24 hours after they start.
Administrators control this field on the Activity settings page.
Enables creation of events that repeat at specified intervals.
Administrators control this field on the Activity settings page.
Enables creation of tasks that repeat at specified intervals.
Administrators control this field on the Activity settings page.
In the sidebar, displays a shortcut link to a user’s last-used calendar view.
Administrators control this field on the Activity settings page.
Allows administrators to specify whether tapping New Task in Salesforce1 opens a regular task record edit page or a page that displays key task fields first.
Administrators control this field on the Activity settings page.
589
Metadata Types
Field Name Field Type
enableUNSTaskDelegatedToNotifications boolean meetingRequestsLogo showCustomLogoMeetingRequests showEventDetailsMultiUserCalendar showHomePageHoverLinksForEvents showMyTasksHoverLinks string boolean boolean boolean boolean
ActivitiesSettings
Description
On the Activity settings page, exposes a setting for administrators to hide or show a user setting that lets individual users enable or disable email notifications when tasks are assigned to them.
Available when showCustomLogoMeetingRequests
is enabled.
Uploads a custom logo. An administrator can select only a logo that has been uploaded to certain folders in the Documents tab.
Administrators control this field on the Activity settings page.
Displays a custom logo in meeting request emails and on a meeting’s
Web page. Invitees see the logo when a user either invites them to an event or requests a meeting.
Administrators control this field on the Activity settings page.
Displays event details on-screen rather than in hover text.
Administrators control this field on the Activity settings page.
In the calendar section of the Home tab:
•
When a user hovers over the subject of an event, a hover link displays an overlay with selected event details. (Hover links are always available in other calendar views.)
•
When a user clicks the subject of an event, displays the event detail page.
Administrators use a mini page layout to configure the fields shown in the overlay.
Administrators control this field on the User Interface settings page.
In the My Tasks section of the Home tab and on the calendar day view:
•
When a user hovers over the subject of a task, a hover link displays an overlay with selected task details.
•
When a user clicks the subject of a task, displays the task detail page.
Administrators use a mini page layout to configure the fields shown in the overlay.
Administrators control this field on the User Interface settings page.
Example Package Manifest
The following is an example package manifest used to deploy or retrieve the Activity settings metadata for an organization:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Activities </members >
<name >Settings </name >
590
Metadata Types AddressSettings
</types >
<version >28.0
</version >
</Package >
Declarative Metadata Sample Definition
The following is an example of an activity settings file:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ActivitiesSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableActivityReminders >true </enableActivityReminders >
<enableClickCreateEvents >true </enableClickCreateEvents >
<enableDragAndDropScheduling >true </enableDragAndDropScheduling >
<enableEmailTracking >true </enableEmailTracking >
<enableGroupTasks >true </enableGroupTasks >
<enableListViewScheduling >true </enableListViewScheduling >
<enableMultidayEvents >true </enableMultidayEvents >
<enableRecurringEvents >true </enableRecurringEvents >
<enableRecurringTasks >true </enableRecurringTasks >
<enableSidebarCalendarShortcut >true </enableSidebarCalendarShortcut >
<meetingRequestsLogo >Folder02/logo03.png
</meetingRequestsLogo >
<showCustomLogoMeetingRequests >true </showCustomLogoMeetingRequests >
<showEventDetailsMultiUserCalendar >true </showEventDetailsMultiUserCalendar >
<showHomePageHoverLinksForEvents >true </showHomePageHoverLinksForEvents >
<showMyTasksHoverLinks >true </showMyTasksHoverLinks >
</ActivitiesSettings >
SEE ALSO:
AddressSettings
Represents the configuration of country and state picklists. Use the AddressSettings component type to configure state and country data in your organization so that you can convert text-based values into standard picklist values. To convert your state and country values, from Setup, enter
State and Country Picklists
in the
Quick Find
box, then select State and Country Picklists
. For more information, see “Let Users Select State and Country from Picklists” in the Salesforce online help.
This type extends the
Metadata metadata type and inherits its
fullName
field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
Declarative Metadata File Suffix and Directory Location
AddressSettings values are stored in a single file named
Address.settings
in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
AddressSettings is available in API versions 27.0 and later.
591
Metadata Types AddressSettings
CountriesAndStates
This complex metadata type represents valid definitions of states and countries in picklists.
Note: You can use the Metadata API to edit existing states and countries in state and country picklists. You can’t use the Metadata
API to create or delete new states or countries.
Field
countries
Field Type
[]
Description
The countries available in picklists.
Country
This metadata type provides the definition for a country in a picklist.
Field
active
Field Type
boolean
Description
Determines whether the value is available in the API.
Important: After you enable state and country picklists in your Salesforce organization, you can’t set the active
status to
false
.
integrationValue string isoCode label orgDefault standard string string boolean boolean
A customizable text value that is linked to a state or country code. Integration values for standard states and countries default to the full ISO-standard state and country names. Integration values function similarly to the API names of custom fields and objects. Configuring integration values allows integrations that you set up before enabling state and country picklists to continue to work.
Important:
If you don’t specify integration values before enabling state and country picklists in your organization, records use the default value provided by Salesforce. If you change integration values later, records created or updated from that point on use your edited values.
The ISO-standard code populates this field when you issue a retrieve()
call. This field is read only in the API but you can edit the label in Setup. You can’t edit the isoCode
of standard
states and countries.
The label is what users see in picklists in Salesforce. This field is read only in the API but you can edit the label in Setup.
Sets a country as the default value for new records in the
Salesforce organization.
Standard states and countries are states and countries that are included with Salesforce. You can’t edit the standard attribute.
592
Metadata Types AddressSettings
Field
states visible
Field Type
[] boolean
Description
The states or provinces that are part of the country.
Makes the state or country available to users in Salesforce. States or countries that are visible
must also be active
.
State
This metadata type provides the definition for a state in a picklist.
Field
active
Field Type
boolean integrationValue isoCode label standard visible string string string boolean boolean
Description
Determines whether the value is available in the API.
Important: After you enable state and country picklists in your Salesforce organization, you can’t set the active
status to
false
.
A customizable text value that is linked to a state or country code. Integration values for standard states and countries default to the full ISO-standard state and country names. Integration values function similarly to the API names of custom fields and objects. Configuring integration values allows integrations that you set up before enabling state and country picklists to continue to work.
Important: If you don’t specify integration values before enabling state and country picklists in your organization, records use the default value provided by Salesforce. If you change integration values later, records created or updated from that point on use your edited values.
The ISO-standard code populates this field when you issue a retrieve()
call. This field is read only in the API but you can edit the label in Setup.
The label is what users see in picklists in Salesforce. This field is read only in the API but you can edit the label in Setup.
Standard states and countries are states and countries that are included with Salesforce. You can’t edit the standard attribute.
Makes the state or country available to users in Salesforce. States or countries that are visible
must also be active
.
593
Metadata Types AddressSettings
Declarative Metadata Sample Definition
The following is sample XML that configures state and country picklists for the United States and Canada for use in an organization. It also makes the country of Greenland available only in the API. This example is supported in API version 41.0.
<?xml
version= "1.0" encoding= "UTF-8"?>
<AddressSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<countriesAndStates >
<countries >
<country >
<active >true </active >
<integrationValue >United States </integrationValue >
<isoCode >US </isoCode >
<label >United States </label >
<orgDefault >true </orgDefault >
<standard >true </standard >
<states >
<state >
<active >true </active >
<integrationValue >Alabama </integrationValue >
<isoCode >AL </isoCode >
<label >Alabama </label >
<standard >true </standard >
<visible >true </visible >
</state >
<state >
<active >true </active >
<integrationValue >Alaska </integrationValue >
<isoCode >AK </isoCode >
<label >Alaska </label >
<standard >true </standard >
<visible >true </visible >
</state >
</states >
<visible >true </visible >
</country >
<country >
<active >true </active >
<integrationValue >Canada </integrationValue >
<isoCode >CA </isoCode >
<label >Canada </label >
<orgDefault >false </orgDefault >
<states >
<state >
<active >true </active >
<integrationValue >Alberta </integrationValue >
<isoCode >AB </isoCode >
<label >Alberta </label >
<standard >true </standard >
<visible >true </visible >
</state >
<state >
<active >true </active >
<integrationValue >British Columbia </integrationValue >
<isoCode >BC </isoCode >
594
Metadata Types BusinessHoursSettings
<label >British Columbia </label >
<standard >true </standard >
<visible >true </visible >
</state >
</states >
<visible >true </visible >
</country >
<country >
<active >true </active >
<integrationValue >Greenland </integrationValue >
<isoCode >GL </isoCode >
<label >Greenland </label >
<standard >true </standard >
<visible >false </visible >
</country >
</countries >
</countriesAndStates >
</AddressSettings >
SEE ALSO:
BusinessHoursSettings
Represents the metadata used to manage settings for business hours and holidays in entitlements, entitlement templates, campaigns,
and cases. This type extends the Metadata
metadata type and inherits its fullName
field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
Business hours and holidays settings are stored in a single file named businessHours.settings
in the settings
directory.
The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
BusinessHoursSettings is available in API version 29.0 and later.
Fields
Field Name
businessHours
Field Type
holidays
Description
Represents the application of business hours to entitlements, entitlement templates, campaigns, and cases.
Represents a holiday and its usage in businessHours
.
595
Metadata Types BusinessHoursSettings
BusinessHoursEntry
Represents the application of business hours to entitlements, entitlement templates, campaigns, and cases.
Field Name
timeZoneId name active default mondayStartTime mondayEndTime tuesdayStartTime tuesdayEndTime wednesdayStartTime wednesdayEndTime thursdayStartTime thursdayEndTime fridayStartTime fridayEndTime saturdayStartTime saturdayEndTime
Field Type
string string string string string string string string string string string string string string string string
Description
The time zone for the time that defines business hours.
Name of the business hours. This name should be unique.
Indicates whether the business hours are active.
Indicates whether the business hours are used as the default business hours.
Start time for the business hours on Monday. Uses the format
HH:mm:ss.SSSZ
.
End time for the business hours on Monday. Uses the format
HH:mm:ss.SSSZ
. The value
00:00:00.000Z
specifies midnight on Monday.
Start time for the business hours on Tuesday. Uses the format
HH:mm:ss.SSSZ
.
End time for the business hours on Tuesday. Uses the format
HH:mm:ss.SSSZ
. The value
00:00:00.000Z
specifies midnight on Tuesday.
Start time for the business hours on Wednesday. Uses the format
HH:mm:ss.SSSZ
.
End time for the business hours on Wednesday. Uses the format
HH:mm:ss.SSSZ
. The value
00:00:00.000Z
specifies midnight on Wednesday.
Start time for the business hours on Thursday. Uses the format
HH:mm:ss.SSSZ
.
End time for the business hours on Thursday. Uses the format
HH:mm:ss.SSSZ
. The value
00:00:00.000Z
specifies midnight on Thursday.
Start time for the business hours on Friday. Uses the format
HH:mm:ss.SSSZ
.
End time for the business hours on Friday. Uses the format
HH:mm:ss.SSSZ
. The value
00:00:00.000Z
specifies midnight on Friday.
Start time for the business hours on Saturday. Uses the format
HH:mm:ss.SSSZ
.
End time for the business hours on Saturday. Uses the format
HH:mm:ss.SSSZ
. The value
00:00:00.000Z
specifies midnight on Saturday.
596
Metadata Types BusinessHoursSettings
Field Name
sundayStartTime sundayEndTime
Field Type
string string
Description
Start time for the business hours on Sunday. Uses the format
HH:mm:ss.SSSZ
.
End time for the business hours on Sunday. Uses the format
HH:mm:ss.SSSZ
. The value
00:00:00.000Z
specifies midnight on Sunday.
Holidays
Represents a holiday and its usage in businessHours
.
Field Name
name description isRecurring activityDate
Field Type
string string string string recurrenceStartDate recurrenceEndDate startTime endTime recurrenceType recurrenceInterval recurrenceDayOfWeek recurrenceDayOfMonth recurrenceInstance recurrenceMonthOfYear string string string string string string string string string string
Description
Name of the holiday. This name does not have to be unique.
The description of the holiday.
Indicates whether the holiday is recurring.
The date of the holiday. Use for non-recurring holidays. Uses the format
HH:mm:ss.SSSZ
.
The date the holiday starts recurring. Uses the format yyyy-mm-dd
.
The date the holiday stops recurring. Uses the format yyyy-mm-dd
.
Optional.
The start time on the date of the holiday. Uses the format
HH:mm:ss.SSSZ
. startTime
and endTime
must be both null or both not null. If they are both null, indicates the whole day.
The end time on the date of the holiday. Uses the format
HH:mm:ss.SSSZ
. startTime
and endTime
must be both null or both not null. If they are both null, indicates the whole day.
The recurrence type of the holiday. Valid values are: RecursDaily,
RecursEveryWeekday, RecursMonthly, RecursMonthlyNth, RecursWeekly,
RecursYearly, RecursYealyNth.
The interval of weeks, months, or years the holiday recurs.
The day of week the holiday recurs. Valid values: Monday, Tuesday,
Wednesday, Thursday, Friday, Saturday, Sunday.
The day of month the holiday recurs. Valid values: integers 1-31.
Valid values: First, Second, Third, Fourth, Last. Only used for recurrenceType RecursMonthlyNth and RecursYearlyNth. For example, if the recurenceInstance value is First, the holiday recurs on the first Monday of the month every 3 months.
Valid values: January, February, March, April, May, June, July, August,
September, October, November, December.
597
Metadata Types BusinessHoursSettings
Field Name
businessHours
Field Type
string
Description
The name of the business hours setting that applies to this holiday.
Declarative Metadata Sample Definition
The following is an example businesshours.settings
metadata file:
<?xml
version= "1.0" encoding= "UTF-8"?>
<BusinessHoursSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<businessHours >
<active >true </active >
<default >true </default >
<fridayEndTime >00:00:00.000Z
</fridayEndTime >
<fridayStartTime >00:00:00.000Z
</fridayStartTime >
<mondayEndTime >00:00:00.000Z
</mondayEndTime >
<mondayStartTime >00:00:00.000Z
</mondayStartTime >
<name >Default </name >
<saturdayEndTime >00:00:00.000Z
</saturdayEndTime >
<saturdayStartTime >00:00:00.000Z
</saturdayStartTime >
<sundayEndTime >00:00:00.000Z
</sundayEndTime >
<sundayStartTime >00:00:00.000Z
</sundayStartTime >
<thursdayEndTime >00:00:00.000Z
</thursdayEndTime >
<thursdayStartTime >00:00:00.000Z
</thursdayStartTime >
<timeZoneId >America/Los_Angeles </timeZoneId >
<tuesdayEndTime >00:00:00.000Z
</tuesdayEndTime >
<tuesdayStartTime >00:00:00.000Z
</tuesdayStartTime >
<wednesdayEndTime >00:00:00.000Z
</wednesdayEndTime >
<wednesdayStartTime >00:00:00.000Z
</wednesdayStartTime >
</businessHours >
<businessHours >
<active >true </active >
<default >false </default >
<fridayEndTime >00:00:00.000Z
</fridayEndTime >
<fridayStartTime >00:00:00.000Z
</fridayStartTime >
<mondayEndTime >15:00:00.000Z
</mondayEndTime >
<mondayStartTime >09:00:00.000Z
</mondayStartTime >
<name >bh1 </name >
<saturdayEndTime >00:00:00.000Z
</saturdayEndTime >
<saturdayStartTime >00:00:00.000Z
</saturdayStartTime >
<sundayEndTime >00:00:00.000Z
</sundayEndTime >
<sundayStartTime >00:00:00.000Z
</sundayStartTime >
<thursdayEndTime >17:00:00.000Z
</thursdayEndTime >
<thursdayStartTime >10:50:00.000Z
</thursdayStartTime >
<timeZoneId >America/Los_Angeles </timeZoneId >
<tuesdayEndTime >13:00:00.000Z
</tuesdayEndTime >
<tuesdayStartTime >09:00:00.000Z
</tuesdayStartTime >
<wednesdayEndTime >15:00:00.000Z
</wednesdayEndTime >
<wednesdayStartTime >09:00:00.000Z
</wednesdayStartTime >
</businessHours >
<holidays >
<activityDate >2013-09-02 </activityDate >
<businessHours >Default </businessHours >
598
Metadata Types CaseSettings
<businessHours >bh1 </businessHours >
<isRecurring >false </isRecurring >
<name >Labor Day </name >
</holidays >
<holidays >
<businessHours >bh1 </businessHours >
<isRecurring >true </isRecurring >
<name >Thanksgiving </name >
<recurrenceDayOfMonth >21 </recurrenceDayOfMonth >
<recurrenceMonthOfYear >November </recurrenceMonthOfYear >
<recurrenceStartDate >2013-11-21 </recurrenceStartDate >
<recurrenceType >RecursYearly </recurrenceType >
</holidays >
</BusinessHoursSettings >
The following is an example package.xml
manifest that references the BusinessHoursSettings definitions:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >BusinessHours </members >
<name >Settings </name >
</types >
<version >29.0
</version >
</Package >
CaseSettings
Represents an organization’s case settings, such as the default case owner, which case-related features are enabled, and which email templates are used for various case activities.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
CaseSettings values are stored in the
Case.settings
file in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
CaseSettings is available in API version 27.0 and later.
Fields
Field Name Field Type
caseAssignNotificationTemplate string
Description
Specifies the email template used for case assignment notifications. The format must be folderName
/ emailTemplateName
.
599
Metadata Types CaseSettings
Field Name
caseCloseNotificationTemplate caseCommentNotificationTemplate caseCreateNotificationTemplate caseFeedItemSettings
Field Type
string string string closeCaseThroughStatusChange boolean defaultCaseOwner defaultCaseOwnerType defaultCaseUser
[] string string string
Description
Specifies the email template used for case close notifications.
The format must be folderName
/ emailTemplateName
.
Specifies the email template used for case comment notifications. The format must be folderName
/ emailTemplateName
.
Specifies the email template used for case create notifications. The format must be folderName
/ emailTemplateName
.
Specifies the settings for feed items in feed-based case page layouts. This field is available in API version 32.0 and later.
Indicates whether
Closed
is included in the Case Status field on case edit pages ( true
) or not ( false
).
Specifies the default owner of a case when assignment rules fail to locate an owner.
Specifies whether the default case owner is a user or a queue.
Specifies the user listed in the Case History related list for automated case changes from:
•
Assignment rules
•
Escalation rules
•
On-Demand Email-to-Case
•
Cases logged in the Self-Service portal emailToCase enableCaseFeed enableDraftEmails enableEarlyEscalationRuleTriggers enableNewEmailDefaultTemplate enableSuggestedArticlesApplication
boolean boolean boolean boolean boolean
The organization’s Email-to-Case settings.
Indicates whether Case Feed is enabled ( true
) or not
( false
).
Indicates whether draft emails are enabled ( true
) or not
( false
). Enabling email drafts requires that Case Feed and
Email-to-Case are also enabled.
Indicates whether early triggers on escalation rules are enabled ( true
) or not ( false
).
Indicates whether default email templates are enabled
( true
) or not ( false
). Default email templates are available only if draft emails are enabled.
Indicates whether the Suggested Articles list appears on case pages.( true
) or not ( false
). Is only valid if enableSuggestedSolutions
= false
.
600
Metadata Types
Field Name Field Type
enableSuggestedArticlesCustomerPortal boolean enableSuggestedArticlesPartnerPortal boolean enableSuggestedSolutions boolean keepRecordTypeOnAssignmentRule boolean newEmailDefaultTemplateClass string notifyContactOnCaseComment boolean notifyDefaultCaseOwner notifyOwnerOnCaseComment boolean boolean notifyOwnerOnCaseOwnerChange boolean showEmailAttachmentsInCase
AttachmentsRL boolean
CaseSettings
Description
Indicates whether the Suggested Articles list appears on customer portal pages ( true
) or not ( false
). Is only valid if enableSuggestedSolutions
= false
.
Indicates whether the Suggested Articles list appears on partner portal pages ( true
) or not ( false
). Is only valid if enableSuggestedSolutions
= false
.
Indicates whether the View Suggested Solutions or Find
Articles button appears on case detail pages ( true
) or not
( false
). Is only valid if enableSuggestedArticlesApplication
, enableSuggestedArticlesCustomerPortal
, and enableSuggestedArticlesPartnerPortal
= false
.
Indicates whether, when applying assignment rules to manually created records, to keep the existing record type
( true
) or to override the existing record type with the assignee’s default record type ( false
).
Specifies the Apex class that defines the default email template for new email messages in Case Feed. This field appears only when enableNewEmailDefaultTemplate=true
.
Indicates whether contacts who are not members of your
Self-Service portal can be notified when a new comment is added to a case.( true
) or not ( false
).
Indicates whether the default case owner is notified when assigned a new case ( true
) or not ( false
).
Indicates whether the case owner is notified when a comment is added to a case ( true
) or not ( false
).
Indicates whether the
Send Notification Email checkbox on cases is automatically selected when users change a case owner to another user ( true
).
Indicates whether the case Attachments related list shows email attachments. If true
, the page displays an email icon next to each attachment from an email in the Attachments related list for cases. The related list’s list view also includes a Source column that identifies the attachment’s origin. If false
, email attachments aren’t displayed in the
Attachments related list for cases.
This field is available in API version 40.0 and later.
601
Metadata Types CaseSettings
Field Name
showFewerCloseActions systemUserEmail useSystemEmailAddress useSystemUserAsDefaultCaseUser webToCase
Field Type
boolean string boolean boolean
Description
Indicates whether the Save & Close button on case edit pages and the Cls link on Cases related lists are hidden
( true
) or shown ( false
).
Specifies the email address used when the default case user is the system user.
Indicates whether case comment, case attachment, and case assignment email notifications are sent from a system address ( true
) or whether case notifications appear to be sent from the user or contact updating the case ( false
).
Indicates whether the system user is used as the automated case user ( true
) or not ( false
). If false, then you must specify a value for the defaultCaseUser
field.
The organization’s Web-to-Case settings.
EmailToCaseSettings
Represents an organization’s Email-to-Case settings.
Fields
Field Name
enableEmailToCase enableHtmlEmail enableOnDemandEmailToCase enableThreadIDInBody
Field Type
boolean boolean boolean boolean
Description
Indicates whether Email-to-Case is enabled ( true
) or not
( false
). Note: once Email-to-Case is enabled, it can’t be disabled.
Indicates whether HTML email is enabled ( true
) or not
( false
).
Indicates whether On-Demand Email-to-Case is enabled
( true
) or not ( false
).
Indicates whether the Thread ID for a case is inserted in the body of an email ( true
) or not ( false
).
enableThreadIDInSubject notifyOwnerOnNewCaseEmail overEmailLimitAction boolean boolean
Indicates whether the Thread ID for a case is inserted in the subject line of an email ( true
) or not ( false
).
Indicates whether the owner of a case receives a notification when a new email related to the case is received ( true
) or not ( false
).
EmailToCaseOnFailureActionType
(
Specifies what happens to email messages received after an organization exceeds its daily Email-to-Case limits. Valid values are:
•
Bounce
602
Metadata Types CaseSettings
Field Name Field Type Description
•
Discard
•
Requeue preQuoteSignature boolean Indicates whether the user signature is inserted after the reply but before the email thread in an outbound email ( true
) or at the end of the email ( false
).
The organization’s Email-to-Case routing address settings.
routingAddresses
unauthorizedSenderAction
EmailToCaseOnFailureActionType
(
Specifies what happens to email messages received from invalid senders. Valid values are:
•
Bounce
•
Discard
EmailToCaseRoutingAddress
Represents an organization’s Email-to-Case routing address.
Fields
Field Name
addressType authorizedSenders caseOrigin caseOwner caseOwnerType
Field Type Description
EmailToCaseRoutingAddressType
Specifies the type of Email-to-Case routing address. Valid values are:
•
EmailToCase
—A routing address used with
Email-to-Case or On-Demand Email-to-Case.
•
Outlook
—A routing address used with
Salesforce for Outlook to create cases from Outlook.
Requires that On-Demand Email-to-Case is enabled.
string string
Specifies the email addresses or domains from which
On-Demand Email-to-Case can receive email. Include multiple entries in a comma-separated list.
Specifies the default case origin for cases created through this routing address.
string
Specifies the default owner of cases created through this routing address. The case owner can be either a user or a queue. Specify the case owner using a Salesforce username.
Specifying a case owner here in the routing address settings value of defaultCaseOwner
in CaseSettings.
string Specifies whether the default case owner is a user or a queue.
603
Metadata Types CaseSettings
Field Name
casePriority createTask emailAddress emailServicesAddress string string isVerified routingName saveEmailHeaders taskStatus
Field Type
string boolean boolean string boolean string
Description
Specifies the default case priority for cases created through this routing address.
Indicates whether a task is automatically assigned to the case owner when a case is created through an email ( true
) or not ( false
).
Specifies the email address used to route email messages that are submitted as cases.
Specifies the Salesforce-generated routing address used for setting up Email-to-Case forwarding. This field value is read-only and can't be modified.
Indicates whether the customer has verified the routing address (typically by clicking a confirmation email). This field value is read-only and can't be modified.
Specifies the name of the Email-to-Case routing address.
Indicates whether email routing and envelope information are saved ( true
) or not ( false
).
Specifies the default status on tasks automatically assigned to the case owner when email is submitted as a case. Only applies if createTask
is set to true
.
FeedItemSettings
Represents an organization’s feed item settings. Available in API version 32.0 and later.
Field Name
characterLimit collapseThread displayFormat feedItemType
Field Type
int boolean
FeedItemDisplayFormat
of type string)
Description
Specifies the maximum number of characters displayed for each feed item.
Indicates whether earlier messages in an email thread are removed from email feed items( true
) or not ( false
).
Indicates how email feed items are displayed. Valid values are:
•
Default
—Blank lines in email feed items are displayed.
•
HideBlankLines
—Blank lines in email feed items are not displayed.
FeedItemType (
of type string)
The type of feed item to which the settings apply. For
FeedItemSettings
, the only valid feedItemType value is
EmailMessageEvent
.
604
Metadata Types
WebToCaseSettings
Represents an organization’s Web-to-Case settings.
Fields
Field Name
caseOrigin
Field Type
string defaultResponseTemplate string enableWebToCase boolean
CaseSettings
Description
Specifies the default case origin for cases created through this web form.
Only applies if enableWebToCase
is set to true
.
Specifies the default template used for email responses to cases submitted through a Self-Service portal. Only applies if enableWebToCase
is set to true
.
Indicates whether Web-to-Case is enabled ( true
) or not ( false
).
Declarative Metadata Sample Definition
This code sample is an example of a case settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CaseSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<caseAssignNotificationTemplate > unfiled$public/SupportCaseAssignmentNotification
</caseAssignNotificationTemplate >
<caseCloseNotificationTemplate > unfiled$public/SupportCaseCloseNotification
</caseCloseNotificationTemplate >
<caseCommentNotificationTemplate > unfiled$public/SupportCaseCommentNotification
</caseCommentNotificationTemplate >
<caseCreateNotificationTemplate > unfiled$public/SupportCaseCreateNotification
</caseCreateNotificationTemplate >
<closeCaseThroughStatusChange >true </closeCaseThroughStatusChange >
<defaultCaseOwner >[email protected]
</defaultCaseOwner >
<defaultCaseOwnerType >User </defaultCaseOwnerType >
<defaultCaseUser >[email protected]
</defaultCaseUser >
<emailToCase >
<enableEmailToCase >true </enableEmailToCase >
<enableHtmlEmail >false </enableHtmlEmail >
<enableOnDemandEmailToCase >true </enableOnDemandEmailToCase >
<enableThreadIDInBody >true </enableThreadIDInBody >
<enableThreadIDInSubject >true </enableThreadIDInSubject >
<notifyOwnerOnNewCaseEmail >false </notifyOwnerOnNewCaseEmail >
<overEmailLimitAction >Bounce </overEmailLimitAction >
<preQuoteSignature >true </preQuoteSignature >
<routingAddresses >
<addressType >EmailToCase </addressType >
<authorizedSenders >[email protected]
</authorizedSenders >
<caseOrigin >Email </caseOrigin >
<casePriority >Medium </casePriority >
605
Metadata Types ChatterAnswersSettings
<createTask >true </createTask >
<emailAddress >[email protected]
</emailAddress >
<routingName >EmailToCaseRoutingAddress1 </routingName >
<saveEmailHeaders >true </saveEmailHeaders >
<taskStatus >Not Started </taskStatus >
</routingAddresses >
<routingAddresses >
<addressType >Outlook </addressType >
<authorizedSenders >[email protected]
</authorizedSenders >
<caseOrigin >Email </caseOrigin >
<caseOwner >[email protected]
</caseOwner >
<caseOwnerType >User </caseOwnerType >
<casePriority >High </casePriority >
<routingName >OutlookRoutingAddress1 </routingName >
</routingAddresses >
<unauthorizedSenderAction >Discard </unauthorizedSenderAction >
</emailToCase >
<enableCaseFeed >true </enableCaseFeed >
<enableDraftEmails >true </enableDraftEmails >
<enableEarlyEscalationRuleTriggers >true </enableEarlyEscalationRuleTriggers >
<enableNewEmailDefaultTemplate >true </enableNewEmailDefaultTemplate >
<enableSuggestedArticlesApplication >true </enableSuggestedArticlesApplication >
<enableSuggestedArticlesCustomerPortal >true </enableSuggestedArticlesCustomerPortal >
<enableSuggestedArticlesPartnerPortal >false </enableSuggestedArticlesPartnerPortal >
<enableSuggestedSolutions >false </enableSuggestedSolutions >
<keepRecordTypeOnAssignmentRule >true </keepRecordTypeOnAssignmentRule >
<newEmailDefaultTemplateClass >CaseTemplateController </newEmailDefaultTemplateClass >
<notifyContactOnCaseComment >true </notifyContactOnCaseComment >
<notifyDefaultCaseOwner >true </notifyDefaultCaseOwner >
<notifyOwnerOnCaseComment >true </notifyOwnerOnCaseComment >
<notifyOwnerOnCaseOwnerChange >false </notifyOwnerOnCaseOwnerChange >
<showFewerCloseActions >false </showFewerCloseActions >
<useSystemEmailAddress >true </useSystemEmailAddress >
<webToCase >
<caseOrigin >Web </caseOrigin >
<defaultResponseTemplate >unfiled$public/SupportCaseResponse </defaultResponseTemplate >
<enableWebToCase >true </enableWebToCase >
</webToCase >
</CaseSettings >
SEE ALSO:
ChatterAnswersSettings
Represents the metadata used to manage settings for Chatter Answers.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
606
Metadata Types ChatterAnswersSettings
File Suffix and Directory Location
Chatter Answers settings are stored in a single file named
ChatterAnswers.settings
in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
ChatterAnswersSettings is available in API version 27.0 and later.
Fields
Field Name Field Type
emailFollowersOnBestAnswer boolean emailFollowersOnReply emailOwnerOnPrivateReply boolean emailOwnerOnReply enableAnswerViaEmail enableChatterAnswers enableFacebookSSO enableInlinePublisher enableReputation enableRichTextEditor boolean boolean boolean boolean boolean boolean boolean boolean
Description
Indicates whether users are notified when a best answer is selected for a question that they’re following ( true
) or not ( false
).
Indicates whether users are notified when other users reply to questions they’re following ( true
) or not ( false
).
Indicates whether users are notified when customer support responds to their questions privately ( true
) or not ( false
).
Indicates whether users are notified when other users reply to their questions ( true
) or not ( false
).
Indicates whether users can post answers by replying to email notifications ( true
) or not ( false
). This field is available in API version
29.0 and later.
Indicates whether Chatter Answers is enabled in the organization ( true
) or not ( false
).
Indicates whether users sign in to your Chatter Answers communities with their Facebook logins ( true
) or not ( false
). To enable this feature, you must define and enable a Facebook authentication provider in your organization’s security controls and enable Auth Providers in your organization.
Indicates whether users can filter search results by articles or questions before they post a question to any of your Chatter Answers communities
( true
) or not ( false
). Also, adds
Title
and
Body
fields to questions for easier text input and scanning. This field is available in API version 29.0 and later.
Indicates whether reputations display for users as hover text on their profile pictures ( true
) or not ( false
). Reputation is enabled across all zones. To enable the reputation setting, you must enable Reputation in your organization.
Indicates whether the rich text editor is enabled for users to format text and upload images when posting questions ( true
) or not ( false
).
To enable rich text editor, you must enable Optimize Question Flow.
607
Metadata Types CompanySettings
Field Name
facebookAuthProvider showInPortals
Field Type
string boolean
Description
The name of an existing Facebook authentication provider. You must choose a Facebook authentication provider to implement Facebook
Single Sign On for your Chatter Answers communities.
Indicates whether Chatter Answers can be added as a tab to your
Customer portal or partner portal ( true
) or not ( false
).
Declarative Metadata Sample Definition
The following is an example chatteranswers.settings
metadata file:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ChatterAnswersSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<emailFollowersOnBestAnswer >true </emailFollowersOnBestAnswer >
<emailFollowersOnReply >true </emailFollowersOnReply >
<emailOwnerOnPrivateReply >true </emailOwnerOnPrivateReply >
<emailOwnerOnReply >true </emailOwnerOnReply >
<enableChatterAnswers >true </enableChatterAnswers >
<enableFacebookSSO >true </enableFacebookSSO >
<enableInlinePublisher >true </enableInlinePublisher >
<enableReputation >true </enableReputation >
<enableRichTextEditor >true </enableRichTextEditor >
<facebookAuthProvider >FacebookAuthProvider </facebookAuthProvider >
<showInPortals >true </showInPortals >
</ChatterAnswersSettings >
The following is an example package.xml
manifest that references the ChatterAnswersSettings definitions:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >ChatterAnswers </members >
<name >Settings </name >
</types >
<version >29.0
</version >
</Package >
SEE ALSO:
CompanySettings
Represents global settings that affect multiple features in your organization.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
608
Metadata Types CompanySettings
Declarative Metadata File Suffix and Directory Location
CompanySettings values are stored in a single file named
Company.settings
in the settings
directory of the corresponding package directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
Company Profile Settings are available in API version 27.0 and later.
Fields
Field Name
fiscalYear
Field Type
Description
The organization’s fiscal year setting based on year and start month. Not available if Custom Fiscal Year or Forecasts (Classic) is enabled. When changing fiscal year settings, quotas and adjustments can be purged. For example changing your start month results in purging this data.
FiscalYearSetting
Represents your organization’s fiscal year setting.
Field
fiscalYearNameBasedOn
Field Type
string startMonth string
Description
This field is used to determine the fiscal year name. Valid values are endingMonth
or startingMonth
. For example, if your fiscal year starts in April 2012 and ends in March 2013, and this value is:
•
endingMonth
, then 2013 is used for the fiscal year name.
•
startingMonth
, then 2012 is used for the fiscal year name.
The month on which the fiscal year is based.
Declarative Metadata Sample Definition — Fiscal Year Setting
A sample XML definition of a fiscal year setting is shown below. Note that this example is supported in API version 27.0 and later.
<?xml
version= "1.0" encoding= "UTF-8"?>
<CompanySettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<fiscalYear >
<fiscalYearNameBasedOn >endingMonth </fiscalYearNameBasedOn >
<startMonth >January </startMonth >
609
Metadata Types ContractSettings
</fiscalYear >
</CompanySettings >
SEE ALSO:
ContractSettings
Represents contract settings. For more information, see “Set Up Contracts” in the Salesforce online help.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
There is one contract settings file stored in a file named
Contract.settings
in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
ContractSettings is available in API version 27.0 and later.
Fields
Field Name
autoCalculateEndDate notifyOwnersOnContractExpiration
Field Type
boolean boolean
Description
Indicates whether the end date of a contract is automatically calculated
( true
) or not ( false
).
Indicates whether account and contract owners are automatically sent email notifications when a contract expires ( true
) or not ( false
).
Declarative Metadata Sample Definition
This is a sample contract settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ContractSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<autoCalculateEndDate >true </autoCalculateEndDate >
<notifyOwnersOnContractExpiration >false </notifyOwnersOnContractExpiration >
</ContractSettings >
SEE ALSO:
EntitlementSettings
Represents an organization’s entitlement settings.
610
Metadata Types EntitlementSettings
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
EntitlementSettings values are stored in the
Entitlements.settings
file in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
EntitlementSettings is available in API version 27.0 and later.
Fields
Field Name Field Type
assetLookupLimitedToActiveEntitlementsOnAccount boolean assetLookupLimitedToActiveEntitlementsOnContact boolean assetLookupLimitedToSameAccount boolean assetLookupLimitedToSameContact boolean enableEntitlements enableEntitlementVersioning boolean boolean entitlementLookupLimitedToActiveStatus boolean entitlementLookupLimitedToSameAccount boolean entitlementLookupLimitedToSameAsset boolean
Description
Indicates whether entitlements-related lookup filters on cases return only the assets related to the active entitlements on the case’s account ( true
) or not ( false
).
Indicates whether entitlements-related lookup filters on cases return only the assets related to the active entitlements on the case’s contact ( true
) or not ( false
).
Indicates whether entitlements-related lookup filters on cases return only the assets related to the case’s account
( true
) or not ( false
).
Indicates whether entitlements-related lookup filters on cases return only the assets related to the case’s contact
( true
) or not ( false
).
Indicates whether entitlements are enabled ( true
) or not
( false
).
Indicates whether entitlement versioning is enabled
( true
) or not ( false
).
This field is available in API version 28.0 and later.
Indicates whether entitlements-related lookup filters on cases return only active entitlements ( true
) or not
( false
).
Indicates whether entitlements-related lookup filters on cases return only the entitlements related to the case’s account ( true
) or not ( false
).
Indicates whether entitlements-related lookup filters on cases return only the entitlements related to the case’s asset ( true
) or not ( false
).
611
Metadata Types FileUploadAndDownloadSecuritySettings
Field Name Field Type
entitlementLookupLimitedToSameContact boolean
Description
Indicates whether entitlements-related lookup filters on cases return only the entitlements related to the case’s contact ( true
) or not ( false
).
Declarative Metadata Sample Definition
This is a sample entitlements settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<EntitlementSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<assetLookupLimitedToActiveEntitlementsOnAccount > false
</assetLookupLimitedToActiveEntitlementsOnAccount >
<assetLookupLimitedToActiveEntitlementsOnContact > false
</assetLookupLimitedToActiveEntitlementsOnContact >
<assetLookupLimitedToSameAccount > false
</assetLookupLimitedToSameAccount >
<assetLookupLimitedToSameContact > false
</assetLookupLimitedToSameContact >
<enableEntitlements > true
</enableEntitlements >
<entitlementLookupLimitedToActiveStatus > false
</entitlementLookupLimitedToActiveStatus >
<entitlementLookupLimitedToSameAccount > false
</entitlementLookupLimitedToSameAccount >
<entitlementLookupLimitedToSameAsset > false
</entitlementLookupLimitedToSameAsset >
<entitlementLookupLimitedToSameContact > false
</entitlementLookupLimitedToSameContact >
</EntitlementSettings >
SEE ALSO:
FileUploadAndDownloadSecuritySettings
Represents the security settings for uploading and downloading files. This type extends the
metadata type and inherits its fullName
field.
612
Metadata Types FileUploadAndDownloadSecuritySettings
File Suffix and Directory Location
FileUploadAndDownloadSecuritySettings components have the suffix
.settings
and are stored in the settings
folder.
Version
FileUploadAndDownloadSecuritySettings components are available in API version 39.0 and later.
Fields
Field Name
dispositions
Field Type Description
FileTypeDispositionAssignmentBean[]
Represents the metadata used to manage filetype behavior.
This field is available in API version 39.0 and later.
noHtmlUploadAsAttachment boolean Indicates whether to allow HTML uploads as attachments or document records. This field is available in API version 39.0 and later.
FileTypeDispositionAssignmentBean
Represents the metadata used to manage filetype behavior.
Field Name
behavior filetype
Field Type
FileDownloadBehavior
of type string)
Description
One of the following values:
•
DOWNLOAD
•
EXECUTE
•
HYBRID
The following filetypes are a security risk and can not have EXECUTE behavior:
•
EXE
•
FLASH
•
HTML
•
RFC822
•
SVG
•
TXML
•
UNKNOWN
•
WEBVIEW
•
XHTML
•
XML
Although more filetypes exist, these are the only ones supported by FileTypeDispositionAssignmentBean:
•
AVI
613
Metadata Types FileUploadAndDownloadSecuritySettings
Field Name Field Type
securityRiskFileType boolean
Description
•
RFC822
•
SVG
•
TXML
•
UNKNOWN
•
WAV
•
WEBVIEW
•
WMA
•
WMV
•
WORD
•
WORD_X
•
XHTML
•
XML
•
EXCEL
•
EXCEL_X
•
EXE
•
FLASH
•
HTML
•
MOV
•
MP3
•
MP4
•
MPEG
•
•
POWER_POINT
•
POWER_POINT_X
Indicates filetypes that cannot have behavior set to EXECUTE, due to security risks. This field is read-only.
Declarative Metadata Sample Definition
The following is an example of a FileUploadAndDownloadSecuritySettings component.
<FileUploadAndDownloadSecuritySettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<dispositions >
<behavior >HYBRID </behavior >
<fileType >AVI </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >WORD </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
614
Metadata Types
<dispositions >
<behavior >HYBRID </behavior >
<fileType >WORD_X </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >EXE </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >HTML </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >WEBVIEW </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >RFC822 </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >MOV </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >MP3 </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >MP4 </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >MPEG </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >PDF </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >POWER_POINT </fileType >
<securityRiskFileType >false </securityRiskFileType >
FileUploadAndDownloadSecuritySettings
615
Metadata Types
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >POWER_POINT_X </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >SVG </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >FLASH </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >TXML </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >UNKNOWN </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >WAV </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >WMA </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >WMV </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >XHTML </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >EXCEL </fileType >
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >HYBRID </behavior >
<fileType >EXCEL_X </fileType >
FileUploadAndDownloadSecuritySettings
616
Metadata Types ForecastingSettings
<securityRiskFileType >false </securityRiskFileType >
</dispositions >
<dispositions >
<behavior >DOWNLOAD </behavior >
<fileType >XML </fileType >
<securityRiskFileType >true </securityRiskFileType >
</dispositions >
<noHtmlUploadAsAttachment >false </noHtmlUploadAsAttachment >
</FileUploadAndDownloadSecuritySettings >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >FileUploadAndDownloadSecurity </members >
<name >Settings </name >
</types >
<version >39.0
</version >
</Package >
ForecastingSettings
Represents the Collaborative Forecasts settings options. This type extends the Metadata
metadata type and inherits its fullName field.
Note: This information only applies to Collaborative Forecasts.
File Suffix and Directory Location
ForecastingSettings values are stored in a single file named
Forecasting.settings
in the settings
directory of the corresponding package directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
ForecastingSettings components are available in API version 28 and later. The structure of the ForecastingSettings type changed significantly in API version 30.0.
Fields
Field Name
displayCurrency
Field Type
DisplayCurrency
(
type string)
Description
The currency for displaying forecasts; either the organization's corporate currency or each forecast owner's personal currency setting. This is the default currency used in Collaborative Forecasts and selected in setup.
The selection must be one of the currencies enabled for use in the organization, and only one selection is allowed. The default is
Corporate
. The valid values are:
•
Corporate
617
Metadata Types ForecastingSettings
Field Name Field Type Description
•
Personal enableForecasts boolean Indicates if Collaborative Forecasts is enabled or not. Set to true
to enable Collaborative Forecasts and false
to disable the functionality.
Warning: Disabling Forecasts can result in data loss. Refer to the online Help before disabling any functionality.
forecastingCategoryMappings
ForecastingCategoryMappings[] A list of mappings associating forecast types with forecast rollups.
forecastingDisplayedFamilySettings string
ForecastingDisplayedFamilySettings[]
The product families chosen to allow forecasting on in Lightning
Experience. This field is available in API version 40.0 and later.
forecastingTypeSettings
ForecastingType
Settings[]
A list of forecast types. For field values, see ForecastingTypeSettings. The maximum number of forecast types is four.
ForecastingTypeSettings
The settings for each forecast type. An organization can have up to four forecast types active. Omitting a previously enabled forecast type that has a minimum API version less than or equal to the metadata package version deletes its quota and adjustment data from the organization.
Warning:
Omitting a forecast type field from the XML can deactivate that forecast type: if the forecast type was available in the release specified by the XML package version, that forecast type is deactivated and its quota and adjustment data are deleted.
Field Name
active
Field Type
boolean
Description
Indicates whether the forecast type specified in the name
field is active.
Note:
Setting the active
field to false purges all forecasting data, adjustments, and quotas for the forecast type. When active
is set to true, some values on the Forecasts tab may not appear immediately. An in-process icon appears to indicate that the values are being calculated.
adjustmentsSettings
AdjustmentsSettings This enables or disables the Forecasts adjustments option in Forecasts.
displayedCategoryApiNames string This read-only field appears four times to specify the four forecast rollup categories displayed in the Forecasts tab, for either cumulative forecast rollups, or individual forecast category rollups. Always use the same 4 values for both displayedCategoryApiNames
and forecastedCategoryApiNames
.
Valid values for organizations using cumulative forecast rollups:
•
openpipeline
•
bestcaseforecast
•
commitforecast
•
closedonly
Valid values for organizations using individual forecast category rollups:
618
Metadata Types ForecastingSettings
Field Name Field Type Description
•
pipelineonly
•
bestcaseonly
•
commitonly
•
closedonly forecastedCategoryApiNames string This field appears four times to specify the four forecast rollup categories used in the organization, for either cumulative forecast rollups, or individual forecast category rollups.
Valid values for organizations using cumulative forecast rollups:
•
openpipeline
•
bestcaseforecast
•
commitforecast
•
closedonly
Valid values for organizations using individual forecast category rollups:
•
pipelineonly
•
bestcaseonly
•
commitonly
•
closedonly
Changing from one set of four values to the other changes the organization setting for Enable Cumulative Forecast Rollups in Setup. If this field is omitted, the setting is not changed.
forecastRangeSettings hasProductFamily isAmount isAvailable isQuantity managerAdjustableCategoryApiNames
ForecastRangeSettings The default periods and range selections in Collaborative Forecasts.
boolean boolean
Indicates whether the forecasting type has product family forecasts enabled. Available in API version 41.0 and later.
This read-only field indicates whether the forecast type is based on revenue amounts. The value of isAmount
is always the opposite of the value of isQuantity
.
boolean boolean string
This read-only field indicates whether the forecast type can currently be used in the organization. For example, the revenue splits forecast type can’t be used in an organization that doesn’t have Opportunity Splits enabled.
This read-only field indicates whether the forecast type is based on product quantities. The value of isQuantity
is always the opposite of the value of isAmount
.
This read-only field appears twice to specify the two forecast rollup categories that forecast managers can adjust in the organization for either cumulative forecast rollups or individual forecast category rollups.
This field can only be used when the enableAdjustments
field contains a value of true. If both the managerAdjustableCategoryApiNames
and
619
Metadata Types ForecastingSettings
Field Name
masterLabel name
Field Type
string string
Description
ownerAdjustableCategoryApiNames
fields are being used, they must contain the same two values. Their values must also be consistent with the values of the enableAdjustments
and enableOwnerAdjustments
fields.
Valid values for organizations using cumulative forecast rollups:
•
bestcaseforecast
•
commitforecast
Valid values for organizations using individual forecast category rollups:
•
bestcaseonly
•
commitonly
This read-only field indicates the UI label for the forecast type.
The name of the forecast type. Each forecast type requires a specific string.
Valid values include:
•
OpportunityRevenue
: Opportunities - Revenue
•
OpportunityQuantity
: Opportunities - Quantity
•
OpportunitySplitRevenue
: Opportunity Revenue Splits -
Revenue
•
OpportunityOverlayRevenue
: Opportunity Overlay Splits
- Revenue
•
OpportunityLineItemRevenue
: Product Families -
Revenue
•
OpportunityLineItemQuantity
: Product Families -
Quantity
•
The name of a custom opportunity split type that has been enabled as a forecast type. Custom split types are based on currency fields, which can contain revenue amounts only.
opportunityListFieldsLabelMappings
OpportunityListFieldsLabelMappings A read-only list of the API names and UI labels for all fields on the
Opportunity object.
opportunityListFields
SelectedSettings
OpportunityListFields
SelectedSettings
The fields selected to appear in the opportunity pane of the forecast page for the forecast type.
Opportunity Name
is required. You can select up to 15 fields.
opportunityListFields
UnselectedSettings opportunitySplitName ownerAdjustableCategoryApiNames
OpportunityListFields
UnselectedSettings
The fields not selected to appear in the opportunity pane of the forecast page for the forecast type.
string string
Indicates whether the forecasting type has a split type, and if so, the name of the split type. Available in API version 41.0 and later.
This read-only field appears twice to specify the two forecast rollup categories that forecast owners can adjust in the organization, for either
620
Metadata Types ForecastingSettings
Field Name
quotasSettings territory2ModelName
Field Type
QuotasSettings string
Description
cumulative forecast rollups, or individual forecast category rollups. This field can only be used when the enableOwnerAdjustments
field contains a value of true. If both the managerAdjustableCategoryApiNames
and ownerAdjustableCategoryApiNames
fields are being used, they must contain the same two values. Their values must also be consistent with the values of the enableAdjustments
and enableOwnerAdjustments
fields.
Valid values for organizations using cumulative forecast rollups:
•
bestcaseforecast
•
commitforecast
Valid values for organizations using individual forecast category rollups:
•
bestcaseonly
•
commitonly
This enables or disables the quota option in Forecasts.
Indicates whether the forecasting type has a Territory2 model, and if so, the name of the Territory2 model. Available in API version 41.0 and later.
AdjustmentsSettings
The adjustment options for Collaborative Forecasts.
Field
enableAdjustments
Field Type
boolean enableOwnerAdjustments boolean
Description
Set to true
to enable Collaborative Forecasts manager adjustments and false
to disable them. All forecast types must contain the same enableAdjustments
value.
Warning: Disabling adjustments results in Collaborative
Forecasts adjustment data being purged.
Set to true
to enable Collaborative Forecasts owner adjustments and false
to disable them. All forecast types must contain the same enableAdjustments
value.
Warning: Disabling adjustments results in Collaborative
Forecasts adjustment data being purged.
ForecastRangeSettings
The default periods and range selections in Collaborative Forecasts. Users can forecast up to 12 months or eight quarters in the future or past. If your forecast range includes the current month or quarter, the forecasts page displays the current month or quarter by default.
621
Metadata Types ForecastingSettings
If not, the first month or quarter of the range is selected. All forecast types must contain the same forecastRangeSettings
field values.
Warning: If you change the time period from monthly to quarterly or quarterly to monthly, or you change the standard fiscal year, all adjustments and quotas are purged. If you enable custom fiscal years, creating the first custom fiscal year deletes any quotas and adjustments in the corresponding and subsequent standard fiscal years. These changes trigger a forecast recalculation that can take significant time, depending on the quantity of your data.
Field
beginning displaying periodType
Field Type
int int
PeriodTypes (
type string)
Description
Indicates the beginning month or quarter to display by default.
Indicates the number of months or quarters to display by default.
The maximum number of months is 12 and quarters is 8.
Indicates what type of period to use. Valid values are:
•
Month
•
Quarter
OpportunityListFieldsLabelMappings
A read-only list of the API names and UI labels for all fields on the Opportunity object.
Field
field label
Field Type
string string
Description
The API name of the Opportunity field.
The UI label of the Opportunity field.
OpportunityListFieldsSelectedSettings
The fields selected to appear in the opportunity pane of the forecast page for the forecast type.
Opportunity Name
is required.
You can select up to 15 fields.
Field
field
Field Type
string
Description
Specifies names of fields to display in the opportunity pane.
OpportunityListFieldsUnselectedSettings
The fields not selected to appear in the opportunity pane of the forecast page for the forecast type.
Field
field
Field Type
string
Description
Specifies names of fields not displayed in the opportunity pane.
QuotasSettings
QuotasSettings indicates if quotas are available in Collaborative Forecasts.
622
Metadata Types ForecastingSettings
Field
showQuotas
Field Type
boolean
Description
Set to true
to enable quotas. All forecast types must contain the same showQuotas
field value.
ForecastingCategoryMappings
The forecasting category mappings for Collaborative Forecasts. This subtype appears eight times within the
ForecastingSettings type. Each occurrence includes fields that specify a type of forecast category rollup, which forecast categories each rollup includes, and the weight of each forecast category in the rollup. Organizations using either cumulative forecast rollups or individual forecast category columns must include all eight occurrences of this subtype.
Field
forecastingItemCategoryApiName
Field Type
string
Description
This field specifies the API name of the rollup type. The valid values are:
•
openpipeline
•
bestcaseforecast
•
commitforecast
•
pipelineonly
•
bestcaseonly
•
commitonly
•
closedonly
•
omittedonly weightedSourceCategories
WeightedSourceCategories[] This field can occur more than once when specifying more than one forecast category to include in the rollup type. Each occurrence contains two subfields that specify a forecast category to include in the forecast rollup type and its weight.
Some rollup types include more than one forecast category. This list shows the forecast categories that are included in each rollup type.
•
Rollup: openpipeline, Forecast categories: pipeline, best case, commit
•
Rollup: bestcaseforecast, Forecast categories: best case, commit, closed
•
Rollup: commitforecast, Forecast categories: commit, closed
•
Rollup: pipelineonly, Forecast categories: pipeline
•
Rollup: bestcaseonly, Forecast categories: best case
•
Rollup: commitonly, Forecast categories: commit
•
Rollup: closedonly, Forecast categories: closed
•
Rollup: omittedonly, Forecast categories: omitted
623
Metadata Types ForecastingSettings
WeightedSourceCategories
This field can occur more than once when specifying more than one forecast category to include in the rollup type. Each occurrence contains two subfields that specify a forecast category to include in the forecast rollup type and its weight. Some rollup types include more than one forecast category. This table shows the forecast categories that are included in each rollup type.
Field
sourceCategoryApiName
Field Type
string weight double
Description
Specifies the API name of a forecast category to include in the rollup type. The valid values are.
•
pipeline
•
best case
•
commit
•
closed
•
omitted
Specifies the weight given to the forecast category when calculating the forecast for the rollup type. The only supported value is 1.0.
ForecastingDisplayedFamilySettings
The product families that an admin chooses to allow forecasting on in Lightning Experience. This field is available in API version 40.0
and later.
Field
productFamily
Field Type
string
Description
The product family available to forecast on. Each product family is unique.
Declarative Metadata Sample Definition
The following is an example of a ForecastingSettings component that enables the Opportunity-Revenue and Product Family-Quantity forecast types:
<?xml
version= "1.0" encoding= "UTF-8"?>
<ForecastingSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableForecasts >true </enableForecasts >
<forecastingTypeSettings >
<active >true </active >
<adjustmentsSettings >
<enableAdjustments >true </enableAdjustments >
</adjustmentsSettings >
<name >OpportunityRevenue </name >
<forecastRangeSettings >
<beginning >0 </beginning >
<displaying >6 </displaying >
624
Metadata Types ForecastingSettings
<periodType >Month </periodType >
</forecastRangeSettings >
<opportunityListFieldsSelectedSettings >
<field >OPPORTUNITY.NAME
</field >
</opportunityListFieldsSelectedSettings >
<quotasSettings >
<showQuotas >true </showQuotas >
</quotasSettings >
</forecastingTypeSettings >
<forecastingTypeSettings >
<active >false </active >
<adjustmentsSettings >
<enableAdjustments >true </enableAdjustments >
</adjustmentsSettings >
<name >OpportunityLineItemQuantity </name >
<forecastRangeSettings >
<beginning >0 </beginning >
<displaying >6 </displaying >
<periodType >Month </periodType >
</forecastRangeSettings >
<opportunityListFieldsSelectedSettings >
<field >OPPORTUNITY.NAME
</field >
</opportunityListFieldsSelectedSettings >
<quotasSettings >
<showQuotas >true </showQuotas >
</quotasSettings >
<displayedCategoryApiNames >pipelineonly </displayedCategoryApiNames >
<displayedCategoryApiNames >bestcaseonly </displayedCategoryApiNames >
<displayedCategoryApiNames >commitonly </displayedCategoryApiNames >
<displayedCategoryApiNames >closedonly </displayedCategoryApiNames >
<forecastedCategoryApiNames >commitonly </forecastedCategoryApiNames >
<forecastedCategoryApiNames >closedonly </forecastedCategoryApiNames >
<forecastedCategoryApiNames >bestcaseonly </forecastedCategoryApiNames >
<forecastedCategoryApiNames >pipelineonly </forecastedCategoryApiNames >
<managerAdjustableCategoryApiNames >commitonly </managerAdjustableCategoryApiNames >
<managerAdjustableCategoryApiNames >bestcaseonly </managerAdjustableCategoryApiNames >
<ownerAdjustableCategoryApiNames >commitonly </ownerAdjustableCategoryApiNames >
<ownerAdjustableCategoryApiNames >bestcaseonly </ownerAdjustableCategoryApiNames >
</forecastingTypeSettings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >commitonly </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >commit </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
</forecastingCategoryMappings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >closedonly </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >closed </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
625
Metadata Types ForecastingSettings
</forecastingCategoryMappings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >bestcaseforecast </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >commit </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
<weightedSourceCategories >
<sourceCategoryApiName >best case </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
<weightedSourceCategories >
<sourceCategoryApiName >closed </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
</forecastingCategoryMappings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >omittedonly </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >omitted </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
</forecastingCategoryMappings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >openpipeline </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >commit </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
<weightedSourceCategories >
<sourceCategoryApiName >best case </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
<weightedSourceCategories >
<sourceCategoryApiName >pipeline </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
</forecastingCategoryMappings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >bestcaseonly </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >best case </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
</forecastingCategoryMappings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >commitforecast </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >closed </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
<weightedSourceCategories >
<sourceCategoryApiName >commit </sourceCategoryApiName >
626
Metadata Types IdeasSettings
<weight >1.0
</weight >
</weightedSourceCategories >
</forecastingCategoryMappings >
<forecastingCategoryMappings >
<forecastingItemCategoryApiName >pipelineonly </forecastingItemCategoryApiName >
<weightedSourceCategories >
<sourceCategoryApiName >pipeline </sourceCategoryApiName >
<weight >1.0
</weight >
</weightedSourceCategories >
</forecastingCategoryMappings >
SEE ALSO:
IdeasSettings
Represents the metadata used to manage settings for Ideas.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
IdeasSettings is stored in one file named
Ideas.settings
in the settings
folder of the corresponding package directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
IdeasSettings is available in API version 27.0 and later.
Ideas
Represents settings for Ideas and Idea Themes.
Fields
Field Name
enableIdeaThemes enableIdeas enableIdeasReputation
Field Type
boolean boolean boolean enableChatterProfile boolean
Description
Indicates whether Idea Themes is enabled ( true
) or not ( false
).
Indicates whether Ideas is enabled ( true
) or not ( false
).
Indicates whether Reputation is enabled ( true
) or not ( false
). You can’t enable IdeasReputation without enabling the Ideas Reputation permission in your organization. This field is available in API version 28.0
and later.
Indicates that the Chatter user profile is used for Ideas user profiles. If enableChatterProfile
is true
, the ideasProfilePage value must not be specified. If enableChatterProfile
is false
,
627
Metadata Types KnowledgeSettings
Field Name
ideasProfilePage halfLife
Field Type
string double
Description
then specify a ideasProfilePage
value, otherwise the Ideas zone profile is used. This field is available in API version 29.0 and later.
The name of the Visualforce page to use for a custom Ideas user profile, if enableChatterProfile
is false
. If enableChatterProfile
is false
, then specify a ideasProfilePage
value, otherwise the Ideas zone profile is used.
This field is available in API version 29.0 and later.
Indicates how quickly old ideas drop in ranking on the Popular Ideas subtab. The half-life setting determines how the number of days after which old ideas drop in ranking on the Popular Ideas subtab, to make room for ideas with more recent votes. A shorter half-life moves older ideas down the page faster than a longer half-life.
Declarative Metadata Sample Definition
The following is an example ideas.settings
metadata file:
<?xml
version= "1.0" encoding= "UTF-8"?>
<IdeasSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableIdeaThemes >true </enableIdeaThemes >
<enableIdeas >true </enableIdeas >
<enableIdeasReputation >true </enableIdeasReputation >
<enableChatterProfile >false </enableChatterProfile >
<ideasProfilePage >
name of Visualforce page
</ideasProfilePage >
<halfLife >2.6
</halfLife >
</IdeasSettings >
SEE ALSO:
KnowledgeSettings
Represents the metadata used to manage settings for Salesforce Knowledge.
This type extends the
Metadata metadata type and inherits its
fullName
field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
KnowledgeSettings values are stored in a single file named
Knowledge.settings
in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
KnowledgeSettings is available in API version 27.0 and later.
628
Metadata Types KnowledgeSettings
Fields
Field Name
answers cases defaultLanguage languages enableChatterQuestionKBDeflection enableCreateEditOnArticlesTab enableExternalMediaContent enableKnowledge showArticleSummariesCustomerPortal showArticleSummariesInternalApp showArticleSummariesPartnerPortal showValidationStatusField suggestedArticles
Field Type
string
boolean boolean boolean boolean boolean boolean boolean
Description
Represents the metadata used to manage settings for Salesforce Knowledge and Answers.
Represents the metadata used to manage settings for Salesforce Knowledge and Cases.
Required. The default language for Salesforce
Knowledge. Use the abbreviation for the language, for example, en_US for United States
English.
A list of languages enabled for Salesforce
Knowledge.
Indicates whether tracking for case deflection via
Chatter is enabled ( true
) or not ( false
).
Indicates whether users can create and edit articles on the articles tab ( true
) or not
( false
).
Indicates whether connecting to external media is enabled ( true
) or not ( false
).
Indicates whetherSalesforce Knowledge is enabled ( true
) or not ( false
).
Indicates whether article summaries appear in the Customer Portal ( true
) or not ( false
).
Indicates whether article summaries appear in the internal knowledge base ( true
) or not
( false
).
Indicates whether article summaries appear in the partner portal ( true
) or not ( false
).
boolean Indicates whether validation status appears on articles ( true
) or not ( false
).
KnowledgeSuggestedArticlesSettings
Represents the metadata used to manage settings for the case fields used to suggest articles for cases. Available in API version 37.0 and later.
KnowledgeAnswerSettings
Represents the metadata used to manage settings for Salesforce Knowledge and Answers.
629
Metadata Types KnowledgeSettings
Field Name
assignTo defaultArticleType enableArticleCreation
Field Type
string string boolean
Description
Specifies the username an article is assigned to from Answers.
The default article type for articles created from Answers. Uses the API name of the article type.
Indicates whether users can create articles from Answers ( true
) or not
( false
).
KnowledgeCaseField
Represents the name of the case field used to suggest articles for the case. Available in API version 37.0 and later.
Field Name
name
Field Type
string
Description
Specifies the name of the case field used to suggest articles for the case.
KnowledgeCaseFieldsSettings
Represents a list of the case fields used to suggest articles for the case. Available in API version 37.0 and later.
Field Name
field
Field Type
[]
Description
Specifies the names of the case fields used to suggest articles for the case.
KnowledgeWorkOrderField
Represents the name of the work order field used to suggest articles for the work order. Available in API version 39.0 and later.
Field Name
name
Field Type
string
Description
Specifies the name of the work order field used to suggest articles for the work order.
KnowledgeWorkOrderFieldsSettings
Represents a list of the work order fields used to suggest articles for the work order. Available in API version 39.0 and later.
Field Name
field
Field Type
Description
Specifies the names of the work order fields used to suggest articles for the work order.
630
Metadata Types KnowledgeSettings
KnowledgeWorkOrderLineItemField
Represents the name of the work order line item field used to suggest articles for the work order line item. Available in API version 39.0
and later.
Field Name
name
Field Type
string
Description
Specifies the name of the work order line item field used to suggest articles for the work order line item.
KnowledgeWorkOrderLineItemFieldsSettings
Represents a list of the work order line item fields used to suggest articles for the work order line item. Available in API version 39.0 and later.
Field Name
field
Field Type
KnowledgeWorkOrderLineItemField []
Description
Specifies the names of the work order line item fields used to suggest articles for the work order line item.
KnowledgeSuggestedArticlesSettings
Represents the metadata used to manage settings for the articles suggested for cases, work orders, and work order line items. The Work
Order and Work Order Line Item objects must be enabled in the org to use the associated fields.
Field Name
caseFields useSuggestedArticlesForCase workOrderFields
Field Type
boolean
KnowledgeWorkOrderFieldsSettings
Description
Represents a list of the case fields used to suggest articles for the case.
Indicates whether case content is used to suggest articles for cases (true) or not (false).
Represents a list of the work order fields used to suggest articles for the work order.
workOrderLineItemFields
KnowledgeWorkOrderLineItemFieldsSettings
Represents a list of the work order line item fields used to suggest articles for the work order line item.
KnowledgeCaseSettings
Represents the metadata used to manage settings for Salesforce Knowledge and Cases.
Field Name
articlePDFCreationProfile articlePublicSharingSites
Field Type
string
Description
The profile used to create a PDF of an article from
Cases.
Represents the metadata used to manage settings for Salesforce Knowledge and Sites.
631
Metadata Types KnowledgeSettings
Field Name
articlePublicSharingCommunities articlePublicSharingSitesChatterAnswers assignTo customizationClass defaultContributionArticleType editor
Field Type
string string string
KnowledgeCaseEditor
(
of type string)
Description
Represents the metadata used to manage settings for Salesforce Knowledge and Communities.
Represents the metadata used to manage settings for Salesforce Knowledge and Sites with Chatter
Answers.
Specifies the username an article is assigned to from
Cases.
Specifies the Apex class used for customization.
The default article type for articles created from
Cases.
Indicates the rich text editor type. Valid values are:
•
simple
•
standard enableArticleCreation enableArticlePublicSharingSites useProfileForPDFCreation boolean boolean boolean
Indicates whether users can create articles from
Cases ( true
) or not ( false
). Controls whether other fields on KnowledgeCaseSettings can be set.
Indicates whether articles can be shared via a public site (URL) from Cases ( true
) or not ( false
).
Indicates whether a profile is used to create a PDF of an article from Cases ( true
) or not ( false
).
KnowledgeSitesSettings
Represents the metadata used to manage settings for Salesforce Knowledge and Sites.
Field Name
site
Field Type
string[]
Description
Specifies the site used for Salesforce Knowledge and Sites.
KnowledgeLanguageSettings
A list of languages enabled for Salesforce Knowledge. KnowledgeLanguageSettings is available in API version 28.0 and later.
Field Name
language
Field Type
Description
Represents the metadata used to manage settings for the languages enabled for Salesforce Knowledge.
632
Metadata Types KnowledgeSettings
KnowledgeLanguage
Represents the metadata used to manage settings for the languages enabled for Salesforce Knowledge. KnowledgeLanguage is available in API version 28.0 and later.
Field Name
active defaultAssignee defaultAssigneeType defaultReviewer defaultReviewerType name
Field Type
boolean string
KnowledgeLanguageLookupValueType
(
of type string)
Description
Indicates whether the language is enabled ( true
) or not ( false
).
The default assignee for articles in the language.
Indicates the default assignee type. Valid values are:
•
user
•
queue string
KnowledgeLanguageLookupValueType
(
of type string)
The default reviewer for articles in the language.
Indicates the default reviewer type. Valid values are:
•
user
•
queue string The code for the language name, for example: English is en. See “What languages does Salesforce support?” in the Salesforce online help for a list of supported languages and their codes.
Declarative Metadata Sample Definition
This is a sample Knowledge settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<KnowledgeSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<answers >
<enableArticleCreation >false </enableArticleCreation >
</answers >
<cases >
<articlePDFCreationProfile >partner portal knowledge profile </articlePDFCreationProfile >
<articlePublicSharingSites >
<site >KnowledgeSite </site >
<site >PKB2Site </site >
<site >ChatterAnswersSite </site >
</articlePublicSharingSites >
<articlePublicSharingSitesChatterAnswers >
<site >ChatterAnswersSite </site >
</articlePublicSharingSitesChatterAnswers >
<assignTo >[email protected]
</assignTo >
<defaultContributionArticleType >Support </defaultContributionArticleType >
<editor >simple </editor >
<enableArticleCreation >true </enableArticleCreation >
<enableArticlePublicSharingSites >true </enableArticlePublicSharingSites >
633
Metadata Types
<useProfileForPDFCreation >true </useProfileForPDFCreation >
</cases >
<defaultLanguage >ja </defaultLanguage >
<enableCreateEditOnArticlesTab >true </enableCreateEditOnArticlesTab >
<enableExternalMediaContent >true </enableExternalMediaContent >
<enableKnowledge >true </enableKnowledge >
<showArticleSummariesCustomerPortal >true </showArticleSummariesCustomerPortal >
<showArticleSummariesInternalApp >true </showArticleSummariesInternalApp >
<showArticleSummariesPartnerPortal >true </showArticleSummariesPartnerPortal >
<showValidationStatusField >true </showValidationStatusField >
<suggestedArticles >
<caseFields >
<field >
<name >Subject </name >
</field >
<field >
<name >SuppliedEmail </name >
</field >
</caseFields >
<useSuggestedArticlesForCase >true </useSuggestedArticlesForCase >
</suggestedArticles >
</KnowledgeSettings >
SEE ALSO:
LeadConvertSettings
Represents an organization’s custom field mappings for lead conversion. Custom fields can be mapped from Leads to Accounts, Contacts, and Opportunities. Options for creating opportunities during lead conversion can also be specified. This type extends the
metadata type and inherits its fullName
field.
Version
LeadConvertSettings is available in API versions 39.0 and later.
Fields
Field Name
allowOwnerChange
Field Type
boolean objectMapping inputObject mappingFields metadata type string metadata type
Description
Indicates whether to include the RecordOwner field in the Convert Lead dialog box ( true
) or not ( false
).
A set of inputObject
, mappingFields
, and outputObject entries. Up to three objectMapping
types can be declared—one each for Account, Contact, and Opportunity.
The name of the object type containing the source fields for mapping.
The value will always be
Lead
.
A set of inputField
and outputField
entries.
634
LeadConvertSettings
Metadata Types
Field Name
inputField outputField outputObject opportunityCreationOptions
Field Type
string string string string
LeadConvertSettings
Description
The name of a custom lead field supplying source data during lead conversion.
The name of a custom account, contact, or opportunity field that will receive data from source field named in the accompanying inputField
entry.
The name of the object type receiving data during lead conversion—
Account
,
Contact
, or
Opportunity
.
This optional field determines whether the Opportunity field is visible or required in the Convert Lead dialog box. Valid values include:
•
VisibleOptional
—The Opportunity field is included in the dialog box but not required. A new opportunity is created if the user enters an opportunity name. This is the default value.
•
VisibleRequired
—The Opportunity field is included in the dialog box and is required. A new opportunity is created based on the name entered by the user.
•
NotVisible
—The Opportunity field is not included in the dialog box. No opportunity is created.
Declarative Metadata Sample Definition
The following is an example of the LeadConvertSettings type:
<?xml
version= "1.0" encoding= "UTF-8"?>
<LeadConvertSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<allowOwnerChange >false </allowOwnerChange >
<objectMapping >
<inputObject >Lead </inputObject >
<mappingFields >
<inputField >custom_lead_field_1 </inputField >
<outputField >custom_account_field_1 </outputField >
</mappingFields >
<mappingFields >
<inputField >custom_lead_field_2 </inputField >
<outputField >custom_account_field_2 </outputField >
</mappingFields >
<mappingFields >
<inputField >custom_lead_field_3 </inputField >
<outputField >custom_account_field_3 </outputField >
</mappingFields >
<outputObject >Account </outputObject >
</objectMapping >
<objectMapping >
<inputObject >Lead </inputObject >
<mappingFields >
<inputField >custom_lead_field_4 </inputField >
<outputField >custom_opportunity_field_1 </outputField >
635
Metadata Types LiveAgentSettings
</mappingFields >
<outputObject >Opportunity </outputObject >
</objectMapping >
<opportunityCreationOptions >VisibleOptional </opportunityCreationOptions >
</LeadConvertSettings >
LiveAgentSettings
type and inherits its fullName
field.
File Suffix and Directory Location
LiveAgentSettings values are stored in the
LiveAgent.settings
file in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
Version
LiveAgentSettings is available in API version 28.0 and later.
Fields
Field Name
enableLiveAgent
Field Type
boolean
Description
Indicates whether Live Agent is enabled ( true
) or not
( false
).
Declarative Metadata Sample Definition
This is a sample Live Agent settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<LiveAgentSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableLiveAgent >true </enableLiveAgent >
</LiveAgentSettings >
MobileSettings
Represents an organization’s mobile settings. For more information, see “Manage Salesforce Mobile Classic Devices” in the Salesforce online help.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
Declarative Metadata File Suffix and Directory Location
MobileSettings values are stored in a single file named
Mobile.settings
in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
636
Metadata Types MobileSettings
Note: MobileSettings is no longer available in API versions 25.0 and 26.0.
Version
Mobile settings are available in API version 27.0 and later.
Fields
Field
chatterMobile
(Deprecated)
Field Type
dashboardMobile
(Deprecated) salesforceMobile touchMobile
(Deprecated)
Description
The settings for devices running Chatter mobile.
The settings for devices running the mobile dashboards app.
The settings for devices running Salesforce
Classic Mobile.
The settings for devices running Salesforce
Touch.
ChatterMobileSettings
These fields are deprecated. Represents your organization’s Chatter Mobile settings.
Field
IPadAuthorized
Field Type
boolean
IPhoneAuthorized boolean androidAuthorized blackBerryAuthorized enableChatterMobile boolean boolean boolean
Description
Indicates whether iPad devices are enabled for Chatter Mobile ( true
) or not ( false
).
Indicates whether iPhone devices are enabled for Chatter Mobile ( true
) or not
( false
).
Indicates whether Android devices are enabled for Chatter Mobile ( true
) or not
( false
).
Indicates whether Blackberry devices are enabled for Chatter Mobile ( true
) or not
( false
).
Indicates whether Chatter Mobile has been enabled for your organization ( true
) or not ( false
).
Note: Setting this to true
enables you to set all of the other settings. If you change this setting from true to false
, and also try to change
637
Metadata Types MobileSettings
Field
enablePushNotifications sessionTimeout
Field Type Description
any of the other ChatterMobile settings, your deploy will fail with an error.
boolean Indicates whether Chatter push notifications have been enabled for your organization
( true
) or not ( false
)
MobileSessionTimeout (
of type string)
The length of time after which users without activity are prompted to log out or continue working. Valid values are:
•
Never
•
OneMinute
•
FiveMinutes
•
TenMinutes
•
ThirtyMinutes
DashboardMobileSettings
These fields are deprecated. Represents your organization’s Mobile Dashboards iPad app settings.
Field
enableDashboardIPadApp
Field Type
boolean
Description
Indicates whether Mobile Dashboards iPad app has been enabled for your organization
( true
) or not ( false
)
SFDCMobileSettings
Represents your organization’s Salesforce Classic Mobile app settings.
Field
enableUserToDeviceLinking
Field Type
boolean enableMobileLite boolean
Description
Permanently link users to their mobile devices. Set this option to true
only if you want to prevent your users from switching devices without administrative intervention..
Indicates whether your organization has the free version of Salesforce Mobile Classic enabled ( true
) or not ( false
).
Note that the free version of Salesforce
Mobile Classic is available only for orgs that turned on this option prior to Summer ’16.
638
Metadata Types NameSettings
TouchMobileSettings
These fields are deprecated. Salesforce Touch has been upgraded to the Salesforce1 app.
Field
enableTouchBrowserIPad
Field Type
boolean enableTouchAppIPad boolean
Description
Indicates whether your organization has the
Salesforce Touch mobile browser app enabled ( true
) or not ( false
).
Indicates whether your organization has the
Salesforce Touch downloadable app enabled ( true
) or not ( false
)
Declarative Metadata Sample Definition
This is a sample mobile.settings
metadata file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<MobileSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<chatterMobile >
<IPadAuthorized >true </IPadAuthorized >
<IPhoneAuthorized >true </IPhoneAuthorized >
<androidAuthorized >true </androidAuthorized >
<blackBerryAuthorized >true </blackBerryAuthorized >
<enableChatterMobile >true </enableChatterMobile >
<enablePushNotifications >true </enablePushNotifications >
<sessionTimeout >Never </sessionTimeout >
</chatterMobile >
<dashboardMobile >
<enableDashboardIPadApp >true </enableDashboardIPadApp >
</dashboardMobile >
<salesforceMobile >
<enableUserToDeviceLinking >false </enableUserToDeviceLinking >
<enableMobileLite >false </enableMobileLite >
</salesforceMobile >
<touchMobile >
<enableTouchBrowserIPad >false </enableTouchBrowserIPad >
<enableTouchAppIPad >true </enableTouchAppIPad >
</touchMobile >
</MobileSettings >
SEE ALSO:
NameSettings
Enables or disables middle name and suffix attributes for the following person objects: Contact, Lead, Person Account, and User.
639
Metadata Types OpportunitySettings
File Suffix and Directory Location
NameSettings values are stored in a single file named
Name.settings
in the settings
folder. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
NameSettings components are available in API version 31.0 and later.
Fields
Field Name
enableMiddleName enableNameSuffix
Field Type
boolean boolean
Description
Indicates whether middle names are enabled ( true
) or disabled
( false
) for person objects.
Indicates whether suffixes are enabled ( true
) or disabled ( false
) for person objects.
Declarative Metadata Sample Definition
The following is an example of a NameSettings component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<NameSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableMiddleName >true </enableMiddleName >
<enableNameSuffix >false </enableNameSuffix >
</NameSettings >
The following is an example package.xml
manifest that references the NameSettings definitions.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Name </members >
<name >Settings </name >
</types >
<version >31.0
</version >
</Package >
OpportunitySettings
Represents organization preferences for features such as automatic opportunity updates and similar-opportunity filters. This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
Opportunities values are stored in a single file named
Opportunity.settings
in the settings
directory of the corresponding package directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
640
Metadata Types OpportunitySettings
Version
OpportunitySettings is available in API version 28.0 and later.
Fields
Field Name
enableUpdateReminders
Field Type
boolean autoActivateNewReminders boolean enableFindSimilarOpportunities boolean findSimilarOppFilter enableOpportunityTeam promptToAddProducts multipicklist boolean boolean
Description
Lets users enable automatic, scheduled updates on opportunities.
Automatically uses scheduled updates for new opportunities.
Lets users see related or similar existing opportunities.
Defines parameters for similar opportunities.
Lets users associate team members with opportunities.
Prompts users to add related products to an opportunity.
FindSimilarOppFilter
Defines whether to match by entire columns or fields.
Field Field Type
similarOpportunitiesDisplayColumns string similarOpportunitiesMatchFields string
Description
The columns to compare.
The fields to compare.
Declarative Metadata Sample Definition
The following is an example of the package file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Opportunity </members >
<name >Settings </name >
</types >
<version >28.0
</version >
</Package >
The package file references the following Opportunity.settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<OpportunitySettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<autoActivateNewReminders >true </autoActivateNewReminders >
<enableFindSimilarOpportunities >true </enableFindSimilarOpportunities >
<findSimilarOppFilter >
<similarOpportunitiesMatchFields >OPPORTUNITY.Account
</similarOpportunitiesMatchFields >
641
Metadata Types OrderSettings
<similarOpportunitiesMatchFields >OPPORTUNITY.OpportunityCompetitors
</similarOpportunitiesMatchFields >
<similarOpportunitiesMatchFields >CustomField__c </similarOpportunitiesMatchFields >
<similarOpportunitiesDisplayColumns >CustomField__c </similarOpportunitiesDisplayColumns >
</findSimilarOppFilter >
<enableOpportunityTeam >true </enableOpportunityTeam >
<enableUpdateReminders >true </enableUpdateReminders >
<promptToAddProducts >false </promptToAddProducts >
</OpportunitySettings >
OrderSettings
Represents order settings. This type extends the Metadata
metadata type and inherits its fullName
field. For more information, see
“Set Up Orders” in the Salesforce Help.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
There is one OrderSettings component in a file named
Order.settings
in the settings
folder. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
OrderSettings components are available in API version 30.0 and later.
Fields
Field Name
enableNegativeQuantity
Field Type
boolean enableOrders enableReductionOrders boolean boolean
Description
Indicates whether users in the organization can add order products with quantities of less than zero ( true
) or not ( false
).
To enable this preference, enableOrders
must be set to true
.
Indicates whether orders are enabled for the organization ( true
) or not ( false
).
Indicates whether reduction orders are enabled for the organization
( true
) or not ( false
). For more information, see “Reduction Orders” in the Salesforce Help.
To enable this preference, enableOrders
must be set to true
.
642
Metadata Types OrgPreferenceSettings
Declarative Metadata Sample Definition
This is a sample OrderSettings component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<OrderSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableOrders >true </enableOrders >
<enableReductionOrders >false </enableReductionOrders >
<enableNegativeQuantity >true </enableNegativeQuantity >
</OrderSettings >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Order </members >
<name >Settings </name >
</types >
<version >30.0
</version >
</Package >
OrgPreferenceSettings
Represents the unique org preference settings in a Salesforce org. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
OrgPreferenceSettings values are stored in the
OrgPreference.settings
file in the settings directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
OrgPreferenceSettings components are available in API version 37.0 and later.
Fields
Field Name
preferences
Field Type Description
[] The preferences associated with the org settings. Possible values are:
•
AnalyticsSharingEnable
(available in version 40.0 and later)
•
AsyncSaveEnabled
(available in version 40.0 and later)
•
ChatterEnabled
•
EnhancedEmailEnabled
•
EventLogWaveIntegEnabled
•
LoginForensicsEnabled
•
NetworksEnabled
(available in version 40.0 and later)
643
Metadata Types
Field Name Field Type
OrgPreferenceSettings
Description
•
NotesReservedPref01
•
OfflineDraftsEnabled
•
PathAssistantsEnabled
•
S1DesktopEnabled
•
S1EncryptedStoragePref2
•
S1OfflinePref
•
ScratchOrgManagementPref
(Beta. Available in version
40.0 and later)
•
SendThroughGmailPref
•
SocialProfilesEnable
•
Translation
(available in version 40.0 and later)
•
VoiceEnabled
OrganizationSettingsDetail
Field Name
settingName setttingValue
Field Type
string boolean
Description
The name of the setting. For example,
“S1EncryptedStoragePref2.”
Indicates whether the setting is enabled
( true
) or not ( false
).
Declarative Metadata Sample Definition
The following is an example of a OrgPreferenceSettings component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<OrgPreferenceSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<preferences >
<settingName >EventLogWaveIntegEnabled </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >SendThroughGmailPref </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >LoginForensicsEnabled </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >EnhancedEmailEnabled </settingName >
<settingValue >true </settingValue >
</preferences >
644
Metadata Types
<preferences >
<settingName >NotesReservedPref01 </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >S1OfflinePref </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >S1EncryptedStoragePref2 </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >OfflineDraftsEnabled </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >ChatterEnabled </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >SocialProfilesEnable </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >PathAssistantsEnabled </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >S1DesktopEnabled </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >VoiceEnabled </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >Translation </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >AnalyticsSharingEnable </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >NetworksEnabled </settingName >
<settingValue >true </settingValue >
</preferences >
<preferences >
<settingName >AsyncSaveEnabled </settingName >
<settingValue >false </settingValue >
</preferences >
<preferences >
<settingName >ScratchOrgManagementPref </settingName >
645
OrgPreferenceSettings
Metadata Types PathAssistantSettings
<settingValue >true </settingValue >
</preferences >
</OrgPreferenceSettings >
PathAssistantSettings
Represents the Path preference setting. This type extends the
metadata type and inherits its fullName
field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
PathAssistantSettings components have the suffix
.settings
and are stored in the settings
folder.
Version
PathAssistantSettings components are available in API version 34.0 and later.
Fields
Field Name Field Type
pathAssistantForOpportunityEnabled boolean pathAssistantEnabled boolean
Description
Determines whether the preference is enabled for Path in Opportunity or not. Available in API version 34.0 only.
Determines whether the preference is enabled for Path or not. Available in API version 35.0 and later.
Declarative Metadata Sample Definition
The following is an example of a PathAssistantSettings component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<PathAssistantSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<pathAssistantEnabled >true </pathAssistantEnabled >
</PathAssistantSettings >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >PathAssistant </members >
<name >Settings </name >
</types >
<version >API </version >
</Package
646
Metadata Types PersonalJourneySettings
PersonalJourneySettings
Represents an organization’s Adoption Manager setting, which enables or disables the Adoption Manager tool. This type extends the
metadata type and inherits its fullName
field.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
more details.
File Suffix and Directory Location
PersonalJourneySettings values are stored in the
PersonalJourney.settings
file in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
PersonalJourneySettings components are available in API version 39.0 and later.
Special Access Rules
Adoption Manager must be enabled in your organization.
Fields
Field Name Field Type
enableExactTargetForSalesforceApps boolean
Description
Enables use of Adoption Manager, a tool that helps drive adoption of the Salesforce1 mobile app and the Lightning Experience. For more information, see Salesforce Adoption Manager in the Salesforce help.
ProductSettings
Represents organization preferences for quantity schedules, revenue schedules, and active flag interaction with prices. This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
ProductSettings values are stored in a single file named
Product.settings
in the settings
directory of the corresponding package directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
ProductSettings is available in API version 28.0 and later.
647
Metadata Types
Fields
Field Name Field Type
enableCascadeActivateToRelatedPrices boolean enableQuantitySchedule enableRevenueSchedule boolean boolean
ProfileSessionSetting
Description
When changing active flag on a product record, automatically updates active flag on related prices.
Enables quantity schedules for products.
Enables revenue schedules for products.
Declarative Metadata Sample Definition
The following is an example of the package file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Product </members >
<name >Settings </name >
</types >
<version >28.0
</version >
</Package >
The package file references the following Product.settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ProductSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableCascadeActivateToRelatedPrices >true </enableCascadeActivateToRelatedPrices >
<enableQuantitySchedule >false </enableQuantitySchedule >
<enableRevenueSchedule >false </enableRevenueSchedule >
</ProductSettings >
ProfileSessionSetting
Represents a profile’s session settings. Use ProfileSessionSetting to retrieve the session settings for a given profile. This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
ProfileSessionSetting components have the suffix
.profileSessionSetting
and are stored in the profileSessionSettings
folder.
Version
ProfileSessionSetting components are available in API version 40.0 and later.
648
Metadata Types ProfileSessionSetting
Fields
Field Name
forceLogout profile requiredSessionLevel sessionTimeout sessionTimeoutWarning
Field Type
boolean string Required. Name of the user profile.
Session security level.
int
Description
Required. If true
, when the session times out, users are logged out immediately and redirected to a default or custom logout URL.
boolean
Required. Specifies how many minutes of inactivity elapse before a user’s authenticated session times out. At the end of the session, the user must log in again. This session timeout value applies to users of the profile and overrides the org-wide timeout value. Changes to the org-wide timeout value don’t apply to users of this profile. Valid values:
15
,
30
,
60
,
120
,
240
,
480
,
720
,
1440
.
Required. If true
, the user receives a warning when the session is about to expire.
SessionSecurityLevel
Session security levels control access to certain types of resources based on the type of authentication used for logging in to the current session. For example, username and password authentication requires the standard
session security level. Two-factor authentication requires
HIGH_ASSURANCE
.
Field Name Field Type Description
SessionSecurityLevel
string)
User’s security level for the current session.
•
The
HIGH_ASSURANCE
security level for this session meets the High
Assurance requirements set in the org’s session settings under Session
Security Levels.
•
The
STANDARD
security level for this session meets the Standard requirements set in the org’s session settings under Session Security Levels.
•
The
LOW
level is not available or used in the Salesforce UI. It is used at the
API level, but users assigned to this level experience unpredictable and reduced functionality.
Declarative Metadata Sample Definition
The following is an example of a ProfileSessionSetting component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<ProfileSessionSetting xmlns= "http://soap.sforce.com/2006/04/metadata">
<forceLogout >false </forceLogout >
<profile >platformportal </profile >
<requiredSessionLevel >HIGH_ASSURANCE </requiredSessionLevel >
<sessionTimeout >1440 </sessionTimeout >
649
Metadata Types QuoteSettings
<sessionTimeoutWarning >false </sessionTimeoutWarning >
</ProfileSessionSetting >
QuoteSettings
metadata type and inherits its fullName
field.
File Suffix and Directory Location
QuoteSettings values are stored in a single file named
Quote.settings
in the settings
directory of the corresponding package directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
QuoteSettings is available in API version 28.0 and later.
Fields
Field Name
enableQuote
Field Type
boolean
Description
When set to true
, users can access Quotes.
Declarative Metadata Sample Definition
The following is an example of the package file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Quote </members >
<name >Settings </name >
</types >
<version >28.0
</version >
</Package >
The package file references the following Quote.settings file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<QuoteSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableQuote >true </enableQuote >
</QuoteSettings >
SearchSettings
Represents an org's search settings.
This type extends the
Metadata metadata type and inherits its
fullName
field.
650
Metadata Types SearchSettings
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
File Suffix and Directory Location
SearchSettings values are stored in a single file named
Search.settings
in the settings
folder. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Version
SearchSettings is available in API version 37.0 and later.
Fields
Field Name
documentContentSearchEnabled optimizeSearchForCJKEnabled recentlyViewedUsersForBlankLookupEnabled searchSettingsByObject sidebarAutoCompleteEnabled sidebarDropDownListEnabled sidebarLimitToItemsIOwnCheckboxEnabled singleSearchResultShortcutEnabled
Field Type
boolean boolean boolean boolean boolean
Description
Indicates if a full-text document search is performed.
Indicates whether the search is optimized for the Japanese,
Chinese, and Korean languages. This setting affects sidebar search and the account search for Find Duplicates on a lead record in sidebar search and global search. Enable this option if users are searching mostly in Japanese, Chinese, or Korean, and if the text in searchable fields is mostly in those languages.
Indicates whether the list of records that are returned from a user autocomplete lookup and from a blank user lookup is taken from the user’s recently viewed user records. Otherwise this setting is false
if the lookup shows a list of recently accessed user records from across your org ( false
). Only applies to User object blank lookup searches.
Represents a list of search settings for each object.
boolean Indicates if autocomplete is enabled for sidebar search.
Autocomplete is when users start typing search terms and sidebar search displays a matching list of recently viewed records.
boolean Indicates if a drop-down list appears in the sidebar search section. From this list, users can select to search within tags, within a specific object, or across all objects.
Indicates if the Limit to Items I Own checkbox appears. The checkbox allows your users to include only records for which they are the record owner when entering search queries in the sidebar.
Indicates if a shortcut is enabled. With the shortcut, users skip the search results page and go directly to the record’s detail page when their search returns only a single item. This setting doesn't apply to tags, case comments (in advanced search), and global search.
651
Metadata Types SearchSettings
Field Name Field Type
spellCorrectKnowledgeSearchEnabled boolean
Description
Indicates if spell check is enabled for Knowledge search.
SearchSettingsByObject
Includes
ObjectSearchSetting
field type, which is a list of search settings for each object.
Field Name
searchSettingsByObject
Field Type Description
Contains a list of search settings for each object.
ObjectSearchSetting
A list of search settings for each object.
Field Name
enhancedLookupEnabled
Field Type
boolean lookupAutoCompleteEnabled boolean name resultsPerPageCount string int
Description
Indicates if enhanced lookups is enabled for the object.
Indicates if autocomplete is enabled for lookup search. Autocomplete is when users edit the lookup field inline by choosing an autosuggestion.
The entity name of the object being configured.
The number of search results per page.
Declarative Metadata Sample Definition
The following is an example of the
Search.settings
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SearchSettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<documentContentSearchEnabled >true </documentContentSearchEnabled >
<optimizeSearchForCJKEnabled >true </optimizeSearchForCJKEnabled >
<recentlyViewedUsersForBlankLookupEnabled >true </recentlyViewedUsersForBlankLookupEnabled >
<searchSettingsByObject >
<searchSettingsByObject >
<enhancedLookupEnabled >false </enhancedLookupEnabled >
<lookupAutoCompleteEnabled >false </lookupAutoCompleteEnabled >
<name >Account </name >
<resultsPerPageCount >25 </resultsPerPageCount >
</searchSettingsByObject >
<searchSettingsByObject >
<enhancedLookupEnabled >false </enhancedLookupEnabled >
<lookupAutoCompleteEnabled >false </lookupAutoCompleteEnabled >
<name >Activity </name >
<resultsPerPageCount >25 </resultsPerPageCount >
</searchSettingsByObject >
<searchSettingsByObject >
652
Metadata Types SecuritySettings
<enhancedLookupEnabled >false </enhancedLookupEnabled >
<lookupAutoCompleteEnabled >false </lookupAutoCompleteEnabled >
<name >Asset </name >
<resultsPerPageCount >25 </resultsPerPageCount >
</searchSettingsByObject >
</searchSettingsByObject >
<sidebarAutoCompleteEnabled >true </sidebarAutoCompleteEnabled >
<sidebarDropDownListEnabled >true </sidebarDropDownListEnabled >
<sidebarLimitToItemsIOwnCheckboxEnabled >true </sidebarLimitToItemsIOwnCheckboxEnabled >
<singleSearchResultShortcutEnabled >true </singleSearchResultShortcutEnabled >
<spellCorrectKnowledgeSearchEnabled >true </spellCorrectKnowledgeSearchEnabled >
</SearchSettings >
Example Package Manifest
The following is an example package manifest used to deploy or retrieve the Account settings metadata for an organization.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Search </members >
<name >Settings </name >
</types >
<version >37.0
</version >
</Package >
SecuritySettings
Represents an organization’s security settings. Security settings define trusted IP ranges for network access, password and login requirements, and session expiration and security settings.
In the package manifest, all organization settings metadata types are accessed using the “Settings” name. See
for more details.
Declarative Metadata File Suffix and Directory Location
SecuritySettings values are stored in a single file named
Security.settings
in the settings
directory. The
.settings
files are different from other named components because there is only one settings file for each settings component.
Note: SecuritySettings is no longer available in API versions 25.0 and 26.0.
Version
Security settings are available in API version 27.0 and later.
653
Metadata Types
Fields
Field Name
networkAccess passwordPolicies sessionSettings
Field Type
SecuritySettings
Description
The trusted IP address ranges from which users can always log in without requiring computer activation.
The requirements for passwords and logins, and assistance with retrieving forgotten passwords.
The settings for session expiration and security.
NetworkAccess
Represents your organization’s trusted IP address ranges for network access.
Field
ipRanges
Field Type
[]
Description
The trusted IP address ranges from which users can always log in without requiring computer activation.
Note: In order to add an IP range, deploy all existing IP ranges, as well as the one you want to add. Otherwise, the existing IP ranges are replaced with the ones you deploy. To remove all the IP ranges in an organization, leave the networkAccess field blank
(<networkAccess></networkAccess>).
IpRange
Defines a range of trusted IP addresses for network access.
Field
description
Field Type
string end start string string
Description
The description of the trusted IP range. Use this field to identify the range, such as which corporate network corresponds to this range. This field is available in API version 34.0 and later.
The IP address that defines the high end of a range of trusted addresses.
The IP address that defines the low end of a range of trusted addresses.
PasswordPolicies
Represents your organization’s password and login policies.
654
Metadata Types SecuritySettings
Field
apiOnlyUserHomePageURL complexity expiration
Field Type
string
Description
The URL to which users with the “API Only User” permission are redirected instead of the login page.
type string)
of
Required. The requirement for which types of characters must be used in a user’s password. Valid values are:
•
NoRestriction
—allows any password value and is the least secure option.
•
AlphaNumeric
—requires at least one alphabetic character and one number. This value is the default value.
•
SpecialCharacters
—requires at least one alphabetic character, one number, and one of the following special characters:
! # $ % - _ = + < >
.
•
UpperLowerCaseNumeric
—requires at least one number, one uppercase letter, and one lowercase letter.
This value is available in API version 31.0 and later.
•
UpperLowerCaseNumericSpecialCharacters
—requires at least one number, one uppercase letter, and one lowercase letter, and one of the following special characters:
! # $ % - _ = + < >
. This value is available in API version 31.0 and later.
Expiration (
string)
Required. The length of time until user passwords expire and must be changed. Valid values are:
•
Never
•
ThirtyDays
•
SixtyDays
•
NinetyDays
. This value is the default value.
•
SixMonths
•
OneYear minimumPasswordLifetime boolean Indicates whether a one-day minimum password lifetime is required ( true
) or not ( false
). This field is available in API version 31.0 and later.
historyRestriction lockoutInterval string Required. The number of previous passwords saved for users so that they must always reset a new, unique password. Valid values are
0
through
24
passwords remembered. The maximum value of 24 applies to API version 31.0 and later. In earlier versions, the maximum value is 16. The default value is
3
.
LockoutInterval (
of type string)
Required. The duration of the login lockout. Valid values are:
•
FifteenMinutes
. This value is the default value.
•
ThirtyMinutes
655
Metadata Types SecuritySettings
Field
maxLoginAttempts
Field Type Description
•
SixtyMinutes
•
Forever
(must be reset by admin)
MaxLoginAttempts
of type string)
Required. The number of login failures allowed for a user before they become locked out. Valid values are:
•
NoLimit
•
ThreeAttempts
•
FiveAttempts
•
TenAttempts
. This value is the default value.
minimumPasswordLength string obscureSecretAnswer passwordAssistanceMessage passwordAssistanceURL questionRestriction boolean string string
QuestionRestriction
of type string)
Required. The minimum number of characters required for a password. Valid values are from 5 to 50. The default value is 8.
This field is available in API version 35.0 and later.
Before API version 35.0, specify minimum password length with the enumeration minPasswordLength
, with valid values
FiveCharacters
,
EightCharacters
(default),
TenCharacters
,
TwelveCharacters
(API version
31.0 and later), and
FifteenCharacters
(API version 34.0
and later).
Hides the secret answer associated with a password ( true
) or not ( false
).
Note: If your org uses the Microsoft Input Method Editor
(IME) with the input mode set to Hiragana, when you type ASCII characters, they’re converted in Japanese characters in normal text fields. However, the IME doesn’t work properly in fields with obscured text. If your org’s users cannot properly enter their passwords or other values after enabling this feature, disable the feature.
The text that appears in the Account Lockout email and at the bottom of the Confirm Identity screen for users resetting their passwords.
The URL that users can click to retrieve forgotten passwords.
Required. The restriction on whether the answer to the password hint question can contain the password itself. Valid values are:
•
None
•
DoesNotContainPassword
. This value is the default value.
656
Metadata Types SecuritySettings
SessionSettings
Represents your organization’s session expiration and security settings.
Field
disableTimeoutWarning
Field Type
boolean enableCSPOnEmail enableCSRFOnGet enableCSRFOnPost enableClickjackSetup boolean boolean boolean enableCacheAndAutocomplete boolean enableClickjackNonsetupSFDC boolean enableClickjackNonsetupUser boolean enableClickjackNonsetupUserHeaderless boolean enablePostForSessions boolean enableSMSIdentity boolean boolean enforceIpRangesEveryRequest boolean
Description
Indicates whether the session timeout warning popup is disabled ( true
) or enabled ( false
).
Indicates whether a content security policy is enabled for the email template. A content security policy helps prevent cross-site scripting attacks by whitelisting sources of images and other content.
Indicates whether Cross-Site Request Forgery (CSRF) protection on GET requests on non-setup pages is enabled ( true
) or disabled ( false
).
Indicates whether Cross-Site Request Forgery (CSRF) protection on POST requests on non-setup pages is enabled ( true
) or disabled ( false
).
Indicates whether the user’s browser is allowed to store user names and auto-fill the
User Name
field on the login page
( true
) or not ( false
).
Indicates whether clickjack protection for non-setup Salesforce pages is enabled ( true
) or disabled ( false
).
Indicates whether clickjack protection for customer Visualforce pages with standard headers turned on is enabled ( true
) or disabled ( false
).
Indicates whether clickjack protection for customer Visualforce pages with standard headers turned off is enabled ( true
) or disabled ( false
). Available in API version 34.0 and later.
Indicates whether clickjack protection for setup pages is enabled
( true
) or disabled ( false
).
Indicates whether cross-domain session information is exchanged using a POST request instead of a GET request, such as when a user is using a Visualforce page. In this context, POST requests are more secure than GET requests. Available in API version 31.0 and later.
Indicates whether users can receive a one-time PIN delivered via SMS ( true
) or not ( false
).
If true
, the IP addresses in Login IP Ranges are enforced when a user accesses Salesforce (on every page request), including access from a client application. If false
, the IP addresses in
Login IP Ranges are enforced only when a user logs in. This field
657
Metadata Types
Field Field Type
forceLogoutOnSessionTimeout boolean forceRelogin boolean hstsOnForcecomSites boolean lockSessionsToDomain boolean lockSessionsToIp logoutURL requireHttpOnly requireHttps boolean string boolean boolean
658
SecuritySettings
Description
affects all user profiles that have login IP restrictions. Available in API version 34.0 and later.
Indicates that when sessions time out for inactive users, current sessions become invalid. The browser refreshes and returns to the login page. To access the org, the user must log in again.
Enabled ( true
) or not ( false
). Available in API version 31.0
and later.
If true
, an administrator that is logged in as another user is required to log in again to their original session, after logging out as the secondary user. If false
, the administrator is not required to log in again.
Indicates whether Visualforce, Force.com sites, or Communities must use HTTPS. This field is available in API version 41.0 and later.
Indicates whether the current UI session for a user, such as a community user, is associated with a specific domain. This check helps prevent unauthorized use of the session ID in another domain. The value is true
by default for organizations created with the Spring ’15 release or later. Available in API version 33.0
and later.
Indicates whether user sessions are locked to the IP address from which the user logged in ( true
) or not ( false
).
The URL to which users are redirected when they log out of
Salesforce. If no value is specified, the default is https://login.salesforce.com
unless MyDomain is enabled. If My Domain is enabled, the default is https://customdomain.my.salesforce.com
.
Available in API version 34.0 and later.
Sets the
HttpOnly
attribute on session cookies, making them inaccessible via JavaScript. If true
, session ID cookie access is restricted. If false
, access is not restricted.
Note: If you have a custom or packaged application that uses JavaScript to access session ID cookies, your application breaks if requireHttpOnly
is set to true
, because the application can't access the cookie.
This field is available in API version 40.0 and later.
Determines whether HTTPS is required to log in to or access
Salesforce. This option is enabled by default for security reasons.
To change to HTTP, contact Salesforce Customer Support.
This field is available in API version 40.0 and later.
Metadata Types
Field
sessionTimeout
SecuritySettings
Field Type
of type string)
Description
The length of time after which users without activity are prompted to log out or continue working. Valid values are:
•
FifteenMinutes
•
ThirtyMinutes
•
SixtyMinutes
•
TwoHours
•
FourHours
•
EightHours
•
TwelveHours
Declarative Metadata Sample Definition
The following is a sample security.settings
metadata file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SecuritySettings xmlns= "http://soap.sforce.com/2006/04/metadata">
<networkAccess >
<ipRanges >
<end >127.0.0.1
</end >
<start >127.0.0.1
</start >
</ipRanges >
</networkAccess >
<passwordPolicies >
<apiOnlyUserHomePageURL >http://www.altPage.com
</apiOnlyUserHomePageURL >
<complexity >SpecialCharacters </complexity >
<expiration >OneYear </expiration >
<passwordAssistanceURL >http://www.acme.com/forgotpassword </passwordAssistanceURL >
<passwordAssistanceMessage >Forgot your password? Reset it here.
</passwordAssistanceMessage >
<historyRestriction >3 </historyRestriction >
<lockoutInterval >ThirtyMinutes </lockoutInterval >
<maxLoginAttempts >ThreeAttempts </maxLoginAttempts >
<minimumPasswordLength >10 </minPasswordLength >
<questionRestriction >None </questionRestriction >
</passwordPolicies >
<sessionSettings>
<disableTimeoutWarning >true </disableTimeoutWarning >
<enableCSRFOnGet >false </enableCSRFOnGet >
<enableCSRFOnPost >false </enableCSRFOnPost >
<enableCacheAndAutocomplete >false </enableCacheAndAutocomplete >
<enableClickjackNonsetupSFDC >true </enableClickjackNonsetupSFDC >
<enableClickjackNonsetupUser >true </enableClickjackNonsetupUser >
<enableClickjackSetup >true </enableClickjackSetup >
<enableSMSIdentity >true </enableSMSIdentity >
<forceRelogin >true </forceRelogin >
<lockSessionsToIp >true </lockSessionsToIp >
<sessionTimeout >TwelveHours </sessionTimeout >
659
Metadata Types SocialCustomerServiceSettings
</sessionSettings >
</SecuritySettings >
SEE ALSO:
SocialCustomerServiceSettings
Represents which Social Business Rules option has been saved to format inbound content from social posts to cases.
File Suffix and Directory Location
SocialCustomerServiceSettings components have the suffix settings
and are stored in the settings
folder.
Version
SocialCustomerServiceSettings is available in API version 41.0 and later.
Fields
Field Name
caseSubjectOption
Field Type
CaseSubjectOption
(
string)
Description
Required. Specifies an option from which inbound social content is formatted to appear in case records’ Case Subject field. Valid values are:
•
SocialPostSource
•
SocialPostContent
•
BuildCustom
Declarative Metadata Sample Definition
This is a sample of a
SocialCustomerServiceSettings.settings
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >Settings </name >
</types >
<version >41.0
</version >
</Package >
660
Metadata Types Territory2Settings
Territory2Settings
Represents the metadata for the default settings for Territory Management 2.0 users to access and modify records associated with sales territories. The standard record access settings apply to accounts and opportunities. If your Salesforce org uses
Private
default internal
metadata type and inherits its fullName
field. Available only if Territory Management 2.0 has been enabled for your org.
File Suffix and Directory Location
Territory2Settings components have the suffix settings
and are stored in the
Settings
folder.
Version
Territory2Settings components are available in API version 32.0 and later.
Special Access Rules
The Territory2Model object has a
State
field in the SOAP API. States include
Planning
,
Active
,
Archived
, and a number of other states, such as
Cloning
, that indicate that a process is underway. Users who do not have the “Manage Territories” permission can access only territories that belong to the model in
Active
state. The “Manage Territories” permission is required for deploy() calls for all territory management entities, in addition to the “Modify All Data” permission required by Metadata API. Using retrieve() without the “Manage Territories” permission will return only entities that belong to a Territory2Model in
Active
state. We recommend against retrieving without the “Manage Territories” permission because the call will retrieve only partial data.
Fields
Field Name Field Type
defaultAccountAccessLevel string defaultCaseAccessLevel string defaultContactAccessLevel string defaultOpportunityAccessLevel string
Description
The default level of access users will have to account records in territories:
view
and
edit
accounts assigned to territories or
view
,
edit
,
transfer
, and
delete
accounts assigned to territories.
The default level of access users will have to case records in territories:
view
and
edit
accounts assigned to territories or
view
,
edit
,
transfer
, and
delete
accounts assigned to territories.
The default level of access users will have to contact records in territories:
view
and
edit
accounts assigned to territories or
view
,
edit
,
transfer
, and
delete
accounts assigned to territories.
The default level of access users will have to opportunity records in territories:
view
and
edit
accounts assigned to territories or
view
,
edit
,
transfer
, and
delete
accounts assigned to territories.
661
Metadata Types
Declarative Metadata Sample Definition
The following example shows the definition of a Territory2Settings component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Territory2Settings xmlns= "http://soap.sforce.com/2006/04/metadata">
<defaultAccountAccessLevel >Owner </defaultAccountAccessLevel >
<defaultOpportunityAccessLevel >Read </defaultOpportunityAccessLevel >
<defaultCaseAccessLevel >None </defaultCaseAccessLevel >
<defaultContactAccessLevel >Edit </defaultContactAccessLevel >
</Territory2Settings >
Usage
.
SharedTo
SharedTo defines the sharing access for a list view or a folder. It can be used to specify the target and source for owner-based sharing rules. See “Sharing Considerations” and “What Is a Group?” in the Salesforce online help.
Declarative Metadata File Suffix and Directory Location
SharedTo is used with
Version
SharedTo is available in API version 17.0 and later.
Fields
Field Field Type
allCustomerPortalUsers string allInternalUsers allPartnerUsers channelProgramGroup string string string
Description
A group containing all customer portal users.
This field is available in API version 24.0 and later.
A group containing all internal and nonportal users.
This field is available in API version 24.0 and later.
A group containing all partner users.
This field is available in API version 24.0 and later.
A system-managed group with sharing access containing all partner members of the corresponding channel program or level.
This field is available in API version 41.0 and later.
SharedTo
662
Metadata Types
Field
channelProgramGroups
Field Type
string[] group string[] groups string[] managerSubordinates managers portalRole string[] string[] string[] portalRoleandSubordinates string[] role string[] roleAndSubordinates string[] roleAndSubordinatesInternal roles string[] string[]
663
SharedTo
Description
A list of system-managed groups with sharing access containing all partner members of the corresponding channel programs or levels.
This field is available in API version 41.0 and later.
A list of groups with sharing access. Use this field instead of the groups
field.
This field is available in API version 22.0 and later.
A list of groups with sharing access.
Use the group
field instead for API version 22.0 and later.
A list of users whose direct and indirect subordinates receive sharing access. This field is available in API version 24.0 and later.
A list of users whose direct and indirect managers receive sharing access. This field is available in API version 24.0 and later.
A list of groups with sharing access containing all users in a portal role.
This field is available in API version 24.0 and later.
A list of groups with sharing access containing all users in a portal role or those under that role.
This field is available in API version 24.0 and later.
A list of roles with sharing access. Use this field instead of the roles
field.
This field is available in API version 22.0 and later.
A list of roles with sharing access. All roles below each of these roles in the role hierarchy also have sharing access. If portal accounts are enabled, then all roles and portal accounts below
.
each of these roles in the role hierarchy also have sharing access.
Use this field instead of the rolesAndSubordinates
field
This field is available in API version 22.0 and later.
A list of roles with sharing access. All roles below each of these roles in the role hierarchy also have sharing access.
This field is available in API version 22.0 and later.
A list of roles with sharing access.
Use the role
field instead for API version 22.0 and later.
Metadata Types
Field
rolesAndSubordinates
Field Type
string[] territories territoriesAndSubordinates string[] territory territoryAndSubordinates string[] queue string[] string[] string[]
SharingBaseRule
Description
A list of roles with sharing access. All roles below each of these roles in the role hierarchy also have sharing access. If portal accounts are enabled, then all roles and portal accounts below each of these roles in the role hierarchy also have sharing access.
Use the roleAndSubordinates
field instead for API version 22.0 and later.
A list of territories with sharing access.
Use the territory
field instead for API version 22.0 and later.
A list of territories with sharing access. All territories below each of these territories in the territory hierarchy also have sharing access.
Use the territoryAndSubordinates
field instead for
API version 22.0 and later.
A list of territories with sharing access. Use this field instead of the territories
field.
This field is available in API version 22.0 and later.
A list of territories with sharing access. All territories below each of these territories in the territory hierarchy also have sharing access. Use this field instead of the territoriesAndSubordinates
field.
This field is available in API version 22.0 and later.
A list of queues with sharing access. Applies only to lead, case, and CustomObject sharing rules.
This field is available in API version 24.0 and later.
SharingBaseRule
metadata type and inherits its fullName
field.
Note:
You can’t create a SharingBaseRule component directly. Use the components under
instead.
Version
SharingBaseRule replaces
and is available in API version 33.0 and later.
664
Metadata Types
Fields
Field
accessLevel accountSettings description label sharedTo
Field Type
string
string string
SharingBaseRule
Description
Required. The access level that the sharing rule grants.
The access level for the account’s children (case, contact, and opportunity).
Describes the sharing rule. Maximum of 1000 characters.
Required. Label for the sharing rule.
Required. Specifies who the record should be shared with.
AccountSharingRuleSettings
Defines the access level for the case, contact, and opportunity associated with the account.
Field
caseAccessLevel
Field Type
string contactAccessLevel string opportunityAccessLevel string
Description
Required. The access level that the user or group has to cases associated with the account.
Possible values are:
•
None
•
Read
•
Edit
Required. The access level that the user or group has to contacts associated with the account.
Possible values are:
•
None
•
Read
•
Edit
Required. The access level that the user or group has to opportunities associated with the account.
Possible values are:
•
None
•
Read
•
Edit
665
Metadata Types SharingRules
SharingRules
Represents the base container for sharing rules, which can be criteria-based, ownership-based, or territory-based. SharingRules enables you to share records with a set of users, using rules that specify the access level for the target user group.
This type extends the
Metadata metadata type and inherits its
fullName
field. For more information, see “Sharing Rules” in the
Salesforce online help.
In API version 33.0 and later, retrieving, deleting, or deploying of all sharing rules in an organization is available . Wildcard support is also available. You can’t retrieve, delete, or deploy manual sharing rules or sharing rules by their type (owner, criteria-based, or territory).
Declarative Metadata File Suffix and Directory Location
In API version 33.0 and later, components are stored in the sharingRules folder and their file name matches the object name with the suffix
.sharingRules
. Criteria-based, owner-based, and territory-based sharing rules are all contained in a object.sharingRule
file.
Prior to API version 33.0, SharingRules components are stored in their corresponding object directory and the file name matches the object name. For example, the accountSharingRules
directory contains an
Account.sharingRules
file for account sharing rules. SharingRules for custom objects are stored in the customObjectSharingRules
directory, which contains files with the
.sharingRules
extension such as
ObjA__c.sharingRules
, where ObjA refers to the developer name of a custom object type.
Version
SharingRules components are available in API version 24.0 and later, but these components are no longer available in API version 33.0
and later: AccountSharingRules, CampaignSharingRules, CaseSharingRules, ContactSharingRules, LeadSharingRules,
OpportunitySharingRules, AccountTerritorySharingRules, CustomObjectSharingRules, UserSharingRules.
In API version 33.0 and later, use SharingCriteriaRule
,
SharingOwnerRule and SharingTerritoryRule .
Fields
The following information assumes that you are familiar with implementing sharing rules for standard objects and custom objects. For more information on these fields, see “Sharing Settings” in the Salesforce online help.
Field Field Type
sharingCriteriaRules
sharingOwnerRules
[] sharingTerritoryRules
Description
An array of criteria-based sharing rules. Available in API version 33.0 and later.
An array of ownership-based sharing rules. Available in
API version 33.0 and later.
An array of territory-based sharing rules. Available in API version 33.0 and later.
SharingCriteriaRule
Defines a criteria-based sharing rule. It extends
and inherits all its fields. Available in API version 33.0 and later.
666
Metadata Types SharingRules
Field
booleanFilter criteriaItems
Field Type
string
Description
Advanced filter conditions that are specified for the sharing rule.
An array of the boolean criteria (conditions) for the sharing rule.
SharingOwnerRule
Defines a ownership-based sharing rule. It extends
SharingBaseRule and inherits all its fields. Available in API version 33.0 and later.
Field
sharedFrom
Field Type
Description
Required. Specifies the record owners.
SharingTerritoryRule
Defines a territory-based sharing rule. It extends SharingOwnerRule
and inherits all its fields. Available in API version 33.0 and later.
AccountSharingRules
Represents the sharing rules for accounts. It extends the
metadata type and inherits its fullName
field. Only available in API version 32.0 and earlier.
Field
criteriaBasedRules ownerRules
Field Type
AccountCriteriaBasedSharingRule []
Description
List that defines user criteria-based rules.
List that defines user membership-based rules.
CampaignSharingRules
fullName
field. Only available in API version 32.0 and earlier.
Field
criteriaBasedRules ownerRules
Field Type
CampaignCriteriaBasedSharingRule
[]
[]
Description
List that defines user criteria-based rules.
List that defines user membership-based rules.
CaseSharingRules
Represents the sharing rules for cases. It extends the
metadata type and inherits its fullName
field. Only available in
API version 32.0 and earlier.
667
Metadata Types SharingRules
Field
criteriaBasedRules ownerRules
Field Type
[]
[]
Description
List that defines user criteria-based rules.
List that defines user membership-based rules.
ContactSharingRules
Represents the sharing rules for contacts. It extends the
metadata type and inherits its fullName
field. Only available in API version 32.0 and earlier.
Field
criteriaBasedRules ownerRules
Field Type
ContactCriteriaBasedSharingRule
[]
[]
Description
List that defines user criteria-based rules.
List that defines user membership-based rules.
LeadSharingRules
Represents the sharing rules for leads. It extends the
metadata type and inherits its fullName
field. Only available in
API version 32.0 and earlier.
Field
criteriaBasedRules ownerRules
Field Type
[]
[]
Description
List that defines user criteria-based rules.
List that defines user membership-based rules.
OpportunitySharingRules
Represents the sharing rules for opportunities. It extends the SharingRules
metadata type and inherits its fullName
field. Only available in API version 32.0 and earlier.
Field
criteriaBasedRules ownerRules
Field Type
OpportunityCriteriaBasedSharingRule []
OpportunityOwnerSharingRule []
Description
List that defines user criteria-based rules.
List that defines user membership-based rules.
AccountTerritorySharingRules
Represents the sharing rules for account territories. It extends the
metadata type and inherits its fullName
field. Only available in API version 32.0 and earlier.
668
Metadata Types
Field
rules
Field Type
AccountTerritorySharingRule []
SharingRules
Description
List that defines user membership-based rules. The list of acceptable values for the sharedFrom
fields are:
•
territory
•
territoryAndSubordinates
CustomObjectSharingRules
fullName
field. Only available in API version 32.0 and earlier.
Field
criteriaBasedRules ownerRules
Field Type Description
CustomObjectCriteriaBasedSharingRule []
List that defines user criteria-based rules.
CustomObjectOwnerSharingRule []
List that defines user membership-based rules.
UserSharingRules
Represents the sharing rules for users. With user sharing rules, you can share members of a group with members of another group. It extends the
metadata type and inherits its fullName
field. Only available in API version 32.0 and earlier.
Field
criteriaBasedRules membershipRules
Field Type
[]
Description
List that defines user criteria-based rules.
List that defines user membership-based rules.
Declarative Metadata Sample Definition
For retrieving sharing rules, see package.xml
The following sample XML definition represents a criteria-based sharing rule in API version 33.0.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SharingRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<sharingCriteriaRules >
<fullName >AccountCriteriaShareWithCEO </fullName >
<accessLevel >Edit </accessLevel >
<accountSettings >
<caseAccessLevel >Read </caseAccessLevel >
<contactAccessLevel >Edit </contactAccessLevel >
<opportunityAccessLevel >Edit </opportunityAccessLevel >
</accountSettings >
<criteriaItems >
<field >Name </field >
<operation >startsWith </operation >
<value >Test </value >
669
Metadata Types SharingRules
</criteriaItems >
<description >my account criteria rule description </description >
<label >AccountCriteriaShareWithCEO </label >
<sharedTo >
<role >CEO </role >
</sharedTo >
</sharingCriteriaRules >
</SharingRules >
The following sample XML definition represents an ownership-based sharing rule in API version 33.0.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SharingRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<sharingOwnerRules >
<fullName >MyCase </fullName >
<accessLevel >Edit </accessLevel >
<description >my case test owner sharing rule desc </description >
<label >MyCase </label >
<sharedFrom >
<role >COO </role >
</sharedFrom >
<sharedTo >
<role >CEO </role >
</sharedTo >
</sharingOwnerRules >
</SharingRules >
The following sample XML definition represents a territory-based sharing rule in API version 33.0.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SharingRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<sharingTerritoryRules >
<fullName >MyAccountTerritoryRule </fullName >
<accessLevel >Read </accessLevel >
<accountSettings >
<caseAccessLevel >None </caseAccessLevel >
<contactAccessLevel >Read </contactAccessLevel >
<opportunityAccessLevel >None </opportunityAccessLevel >
</accountSettings >
<description >MyAccountTerritoryRule desc </description >
<label >MyAccountTerritoryRule </label >
<sharedFrom >
<territory >My_territory </territory >
</sharedFrom >
<sharedTo >
<role >CEO </role >
</sharedTo >
</sharingTerritoryRules >
</SharingRules >
The following is the definition of two account owner-based sharing rules in API version 32.0 and earlier. The file name corresponds to
Account.sharingRules
under the accountSharingRules
directory. In this definition, ownerRules corresponds to
<?xml
version= "1.0" encoding= "UTF-8"?>
<AccountSharingRules xmlns= "http://soap.sforce.com/2006/04/metadata">
670
Metadata Types SharingRules
<ownerRules >
<fullName >G1Dev_G2New </fullName >
<sharedFrom >
<group >G1Dev </group >
</sharedFrom >
<sharedTo >
<group >G2New </group >
</sharedTo >
<accountAccessLevel >Read </caseAccessLevel >
<caseAccessLevel >None </caseAccessLevel >
<contactAccessLevel >Read </contactAccessLevel >
<name >G1Dev_G2New </name >
<opportunityAccessLevel >Edit </opportunityAccessLevel >
</ownerRules >
<ownerRules >
<fullName >G2New_R1New </fullName >
<sharedFrom >
<group >G2New </group >
</sharedFrom >
<sharedTo >
<roleAndSubordinates >R1New </roleAndSubordinates >
</sharedTo >
<accountAccessLevel >Edit </accountAccessLevel >
<caseAccessLevel >Read </caseAccessLevel >
<contactAccessLevel >Edit </contactAccessLevel >
<name >G2New_R1New </name >
<opportunityAccessLevel >None </opportunityAccessLevel >
</ownerRules >
</AccountSharingRules >
The following is the definition of a user criteria-based sharing rule and a user membership-based sharing rule in API version 32.0 and earlier. The file name corresponds to
User.sharingRules
under the userSharingRules
directory.
<?xml
version= "1.0" encoding= "UTF-8"?>
<UserSharingRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<criteriaBasedRules >
<fullName >shareUsers2 </fullName >
<sharedTo >
<group >Asia_Division </group >
</sharedTo >
<criteriaItems >
<field >FirstName </field >
<operation >equals </operation >
<value >John </value >
</criteriaItems >
<name >shareUsers2 </name >
<userAccessLevel >Read </userAccessLevel >
</criteriaBasedRules >
<membershipRules >
<fullName >shareUsers1 </fullName >
<sharedTo >
<group >South_America_Division </group >
</sharedTo >
<sharedFrom >
<group >Asia_Division </group >
671
Metadata Types BaseSharingRule
</sharedFrom >
<name >shareUsers1 </name >
<userAccessLevel >Read </userAccessLevel >
</membershipRules >
</UserSharingRules >
The following shows a sample package.xml
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >ObjA__c.* </members >
<name >SharingCriteriaRule </name >
</types >
<types >
<members >ObjA__c.* </members >
<name >SharingOwnerRule </name >
</types >
<version >41.0
</version >
</Package >
BaseSharingRule
instead.
inherits its fullName
field.
Note:
You can’t create a BaseSharingRule component directly. Use the components under the
or
metadata types instead.
Version
BaseSharingRule components are available in API version 24.0 and later.
Fields
For more information on these fields, see “Sharing Settings” in the Salesforce online help.
Field
sharedTo fullName
Field Type
string
Description
Required. Specifies who the record should be shared with.
The unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
672
Metadata Types CriteriaBasedSharingRule
CriteriaBasedSharingRule
Represents a criteria-based sharing rule. CriteriaBasedSharingRule enables you to share records based on specific criteria. It extends the
BaseSharingRule metadata type and inherits its
sharedTo
field. For more information, see “Criteria-Based Sharing Rules Overview” in the Salesforce online help.
Note:
You can’t create a CrteriaBasedSharingRule component directly. Use the child components instead.
Declarative Metadata File Suffix and Directory Location
CriteriaBasedSharingRule components are stored within the
SharingRules
component in the criteriaBasedRules
field.
Version
CriteriaBasedSharingRule components are available in API version 24.0 and later.
Fields
The following information assumes that you are familiar with implementing sharing rules for standard objects and custom objects. For more information on these fields, see “Sharing Settings” in the Salesforce online help.
Field
criteriaItems
Field Type
Description
List that represents the criteria for the sharing rule. The possible values are:
•
field
•
operation
•
value
AccountCriteriaBasedSharingRule
Represents a criteria-based sharing rule for accounts. It extends the CriteriaBasedSharingRule
metadata type and inherits its criteriaItems
field.
AccountCriteriaBasedSharingRule is used by the criteriaBasedRules
field in
.
Field
accountAccessLevel booleanFilter
Field Type Description
ShareAccessLevelNoNone
of type string)
Required. A value that represents the level of access that the user or group has to the account. The possible values are:
•
Read
•
Edit
•
All string Represents the filter logic of the sharing rule.
673
Metadata Types CriteriaBasedSharingRule
Field
caseAccessLevel
Field Type Description
ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that the user or group has to cases associated with the account. The possible values are:
•
None
•
Read
•
Edit contactAccessLevel description
ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that the user or group has to contacts associated with the account. The possible values are:
•
None
•
Read
•
Edit string Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
name string Required. Name for the sharing rule. Corresponds to Label in the user interface.
opportunityAccessLevel ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that a target group is granted for any associated opportunity. The possible values are:
•
None
•
Read
•
Edit
CampaignCriteriaBasedSharingRule
Represents a criteria-based sharing rule for campaigns. It extends the
metadata type and inherits its criteriaItems
field.
CampaignCriteriaBasedSharingRule is used by the criteriaBasedRules
.
Field
booleanFilter description
Field Type
string string
Description
Represents the filter logic of the sharing rule.
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
674
Metadata Types CriteriaBasedSharingRule
Field
campaignAccessLevel name
Field Type Description
ShareAccessLevelNoNone
of type string)
Required. A value that represents the level of access that a target group is granted for a campaign. The possible values are:
•
Read
•
Edit
•
All string Required. Name for the sharing rule. Corresponds to Label in the user interface.
CaseCriteriaBasedSharingRule
Represents a criteria-based sharing rule for cases. It extends the
metadata type and inherits its criteriaItems
field.
CaseCriteriaBasedSharingRule is used by the criteriaBasedRules
.
Field
booleanFilter description caseAccessLevel name
Field Type
string string
Description
Represents the filter logic of the sharing rule.
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of access being granted for a case. The possible values are:
•
Read
•
Edit string Required. Name for the sharing rule. Corresponds to Label in the user interface.
ContactCriteriaBasedSharingRule
Represents a criteria-based sharing rule for contacts. It extends the CriteriaBasedSharingRule
metadata type and inherits its criteriaItems
field.
ContactCriteriaBasedSharingRule is used by the criteriaBasedRules
field in
Field
booleanFilter description
Field Type
string string
Description
Represents the filter logic of the sharing rule.
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
675
Metadata Types CriteriaBasedSharingRule
Field
contactAccessLevel name
Field Type Description
ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of access being granted to the target group, role, or user for a contact. The possible values are:
•
Read
•
Edit string Required. Name for the sharing rule. Corresponds to Label in the user interface.
LeadCriteriaBasedSharingRule
criteriaItems field.
LeadCriteriaBasedSharingRule is used by the criteriaBasedRules
Field
booleanFilter description leadAccessLevel name
Field Type
string string
Description
Represents the filter logic of the sharing rule.
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of allowed access.
The possible values are:
•
Read
•
Edit string Required. Name for the sharing rule. Corresponds to Label in the user interface.
OpportunityCriteriaBasedSharingRule
Represents a criteria-based sharing rule for opportunities. It extends the
metadata type and inherits its criteriaItems
field.
OpportunityCriteriaBasedSharingRule is used by the criteriaBasedRules
field in
.
Field
booleanFilter description
Field Type
string string
Description
Represents the filter logic of the sharing rule.
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
676
Metadata Types CriteriaBasedSharingRule
Field Field Type Description
opportunityAccessLevel ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of allowed access.
The possible values are:
•
Read
•
Edit name string Required. Name for the sharing rule. Corresponds to Label in the user interface.
CustomObjectCriteriaBasedSharingRule
criteriaItems
field.
CustomObjectCriteriaBasedSharingRule is used by the criteriaBasedRules
field in
Field
accessLevel
Field Type
string booleanFilter description name string string string
Description
Required. A value that represents the type of allowed sharing.
The possible values are:
•
Read
•
Edit
•
All
Represents the filter logic of the sharing rule.
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
Required. Name for the sharing rule. Corresponds to Label in the user interface.
UserCriteriaBasedSharingRule
criteriaItems field.
UserCriteriaBasedSharingRule is used by the criteriaBasedRules
Field
booleanFilter description
Field Type
string string
Description
Represents the filter logic of the sharing rule.
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
677
Metadata Types
Field
name userAccessLevel
CriteriaBasedSharingRule
Field Type
string
Description
Required. Name for the sharing rule. Corresponds to Label in the user interface.
ShareAccessLevelReadEdit
(
Required. A value that represents the type of allowed sharing.
The possible values are:
•
Read
•
Edit
Declarative Metadata Sample Definition
The following is the definition of two owner-based sharing rules and one criteria-based sharing rule containing two criteria items. The file name corresponds to the Account.sharingRules file under the accountSharingRules directory.
<?xml
version= "1.0" encoding= "UTF-8"?>
<AccountSharingRules xmlns= "http://soap.sforce.com/2006/04/metadata">
<ownerRules >
<fullName >G1Dev_G2New </fullName >
<sharedTo >
<group >G2New </group >
</sharedTo >
<sharedFrom >
<group >G1Dev </group >
</sharedFrom >
<accountAccessLevel >Read </accountAccessLevel >
<caseAccessLevel >None </caseAccessLevel >
<contactAccessLevel >Read </contactAccessLevel >
</ownerRules >
<fullName >G2New_R1New </fullName >
<sharedTo >
<roleAndSubordinates >R1New </roleAndSubordinates >
</sharedTo >
<sharedFrom >
<group >G2New </group >
</sharedFrom >
<accountAccessLevel >Edit </accountAccessLevel >
<caseAccessLevel >Read </caseAccessLevel >
<contactAccessLevel >Edit </contactAccessLevel >
<name >G2New_R1New </name >
<opportunityAccessLevel >None </opportunityAccessLevel >
</ownerRules >
<criteriaBasedRules >
<fullName >AccountCriteria </fullName >
<sharedTo >
<group >G1 </group >
</sharedTo >
<criteriaItems >
<field >BillingCity </field >
<operation >equals </operation >
<value >San Francisco </value >
</criteriaItems >
678
Metadata Types OwnerSharingRule
<criteriaItems >
<field >MyChkBox__c </field >
<operation >notEqual </operation >
<value >False </value >
</criteriaItems >
<accountAccessLevel >Read </accountAccessLevel >
<booleanFilter >1 OR 2 </booleanFilter >
<caseAccessLevel >None </caseAccessLevel >
<contactAccessLevel >Read </contactAccessLevel >
<name >AccountCriteria </name >
<opportunityAccessLevel >None </opportunityAccessLevel >
</criteriaBasedRules >
</AccountSharingRules >
OwnerSharingRule
This component is removed as of API version 33.0 and is available in earlier versions only.
Represents an ownership-based sharing rule. OwnerSharingRule enables you to share records owned by a set of users with another set,
using rules that specify the access level of the target user group. It extends the BaseSharingRule
metadata type and inherits its SharedTo field. For more information, see “Sharing Rules” in the Salesforce online help.
Note: You can’t create a OwnerSharingRule component directly. Use the child components instead.
Declarative Metadata File Suffix and Directory Location
OwnerSharingRules components are stored within the
SharingRules
component in the ownerRules
field.
Version
OwnerSharingRules components are available in API version 24.0 and later.
Fields
The following information assumes that you are familiar with implementing sharing rules for standard objects and custom objects. For more information on these fields, see “Sharing Settings” in the Salesforce online help.
Field
sharedFrom sharedTo fullName
Field Type
string
Description
Required. Specifies the record owners.
Required. Specifies who the record should be shared with.
The unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
679
Metadata Types OwnerSharingRule
AccountOwnerSharingRule
Represents a sharing rule for an account with users other than the owner. It extends the
OwnerSharingRule metadata type and inherits
its fullName
, sharedFrom
, and sharedTo
fields.
AccountOwnerSharingRule is used by the ownerRules
field in AccountSharingRules .
Field
accountAccessLevel caseAccessLevel contactAccessLevel
Field Type Description
ShareAccessLevelNoNone
of type string)
Required. A value that represents the level of access that a group or role has to the account. The possible values are:
•
Read
•
Edit
•
All
ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that a group or role has to cases associated with the account. The possible values are:
•
None
•
Read
•
Edit
ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that a group or role has to contacts associated with the account. The possible values are:
•
None
•
Read
•
Edit description string Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
name string Required. Name for the sharing rule. Corresponds to Label in the user interface.
opportunityAccessLevel ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that a group or role is granted for any associated opportunity. The possible values are:
•
None
•
Read
•
Edit
CampaignOwnerSharingRule
its fullName
, sharedFrom
, and sharedTo
fields.
680
Metadata Types OwnerSharingRule
CampaignOwnerSharingRule is used by the ownerRules
field in
Field
campaignAccessLevel description name
Field Type Description
ShareAccessLevelNoNone
of type string)
A value that represents the level of access that a group or role is granted for a campaign. The possible values are:
•
Read
•
Edit
•
All string string
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
Name for the sharing rule. Corresponds to Label in the user interface.
CaseOwnerSharingRule
metadata type and inherits its fullName
, sharedFrom
, and sharedTo
fields.
CaseOwnerSharingRule is used by the ownerRules
field in
CaseSharingRules . All the following fields are required.
Field
caseAccessLevel description name
Field Type Description
ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of access that a group or role is granted for a case. The possible values are:
•
Read
•
Edit string string
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
Required. Name for the sharing rule. Corresponds to Label in the user interface.
ContactOwnerSharingRule
its fullName
, sharedFrom
, and sharedTo
fields.
ContactOwnerSharingRule is used by the ownerRules
.
681
Metadata Types OwnerSharingRule
Field
contactAccessLevel description name
Field Type Description
ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of access that a group or role is granted for a contact. The possible values are:
•
Read
•
Edit string string
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
Required. Name for the sharing rule. Corresponds to Label in the user interface.
LeadOwnerSharingRule
fullName
, sharedFrom
, and sharedTo
fields.
LeadOwnerSharingRule is used by the ownerRules
field in
Field
leadAccessLevel description name
Field Type Description
ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of access that a group or role is granted for a lead. The possible values are:
•
Read
•
Edit string string
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
Required. Required. Name for the sharing rule. Corresponds to
Label in the user interface.
OpportunityOwnerSharingRule
Represents a sharing rule for an opportunity with users other than the owner. It extends the
OwnerSharingRule metadata type and
inherits its fullName
, sharedFrom
, and sharedTo
fields.
OpportunityOwnerSharingRule is used by the ownerRules
field in
.
Field
name
Field Type
string
Description
Required. Name for the sharing rule. Corresponds to Label in the user interface.
682
Metadata Types OwnerSharingRule
Field
description
Field Type
string
Description
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
opportunityAccessLevel ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of access that a group or role is granted for an opportunity. The possible values are:
•
Read
•
Edit
AccountTerritorySharingRule
Represents a rule for sharing an account within a territory. It extends the
metadata type and inherits its fullName
, sharedFrom
, and sharedTo
fields.
AccountTerritorySharingRule is used by the ownerRules
field in AccountTerritorySharingRules .
Field
accountAccessLevel caseAccessLevel contactAccessLevel description
Field Type Description
ShareAccessLevelNoNone
of type string)
Required. A value that represents the level of access that a
Territory or TerritoryAndSubordinates group is granted for an account territory. The possible values are:
•
Read
•
Edit
•
All
ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that a
Territory or TerritoryAndSubordinates group is granted for all child cases to an account. The possible values are:
•
None
•
Read
•
Edit
ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that a
Territory or TerritoryAndSubordinates group is granted for all related contacts on an account. The possible values are:
•
None
•
Read
•
Edit string Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
683
Metadata Types OwnerSharingRule
Field
name
Field Type
string
Description
Required. Name for the sharing rule. Corresponds to Label in the user interface.
opportunityAccessLevel ShareAccessLevelNoAll
of type string)
Required. A value that represents the level of access that a
Territory or TerritoryAndSubordinates group is granted for all opportunities associated with an account. The possible values are:
•
None
•
Read
•
Edit
CustomObjectOwnerSharingRule
Represents a sharing rule for custom objects. It extends the OwnerSharingRule
metadata type and inherits its fullName
, sharedFrom
, and sharedTo
fields.
CustomObjectOwnerSharingRule is used by the ownerRules
field in CustomObjectSharingRules
.
Field
accessLevel
Field Type
string description name string string
Description
Required. A value that represents the level of access that a group or role is granted to a custom object. The possible values are:
•
Read
•
Edit
•
All
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
Required. Name for the sharing rule. Corresponds to Label in the user interface.
UserMembershipSharingRule
Represents a sharing rule to share members of a group with another group of users. It extends the
OwnerSharingRule metadata type
and inherits its fullName
, sharedFrom
, and sharedTo
fields.
UserMembershipSharingRule is used by the ownerRules
on page 669.
Field
description
Field Type
string
Description
Represents the description of the sharing rule. Maximum of 1000 characters.
This field is available in API version 29.0 and later.
684
Metadata Types
Field
name userAccessLevel
SharingSet
Field Type
string
Description
Required. Name for the sharing rule. Corresponds to Label in the user interface.
ShareAccessLevelReadEdit
of type string)
Required. A value that represents the level of access that a group or role is granted for a user. The possible values are:
•
Read
•
Edit
SharingSet
Represents a sharing set. A sharing set defines an access mapping that grants portal or community users access to objects that are associated with their accounts or contacts. This type extends the
metadata type and inherits its fullName
field.
For example, you can grant portal or community users access to all cases related to their account record. Similarly, you can grant portal or community users access to all cases related to a parent account that is identified on the user’s account record. For more information, see “Sharing Set Overview” in the Salesforce Help.
File Suffix and Directory Location
SharingSet components have the suffix
.sharingSet
and are stored in the sharingSets
folder.
Version
SharingSet components are available in API version 30.0 and later.
Fields
Field Name
accessMappings description name profiles
Field Type
[] string string string[]
Description
A list of access mappings on a sharing set.
The sharing set description. Limit: 255 characters.
Required. The unique identifier for API access. Corresponds to Sharing
Set Name on the user interface.
The profiles of users that are granted access to the target objects. Valid values are:
•
Authenticated Website
•
Customer Community User
•
Customer Community Login User
•
High Volume Customer Portal User
•
Overage Authenticated Website User
•
Overage High Volume Customer Portal User
685
Metadata Types SharingSet
AccessMapping
AccessMapping represents an access mapping in the sharing set, which grants access to a target object by looking up to an account or contact associated with the user.
You can grant portal users access to a target object, or to both a target object and its associated objects, such as an account and its contacts and cases.
Field Name
accessLevel
Field Type
string objectField object userField string string string
Description
The target object access level granted to the portal user. Valid values are:
•
Read
•
Edit
A lookup to the target object, which supports standard or custom fields, or an
Id. For accounts or cases associated with entitlements, use
Entitlement.Account
or
Entitlement.Case
.
The target object to which the portal user is gaining access, and refers to one of the following:
•
Account
•
Contact
•
Case
•
ServiceContract
•
User
•
Custom Objects (e.g.
ObjA__c
)
Portal users gain access to all order entitlements and order items under an account to which they have access.
The user’s lookup to an account, contact, or a standard or custom field derived from an account or contact. Either the user or the user’s manager can be used in the lookup. Valid values are:
•
Account
•
Account.Field
•
Contact
•
Contact.Field
•
Manager.Account
•
Manager.Contact
Field
refers to a standard or custom field based on an account or contact.
686
Metadata Types SharingSet
Declarative Metadata Sample Definition
The following is an example of a SharingSet component that grants users access to all contacts whose
ReportsTo
fields match the users’ contacts.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SharingSet xmlns= "http://soap.sforce.com/2006/04/metadata">
<accessMappings >
<accessLevel >Read </accessLevel >
<objectField >ReportsTo </objectField >
<object >Contact </object >
<userField >Contact </userField >
</accessMappings >
<description >User Access Mapping </description >
<name >User </name >
<profiles >customer community user </profiles >
</SharingSet >
The following is an example of a SharingSet component that grants users access to all cases that are related to an entitlement, which is associated with the user’s account.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SharingSet xmlns= "http://soap.sforce.com/2006/04/metadata">
<name >Case </name >
<accessMappings >
<accessLevel >Edit </accessLevel >
<objectField >Entitlement.Account
</objectField >
<object >Case </object >
<userField >Account </userField >
</accessMappings >
</SharingSet >
The following is an example of a SharingSet component with a list of access mappings.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SharingSet xmlns= "http://soap.sforce.com/2006/04/metadata">
<description >This is a basic sharing set with several access mappings.
</description >
<name >Basic </name >
<profiles >customer community user </profiles >
<accessMappings >
<accessLevel >Read </accessLevel >
<objectField >Id </objectField >
<object >Account </object >
<userField >Account </userField >
</accessMappings >
<accessMappings >
<accessLevel >Edit </accessLevel >
<objectField >Account </objectField >
<object >Contact </object >
<userField >Account </userField >
</accessMappings >
<accessMappings >
<accessLevel >Edit </accessLevel >
<objectField >Contact </objectField >
<object >Case </object >
687
Metadata Types SiteDotCom
<userField >Contact </userField >
</accessMappings >
<accessMappings >
<accessLevel >Read </accessLevel >
<objectField >AccountLookup__c </objectField >
<object >HVPUAccessible__c </object >
<userField >Account </userField >
</accessMappings >
</SharingSet >
The following is an example package.xml
that references the previous definition.
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<fullName >SharingSetBasic </fullName >
<types >
<members >HVPUAccessible__c.AccountLookup__c
</members >
<members >HVPUAccessible__c.ContactLookup__c
</members >
<name >CustomField </name >
</types >
<types >
<members >HVPUAccessible__c </members >
<name >CustomObject </name >
</types >
<types >
<members >Basic </members >
<name >SharingSet </name >
</types >
<version >30.0
</version >
</Package >
SiteDotCom
Represents a site for deployment. It extends the MetadataWithContent type and inherits its
fullName
and content
fields.
Declarative Metadata File Suffix and Directory Location
SiteDotCom components are stored in the siteDotComSites
directory of the corresponding package directory. The file name for the metadata
.xml
file is
[sitename].site-meta.xml
. The file name for the site file is
[sitename].site
Note: There is a file size limitation when using the Metadata API to deploy a site from sandbox to production. The assets in the
.site
file can’t be larger than 40 MB. The site gets created, but the assets show in the new site as broken. To fix the assets, export the assets from the sandbox environment separately and then import them into your new site.
Version
SiteDotCom
components are available in API version 30.0 and later.
688
Metadata Types
Fields
Field
label siteType
Field Type
string
(
string)
Description
The name of the site you are deploying.
Required. Identifies whether the site is a
ChatterNetworkPicasso
site for Salesforce
Communities sites, or a
Siteforce
site for
Site.com sites.
Declarative Metadata Sample Definition
Sample XML definitions for SiteDotCom are shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<SiteDotCom xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >testsite </label >
<siteType >Siteforce </siteType >
</SiteDotCom >
<?xml
version= "1.0" encoding= "UTF-8"?>
<SiteDotCom xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >testCommunity </label >
<siteType >ChatterNetworkPicasso </siteType >
</SiteDotCom >
Skill
Represents the settings for a skill used for field service or to route chats to agents in Live Agent, such as the name of the skill and which
agents the skills are assigned to. This type extends the Metadata
metadata type and inherits its fullName
field.
File Suffix and Directory Location
Skill values are stored in the
<developer_name>.skill
file in the skills
directory.
Version
Skill is available in API version 28.0 and later.
Fields
Field Name
assignments
Field Type
Description
Specifies how skills are assigned to Live Agent users. Skills can be assigned to sets of users or sets of profiles.
Skill
689
Metadata Types
Field Name
description label
Field Type
string string
Description
Specifies the description of the skill. This field is available in
API version 38.0 and later.
Specifies the name of the skill.
SkillAssignments
Represents which users and user profiles to whom specific skills are assigned.
Fields
Field Name
profiles users
Field Type
Description
Specifies the profiles that are associated with a specific skill.
Specifies the users that are associated with a specific skill.
SkillProfileAssignments
Represents the profiles that are associated with a specific skill.
Fields
Field Name
profile
Field Type
string
Description
Specifies the custom name of the profile associated with a specific skill.
Skill
SkillUserAssignments
Represents the users that are associated with a specific skill.
Fields
Field Name
user
Field Type
string
Description
Specifies the username of the user associated with a specific skill.
690
Metadata Types StandardValueSet
Declarative Metadata Sample Definition
This is a sample of a skill
file.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Skill xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >My Skill 1 </label >
<assignments >
<profiles >
<profile >LiveAgentOperator </profile >
<profile >LiveAgentSupervisor </profile >
</profiles >
<users >
<user >[email protected]
</user >
</users >
</assignments >
</Skill >
StandardValueSet
fullName
field.
File Suffix and Directory Location
StandardValueSet components have the suffix
.standardValueSet
and are stored in the standardValueSets
folder.
Version
StandardValueSet components are available in API version 38.0 and later.
Note: StandardValueSet isn’t available in Tooling API. Picklist elements in Tooling API are represented as in API version 37.0.
Fields
Field Name
sorted standardValue
Field Type
boolean
Description
Required. Indicates whether a global value set is sorted in alphabetical order. By default, this value is false
.
Defines each value in a standard picklist’s value set.
Note: When setting standardValue
on Record Types, including person account record types, new picklist values loaded into your organization through the Metadata API do not display in the picklist UI by default. For users to see the new values, go to the Record Types list for the object containing the picklist field, click Edit and add the new value to the Selected Fields list.
691
Metadata Types StandardValueSetTranslation
Declarative Metadata Sample Definition
The following example shows a StandardValueSet component that’s defined as the Stage standard picklist on a customized opportunity object.
<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
<fullName>OpportunityStage</fullName> <!-- Enum name -->
<standardValue>
<fullName>Closed Abandoned</fullName>
</standardValue>
<standardValue>
<fullName>Closed Won</fullName>
</standardValue>
<standardValue>
<fullName>Closed Lost</fullName>
</standardValue>
</StandardValueSet>
<CustomObject>
<fullName>Opportunity</fullName>
<fields>
<fullName>StageName</fullName> <!-- field name -->
<label>Stage</label>
<type>Picklist</type>
</fields>
<label>ObjectWithValueSet</label>
<pluralLabel>ObjectWithValueSet</pluralLabel>
<sharingModel>ReadWrite</sharingModel>
</CustomObject>
StandardValueSetTranslation
Contains details for a standard picklist translation. It returns a translated standard value set.This type extends the
type and inherits its fullName
field.
File Suffix and Directory Location
StandardValueSetTranslation components have the suffix
.standardValueSetTranslation
and are stored in the standardValueSetTranslations
folder.
Translations are stored in a file with a format of
ValueSetName-lang.standardValueSetTranslation
, where
ValueSetName
is the global value set’s name, and lang is the translation language.
Version
StandardValueSetTranslation components are available in API version 38.0 and later.
692
Metadata Types
Fields
Field
valueTranslation
StaticResource
Field Type
Description
A list of values from global value sets to be translated.
Declarative Metadata Sample Definition
The following is an example of a StandardValueSetTranslation component. When a value isn’t translated, its translation becomes a comment that’s paired with its masterLabel.
<?xml
version= "1.0" encoding= "UTF-8"?>
<StandardValueSetTranslation xmlns= "http://soap.sforce.com/2006/04/metadata">
<valueTranslation >
<masterLabel >Cold </masterLabel >
<translation ><!-- Cold --> </translation >
</valueTranslation >
<valueTranslation >
<masterLabel >Hot </masterLabel >
<translation ><!-- Hot --> </translation >
</valueTranslation >
<valueTranslation >
<masterLabel >Warm </masterLabel >
<translation ><!-- Warm --> </translation >
</valueTranslation >
</StandardValueSetTranslation >
The following is an example package.xml
that references the StandardValueSetTranslation definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >AccountRating-fr </members >
<name >StandardValueSetTranslation </name >
</types >
<version >38.0
</version >
</Package >
SEE ALSO:
StaticResource
metadata type and inherits its content
and fullName
fields.
Static resources allow you to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, style sheets, JavaScript, and other files.
693
Metadata Types StaticResource
File Suffix and Directory Location
The file suffix is
.resource
for the template file. The accompanying metadata file is named
resource-meta.xml
.
Static resource components are stored in the staticresources
folder in the corresponding package directory.
Version
Static resources are available in API version 12.0 and later.
Fields
This metadata type contains the following fields:
Field Name Field Type
cacheControl
StaticResourceCacheControl
content base64Binary contentType string description string fullName string
Description
Required. Indicates whether the static resource is marked with a public caching tag so that a third-party delivery client can cache the content. This is a new field in API version 14.0. The valid values are:
•
Private
•
Public
The static resource content. Base 64-encoded binary data. Prior to making an
API call, client applications must encode the binary attachment data as base64.
Upon receiving a response, client applications must decode the base64 data to binary. This conversion is usually handled for you by a SOAP client. This field is inherited from the
component.
Required. The content type of the file, for example text/plain.
The description of the static resource.
The static resource name. The name can only contain characters, letters, and the underscore (_) character, must start with a letter, and cannot end with an underscore or contain two consecutive underscore characters.
Inherited from the Metadata component, this field is not defined in the WSDL
for this component. It must be specified when creating, updating, or deleting.
to see an example of this field specified for a call.
Declarative Metadata Sample Definition
<?xml
version= "1.0" encoding= "UTF-8"?>
<StaticResource xmlns= "http://soap.sforce.com/2006/04/metadata">
<contentType >text/plain </contentType >
<description >Test Resource </description >
</StaticResource >
694
Metadata Types SynonymDictionary
SynonymDictionary
Represents a set of synonym groups, which are groups of words or phrases that are treated as equivalent in users’ searches. You can define synonym groups to optimize search results for acronyms, variations of product names, and other terminology unique to your organization.
metadata type and inherits its fullName
field.
File Suffix and Directory Location
SynonymDictionary components have the suffix
.synonymDictionary
and are stored in the synonymDictionaries
folder.
Version
SynonymDictionary components are available in API version 29.0 and later.
Special Access Rules
Synonyms must be enabled in your organization. Only users with the “Manage Synonyms” permission can access this object.
Fields
Field Name
groups isProtected label
Field Type
boolean string
Description
The synonym groups defined in this dictionary.
Indicates whether this component is protected ( true
) or not ( false
).
Protected components cannot be linked to or referenced by components created in the installing organization.
Required. Specifies the display name of the synonym dictionary.
SynonymGroup
Represents a group of synonymous words or phrases.
Field Name
languages
Field Type
Language
Description
Required. Specifies the languages the synonym group applies to. If synonyms are specific to a single language, specify only that language. If the synonyms apply to multiple languages, specify multiple languages for one synonym group.
695
Metadata Types
Field Name
terms
Field Type
string
SynonymDictionary
Description
Required. A word or phrase synonymous with other terms in the group.
Maximum of 50 characters. Minimum of two terms
per group.
Synonym groups are symmetric, which means that if oranges and apples are defined in a synonym group, a search for
oranges
will return a match for
apples
, and vice versa for a search for
apples
.
Declarative Metadata Sample Definition
The following is an example of a SynonymDictionary component:
<?xml
version= "1.0" encoding= "UTF-8"?>
<SynonymDictionary xmlns= "http://soap.sforce.com/2006/04/metadata">
<groups >
<languages >en_US </languages >
<terms >Salesforce </terms >
<terms >salesforce.com
</terms >
<terms >The Customer Company </terms >
<terms >SFDC </terms >
</groups >
<groups >
<languages >fr </languages >
<terms >renault </terms >
<terms >clio </terms >
</groups >
<label >Sample Dictionary </label >
</SynonymDictionary >
The following is an example package.xml
that references the SynonymDictionary component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >Sample Dictionary </members >
<name >SynonymDictionary </name >
</types >
<version >41.0
</version >
</Package >
Usage
If you have existing synonym groups defined before API version 29.0, your existing groups are associated with a default dictionary called
_Default
.
If you have a set of synonyms that require frequent updates, we recommend assigning the synonym group or groups to a dedicated dictionary with a small number of groups. Each time you deploy an existing dictionary, all of its synonym groups are overwritten. We don’t support deploying updates to only a single synonym group within a dictionary.
696
Metadata Types
Territory
Represents a territory in your organization.
Declarative Metadata File Suffix and Directory Location
The file suffix for territory components is
.territory
and components are stored in the territories
directory of the corresponding package directory.
Version
Territory components are available in API version 24.0 and later.
Fields
This metadata type extends to subtype RoleOrTerritory .
Field Name
accountAccessLevel
Field Type
string fullName parentTerritory string string
Description
Specifies whether users in this territory can access accounts that are assigned to this territory and are otherwise inaccessible. Valid values are:
•
Read
•
Edit
•
All
If your organization’s sharing model for accounts is Public Read/Write, valid values are only
Edit
and
All
.
If no value is set for this field, this field value uses the default access level that is specified in the Manage Territory page in Setup.
This field is available in API version 31.0 and later.
The unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain
two consecutive underscores. This field is inherited from the Metadata
component. Corresponds to Territory Name in the user interface.
The territory above this territory in the territory hierarchy.
Territory
Declarative Metadata Sample Definition
The following is the definition of a territory.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Territory xmlns= "http://soap.sforce.com/2006/04/metadata">
<accountAccessLevel >Edit </accountAccessLevel >
<caseAccessLevel >Edit </caseAccessLevel >
697
Metadata Types Territory2
<contactAccessLevel >Edit </contactAccessLevel >
<description >Sample Territory </description >
<mayForecastManagerShare >false </mayForecastManagerShare >
<name >T22name </name >
<opportunityAccessLevel >Read </opportunityAccessLevel >
</Territory >
Territory2
metadata type and inherits its fullName
field.Available only if Territory Management 2.0 has been enabled for your organization.
File Suffix and Directory Location
Territory2 components have the suffix territory2
and are stored in the territories
folder under the folder for the corresponding
Territory2Model.
Version
Territory2 components are available in API version 32.0 and later.
Special Access Rules
The Territory2Model object has a
State
field in the SOAP API. States include
Planning
,
Active
,
Archived
, and a number of other states, such as
Cloning
, that indicate that a process is underway. Users who do not have the “Manage Territories” permission can access only territories that belong to the model in
Active
state. The “Manage Territories” permission is required for deploy() calls for all territory management entities, in addition to the “Modify All Data” permission required by Metadata API. Using retrieve() without the “Manage Territories” permission will return only entities that belong to a Territory2Model in
Active
state. We recommend against retrieving without the “Manage Territories” permission because the call will retrieve only partial data.
Fields
Field Name
accountAccessLevel
Field Type
string
Description
Specifies whether users in this territory can access accounts that are assigned to this territory and are otherwise inaccessible. Valid values are:
•
Read
•
Edit
•
All
If your organization’s sharing model for accounts is Public Read/Write, valid values are only
Edit
and
All
. If no value is set for this field, this field value uses the default access level that is specified in
Territory2Settings as permitted by the organization’s sharing settings.
698
Metadata Types
Field Name
caseAccessLevel contactAccessLevel customFields description name opportunityAccessLevel
Field Type
string string
string string string
Description
Specifies whether users in this territory can access cases that are assigned to this territory and are otherwise inaccessible. Valid values are:
•
None
•
Read
•
Edit
No value should be specified if your organization’s sharing model for cases/opportunities is Public Read/Write,If no value is set for this field, this field value uses the default access level that is specified in
Territory2Settings as permitted by the organization’s sharing settings.
Specifies whether users in this territory can access contacts that are assigned to this territory and are otherwise inaccessible. Valid values are:
•
None
•
Read
•
Edit
No value should be specified if your organization’s sharing model for contacts is Public Read/Write or Controlled By Parent,
Values for custom fields defined on the Territory2 object and used by this territory. Their metadata is captured separately in
on page 241. Note the following:
•
Territory2 and Territory2Model objects do not handle values for
Text Area (Long), Text Area (Rich), and text-encrypted custom fields.
•
Fields are referenced using their API names. Compound field types like Geolocation will appear as their constituent column fields. For example, nnn_Latitude__s
, nnn_Longitude__s
where
“nnn” is the field name and the suffixes are the Geolocation components.
•
Values of required custom fields are enforced during the deploy()
operation.
A description of the territory.
Required. The user interface label for the territory.
Specifies whether users in this territory can access opportunities that are assigned to this territory and are otherwise inaccessible. Valid values are:
•
None
•
Read
•
Edit
No value should be specified if your organization’s sharing model for cases/opportunities is Public Read/Write,If no value is set for this field,
699
Territory2
Metadata Types Territory2
Field Name
parentTerritory ruleAssociations territory2Type
Field Type Description
this field value uses the default access level that is specified in
Territory2Settings as permitted by the organization’s sharing settings.
string The name of the territory’s parent. When you specify the parent territory, use the developer name. Do not use the “fully qualified” name. Custom fields with no values are retrieved with values of type:
<value xsi:nil="true"/>
. You can also use
<value xsi:nil="true"/>
syntax to remove existing values in custom fields.
Represents an object assignment rule and its association to a territory.
Use the developer name of the rule.
string Required. The territory type that the territory belongs to.
FieldValue
Represents the values of custom fields on the Territory2 object. Available in API version 32.0 and later.
Field Name
name value
Field Type
string any type
Description
Required. The user interface label for the territory.
The value of the field, which can also be null
. The field type is specified in the XML and depends on the field value.
Territory2RuleAssociation
Represents the association of an object assignment rule to a territory. Available in API version 32.0 and later.
Field Name
inherited ruleName
Field Type
boolean string
Description
Required. Indicates whether the rule is inherited from a parent territory ( true
) or local to the current territory ( false
).
Rule inheritance flows from the parent territory where the rule is created to the rule’s descendent territories (if any) in the territory model hierarchy. A local rule is created within a single territory and affects that territory only.
Required. The name of a rule associated with the territory. ruleName
doesn’t need to be fully qualified because Metadata API assumes that the rule belongs to the same model as the territory.
700
Metadata Types Territory2
Declarative Metadata Sample Definition
The following example shows the definition of a Territory2 component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Territory2 xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= "http://www.w3.org/2001/XMLSchema">
<name >USA </name >
<description >United States sales </description >
<accountAccessLevel >Edit </accountAccessLevel >
<opportunityAccessLevel >Read </opportunityAccessLevel >
<caseAccessLevel >Edit </caseAccessLevel >
<contactAccessLevel >Edit </contactAccessLevel >
<parentTerritory >Worldwide_Sales </parentTerritory >
<territory2Type >Geo </territory2Type >
<ruleAssociations >
<ruleName >AccRule1 </name >
<inherited >True </inherited >
</ruleAssociations >
<ruleAssociations >
<ruleName >AccRule2 </name >
<inherited >False </inherited >
</ruleAssociations >
<customFields >
<name >Activation_DateTime__c </name >
<value xsi:type= "xsd:dateTime">2014-07-16T05:05:00.000Z
</value >
</customFields >
<customFields >
<name >AutoNumber__c </name >
<value xsi:type= "xsd:string">T# 000001 </value >
</customFields >
<customFields >
<name >DeactivationDate__c </name >
<value xsi:type= "xsd:date">2016-07-12 </value >
</customFields >
<customFields >
<name >External_Id__c </name >
<value xsi:type= "xsd:string">AB2345 </value >
</customFields >
<customFields >
<name >ManagersPhone__c </name >
<value xsi:nil= "true"/>
</customFields >
</Territory2 >
The following is a package.xml
sample.
FY13
and
FY14
represent the names of territory models and demonstrate that rules can have identical developer names within different models. A wildcard character (*) in place of the model name can be used to retrieve all rules in all models in an organization.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >FY13 </members >
701
Metadata Types Territory2Model
<members >FY14 </members >
<name >Territory2Model </name >
</types >
<types >
<members >FY13.USA
</members >
<members >FY13.Worldwide_Sales
</members >
<members >FY14.APAC
</members >
<members >FY14.USA
</members >
<name >Territory2 </name >
</types >
<version >41.0
</version >
</Package >
Usage
•
Triggers defined on Territory2 will not fire during a deploy()
operation.
•
Territory Management 2.0 components don’t support packaging or change sets and aren’t supported in
.
Territory2Model
Represents the metadata associated with a territory model in Territory Management 2.0. This type extends the
and inherits its fullName
field.Available only if Territory Management 2.0 has been enabled for your Salesforce org.
File Suffix and Directory Location
Territory2Model components have the suffix territory2Model
and are stored in the territory2Models
folder.
Version
Territory2Model components are available in API version 32.0 and later.
Special Access Rules
The Territory2Model object has a
State
field in the SOAP API. States include
Planning
,
Active
,
Archived
, and a number of other states, such as
Cloning
, that indicate that a process is underway. Users who do not have the “Manage Territories” permission can access only models in
Active
state. The “Manage Territories” permission is required for deploy()
calls for all territory management entities, in addition to the “Modify All Data” permission required by Metadata API. Using retrieve()
without the
“Manage Territories” permission will return only entities that belong to a Territory2Model in
Active
state. We recommend against retrieving without the “Manage Territories” permission because the call will retrieve only partial data.
702
Metadata Types
Fields
Field Name
customFields
Territory2Model description name
Field Type
string string
Description
Custom fields defined on the Territory2Model object and used by this model. Their metadata is captured separately.
•
Territory2 and Territory2Model objects do not handle values for Text
Area (Long), Text Area (Rich), and text-encrypted custom fields.
•
Fields are referenced using their API names. Compound field types like Geolocation will appear as their constituent column fields. For example, nnn_Latitude__s
, nnn_Longitude__s
where
“nnn” is the field name and the suffixes are the Geolocation components.
•
Values of required custom fields are enforced during the deploy()
operation.
A description for the territory model.
Required. The user interface label for the territory model..
Declarative Metadata Sample Definition
The following example shows the definition of a Territory2Model component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Territory2Model xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd= "http://www.w3.org/2001/XMLSchema">
<name >FY13 </name >
<description >Geographic allocation </description >
<customFields >
<name >Activation_DateTime__c </name >
<value xsi:type= "xsd:dateTime">2014-07-16T05:05:00.000Z
</value >
</customFields >
<customFields >
<name >AutoNumber__c </name >
<value xsi:type= "xsd:string">M# 000001 </value >
</customFields >
<customFields >
<name >DeactivationDate__c </name >
<value xsi:type= "xsd:date">2016-07-12 </value >
</customFields >
<customFields >
<name >External_Id__c </name >
<value xsi:nil= "true"/>
</customFields >
</Territory2Model >
703
Metadata Types Territory2Rule
Usage
•
The retrieve()
call will not return models in these four states:
Cloning
,
Cloning Failed
,
Deleting
, and
Deletion
Failed
.
•
Whenever a model is created, its initial state is
Planning
. You can only do a deploy()
operation for models in
Planning or
Active
state. The same requirement applies to territories and rules associated with those models. For example, you might have a model in
Planning
state on a sandbox org, and a model with the same developer name in
Archived
state on your production org. The deploy()
operation on production will fail because that model’s state is
Archived
and that state prevents changes to the model.
•
Because of the state restrictions, if you have territory models in different orgs with identical developer names and you attempt a deploy()
operation, Metadata API will attempt to create new models, but that operation will fail because of the developer name conflict. For example, you might have a model in
Planning
state on a sandbox org, and a model with the same developer name in
Archived
state on your production org. The deploy()
operation on production will fail because that model’s state is
Archived
and that state prevents changes to the model.
•
If you try to delete a model that has territories, then the delete()
call will change the model’s state to
Deleting
and cascade delete all territories, rules, and user associations in the model. Deleting may take some time depending on the number of territries in the model.
•
Whenever a model is created, its initial state is
Planning
. If a model with the same developer name already exists, it will already have a state, so we do not include the
State
field in Territory2.
•
Territory Management 2.0 components don’t support packaging or change sets and aren’t supported in
.
Territory2Rule
Represents the metadata associated with a territory assignment rule associated with an object, such as Account, in Territory Management
2.0. This type extends the Metadata
metadata type and inherits its fullName
field.Available only if Territory Management 2.0 has been enabled for your Salesforce org.
File Suffix and Directory Location
Territory2Rule components have the suffix territory2Rule
and are stored in the rules
folder under the folder for the corresponding Territory2Model.
Version
Territory2Rule components are available in API version 32.0 and later.
Special Access
The Territory2Model object has a
State
field in the SOAP API. States include
Planning
,
Active
,
Archived
, and a number of other states, such as
Cloning
, that indicate that a process is underway. Users who do not have the “Manage Territories” permission can access only rules that belong to the model in
Active
state. The “Manage Territories” permission is required for deploy()
calls for all territory management entities, in addition to the “Modify All Data” permission required by Metadata API. Using retrieve() without the “Manage Territories” permission will return only entities that belong to a Territory2Model in
Active
state. We recommend against retrieving without the “Manage Territories” permission because the call will retrieve only partial data.The SOAP API and the user interface require that a user attempting to create or edit a rules has field-level security access to the fields referenced in the rule item.
704
Metadata Types Territory2Rule
This restriction is relaxed for Metadata API deploy()
operations, as those require “Modify All Data” and “Manage Territories” permissions.
“Modify All Data” is the base permission requirement for all Metadata API operations.
Fields
Field Name
active booleanFilter name objectType ruleItems
Field Type
boolean string string string
Description
Required. Indicates whether the rule is active ( true
) or inactive
( false
). Via the API, active rules run automatically when object records are created and edited. The exception is when the value of the
IsExcludedFromRealign
field on an object record is true
, which prevents record assignment rules from evaluating that record.
An advanced filter condition. For example:
(1 AND 2) OR 3
.
Numbering must start at 1 and must be contiguous.
Required. The user interface label for the rule.
Required. The object that the rule is defined for. For API version 32.0, the only available object is Account.
on page 705
The items that define a rule’s the selection criteria, such as
Billing
State equals California
.
Territory2RuleItem
Represents the association of a rule item to a rule. Available in API version 32.0 and later.
Field Name
field operation value
Field Type
string
Description
The standard or custom object field that the rule item operates on.
string)
The criterion to apply for the rule item. For example:
equals
or
starts with
.
string The field value or values to evaluate. For example: if the field is
Billing
ZIP/Postal Code
, a value might be
94105
.
Declarative Metadata Sample Definition
The following example shows the definition of a Territory2RuleItem component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Territory2Rule xmlns= "http://soap.sforce.com/2006/04/metadata">
<label >Northern CA </label >
<description >To capture northern CA based accounts </description >
<objectType >Account </objectType >
<active >True </active >
<ruleItems >
705
Metadata Types Territory2Type
<field >BillingZip </field >
<operation >contains </operation >
<value ><94105,94404,94536/value>
</ruleItems >
<ruleItems >
<field >Industry </field >
<operation >equals </operation >
<value >IT </value >
</ruleItems >
<ruleItems >
<field >someCustomField__c </field >
<operation >greater_than </operation >
<value >50000 </value >
</ruleItems >
<booleanFilter >(1 OR 2) AND 3 </booleanFilter >
</Territory2Rule >
The following is a package.xml
sample.
FY13
and
FY14
represent names of territory models and demonstrate that rules can have identical developer names within different models. A wildcard character (*) in place of the model name can be used to retrieve all rules in all models in an org.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >FY13 </members >
<members >FY14 </members >
<name >Territory2Model </name >
</types >
<types >
<members >FY13.AccRule1
</members >
<members >FY14.AccRule1
</members >
<name >Territory2Rule </name >
</types >
<version >41.0
</version >
</Package >
Usage
•
A territory rule can have up to 10 rule items.
•
The sort order of rule items is implicitly derived from the position of the rule items in the XML
•
Rules can’t be run via Metadata API.
•
Territory Management 2.0 components don’t support packaging or change sets and aren’t supported in
.
Territory2Type
Represents the metadata for a category of territories in Territory Management 2.0. Every Territory2 must have a Territory2Type. This type extends the
Metadata metadata type and inherits its
fullName
field.Available only if Enterprise Territory Management has been enabled for your Salesforce org.
706
Metadata Types Territory2Type
File Suffix and Directory Location
Territory2Type components have the suffix territory2Type
and are stored in the territory2Types
folder.
Version
Territory2Type components are available in API version 32.0 and later.
Special Access Rules
Users without the “Manage Territories” permission will be able to retrieve all the Territory2Types in the org. “Manage Territories” permission is required for the deploy()
operation, in addition to the “Modify All Data” permission required by the Metadata API.
Fields
Field Name
description name priority
Field Type
string string int
Description
A description of the territory type.
Required. The user interface label for the territory type.
Required. Used for Filter-Based Opportunity Territory Assignment
(Pilot in Spring ’15 / Metadata API version 33). Lets you specify a priority for a territory type. For opportunity assignments, the filter examines all territories assigned to the account that the opportunity is assigned to. The account-assigned territory whose territory type priority is highest is then assigned to the opportunity. The priority
field value on each territory type must be unique.
Further, if there are multiple territories with the same territory type
(and therefore the same priority) assigned to the account, no territory is not assigned to the opportunity.
Declarative Metadata Sample Definition
The following example shows the definition of a Territory2Type component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Territory2Type xmlns= "http://soap.sforce.com/2006/04/metadata">
<name >Geo </name >
<description >Geographic allocation </description >
</Territory2Type >
Usage
.
707
Metadata Types TopicsForObjects
TopicsForObjects
Represents the ability to assign topics to objects or to remove topic assignments.
File Suffix and Directory Location
TopicsForObjects components have the suffix
.topicsforobjects
and are stored in the topicsforobjects
folder of the corresponding package directory.
Version
TopicsForObjects components are available in API version 41.0 and later.
Fields
Field Name
enableTopics
Field Type
boolean entityApiName string
Description
Required. When true, indicates whether users can assign topics or remove topic assignments. When false, users can’t assign or remove topics.
Upon org creation, this value is true for the following objects:
•
Account
•
Asset
•
Campaign
•
Case
•
Contact
•
Content Document
•
Contract
•
Event
•
Lead
•
Opportunity
•
Order
•
Solution
•
Task
For all remaining standard objects and custom objects, the default is false.
Required. Indicates the object’s API name for enabling topics.
708
Metadata Types TransactionSecurityPolicy
Declarative Metadata Sample Definition
The following is an example of a TopicsForObjects component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<TopicsForObjects xmlns= "http://soap.sforce.com/2006/04/metadata">
<enableTopics >false </enableTopics >
<entityApiName >Account </entityApiName >
</TopicsForObjects >
The following is an example package.xml
that references the previous definition.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >TopicsForObjects </name >
</types >
<version >41.0
</version >
</Package >
TransactionSecurityPolicy
Represents a transaction security policy definition. Transaction Security policies give you a way to look through events in your organization and specify actions to take when certain combinations occur.
This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
TransactionSecurityPolicy components have the suffix
.transactionSecurityPolicy
and are stored in the transactionSecurityPolicies
folder.
Version
TransactionSecurityPolicy components are available in API version 35.0 and later.
Fields
Field Name
action
Field Type
active apexClass description boolean string string
Description
Required. Describes the action to take when the matching
Transaction Security policy is triggered.
Required. If true
, the policy is enabled and is actively monitoring its event.
Required. The name of the class that implements the
TxnSecurity.PolicyCondition
interface for this policy.
Optional. A description of the policy.
709
Metadata Types
Field Name
developerName eventType executionUser masterLabel resourceName
TransactionSecurityPolicy
Field Type
string
Description
Optional. This unique name prevents conflicts with other policies that have the same masterLabel
. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
of type string)
Indicates which type of event is being monitored. Valid values are:
•
AccessResource
—Notifies you when the selected resource has been accessed.
•
AuditTrail
—Reserved for future use.
•
DataExport
—Notifies you when the selected object type has been exported using the Data Loader API client.
•
Entity
—Notifies you on use of an object type such as an authentication provider or client browser.
•
Login
—Notifies you when a user logs in.
string string string
Required. The name of the user to notify when the policy is triggered, if any notifications have been selected. This user must have the System Administrator profile.
Optional. The master label for this object. This display value is the internal label that is not translated.
Required. A resource used to narrow down the conditions under which the policy triggers. For example, with a
Login
event, you can add a resource to specify that only a specific login URL triggers the policy. The resources available depend on the
field. Valid resources are grouped below by event type.
•
AccessResource—EventTimestamp, SessionLevel, SourceIp
•
DataExport—EventTimestamp, SessionLevel, SourceIp
•
Entity—AuthorizeUrl, ConsumerKey, ConsumerSecret,
DefaultScopes, DeveloperName, ErrorUrl, FriendlyName,
IconUrl, IdTokenIssuer, LogoutUrl, TokenUrl, UserInfoUrl
•
Login—ApiType, ApiVersion, Application, Browser,
ClientVersion, LoginUrl, Platform, Status
TransactionSecurityAction
Describes the action to take when the matching Transaction Security policy is triggered.
Field Name
block
Field Type
boolean
Description
Required. If true
, the requested operation is blocked. This action only applies to Login and AccessResource events.
710
Metadata Types TransactionSecurityPolicy
Field Name
endSession freezeUser
Field Type
boolean boolean
Description
Required. If true
, a current session must be closed before a new session can be started. This action only applies to Login events.
Required. If true
, the user that triggered the policy is frozen. This action only applies to Chatter resources for Entity events.
notifications
TransactionSecurityNotification
[] Specifies how to notify the system administrator when the action is triggered. There can be none, one, or multiple notifications.
twoFactorAuthentication boolean Required. If true
, two-factor authentication is required for a higher level of access before the requested operation can continue.
This action only applies to Login and AccessResource events.
TransactionSecurityNotification
Describes who to notify and how to notify them when the matching Transaction Security policy is triggered.
Field Name
inApp sendEmail user
Field Type
boolean boolean string
Description
True if an in-app notification is selected.
True if an email notification is selected.
The administrator to receive the notification. This user must belong to the System Administrator profile.
Declarative Metadata Sample Definition
The following is an example of a TransactionSecurityPolicy component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<TransactionSecurityPolicy xmlns= "http://soap.sforce.com/2006/04/metadata">
<action >
<block >true </block >
<endSession >false </endSession >
<notifications >
<inApp >false </inApp >
<sendEmail >true </sendEmail >
<user >[email protected]
</user >
</notifications >
<twoFactorAuthentication >false </twoFactorAuthentication >
</action >
<active >true </active >
<apexClass >TxnSecurityMdApiPolicy </apexClass >
<eventType >Login </eventType >
<executionUser >[email protected]
</executionUser >
<resourceName >LoginHistory </resourceName >
</TransactionSecurityPolicy >
711
Metadata Types Translations
The following is an example package manifest used to deploy or retrieve the transaction security metadata for an organization.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >MySecurityPolicy </members >
<name >TransactionSecurityPolicy </name >
</types >
<version >35.0
</version >
</Package >
Translations
metadata type and inherits its fullName
field. The ability to translate component labels is part of the Translation Workbench. For more information, see “Enable and Disable the Translation Workbench” in the Salesforce online help.
Language
A two-character language code identifies each language, such as en
, or a five-character locale code, such as en_AU.
Note: Setting a default locale is different from setting a default language.
Salesforce offers full support for the following languages.
•
Chinese (Simplified): zh_CN
•
Chinese (Traditional): zh_TW
•
Danish: da
•
Dutch: nl_NL
•
English: en_US
•
Finnish: fi
•
French: fr
•
German: de
•
Italian: it
•
Japanese: ja
•
Korean: ko
•
Norwegian: no
•
Portuguese (Brazil): pt_BR
•
Russian: ru
•
Spanish: es
•
Spanish (Mexico): es_MX
•
Swedish: sv
•
Thai: th
End-user languages are useful if you have a multilingual organization or partners who speak languages other than your company’s default language. For end-user languages, Salesforce provides translated labels for all standard objects and pages, except administrative pages, Setup, and Help. When you specify an end-user language, labels and Help that aren’t translated appear in English. End-user
712
Metadata Types Translations languages are intended only for personal use by end users. Don’t use end-user languages as corporate languages. Salesforce doesn’t provide customer support in end-user languages.
End-user languages include:
•
Arabic: ar
•
Bulgarian: bg
•
Croatian: hr
•
Czech: cs
•
English (UK): en_GB
•
Greek: el
•
Hebrew: iw
•
Hungarian: hu
•
Indonesian: in
•
Polish: pl
•
Portuguese (European): pt_PT
•
Romanian: ro
•
Slovak: sk
•
Slovenian: sl
•
Turkish: tr
•
Ukrainian: uk
•
Vietnamese: vi
Note:
Salesforce provides limited support for right-to-left languages—Arabic and Hebrew—for the following features.
•
Live Agent
•
Cases
•
Accounts
These features are not supported in Lightning Experience, the Salesforce1 mobile app, any other mobile app or mobile browser, or any user interface except Salesforce Classic. There is no guarantee that right-to-left languages function correctly with any other
Salesforce features. There are no plans to expand the list of supported features.
Features that aren’t supported for right-to-left languages include, but are not limited to, the following.
•
Report Builder
•
Generating quote PDFs
•
Customizable forecasting
•
Emails
•
Salesforce Knowledge
•
Feeds
•
Communities
•
Certain search features, including lemmatization and synonym groups
The absence of a feature from this list does not imply support. Only Live Agent, Cases, and Accounts are supported with right-to-left languages.
713
Metadata Types Translations
In situations where Salesforce doesn’t provide default translations, use platform-only languages to localize apps and custom functionality that you’ve built on the Salesforce App Cloud. You can translate items such as custom labels, custom objects, and field names. You can also rename most standard objects, labels, and fields. Informative text and non-field label text aren’t translatable.
Platform-only languages are available in all places where you can select a language in the application. However, when you select a platform-only language, all standard Salesforce labels default to English or, in select cases, to an end-user or fully supported language.
•
Albanian: sq
•
Arabic (Algeria): ar_DZ
•
Arabic (Bahrain): ar_BH
•
Arabic (Egypt): ar_EG
•
Arabic (Iraq): ar_IQ
•
Arabic (Jordan): ar_JO
•
Arabic (Kuwait): ar_KW
•
Arabic (Lebanon): ar_LB
•
Arabic (Libya): ar_LY
•
Arabic (Morocco): ar_MA
•
Arabic (Oman): ar_OM
•
Arabic (Qatar): ar_QA
•
Arabic (Saudi Arabia): ar_SA
•
Arabic (Sudan): ar_SD
•
Arabic (Syria): ar_SY
•
Arabic (Tunisia): ar_TN
•
Arabic (United Arab Emirates): ar_AE
•
Arabic (Yemen): ar_YE
•
Armenian: hy
•
Basque: eu
•
Bosnian: bs
•
Bengali: bn
•
Catalan: ca
•
Chinese (Simplified—Singapore): zh_SG
•
Chinese (Traditional—Hong Kong): zh_HK
•
Dutch (Belgium): nl_BE
•
English (Australia): en_AU
•
English (Canada): en_CA
•
English (Hong Kong): en_HK
•
English (India): en_IN
•
English (Ireland): en_IE
•
English (Malaysia): en_MY
•
English (Philippines): en_PH
•
English (Singapore): en_SG
•
English (South Africa): en_ZA
714
Metadata Types
•
Estonian: et
•
French (Belgium): fr_BE
•
French (Canada): fr_CA
•
French (Luxembourg): fr_LU
•
French (Switzerland): fr_CH
•
Georgian: ka
•
German (Austria): de_AT
•
German (Belgium): de_BE
•
German (Luxembourg): de_LU
•
German (Switzerland): de_CH
•
Hindi: hi
•
Icelandic: is
•
Irish: ga
•
Italian (Switzerland): it_CH
•
Latvian: lv
•
Lithuanian: lt
•
Luxembourgish: lb
•
Macedonian: mk
•
Malay: ms
•
Maltese: mt
•
Romanian (Moldova): ro_MD
•
Montenegrin: sh_ME
•
Romansh: rm
•
Serbian (Cyrillic): sr
•
Serbian (Latin): sh
•
Spanish (Argentina): es_AR
•
Spanish (Bolivia): es_BO
•
Spanish (Chile): es_CL
•
Spanish (Colombia): es_CO
•
Spanish (Costa Rica): es_CR
•
Spanish (Dominican Republic): es_DO
•
Spanish (Ecuador): es_EC
•
Spanish (El Salvador): es_SV
•
Spanish (Guatemala): es_GT
•
Spanish (Honduras): es_HN
•
Spanish (Nicaragua): es_NI
•
Spanish (Panama): es_PA
•
Spanish (Paraguay): es_PY
•
Spanish (Peru): es_PE
•
Spanish (Puerto Rico): es_PR
715
Translations
Metadata Types Translations
•
Spanish (United States): es_US
•
Spanish (Uruguay): es_UY
•
Spanish (Venezuela): es_VE
•
Tagalog: tl
•
Tamil: ta
•
Urdu: ur
•
Welsh: cy
Declarative Metadata File Suffix and Directory Location
Translations are stored in a file with a format of
localeCode.translation
, where
localeCode
is the locale code of the translation language. For example, the file name for German translations is de.translation
. The supported locale codes are listed in
.
Custom object translations are stored in the translations
folder in the corresponding package directory.
Version
Translations components are available in API version 14.0 and later.
Fields
Field
customApplications customLabels customPageWebLinks
Field Type
CustomApplicationTranslation []
[]
CustomPageWebLinkTranslation []
customTabs flowDefinitions fullName
[] string
Description
A list of custom application translations.
A list of custom label translations.
A list of translations for web links defined in a home page component.
A list of custom tab translations.
A list of flow translations.
Only Flow and AutolaunchedFlow types are supported for translation.
This field is available in API version 41.0 and later.
Required. The language code; for example, de
for
German.
Inherited from
, this field is not defined in the
WSDL for this metadata type. It must be specified when creating, updating, or deleting. See
to see an example of this field specified for a call.
716
Metadata Types Translations
Field
globalPicklists quickActions reportTypes scontrols
Field Type
[]
[]
[]
Description
A list of global picklist translations. A global picklist’s value set is inherited by all the custom picklist fields that are based on it.
This field is available in API version 37.0 only and is removed from later versions.
A list of global (rather than object-specific) quick actions.
A list of report type translations.
A list of s-control translations.
CustomApplicationTranslation
CustomApplicationTranslation contains details for a custom application translation. For more details, see
Field
label name
Field Type
string string
Description
Required. The translated custom application name. Maximum of 765 characters.
Required. The name of the custom application.
CustomLabelTranslation
CustomLabelTranslation contains details for a custom label translation. For more details, see
Field
label name
Field Type
string string
Description
Required. The translated custom label name. Maximum of 765 characters.
Required. The custom label name.
CustomPageWebLinkTranslation
CustomPageWebLinkTranslation contains details for a translation of a web link defined in a home page component. For more details, see
.
Field
label name
Field Type
string string
Description
Required. The translated web link.
Required. The name of the web link.
717
Metadata Types
CustomTabTranslation
Field
label name
Field Type
string string
Description
Required. The translated custom tab name.
Required. The custom tab name.
Translations
FlowDefinitionTranslation
FlowDefinitionTranslation contains details for a translation of a flow definition. For more details, see
Available in API version 41.0 and later.
Field
flows fullName label
Field Type
string string
Description
A list of flow version translations for the flow definition.
Required. A unique name for the flow definition.
A translated label for the flow definition.
By default, flow definitions inherit the label of the active flow version. If you provide a label here, the definition label no longer inherits changes to the active version label.
FlowTranslation
FlowTranslation contains details for a translation of a flow version. For more details, see Flow
.
Available in API version 41.0 and later.
Field
choices fullName label
Field Type
[] string string
Description
A list of choice translations for the flow version.
Required. A unique name for the flow version.
The fullName
consists of two parts, separated by a hyphen:
•
Unique name for the flow that contains only underscores and alphanumeric characters. It must be unique across the organization, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
•
Version number for the flow.
For example, “sampleFlow-3” specifies version 3 of the flow whose unique name is sampleFlow.
A translated label for the flow version.
718
Metadata Types
Field
screens
Field Type
Description
A list of screen translations for the flow version.
Translations
FlowChoiceTranslation
Available in API version 41.0 and later.
Field
choiceText name userInput
Field Type
string string
Description
A translated label for the choice.
Required. A unique name for the choice.
FlowChoiceUserInputTranslation
A translated choice input for the choice.
FlowChoiceUserInputTranslation
Available in API version 41.0 and later.
Field
promptText validationRule
Field Type
string
Description
A translated label for the choice input.
FlowInputValidationRuleTranslation
A translated validation rule for the choice input.
FlowInputValidationRuleTranslation
FlowInputValidationRuleTranslation contains details for a translation of a validation rule. For more details, see FlowInputValidationRule in
.
Available in API version 41.0 and later.
Field
errorMessage
Field Type
string
Description
A translated error message for the validation rule.
FlowScreenTranslation
.
Available in API version 41.0 and later.
Field
fields
Field Type
Description
A list of screen field translations for the screen.
719
Metadata Types
Field
helpText name pausedText
Field Type
string string string
Description
Translated help text for the screen.
Required. A unique name for the screen.
A translated paused message for the screen.
FlowScreenFieldTranslation
FlowScreenFieldTranslation contains details for a translation of a screen field. For more details, see FlowScreenField in
.
Available in API version 41.0 and later.
Field
fieldText helpText name validationRule
Field Type
string string string
Description
A translated label for the screen field.
Translated help text for the screen field.
Required. A unique name for the screen field.
FlowInputValidationRuleTranslation
Translated validation rule for the screen field.
GlobalPicklistTranslation
Note: GlobalPicklistTranslation is available in API version 37.0 only and is removed from later versions.
GlobalPicklistTranslation contains details for a global picklist translation.
Translations are stored in a file with a format of
globalPicklistName__e-lang.objectTranslation
, where
globalPicklistName__e
is the global picklist name, and
lang
is the translation language. To reference a global picklist translation value, use
globalPicklistName__e.value1
, where
value1
is the translated value for the user interface.
Here’s what translations look like for a global picklist.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Translations xmlns= "http://soap.sforce.com/2006/04/metadata">
<globalPicklists >
<name >transpicklist </name >
<picklistValues >
<masterLabel >Three </masterLabel >
<translation >Trois </translation >
</picklistValues >
<picklistValues >
<masterLabel >Four </masterLabel >
<translation >Quatre </translation >
</picklistValues >
</globalPicklists >
</Translations >
Translations
720
Metadata Types Translations
Field
name picklistValues
Field Type
string
Description
Required. Represents the name of a global picklist to be translated.
A list of picklist values from global picklists to be translated.
GlobalQuickActionTranslation
Field
label name
Field Type
string string
Description
Required. The translated quick action name, globally.
Required. The quick action name.
ReportTypeTranslation
.
Field
description label name sections
Field Type
string string string
[]
Description
The translated report type description.
The translated report type name.
Required. The name of the report type.
A list of report type section translations.
ReportTypeSectionTranslation
ReportTypeSectionTranslation contains details for a report type section translation.
Field
columns label name
Field Type
ReportTypeColumnTranslation []
string string
Description
A list of report type column translations.
The translated report type section name.
Required. The name of the report type section.
ReportTypeColumnTranslation
ReportTypeColumnTranslation contains details for a report type column translation.
Field
label
Field Type
string
Description
Required. The translated report type column name.
721
Metadata Types
Field
name
Field Type
string
Description
Required. The report type column name.
Translations
ScontrolTranslation
Important: Visualforce pages supersede s-controls. Organizations that haven’t previously used s-controls can’t create them.
Existing s-controls are unaffected, and can still be edited.
ScontrolTranslation contains details for a translation of an s-control. For more information, see “About S-Controls” in the Salesforce online help.
Field
label name
Field Type
string string
Description
Required. The translated s-control name.
Required. The name of the s-control.
Declarative Metadata Sample Definition
A sample XML definition of a translations component is shown below.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Translations xmlns= "http://soap.sforce.com/2006/04/metadata">
<customApplications >
<label >Angebot-Manager </label >
<name >Quote Manager </name >
</customApplications >
<customLabels >
<label >Dieses ist ein manuelles Angebot </label >
<name >quoteManual </name >
</customLabels >
</Translations >
Usage
When you use the
call to get translations in your organization, the files returned in the
.translations
folder only include translations for the other metadata types referenced in package.xml
. For example, the following package.xml
file contains types
elements that match all custom applications, custom labels, web links defined in home page components, custom tabs, report types, and s-controls. Translations for all these metadata types are returned because each metadata type is explicitly listed in package.xml
.
<?xml
version= "1.0" encoding= "UTF-8"?>
<Package xmlns= "http://soap.sforce.com/2006/04/metadata">
<types >
<members >* </members >
<name >CustomApplication </name >
</types >
<types >
<members >* </members >
<name >CustomLabels </name >
722
Metadata Types UserCriteria
</types >
<types >
<members >* </members >
<name >CustomPageWebLink </name >
</types >
<types >
<members >* </members >
<name >CustomTab </name >
</types >
<types >
<members >* </members >
<name >ReportType </name >
</types >
<types >
<members >* </members >
<name >Scontrol </name >
</types >
<types >
<members >* </members >
<name >Translations </name >
</types >
<version >41.0
</version >
</Package >
SEE ALSO:
UserCriteria
Represents the member criteria to use in community moderation rules. This type extends the
metadata type and inherits its fullName
field..
File Suffix and Directory Location
UserCriteria components have the suffix community_name.user_criteria_developer_name.userCriteria
and are stored in the
UserCriteria
folder.
Version
UserCriteria components are available in API version 39.0 and later.
Special Access Rules
To view, create, edit, and delete moderation rules, you need the Manage Communities or Create and Set Up Communities permission.
723
Metadata Types WaveApplication
Fields
Field Name
creationAgeInSeconds description lastChatterActivityAgeInSeconds masterLabel userTypes
Field Type
int string int string
NetworkUserType
(
type string)
Description
If specified, includes only users that were created within a specific time frame.
The description of the user criteria.
If specified, includes only members that have posted or commented in the community within a specific time frame.
Name of the user criteria.
The member type to use in moderation rules. Valid values are:
•
Internal
•
Customer
•
Partner
Declarative Metadata Sample Definition
The following is an example of a UserCriteria component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<UserCriteria xmlns= "http://soap.sforce.com/2006/04/metadata">
<masterLabel >Customer and Partner Members </masterLabel >
<description >Member criteria matches customer and partner member </description >
<userTypes >Partner </userTypes >
<userTypes >Customer </userTypes >
</UserCriteria >
WaveApplication
Represents the Wave Analytics application. This type extends the
metadata type and inherits its fullName
field.
File Suffix and Directory Location
WaveApplication components have the suffix
.wapp
and are stored in the wave
folder.
Version
WaveApplication components are available in API version 37.0 and later.
724
Metadata Types
Fields
Field Name
assetIcon description folder masterLabel shares templateOrigin templateVersion
Field Type
string string string string
string string
WaveDataflow
Description
The icon that represents the Wave application.
The description that appears in the user interface.
The internal api name of the folder or application.
The user interface label name of the folder or application.
The folder sharing rules.
The internal (unique) name of the template used to create the application. This field is blank if the application was not created from a template.
The version assigned to the application template by the template's creator. This field is blank if the application was not created from a template.
Declarative Metadata Sample Definition
The following is an example of a WaveApplication component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<WaveApplication xmlns= "http://soap.sforce.com/2006/04/metadata">
<assetIcon >/analytics/wave/web/proto/images/app/icons/11.png
</assetIcon >
<description >Application that shows my sales </description >
<folder >edit </folder >
<masterLabel >Sales Application </masterLabel >
<shares >
<accessLevel >EditAllContents </accessLevel >
<sharedTo >[email protected]
</sharedTo >
<sharedToType >User </sharedToType >
</shares >
</WaveApplication >
WaveDataflow
inherits its content
and fullName
fields.
File Suffix and Directory Location
WaveDataflow components have the suffix
.wdf
and are stored in the wave
folder.
725
Metadata Types WaveDashboard
Version
WaveDataflow components are available in API version 37.0 and later.
Fields
Field Name
description masterLabel
Field Type
string string
Description
The dataflow description that appears in the user interface.
Required. The dataflow name that appears in the user interface.
Declarative Metadata Sample Definition
The following is an example of a WaveDataflow component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<WaveDataflow xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance">
<description >flow1 </description >
<content xsi:nil= "true"/>
<masterLabel >flow1 </masterLabel >
</WaveDataflow >
WaveDashboard
and inherits its content
and fullName
fields.
File Suffix and Directory Location
WaveDashboard components have the suffix
.wdash
and are stored in the wave
folder.
Version
WaveDashboard components are available in API version 37.0 and later.
Fields
Field Name
application description masterLabel templateAssetSourceName
Field Type
string string string string
Description
Required. The internal name of the application.
The dashboard description that appears in the user interface.
Required. The dashboard name that appears in the user interface.
Links the dashboard to the template used to create it. Null for assets not created from a template.
726
Metadata Types WaveDataset
Declarative Metadata Sample Definition
The following is an example of a WaveDashboard component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<WaveDashboard xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance">
<content xsi:nil= "true"/>
<application >dev__app </application >
<masterLabel >Dashboard1 </masterLabel >
<description >somedesc </description >
</WaveDashboard >
WaveDataset
fullName
field.
File Suffix and Directory Location
WaveDataset components have the suffix
.wds
and are stored in the wave
folder.
Version
WaveDataset components are available in API version 37.0 and later.
Fields
Field Name
application description masterLabel templateAssetSourceName
Field Type
string string string string
Description
Required. The internal name of the application.
The dataset description that appears in the user interface.
Required. The user interface label name of the Dataset.
Links the dataset to the template used to create it. Null for assets not created from a template.
Declarative Metadata Sample Definition
The following is an example of a WaveDataset component.
<WaveDataset >
<application >SharedApp </application >
<description >description </description >
<masterLabel >datasetl </masterLabel >
</WaveDataset >
727
Metadata Types WaveLens
WaveLens
Represents the WaveLens object in the Wave Analytics application. This type extends the
metadata type and inherits its content
and fullName
fields.
File Suffix and Directory Location
WaveLens components have the suffix
.wlens
and are stored in the wave
folder.
Version
WaveLens components are available in API version 37.0 and later.
Fields
Field Name
application datasets description masterLabel templateAssetSourceName
Field Type
string string string string string visualizationType string
Description
Required. The internal name of the application.
A reference to the dataset used to create this lens.
The dashboard description that appears in the user interface.
Required. The user interface label name of the dashboard.
Links the lens to the template used to create it. Null for assets not created from a template.
Required. The visualization type to be used for this lens. Valid values are:
•
calheatmap
—Calendar heat map
•
comparisontable
—Comparison table
•
heatmap
—Heat map
•
hbar
—Horizontal bar
•
hbarhdot
—Horizontal dot plot
•
matrix
—Matrix
•
parallelcoords
—Parallel coordinates
•
pie
—Donut
•
pivottable
—Pivot table
•
scatter
—Scatter plot
•
stackhbar
—Stacked horizontal bar
•
stackvbar
—Stacked vertical bar
•
time
—Time line
•
valuestable
—Values table
•
vbar
—Vertical bar
•
vdot
—Vertical dot plot
728
Metadata Types WaveTemplateBundle
Declarative Metadata Sample Definition
The following is an example of a WaveLens component.
<?xml
version= "1.0" encoding= "UTF-8"?>
<WaveLens xmlns= "http://soap.sforce.com/2006/04/metadata" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance">
<content xsi:nil= "true"/>
<application >dev__app </application >
<datasets >dev__abc </datasets >
<masterLabel >lens1 </masterLabel >
<description >lens in shared app </description >
<visualizationType >hbar </visualizationType >
</WaveLens >
WaveTemplateBundle
Represents a Wave Analytics template bundle, which can be used to create Wave apps. A bundle contains a Wave template definition and all its related resources.This type extends the
metadata type and inherits its fullName
field.
Note: We provide this feature to selected customers through a pilot program that requires agreement to specific terms and conditions. To be nominated to participate in the program, contact Salesforce. Because pilot programs are subject to change, we can’t guarantee acceptance. This pilot feature isn’t generally available, as referenced in this document or in press releases or public statements. We can’t guarantee that it will become generally available within any particular time frame or at all. Make your purchase decisions only on the basis of generally available features. Services provided by the Wave REST API are subject to change. Support is not provided.
File Suffix and Directory Location
A Wave template bundle is a folder that contains definition files for a template. Unlike other metadata components, a WaveTemplateBundle component isn’t represented by a single component file, but instead by a collection of JSON and CSV definition files. Each definition file represents a resource in a template, such as lenses, dashboards, dataflows, and comma-separated values. For example, this directory structure shows the hierarchy of the folders and files for one Wave Template definition, template1.
waveTemplates template1 template-info.json
variables.json
ui.json
extFiles
PostalCodes.csv
Wave template bundles must be under a top-level folder that’s named waveTemplates
. Each bundle must have its own subfolder under the waveTemplates
folder and be named with the template's fully qualified API name. The bundle folder must contain a template-info.json file to specify the metadata about the template and the references to other definition files. An entire bundle doesn’t have a suffix and definition files can have one of the following suffixes.
Suffix
.json
.csv
Component Type
JavaScript Object Notation
Comma-Separated Values
729
Metadata Types Wavexmd
Version
WaveTemplateBundle components are available in API version 35.0 and later.
Special Access Rules
Definitions can be created in both managed and unmanaged packages.
Fields
Field Name
assetIcon
Field Type
string description label templateType string string string
Description
The icon to use by default for new Wave apps based on this template.
Valid values are
1.png
through
20.png
.
The specification of the template.
Required. The label of the template.
Required. The type of the template. Valid values are:
•
App
•
Dashboard
•
Lens
Wavexmd
Represents the WaveXmd object in the Wave Analytics application. This type extends the
Metadata metadata type and inherits its
fullName
field.
File Suffix and Directory Location
WaveXmd components have the suffix
.xmd
and are stored in the wave
folder.
Version
WaveXmd components are available in API version 39.0 and later.
Fields
Field Name
dataset datasetConnector
Field Type
string string
Description
Specifies the dataset associated with this Xmd.
The name of the connector source for the dataset.
730
Metadata Types Wavexmd
Field Name
datasetFullyQualifiedName dates dimensions measures
Field Type
string
Description
Specifies the fully qualified name of the dataset version associated with this Xmd.
List of dates, with formatting information.
List of dimensions, with formatting information.
List of measures, with formatting information.
organizations origin
List of organizations, for multi-organization support.
string The origin of the dataset version.
WaveXmdDate
WaveXmdDate represents a date in Wave Xmd.
Field
alias compact dateFieldDay dateFieldEpochDay dateFieldEpochSecond dateFieldFiscalMonth
Field Type
string boolean string string string string dateFieldFiscalQuarter string dateFieldFiscalWeek string dateFieldFiscalYear dateFieldFullYear dateFieldHour dateFieldMinute dateFieldMonth dateFieldQuarter dateFieldSecond dateFieldWeek dateFieldYear description firstDayOfWeek string string string string int string string string string string string
Description
Alias of the Date column.
Whether the date should be displayed in compact form.
The day field.
The epoch day field.
The epoch second field.
The fiscal month field.
The fiscal quarter field.
The fiscal week field.
The fiscal year field.
The full year field.
The hour field.
The minute field.
The month field.
The quarter field.
The second field.
The week field.
The year field.
The description of the date column.
Represents the first day of the week.
731
Metadata Types Wavexmd
Field
fiscalMonthOffset isYearEndFiscalYear label showInExplorer sortIndex
Field Type
int boolean string boolean int
Description
Offset number of months for the fiscal year in relation to the calendar year.
Whether the year end is the fiscal year.
The label of the date column.
Whether or not the date should be shown in the explorer.
Whether or not to sort.
WaveXmdDimension
WaveXmdDimension represents a dimension in Wave Xmd.
Field
customActions customActionsEnabled dateFormat description field fullyQualifiedName imageTemplate string string string string
Field Type Description
Custom actions linked to this dimension.
boolean string
Indicates whether the dimension has custom actions enabled.
The format used for a date that is a dimension.
The description of the dimension.
The field name of the dimension (used in queries).
The fully qualified name of the dimension.
The image template.
isDerived isMultiValue label linkTemplate boolean boolean string string
Whether this is a derived dimension.
Indicates whether the dimension is multi-value.
The label for the dimension.
The template for formatting a link.
linkTemplateEnabled linkTooltip members origin recordDisplayFields recordIdField boolean string
Indicates whether the dimension has link templates enabled.
The tooltip to be displayed for links.
string
The member overrides for a dimension.
The origin of this dimension.
Ordered list of dimensions. The list defines the default order in which to display the dimensions in the user interface.
string The record ID for this dimension.
recordOrganizationIdField string salesforceActions
The record organization ID for this dimension.
WaveXmdDimensionSalesforceAction
Salesforce actions linked to this dimension.
732
Metadata Types Wavexmd
Field Field Type
salesforceActionsEnabled boolean showDetailsDefaultFieldIndex int showInExplorer sortIndex boolean int
Description
Indicates whether the dimension has Salesforce actions enabled.
Default order in which to show the dimensions in the user interface.
Indicates whether the dimension is displayed in the explorer.
Whether or not to sort.
WaveXmdDimensionCustomAction
WaveXmdDimensionCustomAction represents a custom action in a dimension in Wave Xmd.
Field
customActionName enabled icon method sortIndex target tooltip url
Field Type
string boolean string string int string string string
Description
The name of this custom action.
Indicates whether the action is enabled for a specific dimension.
The icon for the action.
The method for the action.
Whether or not to sort.
The target for the action.
The tooltip for the action.
The URL for the action.
WaveXmdDimensionMember
WaveXmdDimensionMember represents a dimension in Wave Xmd.
Field
color label member sortIndex
Field Type
string string string int
Description
The color for the member.
The label for the member.
The member value.
Whether or not to sort.
WaveXmdRecordDisplayLookup
WaveXmdDimensionRecordDisplayLookup represents a record display field in Wave Xmd.
733
Metadata Types
Field
recordDisplayField
Field Type
string
Description
The field to display.
Wavexmd
WaveXmdDimensionSalesforceAction
WaveXmdDimensionSalesforceAction represents an action in a dimension in Wave Xmd.
Field
enabled salesforceActionName sortIndex
Field Type
boolean string int
Description
Indicates whether the action is enabled for a specific dimension.
The name of the action.
Whether or not to sort.
WaveXmdMeasure
WaveXmdMeasure represents a measure in Wave Xmd.
Field
dateFormat description field
Field Type
string string string formatCustomFormat formatDecimalDigits string int formatIsNegativeParens boolean formatPrefix formatSuffix formatUnit formatUnitMultiplier fullyQualifiedName isDerived label string string string double string boolean string origin string showDetailsDefaultFieldIndex int showInExplorer boolean
Description
The format used for a date that is a measure.
The description of the measure.
The field name of the measure (used in queries).
The original (XMD 1.1) format array as a single string.
The number of digits displayed after the decimal place.
Indicates whether to display negative numbers with parentheses, rather than a minus sign.
The prefix placed before the field value.
The suffix placed after the field value.
The unit string for the measure. For example, 'cm'.
The multiplier for the unit.
The fully qualified name of the measure.
Whether this is a derived measure.
The label for the measure.
The origin of the measure.
Default order in which to show the measures in the user interface.
Indicates whether the measure is displayed in the explorer.
734
Metadata Types
Field
sortIndex
Field Type
int
Description
Whether or not to sort.
Workflow
WaveXmdOrganization
WaveXmdOrganization represents a Salesforce organization in Wave Xmd.
Field
instanceUrl
Field Type
string label sortIndex string organizationIdentifier string int
Description
The instance URL for the organization.
The label for the organization.
The ID of the organization.
Whether or not to sort.
Workflow
Represents the metadata associated with a workflow rule. A workflow rule sets workflow actions into motion when its designated conditions are met. You can configure workflow actions to execute immediately when a record meets the conditions in your workflow rule, or set time triggers that execute the workflow actions on a specific day. For more information, see “Workflow” in the Salesforce
Help. This type extends the
Metadata metadata type and inherits its
fullName
field. Use this metadata type to create, update, or delete workflow rule definitions.
When using a manifest file, retrieve all workflow components using the following code:
<types >
<members >* </members >
<name >Workflow </name >
</types >
Declarative Metadata File Suffix and Directory Location
Workflow files have the suffix
.workflow
. There is one file per standard or custom object that has workflow. These files are stored in the workflows
directory of the corresponding package.
Version
Workflow rules are available in API version 13.0 and later.
Workflow
This metadata type represents the valid types of workflow rules and actions associated with a standard or custom object.
Field Name
alerts
Field Type
Description
An array of all alerts for the object associated with the workflow.
735
Metadata Types Workflow
Field Name
fieldUpdates flowActions fullName knowledgePublishes outboundMessages rules tasks
Field Type
[]
Description
An array of all field updates for the object associated with the workflow.
An array of flow triggers for the object associated with the workflow. Available in API version 30.0 and later.
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 the Flows action in Process
Builder instead.
string
The developer name used as a unique identifier for API access.
The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
component.
An array of Salesforce Knowledge Workflow Publishes associated with the workflow. Available in API version 27.0 and later.
An array of all of the outbound messages for the object associated with the workflow.
[]
An array of all the objects associated with the workflow.
An array of all the tasks for the object associated with the workflow.
WorkflowActionReference
WorkflowActionReference represents one of the workflow actions.
Field Name
name type
Field Type
string
Description
Required. The name of the workflow action.
WorkflowActionType
of type string)
Required. Available types of workflow actions:
•
Alert
•
FieldUpdate
•
FlowAction
—Available in API version 30.0 and later
•
OutboundMessage
•
Task
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 the Flows action in Process Builder instead.
736
Metadata Types Workflow
WorkflowAlert
WorkflowAlert represents an email alert associated with a workflow rule.
Field Name
ccEmails
Field Type
string[] description fullName protected recipients senderAddress senderType string string boolean
string
ActionEmailSenderType
of type string)
Description
Additional email addresses. This field is similar to the CC field in email clients.
For the email to be sent successfully, set a value for ccEmails
or recipients
. You can set values for both fields. The value of ccEmails
can include up to five different email addresses.
Required. A description of the email alert. Available in API version 16.0 and later.
Required. The developer name used as a unique identifier for
API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
component.
Required. Indicates whether this component is protected
( true
) or not ( false
). Protected components cannot be linked to or referenced by components created in the installing organization.
The recipients for the email.
For the email to be sent successfully, set a value for ccEmails
or recipients
. You can set values for both fields.
The address in the From field for the email alert. This allows you to use a standard global email address for your organization (such as [email protected]
) instead of the default From field, which is the email address of the person who updates the record. You can only specify a value in this field if the senderType
is set to
OrgWideEmailAddress
. See “Organization-Wide Email
Addresses” in the Salesforce Help.
The email used as the sender's From and Reply-To addresses.
The following values are valid:
•
CurrentUser
—The email address of the person updating the record. This is the default setting.
•
DefaultWorkflowUser
—The email address of the default workflow user.
737
Metadata Types Workflow
Field Name
template
Field Type
string
Description
•
OrgWideEmailAddress
—A verified global email address for your organization, such as [email protected]
.
Required. Named reference to an EmailTemplate. This email template does not have to exist in the zip file, but it must exist in Metadata API.
WorkflowEmailRecipient
WorkflowEmailRecipient represents a recipient for an email alert associated with a workflow rule.
Field Name
field recipient type
Field Type
string string
ActionEmailRecipientTypes
of type string)
Description
Name of the field referenced in type
. The field named should be of the type specified in type
.
The recipients for the email. Depending on the type selected, this may be required.
Named reference to an EmailTemplate component. Valid values are:
•
accountOwner
- The email is sent to the record's account owner (for example, the Account owner for an
Opportunity).
•
accountTeam
- Only applicable on the Account object.
The email is sent to everyone on that Account's account team.
•
campaignMemberDerivedOwner
- Emails are sent to lead and contact owners when contacts are added to a campaign or in response to a campaign.
•
contactLookup
- The email is sent to a contact whose value is looked up from a field on the record. For this value, the field
field must reference a Contact.
•
creator
- The email is sent to the record's creator.
•
customerPortalOwner
- The email is sent to a specific self-service portal user. For this value, the recipient field must reference a User (by username), only self-service portal users.
•
- The email is sent to an email address whose value is looked up from a field on the record. For this value, the field
field must reference an email field.
•
group
- The email is sent to all users in a group. For this value, the recipient field must reference a group (by group name).
738
Metadata Types
Field Name Field Type
Workflow
Description
•
opportunityTeam
- Only applicable on the
Opportunity object. The email is sent to everyone on that
Opportunity's opportunity team.
•
owner
- The email is sent to the record's owner.
•
partnerUser
- The email is sent to a specific partner user. For this value, the recipient field must reference a User
(by username), only partner users.
•
portalRole
- Like role
, but for portal roles only.
•
portalRoleSubordinates
- Like roleSubordinates
, but for portal roles only.
•
role
- The email is sent to all users in a role. For this value, the recipient field must reference a Role (in the role hierarchy, by role name).
•
roleSubordinates
- The email is sent to all users in a role subordinates. For this value, the recipient field must reference a Role.
•
roleSubordinatesInternal
- Like roleSubordinates
, but for internal portal roles only.
•
user
- The email is sent to a specific user. For this value, the recipient field must reference a User (by username).
•
userLookup
- The email is sent to a user whose value is looked up from a field on the record. For this value, the field
field must reference a user foreign key field.
WorkflowFieldUpdate
WorkflowFieldUpdate represents a workflow field update. Field updates allow you to automatically update a field value to one that you specify when a workflow rule is triggered.
Field Name
description field formula fullName
Field Type
string string string string
Description
The description of the field update. This information is useful to track the reasoning for initially configuring the field update.
Required. The field (on the object for the workflow) to be updated.
Formula
, this is set to a formula used to compute the new field value.
Required. The developer name used as a unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is inherited from the
739
Metadata Types Workflow
Field Name
literalValue lookupValue lookupValueType name notifyAssignee operation protected reevaluateOnChange
Field Type
string string
LookupValueType
of type string)
Description
If the
Literal
, this is the literal value for the field.
If the
lookupValue
, this is the lookup value that is referenced.
The type of object that the
referencing. The valid values are:
•
Queue
•
RecordType
•
User string boolean
FieldUpdateOperation
of type string)
Required. A name for the component. Available in version API
16.0 and later.
Required. Notify the assignee when the field is updated.
Required. The operation that computes the value with which to update the field. Valid values are:
•
Formula
- Indicates the field will be set to a formula. If set, the formula must be a valid formula.
•
Literal
- Indicates the field will be set to a literal value. If set, the literalValue must be a valid literal value for this field.
•
LookupValue
- Similar to Literal, but for an object reference, such as a contact, user, account, etc. If set, the lookupValue
element must be set. Only User is supported in the current API.
•
NextValue
- Indicates that the field will be set to its next value; this is only allowed when the field update references a picklist.
•
Null
- Indicates the field will be set to null.
•
PreviousValue
- Indicates that the field will be set to its previous value; this is only allowed when the field update references a picklist.
boolean boolean
Required. Indicates whether this component is protected ( true
) or not ( false
). Protected components cannot be linked to or referenced by components created in the installing organization.
When set to true, if the field update changes the field’s value, all workflow rules on the associated object are re-evaluated. Any workflow rules whose criteria are met as a result of the field value change will be triggered.
If any of the triggered workflow rules result in another field update that’s also enabled for workflow rule re-evaluation, a domino effect occurs, and more workflow rules can be re-evaluated as a result of the newly-triggered field update. This cascade of workflow rule
740
Metadata Types Workflow
Field Name
targetObject
Field Type
string
Description
re-evaluation and triggering can happen up to five times after the initial field update that started it.
This is set if the change is detected on a child record. If this is set, it points to the foreign key reference on the child object (for example,
EmailMessage.ParentId
) pointing to the parent
(for example, Case). When set, the formula is based on the child object (for example,
EmailMessage
). This field is named sourceField
before version 14.0. The field name change is automatically handled between versions and does not require any manual editing of existing XML component files.
WorkflowFlowAction
Represents a flow trigger, which is a workflow action that launches a flow. Available in API version 30.0 and later. For more information, see the following topics in the Salesforce Help.
•
Define a Flow Trigger for Workflow (Pilot)
•
Flow Trigger Considerations (Pilot)
Note:
•
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 the Flows action in Process
Builder instead.
•
Test mode for flow triggers isn’t supported in the Metadata API. If you want a flow trigger to run the latest flow version when an administrator causes the workflow rule to fire, enable test mode via the user interface after deployment.
Field Name
description flow flowInputs label language protected
Field Type
string string
[] string string boolean
Description
Describes the flow trigger.
Required. Unique name of the flow that this workflow action launches.
An array of values to pass into flow variables and sObject variables when launching the flow.
Required. Name of the flow trigger.
Reserved for future use.
Reserved for future use.
WorkflowFlowActionParameter
Represents a value specified in the flow trigger that is passed into a flow variable or sObject variable when launching the flow.
741
Metadata Types Workflow
Note: 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 the Flows action in Process Builder instead.
Field Name
name value
Field Type Description
string Required. Unique name of the variable or sObject variable in the flow.
The flow variable must have isInput
set to
True
.
string Required. Value to assign to the flow variable or sObject variable when launching the flow.
Unlike an sObject variable, which represents an entire Salesforce record in the flow, a flow variable represents a single field. Therefore, the allowed value
depends on whether the name
identifies a flow variable or an sObject variable.
For an sObject variable, the value
must be a merge field that identifies a record—or a lookup relationship field that references a record—of the same object type as the sObject variable. For example:
•
{!this}
—identifies the record that fired the workflow rule.
•
{!Contact}
—identifies the contact associated with the record that fired the workflow rule.
•
{!Asset.Account}
—identifies the account associated with the asset that is associated with the record that fired the workflow rule.
•
{!SomeObject__r}
—uses a lookup relationship field to identify a custom object record associated with the record that fired the workflow rule.
For a flow variable, you can enter a merge field or a literal value. Manually enter a literal value when the variable should have the same value every time the flow is launched, regardless of which record fired the workflow rule. For example, you can enter
true
or
false
for a variable of type Boolean.
For a flow variable, supported merge fields identify a global variable or a field of the same data type as the flow variable. For example:
•
{!Id}
—ID of the record that fired the workflow rule.
•
{!Account.Owner.Email}
—email address of the account owner for the account associated with the record that fired the workflow rule.
•
{!$Organization.Country}
—country of the organization.
WorkflowKnowledgePublish
WorkflowKnowledgePublish represents Salesforce Knowledge article publishing actions and information. Available in API version 27.0
and later.
Field Name
action
Field Type
KnowledgeWorkflowAction
Description
The article publishing actions available when this rule fires.
Valid values are:
•
PublishAsNew
: Publishes the article as a new article.
•
Publish
: Publishes the article as a version of a previously published article.
742
Metadata Types Workflow
Field Name
description label language protected
Field Type
string string string boolean
Description
A brief article description.
Label that represents the article throughout the Salesforce user interface.
The language of the article.
Required. Indicates whether this component is protected
( true
) or not ( false
). Protected components cannot be linked to or referenced by components created in the installing organization.
WorkflowOutboundMessage
WorkflowOutboundMessage represents an outbound message associated with a workflow rule. Outbound messages are workflow and approval actions that send the information you specify to an endpoint you designate, such as an external service. An outbound message sends the data in the specified fields in the form of a SOAP message to the endpoint. For more information, see “Outbound Message
Actions” in the Salesforce Help.
Field Name
apiVersion
Field Type
double description endpointUrl fields fullName string string string[] string
Description
Required. The API version of the outbound message. This is automatically set to the current API version when the outbound message is created.
Valid API versions for outbound messages are 8.0 and 18.0 or later.
This API version is used in API calls back to Salesforce using the enterprise or partner WSDLs. The
API Version
can only be modified by using the Metadata API. It can't be modified using the Salesforce user interface.
This field is available in API version 18.0 and later.
Warning: If you change the apiVersion
to a version that doesn't support one of the fields
configured for the outbound message, messages will fail until you update your outbound message listener to consume the updated WSDL. You can monitor the status of outbound messages from Setup by entering
Outbound Messages
in the
Quick Find
box, then selecting Outbound Messages in Salesforce.
Describes the outbound message.
Required. The endpoint URL to which the outbound message is sent.
The named references to the fields that are to be sent.
Required. The developer name used as a unique identifier for API access.
The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
This field is inherited from the
743
Metadata Types Workflow
Field Name
includeSessionId integrationUser name protected
Field Type
boolean string string boolean useDeadLetterQueue boolean
Description
Required. Set if you want the Salesforce session ID included in the outbound message. Useful if you intend to make API calls and you do not want to include a username and password.
Required. The named reference to the user under which this message is sent.
Required. A name for the component. Available in version API 16.0 and later.
Required. Indicates whether this component is protected ( true
) or not
( false
). Protected components cannot be linked to or referenced by components created in the installing organization.
This field is only available for organizations with dead letter queue permissions turned on. If set, this outbound message will use the dead letter queue if normal delivery fails.
WorkflowRule
This metadata type represents a workflow rule. This type extends the
metadata type and inherits its fullName
field.
Field Name
actions active booleanFilter boolean string criteriaItems
description formula fullName
Field Type
[] string string string
Description
An array of references for the actions that should happen when this rule fires.
Required. Determines if this rule is active.
For advanced criteria filter, the boolean formula, for example,
(1 AND 2) OR
3
.
An array of the boolean criteria (conditions) under which this rule fires. Note that either this or formula
must be set.
The description of the workflow rule
The formula condition under which this rule first (either this or criteriaItems
) must be set
The developer name used as a unique identifier for API access. The fullName can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
744
Metadata Types
Field Name Field Type
triggerType
WorkflowTriggerTypes ( enumeration
of type string) workflowTimeTriggers
Workflow
Description
This field is inherited from the
component.
Under what conditions the trigger fires.
Valid values are:
•
onAllChanges
- The workflow rule is considered on all changes.
•
onCreateOnly
- The workflow rule is considered only on create.
•
onCreateOrTriggeringUpdate
- The workflow rule is considered on create and triggering updates.
Represents a set of Workflow actions (Field
Updates, Email Alerts, Outbound Messages, and Tasks) that should execute before or after a specified interval of time.
WorkflowTask
This metadata type references an assigned workflow task.
Field Name
assignedTo assignedToType
Field Type
string
ActionTaskAssignedToTypes
of type string)
Description
Specifies the user, role, or team to which the workflow rule or action is assigned. The field corresponding to the value specified here must be the same as the specified assignedToType
.
Valid string values for this type are:
•
accountCreator
- When set, the task is assigned to the record's account's creator.
•
accountOwner
- When set, the task is assigned to the record's account's owner (Opportunity).
•
accountTeam
- Same as WorkflowAlert type
•
creator
- When set, the task is assigned to the record's creator.
•
opportunityTeam
- Same as WorkflowAlert type
•
owner
- When set, the task is assigned to the record's owner.
•
partnerUser
- When set, the assignedTo
field references a User (by username), a partner user.
•
portalRole
- When set, the assignedTo
field references a Role (by role name), a portal role.
745
Metadata Types Workflow
Field Name
description dueDateOffset fullName notifyAssignee offsetFromField priority protected status subject
Field Type
string int string boolean string string boolean string string
Description
•
role
- When set, the assignedTo
field references a Role (by role name)
•
user
- When set, the assignedTo
field references a User (by username)
The description of this workflow task.
Required. The offset, in days, from either the trigger date, or the date specified in the (optional) offsetFromField
. This can be a negative number.
Required. The developer name used as a unique identifier for API access. The fullName
can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive
underscores. This field is inherited from the Metadata
component.
Required. Set to send an email notification when the task is assigned.
Optional field reference of the date field from which the dueDate
should be computed.
Required. The priority to assign the created task.
Required. Indicates whether this component is protected
( true
) or not ( false
). Protected components cannot be linked to or referenced by components created in the installing organization.
Required. The status to assign the created task.
Required. A subject for the workflow task. It is used if an email notification is sent when the task is assigned. Available in API version 16.0 and later.
WorkflowTimeTrigger
Represents a set of Workflow actions (Field Updates, Email Alerts, Outbound Messages, and Tasks) that should execute before or after a specified interval of time.
Field Name
actions offsetFromField
Field Type Description
An array of references for the actions that should happen when this trigger fires.
string The date type field name that the time-based workflow triggers off of, i.e.
Created Date
,
Last Modified Date
,
Rule
746
Metadata Types Workflow
Field Name Field Type Description
Trigger Date
or a custom date field on the object for which the workflow rule is defined.
timeLength string The numeric value of the time after/before the workflow triggers.
A negative value represents the time length before the trigger will fire. The timeLength
is measured in either hours or days, as specified by workflowTimeTriggerUnit
.
workflowTimeTriggerUnit
WorkflowTimeUnits
of type string)
The unit of time before or after which the time-based workflow will trigger. Valid string values are:
•
Hours
•
Days
Declarative Metadata Sample Definition
The following is the definition of a workflow rule:
<?xml
version= "1.0" encoding= "UTF-8"?>
<Workflow xmlns= "http://soap.sforce.com/2006/04/metadata">
<alerts >
<fullName >Another_alert </fullName >
<description >Another alert </description >
<protected >false </protected >
<recipients >
<type >accountOwner </type >
</recipients >
<recipients >
<field >Contact__c </field >
<type >contactLookup </type >
</recipients >
<recipients >
<field >Email__c </field >
<type >email </type >
</recipients >
<template >TestEmail/Email Test </template >
</alerts >
<fieldUpdates >
<fullName >Enum_Field_Update </fullName >
<description >Blah </description >
<field >EnumField__c </field >
<name >Enum Field Update </name >
<notifyAssignee >true </notifyAssignee >
<operation >NextValue </operation >
<protected >false </protected >
</fieldUpdates >
<fieldUpdates >
<fullName >Enum_Field_Update2 </fullName >
<description >Blah </description >
<field >EnumField__c </field >
<literalValue >PLX2 </literalValue >
747
Metadata Types
<name >Enum Field Update2 </name >
<notifyAssignee >true </notifyAssignee >
<operation >Literal </operation >
<protected >false </protected >
</fieldUpdates >
<fieldUpdates >
<fullName >Field_Update </fullName >
<description >TestField update desc </description >
<field >Name </field >
<formula >Name & "Updated" </formula >
<name >Field Update </name >
<notifyAssignee >false </notifyAssignee >
<operation >Formula </operation >
<protected >false </protected >
</fieldUpdates >
<fieldUpdates >
<fullName >Lookup_On_Contact </fullName >
<field >RealOwner__c </field >
<lookupValue >[email protected]
</lookupValue >
<name >Lookup On Contact </name >
<notifyAssignee >false </notifyAssignee >
<operation >LookupValue </operation >
<protected >false </protected >
</fieldUpdates >
<outboundMessages >
<fullName >Another_Outbound_message </fullName >
<description >Another Random outbound.
</description >
<endpointUrl >http://www.test.com
</endpointUrl >
<fields >Email__c </fields >
<fields >Id </fields >
<fields >Name </fields >
<includeSessionId >true </includeSessionId >
<integrationUser >[email protected]
</integrationUser >
<name >Another Outbound message </name >
<protected >false </protected >
</outboundMessages >
<rules >
<fullName >BooleanFilter </fullName >
<active >false </active >
<booleanFilter >1 AND 2 OR 3 </booleanFilter >
<criteriaItems >
<field >CustomObjectForWorkflow__c.CreatedById
</field >
<operation >notEqual </operation >
</criteriaItems >
<criteriaItems >
<field >CustomObjectForWorkflow__c.CreatedById
</field >
<operation >notEqual </operation >
<value >abc </value >
</criteriaItems >
<criteriaItems >
<field >CustomObjectForWorkflow__c.CreatedById
</field >
<operation >equals </operation >
<value >xyz </value >
</criteriaItems >
748
Workflow
Metadata Types
<triggerType >onCreateOrTriggeringUpdate </triggerType >
</rules >
<rules >
<fullName >Custom Rule1 </fullName >
<actions >
<name >Another_alert </name >
<type >Alert </type >
</actions >
<actions >
<name >Enum_Field_Update2 </name >
<type >FieldUpdate </type >
</actions >
<actions >
<fullName >Field_Update </name >
<type >FieldUpdate </type >
</actions >
<actions >
<name >Another_Outbound_message </name >
<type >OutboundMessage </type >
</actions >
<actions >
<name >Role_task_was_completed </name >
<type >Task </type >
</actions >
<active >true </active >
<criteriaItems >
<field >CustomObjectForWorkflow__c.Name
</field >
<operation >startsWith </operation >
<value >ABC </value >
</criteriaItems >
<description >Custom Rule1 desc </description >
<triggerType >onCreateOrTriggeringUpdate </triggerType >
</rules >
<rules >
<fullName >IsChangedFunctionRule </fullName >
<active >true </active >
<description >IsChangedDesc </description >
<formula >ISCHANGED(Name) </formula >
<triggerType >onAllChanges </triggerType >
</rules >
<tasks >
<fullName >Another_task_was_completed </fullName >
<assignedToType >owner </assignedToType >
<description >Random Comment </description >
<dueDateOffset >20 </dueDateOffset >
<notifyAssignee >true </notifyAssignee >
<priority >High </priority >
<protected >false </protected >
<status >Completed </status >
<subject >Another task was completed </subject >
</tasks >
<tasks >
<fullName >Role_task_was_completed </fullName >
<assignedTo >R11 </assignedTo >
749
Workflow
Metadata Types
<assignedToType >role </assignedToType >
<dueDateOffset >-2 </dueDateOffset >
<notifyAssignee >true </notifyAssignee >
<offsetFromField >CustomObjectForWorkflow__c.CreatedDate
</offsetFromField >
<priority >High </priority >
<protected >false </protected >
<status >Completed </status >
<subject >Role task was completed </subject >
</tasks >
<tasks >
<fullName >User_task_was_completed </fullName >
<assignedTo >[email protected]
</assignedTo >
<assignedToType >user </assignedToType >
<dueDateOffset >-2 </dueDateOffset >
<notifyAssignee >true </notifyAssignee >
<offsetFromField >User.CreatedDate
</offsetFromField >
<priority >High </priority >
<protected >false </protected >
<status >Completed </status >
<subject >User task was completed </subject >
</tasks >
</Workflow >
Workflow
750
Λήψη
Διαφήμιση