Coveo Platform 7.0 Salesforce Connector Guide Coveo Platform 7.0 | Salesforce Connector Guide Notice The content in this document represents the current view of Coveo as of the date of publication. Because Coveo continually responds to changing market conditions, information in this document is subject to change without notice. For the latest documentation, visit our website at www.coveo.com. Copyright © 2014, Coveo Solutions Inc. All rights reserved. Coveo is a trademark of Coveo Solutions Inc. This document is protected by copyright and other intellectual property law and is subject to the confidentiality and other restrictions specified in the Coveo License Agreement. Document part number: PM-131004-EN Publication date: 4www.coveo.com 6/6/2015 ii Coveo Platform 7.0 | Salesforce Connector Guide Table of Contents 1. Salesforce Connector 1 1.1 Advantages Relative to the Legacy Connector 1 1.2 Features 1 2. Salesforce Connector Deployment Overview 7 3. Salesforce Connector Requirements 10 4. Creating a Salesforce User Identity 11 4.1 Creating a Dedicated Salesforce Crawling Account 12 4.2 Getting the Security Token for Your Salesforce Account 14 5. Getting Salesforce Client_ID and Client_Secret Values 16 6. Salesforce ObjectsToGet Configuration File 21 6.1 Salesforce Object Definition 21 6.2 Configuration File Elements 22 6.3 XML Schema Definition 33 6.4 Creating a Salesforce ObjectsToGet Configuration File 35 6.5 Salesforce ObjectsToGet Configuration File Example for Standard Objects 36 6.6 Salesforce ObjectsToGet Configuration File Example for Knowledge Base 48 6.7 Salesforce ObjectsToGet Configuration File Example for CRM Content 51 6.8 Salesforce ObjectsToGet Configuration File Example for Chatter Objects 54 6.9 Salesforce Connector Configuration Recipes 58 6.9.1 Indexing all Knowledge Base Versions and States 58 6.9.2 Excluding Archived Knowledge Base Articles 60 6.9.3 Indexing Knowledge Base Attachments 61 6.9.4 Fetching Records With Parent Relationships That Must Be Incrementally Updated 61 6.9.5 Fetching Child Relationship to Use for Folding 63 6.9.6 Fetch Child Relationship to Use to Increase or Reduce Results From Queries 64 6.9.7 Minimizing API Calls and Object Description Prefetching 64 4www.coveo.com iii Coveo Platform 7.0 | Salesforce Connector Guide 6.9.8 Fetching Records Faster Using the Turbo Mode Runner 65 6.9.9 Reducing the Metadata Package Size by Scoping Parents of ContentVersion and Attachment Objects 67 6.9.10 Choosing the Optimal Record Modification Date Field 67 6.9.11 Removing Leading Zeroes of a Field 68 6.9.12 Using the Currency Field Converter 68 6.9.13 Using the FiscalYearResolver 68 6.9.14 Fixing the Feed Tracking Error 68 6.9.15 Indexing More Than the Built-in FeedItem Types 69 7. Creating a Salesforce Mapping File 70 7.1 Salesforce Mapping File Example for Standard Objects 71 7.2 Salesforce Mapping File Example for Knowledge Base 81 7.3 Salesforce Mapping File Example for CRM Content 83 7.4 Salesforce Mapping File Example for Chatter Objects 85 8. Configuring a Salesforce Security Provider 87 8.1 Configuring an Email Security Provider 90 8.2 Configuring an Active Directory Security Provider 91 9. Configuring and Indexing a Salesforce Source 94 9.1 Modifying Hidden Salesforce Source Parameters 101 9.2 Adding an Explicit Connector Parameter 104 10. Troubleshooting Salesforce Connector Issues 108 10.1 API Security Token Required 108 10.2 Expired Access/Refresh Token 108 10.3 Missing ionic.zip File 108 11. Refreshing Security Caches 4www.coveo.com 110 iv Coveo Platform 7.0 | Salesforce Connector Guide 1. Salesforce Connector The Coveo Salesforce connector allows you to crawl Salesforce content and bring it into the unified index, making it easily searchable by end-users. Note: This documentation describes the second generation Salesforce connector introduced with the CES 7.0.5785 August 2013 monthly release. This connector replaces the deprecated original Salesforce connector. 1.1 Advantages Relative to the Legacy Connector This second generation Salesforce connector offers the following advantages over the Salesforce Legacy connector: l Indexing of Salesforce permissions rather than applying the same permission on all source items (see "Indexed Salesforce Security" on page 1) l Improved performance and reduced API calls l Indexing of Knowledge Base articles and CRM content files l Takes advantage of recent Salesforce API versions 1.2 Features Indexed Salesforce Content The connector can index the following Salesforce content: l Service Cloud standard/custom objects and fields l Multilingual Knowledge base articles l Chatter feed items and files [more] l CRM Content (binary files such as PDF) l Sharing permissions l Sandbox and production environments l Inactive users l User visibility Indexed Salesforce Security The connector can index the permissions of each Salesforce item allowing the index to only return Salesforce search results that the user performing the query has the permissions to see. The Coveo index replicates the Salesforce security model for: 4www.coveo.com 1 Coveo Platform 7.0 | Salesforce Connector Guide l View All permissions The Salesforce connector fully supports all View All permissions given through a user profile, more explicitly View All Data which applies to every object, View All User which allows a view all on the user object, and View All on specific objects such Accounts, Cases, Leads, and Contact. Note: As Salesforce does not support View All Data on ContentVersion, the permission is replicated in the connector. l Sharing permissions An administrator can secure private objects with the owner, collaboration group, group, user, bosses of a given user, subordinates of a given user, or Community (also called Network) sharing permission types. l Profile associated to the user The profile specifies standard and custom object permissions for users associated to this profile. Note: Any user which is granted Read access for an object by his profile is entitled to search for records of the given type. l Organization-wide defaults sharing settings These settings specify the level of access your users have to each other's data. l Shared content A user can share private content with specific users or groups. Note: File sharing settings applied to Chatter files and CRM Content documents are also supported. File sharing settings are not the same as the sharing settings for private objects. l CRM Content CRM Content users have access to CRM Content Documents when they are entitled to read such documents in the library to which the documents belong. l Chatter Chatter posts and comments inherit the permissions of the record onto which they are posted, no matter if that record is public, private, a group or a user. Note: Public and private CollaborationGroups are supported. l Communities Sharing sets are supported in Communities. 4www.coveo.com 2 Coveo Platform 7.0 | Salesforce Connector Guide l Role hierarchy within the organization With a role hierarchy, private documents are visible by the owner, but also by all parents of the owner in the hierarchy. l Permission sets Permission sets given to individual users can extend (not restrict) their permissions beyond what is specified in their profile. l License type A user license entitles a user to different functionality within Salesforce and determines which profiles and permission sets are available to the user, so the Coveo index indirectly replicates user license type permissions by indexing permissions from profiles and permission sets. 4www.coveo.com 3 Coveo Platform 7.0 | Salesforce Connector Guide Note: The connector does not support the following security aspects: l Apex managed sharing l IP based permissions The Coveo connector cannot index restrictions on login IP addresses or hours configured in Salesforce. The consequence is that your Salesforce users can access Coveo search interfaces and review Salesforce content from any IP address at any time. l Field level security (FLS) For Enterprise, Unlimited, and Developer Salesforce editions, visibility of individual fields can be granted or denied to users or groups to fine-tune the access control in a permission set or a profile. The Coveo connector cannot index these permissions. The consequence is that a user that is denied access to a field could see the content of this field in Coveo search results. Note however that this is also the case for Salesforce search results (see the Salesforce document Field-Level Security Overview). l Permission changes replicated with re-indexing, not with incremental refreshes When permissions change in Salesforce for a profile, permission set, object sharing, or object security level (Public versus Private), the changes are not replicated in the index on the next incremental refresh. You must refresh the source to capture permission changes. l Shared personal groups A user can share content with a personal group. These sharing permissions cannot be indexed because they are currently not reported by the Salesforce API. The consequence is that members of the personal group will not see the shared content in Coveo Organization results. This limitation is therefore not a security hole. l Frozen users are not supported The user that are frozen using the Freeze button are not denied access to the search (see Freezing User Accounts). l Knowledge Base (KB) item permissions: In Salesforce, you can map User Roles to KB data categories (e.g.: members of the Technical Agent role can only see KB articles under the Technical data category). This mapping information is not available from the Salesforce API and therefore cannot be indexed. Consequently, in search results, all users can see all KB articles under all data categories. l When the organization-wide default is set to Controlled by Parent, a maximum master-detail relationship depth of two levels is supported (see Sharing Default Access Settings). 4www.coveo.com 4 Coveo Platform 7.0 | Salesforce Connector Guide Example: When you index a subdetail object, the detail parents are correctly determined but the master parents are considered public because there are three levels (master-detail-subdetail). Incremental Refresh The incremental refresh feature refreshes the content of the index based on the modification date of the objects in the Salesforce environment. If an item is modified, the incremental refresh feature refreshes the item automatically. Note: The incremental refresh feature limitations: l Does not work when the last incremental refresh was performed more than 30 days ago. This will trigger a full refresh of the content. l Not supported for all not replicateable deleted objects such as deleted ContentVersion (CRM Content and Chatter files) attachments and other items. Customizable ObjectsToGet Configuration File You can customize items that the Coveo crawler retrieves from Salesforce (see "Creating a Salesforce ObjectsToGet Configuration File" on page 35). Customizable Mapping File You can customize how the fields of Salesforce objects are mapped to searchable fields in the Coveo index (see "Creating a Salesforce Mapping File" on page 70). Connector Feature History Coveo Platform version 7.0.7183 Date Features November Support validating the ObjectsToGet with an XSD [more] 2014 7.0.6767 June 2014 l Support incremental modification of knowledge base articles versions and states [more] l 7.0.6424 Support incremental modification of user profiles February Knowledge content searchable by article number without inputting 2014 leading zeroes 4www.coveo.com 5 Coveo Platform 7.0 | Salesforce Connector Guide Coveo Platform version 7.0.6339 7.0.6196 Date Features January l Incremental refresh on knowledge articles 2014 l Support multilingual knowledge articles November Adding support to crawl Chatter feed items and files. 2013 7.0.5785 August 2013 Introduction of this second generation Salesforce connector What's Next? Review the deployment process for the Salesforce connector (see "Salesforce Connector Deployment Overview" on page 7). 4www.coveo.com 6 Coveo Platform 7.0 | Salesforce Connector Guide 2. Salesforce Connector Deployment Overview The following procedure outlines the steps needed to index a Salesforce source. The steps indicate the order in which you must perform configurations tasks. When needed, the steps refer to a detailed procedure. The Salesforce connector can index various Salesforce content types: l Service Cloud standard and custom objects and fields l Knowledge base articles l Chatter l CRM Content When you want to index more than one of these Salesforce content types, you must use the following procedure to create a configuration (ObjectsToGet configuration file, mapping file, and source) for each of them because they cannot share the same set of configuration parameters. To deploy the Salesforce connector 1. Validate that your environment meets the requirements (see "Salesforce Connector Requirements" on page 10). 2. Configure the user identity The Coveo connector needs an account to connect to your Salesforce organization and access the entire content that you want to index. You must create a CES user identity to hold the credentials of this Salesforce account (see "Creating a Salesforce User Identity" on page 11). 3. Get Salesforce Client_ID and Client_Secret values The Coveo security provider and connector for Salesforce must know the Client_ID and Client_ Secret values for your Salesforce organization to be authorized to access its content (see "Getting Salesforce Client_ID and Client_Secret Values" on page 16). 4. Create an ObjectsToGet configuration file An ObjectsToGet XML configuration file tells the crawler which Salesforce items to retrieve (see "Salesforce ObjectsToGet Configuration File" on page 21). You must create your custom ObjectsToGet XML configuration file before configuring your source. You can create the file based on examples that include standard objects and include your custom objects (see "Creating a Salesforce ObjectsToGet Configuration File" on page 35). 5. Configure a mapping file 4www.coveo.com 7 Coveo Platform 7.0 | Salesforce Connector Guide A Salesforce source needs a mapping file to know how to map retrieved Salesforce items to CES index fields. You must create a mapping file before you configure your Salesforce source (see "Creating a Salesforce Mapping File" on page 70). 6. Create a custom Salesforce field set a. The Salesforce source needs a field set matching the CES fields that are included in the mapping file. It is recommended to start by importing the default Salesforce field set file ([CES_Path] \Bin\Coveo.CES.CustomCrawlers.Salesforce.FieldSet.xml) to create fields for all the metadata available by default from Salesforce content. Note: The Coveo.CES.CustomCrawlers.Salesforce.FieldSet.xml file is available starting with CES 7.0.6607 (April 2014 monthly release). b. When you created custom Salesforce object and fields, add corresponding fields to the field set. 7. Configure an Email security provider Note: For a Salesforce Knowledge Base source, you do not need to perform this procedure. Knowledge Base permissions cannot be indexed so no Email security provider is needed. In Salesforce, users are identified by their email addresses. Consequently, permissions returned by the Salesforce security provider for each document are email addresses. The Salesforce security provider then requires another security provider to uniquely identify users from their email addresses. The security provider type to use depends on how users are authenticated when they access the search interface: l When authenticated with their email address, use an Email security provider (see "Configuring an Email Security Provider" on page 90). l When authenticated with their Active Directory account, use an Active Directory security provider (see "Configuring an Active Directory Security Provider" on page 91). Note: An Active Directory security provider is appropriate only when the User Principal Name (UPN) matches the email address for all users. Note: You may require to also use a Regex Transform Member Name security provider in between the two other security providers to map member types. Contact Coveo Support for assistance. 8. Configure a Salesforce security provider Note: For a Salesforce Knowledge Base source, you do not need to perform this procedure. Knowledge Base permissions cannot be indexed so no Email security provider is needed. 4www.coveo.com 8 Coveo Platform 7.0 | Salesforce Connector Guide A Salesforce source needs a Salesforce security provider (see "Configuring a Salesforce Security Provider" on page 87). 9. Configure and index the Salesforce source The Coveo connector needs to know details about your Salesforce organization to be able to index the desired content (see "Configuring and Indexing a Salesforce Source" on page 94). 10. If you encounter issues: l Solve typical issues that return error messages (see "Troubleshooting Salesforce Connector Issues" on page 108). l Consider adding and modifying default values of hidden source parameters (see "Modifying Hidden Salesforce Source Parameters" on page 101). 4www.coveo.com 9 Coveo Platform 7.0 | Salesforce Connector Guide 3. Salesforce Connector Requirements Your environment must meet the following requirements to be able to use the Coveo connector for Salesforce repositories: l Coveo Platform 7.0.5785 This second generation Salesforce connector is available from the CES 7.0.5785 August 2013 monthly release. l Coveo license for the Salesforce connector Your Coveo license must include support for the Salesforce connector to be able to use this connector. l An active Salesforce account to a Salesforce organization The crawling account must have permissions to read all the types of content that you want to index (see "Creating a Salesforce User Identity" on page 11). What's Next? Create a user identity to be used by the Coveo connector to crawl your Salesforce content (see "Creating a Salesforce User Identity" on page 11). 4www.coveo.com 10 Coveo Platform 7.0 | Salesforce Connector Guide 4. Creating a Salesforce User Identity The Coveo connector and security provider for Salesforce must use a user account to connect to your Salesforce organization. When an application such as the Coveo connector accesses your Salesforce content through the API, it must provide credentials where the Security Token associated to the account is appended to the password. Important: Salesforce may regularly request a password change which will generate a new Security Token at the same time. You must then each time update the user identity with the new password and Security Token. To create a Salesforce user identity 1. In the Salesforce organization that you want to index: a. Select or create an account to be used by the Coveo connector and security provider to access your Salesforce content (see "Creating a Dedicated Salesforce Crawling Account" on page 12). b. Find the Salesforce Security Token for this account (see "Getting the Security Token for Your Salesforce Account" on page 14). 2. On the Coveo server, access the Administration Tool. 3. In the Administration Tool, select Configuration > Security. 4. In the navigation panel on the left, select User Identities. 5. In the User Identities page, click Add. 6. In the Modify User Identity page: 4www.coveo.com 11 Coveo Platform 7.0 | Salesforce Connector Guide a. In the Name box, enter a name for this user identity. Example: Salesforce Crawling Account b. In the User box, enter the user name of the selected Salesforce account, typically the email address. c. In the Password box, enter the password to which you append the Security Token for the selected Salesforce account with no space in between. Example: When the password is ThisIsMyPassword and the Security Token is DU5PJU3GtHbQaX0zxiWoCMq8Z, then enter ThisIsMyPasswordDU5PJU3GtHbQaX0zxiWoCMq8Z. d. Click Apply Changes. What's Next? Your Salesforce source and security provider will need to know the Client_ID and Client_Secret values for your Salesforce organization (see "Getting Salesforce Client_ID and Client_Secret Values" on page 16). 4.1 Creating a Dedicated Salesforce Crawling Account The Coveo connector can use a Salesforce administrator account to access and crawl your Salesforce content. It is however a better practice to create dedicated Salesforce user, profile, and permission set for the Coveo crawling, that specify minimal permissions and access. 4www.coveo.com 12 Coveo Platform 7.0 | Salesforce Connector Guide Note: It is strongly recommended to have separate dedicated Salesforce crawling accounts for each Salesforce source and security provider. When the Coveo crawler accesses Salesforce with the same user credentials too many times, Salesforce returns INVALID_QUERY_LOCATOR error messages, such as the following: Error with ID 'SALESFORCE_INVALID_QUERY': invalid query locator (INVALID_ QUERY_LOCATOR) - This error can occur if a user is used more than once for sources that run in parallel. To avoid this error, make sure to use only one user per source or alternate the refresh schedule of your sources. To create a dedicated Salesforce crawling account 1. Using an administrator account, log in to your Salesforce organization. 2. In the user menu, select Setup. 3. Create a Salesforce profile dedicated to the Coveo crawler: a. In the Setup page, select Manage Users > Profiles. b. In the Profiles page, click New Profile. c. In the Clone Profile page: i. In the Existing Profile box, select an existing profile such as Read Only to be used as a template for the new profile according to the permissions you want to grant to the crawler. ii. In the Existing Profile box, enter a name such as CoveoIndexer. iii. Click Save. d. In the page for your new profile, click Edit and in the Administrative Permissions section: 4www.coveo.com 13 Coveo Platform 7.0 | Salesforce Connector Guide i. Ensure that the API Enabled option is selected. ii. Optionally, select the API Only User option as an additional security measure. iii. Select the Modify All Data option when any of the following situation applies: l You are using a CES release prior to version 7.0.6339 (January 2014 monthly release). l You want to index the Salesforce item permissions. Note: If you do not enable Modify All Data, be aware that the crawler will only index content to which it has access, so set up read access to objects accordingly. iv. Optionally, as an additional security measure, in the Login IP Ranges section, select or create a login IP range to restrict the accessibility for this profile. 4. Create a Salesforce user dedicated to the Coveo crawler: a. In the Setup page, select Manage Users > Users. b. In the All Users page, click New User. c. In the New User page: i. Fill the required fields. ii. In the Profile box, select the profile you just created. iii. Click Save. 4.2 Getting the Security Token for Your Salesforce Account When you create a Salesforce account, Salesforce sends an email message from [email protected] with subject: salesforce.com security token confirmation to the email address associated with the account. This email message contains the Security Token for the account and is the only place where you can find the Security Token value. When you change the account password, the security token is also regenerated (so the previous one expires) and a similar email is sent. To get the security token for your Salesforce account 1. In the mailbox for the email address associated with the Salesforce account to be used by the Coveo connector, look for the latest email message received from [email protected] with subject: salesforce.com security token confirmation. 2. If you cannot find the latest email with security token, reset the security token: 4www.coveo.com 14 Coveo Platform 7.0 | Salesforce Connector Guide a. Log in to Salesforce using the Salesforce account to be used by the Coveo connector. b. In the User Menu, select Setup. c. In the menu on the left, under Personal Setup, expand My Personal Information, and then click Reset My Security Token. d. Follow onscreen instructions. A new email message will be sent. 3. Open the message, and then copy the Security Token value. Example: In the following email example, the Security Token value is highlighted. 4www.coveo.com 15 Coveo Platform 7.0 | Salesforce Connector Guide 5. Getting Salesforce Client_ID and Client_Secret Values The Force.com platform implements the OAuth 2.0 Authorization Framework, so users can authorize applications to access Force.com resources. When you configure the Coveo Salesforce security provider and Salesforce source, you must know the Client_ID and Client_Secret token values for the Salesforce organization that you want to index. To get the Salesforce Client_ID and Client_Secret values 1. Using and administrator account, log into the Salesforce organization that you want to index. 2. On the User Menu, select Setup. 3. In the navigation menu on the left, under App Setup, expand Create, and then click Apps. 4. In the Apps page, in the Connected Application section, click New to create a new application that will use OAuth2 to gain access to the organization. 5. In the New Connected App page: 4www.coveo.com 16 Coveo Platform 7.0 | Salesforce Connector Guide a. In the Basic Information section: i. Enter meaningful names in the Connected App Name and API Name boxes. ii. Enter your email in the Contact Email box so that you can receive messages from this application. b. In the API (Enable OAuth Settings) section: i. Select the Enable OAuth Settings check box. ii. In the Callback URL box, since a callback URL will not be used for this application, enter a dummy but valid secured URL (https://) such as 4www.coveo.com 17 Coveo Platform 7.0 | Salesforce Connector Guide https://login.salesforce.com/services/oauth2/callback. iii. In the Available OAuth Scopes list, select the following items: l Access and manage your data (api) l Full access (full) l Perform requests on your behalf at any time (refresh_token, offline_access) and click Add for each so that they appear in the Selected OAuth Scopes list. c. Click Save. 6. In the page that appears for your new connected app, in the API (Enable OAuth Settings) section: a. Copy the Consumer Key value and paste it in a secure reference document of your choice. The Consumer Key is the client_id. b. Next to Consumer secret, click Click to reveal, copy the value that appears, and then paste it in your secure reference document. The Consumer secret is the client_secret. c. Save your reference document. Note: You can always come back to this Salesforce page (Setup > App Setup > Create > Apps, and clicking the application name in the Connected Apps list). 7. Create a Salesforce permission set dedicated to the Coveo crawler and assign it to your dedicated app and user: a. In the Setup page, select Manage Users > Permission Sets. b. In the Permission Sets page, click New. c. In the Create page, in the Label and API Name boxes, enter significant names, and then click Save. 4www.coveo.com 18 Coveo Platform 7.0 | Salesforce Connector Guide d. In the page for the new permission set: i. Click Manage Assignments, and then add the dedicated user you created earlier for the Coveo crawler (see "Creating a Dedicated Salesforce Crawling Account" on page 12). ii. In the Apps section, click Assigned Connected Apps. iii. In the Assigned Connected Apps section, click Edit, add the connected app you just created 4www.coveo.com 19 Coveo Platform 7.0 | Salesforce Connector Guide to the Enabled Connected Apps list, and then click Save. What's Next? Create an ObjectsToGet Configuration file (see "Salesforce ObjectsToGet Configuration File" on page 21). 4www.coveo.com 20 Coveo Platform 7.0 | Salesforce Connector Guide 6. Salesforce ObjectsToGet Configuration File The ObjectsToGet configuration file of the Salesforce connector contains the definition of all standard or custom objects that will be retrieved from the Salesforce organization. Each object definition is used to generate the SOQL query executed by the connector to retrieve the records for that object. With this configuration file, you get control over: Which information is retrieved by specifying the fields and relationships that should be fetched for each l object. This information will be available to use in the mapping file. Which records are returned by specifying conditions on the SOQL query that will be used to filter the query l results. Notes: l If you want to retrieve Salesforce Knowledge Base articles, you need to specify at least two queries for each type of Knowledge article, one for the *__ka object and one the *__kav object (see "Salesforce ObjectsToGet Configuration File Example for Knowledge Base" on page 48). l There is a bug in the Salesforce API that causes the returned JSON to be invalid when querying a binary field of an object, so ensure to not include any binary field in your query. 6.1 Salesforce Object Definition To obtain the list of queryable fields on a specific object: l Salesforce developers can use the describeSObject() method to obtain the complete object definition in JSON format. Example: https://na15.salesforce.com/services/data/v27.0/sobjects/Account/describe l Salesforce administrators can obtain the complete list of fields from Salesforce API online documentation (see Account, Task). To obtain the list of available relationships on a specific object: l Salesforce administrators can access any object definition from Salesforce in the Setup under the Customize menu. Object relationships are identified by fields of data type Lookup (see AccountFields, TaskFields). 4www.coveo.com 21 Coveo Platform 7.0 | Salesforce Connector Guide 6.2 Configuration File Elements The ObjectsToGet Salesforce configuration file is an aggregate of query XML nodes. A query node contains several elements, each one being used to generate the SOQL query of a Salesforce object. ObjectName (required) The name of the object (standard or custom) to query (see Standard Objects). GroupBy (optional) The name of the field on which results should be grouped by. Limit (optional) The maximum number of items that will be retrieved by the query. Offset (optional) The number of items that should be skipped in query results. Fields (required) Contains the name of the fields (Field Name column in Salesforce) that will be available on each record returned by the query. Each field name must be in a <string> element, no matter its data type. Fields specified in this section can be of any data type except Lookup. 4www.coveo.com 22 Coveo Platform 7.0 | Salesforce Connector Guide Example: <Query> <ObjectName>Account</ObjectName> <Fields> <string>Id</string> <string>IsDeleted</string> <string>Name</string> <string>Type</string> <string>BillingStreet</string> <string>BillingCity</string> <string>BillingState</string> <string>BillingPostalCode</string> <string>BillingCountry</string> <string>Phone</string> <string>Fax</string> <string>AccountNumber</string> <string>Website</string> <string>Sic</string> <string>Industry</string> <string>AnnualRevenue</string> <string>NumberOfEmployees</string> <string>Ownership</string> <string>TickerSymbol</string> <string>Description</string> <string>Rating</string> <string>Site</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> </Fields> </Query> QueryCondition (optional) Important: For CES versions prior to 7.0.7022 (September 2014 monthly release), this operator is not validated and has a free form. However, the resulting SOQL must be in the format FIELD OPERATOR VALUE . Rather use QueryCondition2. One or more conditions that will be applied to the SOQL query used to retrieve object records. l Field (required): Case-insensitive name of the object field on which the condition is applied. Relationship names can also be used (ex.: Parent.Type). l Operator (required): The operator to apply to the condition. Any operator supported by Salesforce SOQL queries can be used (see Comparison Operators). l Value (required): Case-sensitive value used to evaluate the condition. String values must be enclosed in single quotes. 4www.coveo.com 23 Coveo Platform 7.0 | Salesforce Connector Guide Example: <Query> <ObjectName>Account</ObjectName> <Fields> <string>Name</string> <string>AccountNumber</string> </Fields> <Conditions> <QueryCondition> <Field>Type</Field> <Operator>!=</Operator> <Value>'Prospect'</Value> </QueryCondition> <QueryCondition> <Field>Owner.Name</Field> <Operator>=</Operator> <Value>'John Smith'</Value> </QueryCondition> </Conditions> </Query> The generated query is: SELECT Name FROM Account WHERE Type != 'Prospect' AND Owner.Name = 'John Smith' QueryCondition2 (optional) Note: This query condition is validated and has more options. This is the prefered way to create a query condition. One or more conditions that will be applied to the SOQL query used to retrieve object records. l Field (required): Case-insensitive name of the Object Field on which the condition is applied. Relationship names can also be used (e.g. Parent.Type). l Relation (required): The operator to apply to the condition. Supported operators are Equal , NotEqual , Less , LessOrEqual, Greater , GreaterOrEqual, Like , NotLike . l SoqlString|SoqlBoolean|SoqlDateTime (required): Case-sensitive value (not Like) used to evaluate the condition. 4www.coveo.com 24 Coveo Platform 7.0 | Salesforce Connector Guide Example: <Query> <ObjectName>Account</ObjectName> <Fields> <string>Name</string> </Fields> <Conditions> <QueryCondition2> <Field>Type</Field> <Relation>NotEqual</Relation> <SoqlString>Prospect</SoqlString> </QueryCondition2> <QueryCondition2> <Field>IsEscalated</Field> <Relation>Equal</Relation> <SoqlBoolean>true</SoqlBoolean> </QueryCondition2> <QueryCondition2> <Field>LastViewDate</Field> <Relation>GreaterOrEqual</Relation> <SoqlDateTime>2014-04-28T00:00:00.0000000-00:00</SoqlDateTime> </QueryCondition2> </Conditions> </Query> Note: For SoqlDateTime, the date/time format must exactly match YYYY-MMDDTHH:MM:SS.0000000-00:00 The generated query is: SELECT Name FROM Account WHERE Type != 'Prospect' AND IsEscalated = true AND LastViewDate >= 2014-04-28T00:00:00 InCondition (optional) l Field (required): Case-insensitive name of the Object Field on which the condition is applied. Relationship names can also be used (e.g. Parent.Type). l AllowedValues (required): Case-sensitive possible values of the field. 4www.coveo.com 25 Coveo Platform 7.0 | Salesforce Connector Guide Example: <Query> <ObjectName>Account</ObjectName> <Fields> <string>Name</string> </Fields> <Conditions> <InCondition> <Field>Type</Field> <AllowedValues> <string>Prospect</string> <string>Client</string> </AllowedValues> </InCondition> </Conditions> </Query> The generated query is: SELECT Name FROM Account WHERE Type IN ('Prospect', 'Client') InQueryCondition (optional) Starting with CES 7.0.7183 (November 2014 monthly release), semi-joins in query's conditions (see Comparison Operators). Semi-joins are useful when you want to index only a subset of records based on another set of records. l Field (required): Case-insensitive name of the object field on which the condition is applied. Relationship names can also be used (ex.: Parent.Type). l Query (required): A valid query object (with ObjectName, Fields , etc) (see Semi-Joins or Anti- Joins Relationship Query Limits). 4www.coveo.com 26 Coveo Platform 7.0 | Salesforce Connector Guide Example: <Query> <ObjectName>Case</ObjectName> <Fields> <string>Id</string> </Fields> <Conditions> <InCondition> <Field>Id</Field> <Query> <ObjectName>CaseComment</ObjectName> <Fields> <string>ParentId</string> </Fields> <Conditions> <QueryCondition> <Field>CommentBody</Field> <Operator>=</Operator> <Value>'this is a test'</Value> </QueryCondition> </Conditions> </Query> </InCondition> </Conditions> </Query> The generated query is: SELECT Id FROM Case WHERE Id IN (SELECT ParentId FROM CaseComment WHERE CommentBody = 'this is a test') Not InQueryCondition (optional) Starting with CES 7.0.7183 (November 2014 monthly release), anti-joins in query's conditions (see Comparison Operators). Anti-joints are useful when you want to index only a subset of records based on another set of records. l Field (required): Case-insensitive name of the object field on which the condition is applied. Relationship names can also be used (ex.: Parent.Type). l Query (required): A valid query object (with ObjectName, Fields , etc) (see Semi-Joins or Anti- Joins Query Limits). 4www.coveo.com 27 Coveo Platform 7.0 | Salesforce Connector Guide Example: <Query> <ObjectName>Case</ObjectName> <Fields> <string>Id</string> </Fields> <Conditions> <NotCondition> <InCondition> <Field>Id</Field> <Query> <ObjectName>CaseComment</ObjectName> <Fields> <string>ParentId</string> </Fields> <Conditions> <QueryCondition> <Field>CommentBody</Field> <Operator>=</Operator> <Value>'this is a test'</Value> </QueryCondition> </Conditions> </Query> </InCondition> </NotCondition> </Conditions> </Query> The generated query is: SELECT Id FROM Case WHERE NOT Id IN (SELECT ParentId FROM CaseComment WHERE CommentBody = 'this is a test') ParentRelationship (optional) One or more relationships which information will be available on each object record returned by the query. An object relationship is defined by a lookup field which creates a relation between the current object being queried and another object. These relations allow SOQL query operations similar to SQL joins. l RelationshipName (required): The field name of data type Lookup. l Fields (required): The name of the fields of the related object that will be available on each record returned by the query. l ParentRelationships (optional): Another level of parent relationship, but this time, the relationship applies to the related object. 4www.coveo.com 28 Coveo Platform 7.0 | Salesforce Connector Guide Example: <Query> <ObjectName>Account</ObjectName> <Fields> <string>Name</string> <string>AccountNumber</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> <string>Email</string> </Fields> </ParentRelationship> </ParentRelationships> </Query> Important: The parent field is copied to the record. If the parent is modified, the indexed record is not updated. ChildRelationship (optional) One or more relationships which information will be available on each Object record returned by the query. An Object relationship is defined by a Lookup Field which creates a relation between the current Object being queried and another Object. These relations allow SOQL query operations similar to SQL joins. l Query (required): A valid query object (with ObjectName, Fields , etc). Example: <Query> <ObjectName>Opportunity</ObjectName> <Fields> <string>Id</string> <string>Name</string> </Fields> <ChildRelationships> <Query> <ObjectName>Attachments</ObjectName> <Fields> <string>Id</string> <string>Name</string> </Fields> </Query> </ChildRelationships> </Query> The generated query is: SELECT Id, Name, (SELECT Id, Name FROM Attachments) FROM Opportunity The generated metadata, when an attachment is found on the opportunity: 4www.coveo.com 29 Coveo Platform 7.0 | Salesforce Connector Guide "Attachments.attribute.type" => "Attachment" "Attachments.attribute.url" => "/services/data/v29.0/sobjects/Attachment/00PG000000B8RUvMAN" "Attachments.Id" => "00PG000000B8RUvMAN" "Attachments.Name" => "a_stash_of_werthers.jpg" Note: l When more than one child exist, the fields contain values separated with a semicolon. Example: Attachments.Name: a.jpg;b.jpg l Nested child relationships (sub-sub queries) are not supported. Important: The child field is copied to the record. If a child is modified, the indexed record is not updated. PolymorphicRelationship (optional) Polymorphic relationships can be useful for parent relationships on a Lookup field that can be related to multiple types of objects (ex.: Lookup (Contract,Campaign,Account,Opportunity,Product,Asset,Case,Solution)). The polymorphic relationship allows for different fields to be retrieved depending on the object that will be related for a specific record. Notes: l The two following metadata appear on the record with polymorphic relationships: <polymorphic_ relationship_name>.<field> and <polymorphic_relationship_name>_<object_ name>.<field>. l Prior to CES 7.0.7183 (November 2014 monthly release), the record with polymorphic relationships only provided the metadata named <polymorphic_relationship_name>_<object_ name>.<field>. l RelationshipName (required): The field name of data type Lookup. l ObjectName (optional): The related object type this polymorphic relationship applies to. Note: Prior to CES 7.0.7183 (November 2014 monthly release), the ObjectName field is required. l Fields (required): 4www.coveo.com 30 Coveo Platform 7.0 | Salesforce Connector Guide The name of the fields of the related object that will be available on each record returned by the query. l ParentRelationships (optional): Another level of parent relationship, but this time, the relationship applies to the related object. Example: <Query> <ObjectName>Task</ObjectName> <Fields> <string>Id</string> <string>Subject</string> <string>ActivityDate</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>What</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Account</ObjectName> <Fields> <string>Name</string> <string>AccountNumber</string> </Fields> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Opportunity</ObjectName> <Fields> <string>Amount</string> <string>TotalOpportunityQuantity</string> </Fields> </PolymorphicRelationship> </PolymorphicRelationships> </Query> Important: The parent field is copied to the record. If a parent is modified, the indexed record is not updated. Order (optional) One or more order restrictions that will be applied to the SOQL query used to retrieve Object records. l Ascending (optional): The direction of the ordering. Default is true (ascending). Use false for descending. l NullsFirst (optional): Whether records with NULL values in the specified fields must be returned first or last. Default is true. l Fields (required): One or more fields to base the ordering on, in the specified field order. 4www.coveo.com 31 Coveo Platform 7.0 | Salesforce Connector Guide Examples: With the following configuration: l Opportunity.Id shows that we can specify the query object name as the parent of the field. l Account.Foo.Id is a field on the parent Foo , which is also a field of the parent Accoun t of Opportunity. l What.Id is a field on the polymorphic parent What of Opportunity. <Query> <ObjectName>Opportunity</ObjectName> <Fields> <string>Id</string> </Fields> <Order> <Ascending>true</Ascending> <NullsFirst>false</NullsFirst> <Fields> <string>Name</string> <string>Opportunity.Id</string> <string>Account.Foo.Id</string> <string>What.Id</string> </Fields> </Order> </Query> The generated query is: SELECT Id FROM Opportunity ORDER BY Name, Opportunity.Id, Account.Foo.Id, What.Id ASC NULLS LAST Configuration including a child relationship: <Query> <ObjectName>Opportunity</ObjectName> <Fields> <string>Id</string> </Fields> <ChildRelationships> <Query> <ObjectName>Attachments</ObjectName> <Fields> <string>Id</string> </Fields> <Order> <Fields> <string>Name</string> </Fields> </Order> </Query> </ChildRelationships> </Query> The generated query is: SELECT Id, (SELECT Id FROM Attachments ORDER BY Name ASC NULLS FIRST) FROM Opportunity Note: The order element is supported with CES 7.0.6607+ (April 2014 monthly release). 4www.coveo.com 32 Coveo Platform 7.0 | Salesforce Connector Guide 6.3 XML Schema Definition Note: Starting with the CES 7.0.7183 (November 2014 monthly release), each of the ObjectsToGet in your Salesforce sources are validated against the XSD. If it is not the case, a SALESFORCE_INVALID_CONFIGURATION error message appears in the CES console and logs. Use the following XML schema definition to validate your configuration file. <?xml version="1.0" encoding="utf-8"?> <xs:schema id="ArrayOfQuery" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="Fields"> <xs:complexType> <xs:sequence> <xs:element name="string" nillable="true" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent msdata:ColumnName="string_Text" msdata:Ordinal="0"> <xs:extension base="xs:string"> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="ParentRelationships"> <xs:complexType> <xs:sequence> <xs:element name="ParentRelationship" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="RelationshipName" type="xs:string" minOccurs="0" maxOccurs="1" /> <xs:element ref="Fields" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="ParentRelationships" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="ParentRelationship" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="RelationshipName" type="xs:string" minOccurs="0" maxOccurs="1" /> <xs:element ref="Fields" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Query" type="QueryType" /> <xs:complexType name="QueryType"> <xs:sequence> <xs:element name="ObjectName" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="GroupBy" type="xs:string" minOccurs="0" /> <xs:element name="Limit" type="xs:string" minOccurs="0" /> <xs:element name="Offset" type="xs:string" minOccurs="0" /> 4www.coveo.com 33 Coveo Platform 7.0 | Salesforce Connector Guide <xs:element name="FoundRecordsAreDeleted" type="xs:string" minOccurs="0" /> <xs:element ref="Fields" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="Order" minOccurs="0" maxOccurs="1"> <xs:complexType> <xs:sequence> <xs:element name="Ascending" type="xs:boolean" minOccurs="0" maxOccurs="1" /> <xs:element name="NullsFirst" type="xs:boolean" minOccurs="0" maxOccurs="1" /> <xs:element ref="Fields" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Conditions" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="QueryCondition" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Field" type="xs:string" minOccurs="0" maxOccurs="1" /> <xs:element name="Operator" type="xs:string" minOccurs="0" maxOccurs="1" /> <xs:element name="Value" type="xs:string" minOccurs="0" maxOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element ref="ParentRelationships" minOccurs="0" maxOccurs="unbounded" /> <xs:element name="PolymorphicRelationships" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="PolymorphicRelationship" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="RelationshipName" type="xs:string" minOccurs="0" maxOccurs="1" /> <xs:element name="ObjectName" type="xs:string" minOccurs="0" maxOccurs="1" /> <xs:element ref="Fields" minOccurs="0" maxOccurs="unbounded" /> <xs:element ref="ParentRelationships" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="ChildRelationships" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Query" type="QueryType" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:element name="ArrayOfQuery" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> <xs:complexType> <xs:sequence> <xs:element ref="Query" minOccurs="0" maxOccurs="unbounded"> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> 4www.coveo.com 34 Coveo Platform 7.0 | Salesforce Connector Guide What's Next? Create your ObjectsToGet configuration file (see "Creating a Salesforce ObjectsToGet Configuration File" on page 35). 6.4 Creating a Salesforce ObjectsToGet Configuration File You must create an ObjectsToGet configuration file and attach it to your Salesforce source to instruct the connector which objects to retrieve from your Salesforce organization (see "Salesforce ObjectsToGet Configuration File" on page 21). Note: You must be familiar with standard and custom objects and fields used in your Salesforce organization to be able to create a custom ObjectsToGet configuration file. The content of the ObjectsToGet configuration file typically includes standard objects but most likely also the custom objects that you want to index. You can create your ObjectsToGet configuration file by starting with provided examples and customize it to suit your needs. It is recommended to create separate ObjectsToGet configuration files with separate sources for the following types of Salesforce content: l Service Cloud standard and custom objects and fields l Knowledge base articles l CRM Content To create a Salesforce ObjectsToGet configuration file 1. Refer to the most appropriate of the following topics to copy the content of the corresponding ObjectsToGet XML configuration file example: l Salesforce ObjectsToGet Configuration File Example for Standard Objects l "Salesforce ObjectsToGet Configuration File Example for Knowledge Base" on page 48 l "Salesforce ObjectsToGet Configuration File Example for CRM Content " on page 51 2. Using a text editor: a. Paste the content of the ObjectsToGet configuration file example. b. Modify or remove standard objects and fields, or add custom objects and fields to match the needs of your Salesforce organization (see "Salesforce ObjectsToGet Configuration File" on page 21). c. Save your ObjectsToGet configuration file. 3. Validate your ObjectsToGet configuration file (see "XML Schema Definition" on page 33). 4www.coveo.com 35 Coveo Platform 7.0 | Salesforce Connector Guide 4. Using an administrator account, connect to the Coveo Master server, and copy your custom ObjectsToGet configuration file to a location accessible to CES. Example: On the Coveo Master server, for an ObjectsToGet configuration file for standard and custom objects and fields, save the file as: D:\CES7\Config\Salesforce_Basic_ObjectsToGet.xml. You will specify the full path to this file when you configure your Salesforce source (see "ObjectsToGet File" on page 97). What's Next? Create a mapping file to transfer the values of fields retrieved from Salesforce into CES fields (see "Creating a Salesforce Mapping File" on page 70). 6.5 Salesforce ObjectsToGet Configuration File Example for Standard Objects The ObjectsToGet configuration file example presented in this topic specifies to retrieve the following standard Service Cloud objects and fields (including Chatter feed items) that are typically useful to index: l Account l Case l Case Comment l Contact l Event l Solution l Task l User l Attachment l Feed item (Chatter) l Feed comment (Chatter) Note: The Salesforce connector can crawl Chatter feed items and comments with CES 7.0.6196+ (November 2013 monthly release). The following code sample is the content of the ObjectsToGet configuration file example for standard Service Cloud objects and fields. 4www.coveo.com 36 Coveo Platform 7.0 | Salesforce Connector Guide <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>Account</ObjectName> <Fields> <string>Id</string> <string>IsDeleted</string> <string>Name</string> <string>Type</string> <string>BillingStreet</string> <string>BillingCity</string> <string>BillingState</string> <string>BillingPostalCode</string> <string>BillingCountry</string> <string>Phone</string> <string>Fax</string> <string>AccountNumber</string> <string>Website</string> <string>Sic</string> <string>Industry</string> <string>AnnualRevenue</string> <string>NumberOfEmployees</string> <string>Ownership</string> <string>TickerSymbol</string> <string>Description</string> <string>Rating</string> <string>Site</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>LastActivityDate</string> <string>Jigsaw</string> <string>JigsawCompanyId</string> <string>AccountSource</string> <string>SicDesc</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>MasterRecord</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Parent</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> 4www.coveo.com 37 Coveo Platform 7.0 | Salesforce Connector Guide </Query> <Query> <ObjectName>Case</ObjectName> <Fields> <string>Id</string> <string>IsDeleted</string> <string>CaseNumber</string> <string>SuppliedName</string> <string>SuppliedEmail</string> <string>SuppliedCompany</string> <string>Type</string> <string>Status</string> <string>Reason</string> <string>Origin</string> <string>Subject</string> <string>Priority</string> <string>Description</string> <string>IsClosed</string> <string>ClosedDate</string> <string>IsEscalated</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Contact</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Account</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Asset</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Parent</RelationshipName> <Fields> <string>CaseNumber</string> <string>Subject</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> 4www.coveo.com 38 Coveo Platform 7.0 | Salesforce Connector Guide </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>Owner</RelationshipName> <ObjectName>Group</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Owner</RelationshipName> <ObjectName>User</ObjectName> </PolymorphicRelationship> </PolymorphicRelationships> </Query> <Query> <ObjectName>CaseComment</ObjectName> <Fields> <string>Id</string> <string>IsPublished</string> <string>CommentBody</string> <string>CreatedDate</string> <string>SystemModstamp</string> <string>LastModifiedDate</string> <string>IsDeleted</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Parent</RelationshipName> <Fields> <string>CaseNumber</string> <string>Subject</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> </Query> <Query> <ObjectName>Contact</ObjectName> <Fields> <string>Id</string> <string>IsDeleted</string> <string>LastName</string> <string>FirstName</string> <string>Salutation</string> <string>Name</string> <string>MailingStreet</string> <string>MailingCity</string> <string>MailingState</string> <string>MailingPostalCode</string> <string>MailingCountry</string> <string>Phone</string> <string>Fax</string> <string>MobilePhone</string> <string>HomePhone</string> <string>AssistantPhone</string> <string>Email</string> <string>Title</string> <string>Department</string> <string>AssistantName</string> <string>LeadSource</string> 4www.coveo.com 39 Coveo Platform 7.0 | Salesforce Connector Guide <string>Birthdate</string> <string>Description</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>LastActivityDate</string> <string>Jigsaw</string> <string>JigsawContactId</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>MasterRecord</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Account</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>ReportsTo</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> </Query> <Query> <ObjectName>Event</ObjectName> <Fields> <string>Id</string> <string>Subject</string> <string>Location</string> <string>IsAllDayEvent</string> <string>ActivityDateTime</string> <string>ActivityDate</string> <string>DurationInMinutes</string> <string>StartDateTime</string> <string>EndDateTime</string> <string>Description</string> <string>IsPrivate</string> <string>ShowAs</string> <string>IsDeleted</string> <string>IsChild</string> <string>IsGroupEvent</string> <string>GroupEventType</string> <string>CreatedDate</string> <string>LastModifiedDate</string> 4www.coveo.com 40 Coveo Platform 7.0 | Salesforce Connector Guide <string>SystemModstamp</string> <string>IsArchived</string> <string>IsRecurrence</string> <string>RecurrenceStartDateTime</string> <string>RecurrenceEndDateOnly</string> <string>RecurrenceTimeZoneSidKey</string> <string>RecurrenceType</string> <string>RecurrenceInterval</string> <string>RecurrenceDayOfWeekMask</string> <string>RecurrenceDayOfMonth</string> <string>RecurrenceInstance</string> <string>RecurrenceMonthOfYear</string> <string>ReminderDateTime</string> <string>IsReminderSet</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Who</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>What</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Account</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>Who</RelationshipName> <ObjectName>Contact</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Who</RelationshipName> <ObjectName>Lead</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Account</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> 4www.coveo.com 41 Coveo Platform 7.0 | Salesforce Connector Guide <RelationshipName>What</RelationshipName> <ObjectName>Asset</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Campaign</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Case</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Contract</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Magic_Item__c</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Opportunity</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Product2</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Solution</ObjectName> </PolymorphicRelationship> </PolymorphicRelationships> </Query> <Query> <ObjectName>Solution</ObjectName> <Fields> <string>Id</string> <string>IsDeleted</string> <string>SolutionNumber</string> <string>SolutionName</string> <string>IsPublished</string> <string>IsPublishedInPublicKb</string> <string>Status</string> <string>IsReviewed</string> <string>SolutionNote</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>TimesUsed</string> <string>IsHtml</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> 4www.coveo.com 42 Coveo Platform 7.0 | Salesforce Connector Guide </ParentRelationship> </ParentRelationships> </Query> <Query> <ObjectName>Task</ObjectName> <Fields> <string>Id</string> <string>Subject</string> <string>ActivityDate</string> <string>Status</string> <string>Priority</string> <string>Description</string> <string>IsDeleted</string> <string>IsClosed</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>IsArchived</string> <string>CallType</string> <string>CallDisposition</string> <string>IsReminderSet</string> <string>IsRecurrence</string> <string>RecurrenceStartDateOnly</string> <string>RecurrenceEndDateOnly</string> <string>RecurrenceTimeZoneSidKey</string> <string>RecurrenceType</string> <string>RecurrenceInterval</string> <string>RecurrenceDayOfWeekMask</string> <string>RecurrenceDayOfMonth</string> <string>RecurrenceInstance</string> <string>RecurrenceMonthOfYear</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Who</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>What</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Account</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> 4www.coveo.com 43 Coveo Platform 7.0 | Salesforce Connector Guide </Fields> </ParentRelationship> </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>Who</RelationshipName> <ObjectName>Contact</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Who</RelationshipName> <ObjectName>Lead</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Account</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Asset</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Campaign</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Case</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Contract</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Magic_Item__c</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Opportunity</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Product2</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>What</RelationshipName> <ObjectName>Solution</ObjectName> </PolymorphicRelationship> </PolymorphicRelationships> </Query> <Query> <ObjectName>User</ObjectName> <Fields> <string>Id</string> <string>Username</string> <string>LastName</string> <string>FirstName</string> <string>Name</string> <string>CompanyName</string> <string>Division</string> <string>Department</string> <string>Title</string> <string>Street</string> <string>City</string> <string>State</string> <string>PostalCode</string> <string>Country</string> <string>Email</string> <string>Phone</string> 4www.coveo.com 44 Coveo Platform 7.0 | Salesforce Connector Guide <string>Fax</string> <string>MobilePhone</string> <string>Alias</string> <string>CommunityNickname</string> <string>IsActive</string> <string>TimeZoneSidKey</string> <string>LocaleSidKey</string> <string>ReceivesInfoEmails</string> <string>ReceivesAdminInfoEmails</string> <string>EmailEncodingKey</string> <string>UserType</string> <string>LanguageLocaleKey</string> <string>EmployeeNumber</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>UserPermissionsMarketingUser</string> <string>UserPermissionsOfflineUser</string> <string>UserPermissionsCallCenterAutoLogin</string> <string>UserPermissionsMobileUser</string> <string>UserPermissionsSFContentUser</string> <string>UserPermissionsKnowledgeUser</string> <string>UserPermissionsInteractionUser</string> <string>UserPermissionsSupportUser</string> <string>UserPermissionsSiteforceContributorUser</string> <string>UserPermissionsSiteforcePublisherUser</string> <string>UserPermissionsChatterAnswersUser</string> <string>ForecastEnabled</string> <string>UserPreferencesActivityRemindersPopup</string> <string>UserPreferencesEventRemindersCheckboxDefault</string> <string>UserPreferencesTaskRemindersCheckboxDefault</string> <string>UserPreferencesReminderSoundOff</string> <string>UserPreferencesDisableAllFeedsEmail</string> <string>UserPreferencesDisableFollowersEmail</string> <string>UserPreferencesDisableProfilePostEmail</string> <string>UserPreferencesDisableChangeCommentEmail</string> <string>UserPreferencesDisableLaterCommentEmail</string> <string>UserPreferencesDisProfPostCommentEmail</string> <string>UserPreferencesContentNoEmail</string> <string>UserPreferencesContentEmailAsAndWhen</string> <string>UserPreferencesApexPagesDeveloperMode</string> <string>UserPreferencesHideCSNGetChatterMobileTask</string> <string>UserPreferencesDisableMentionsPostEmail</string> <string>UserPreferencesDisMentionsCommentEmail</string> <string>UserPreferencesHideCSNDesktopTask</string> <string>UserPreferencesDisCommentAfterLikeEmail</string> <string>UserPreferencesDisableLikeEmail</string> <string>UserPreferencesDisableMessageEmail</string> <string>UserPreferencesOptOutOfTouch</string> <string>UserPreferencesDisableBookmarkEmail</string> <string>UserPreferencesDisableSharePostEmail</string> <string>UserPreferencesEnableAutoSubForFeeds</string> <string>UserPreferencesDisableFileShareNotificationsForApi</string> <string>Extension</string> <string>FederationIdentifier</string> <string>AboutMe</string> <string>FullPhotoUrl</string> <string>SmallPhotoUrl</string> <string>DigestFrequency</string> <string>DefaultGroupNotificationFrequency</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>UserRole</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> 4www.coveo.com 45 Coveo Platform 7.0 | Salesforce Connector Guide <RelationshipName>Profile</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Manager</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Contact</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> </Query> <Query> <ObjectName>Attachment</ObjectName> <Fields> <string>Id</string> <string>IsDeleted</string> <string>Name</string> <string>IsPrivate</string> <string>ContentType</string> <string>BodyLength</string> <string>Body</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>Description</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Parent</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> 4www.coveo.com 46 Coveo Platform 7.0 | Salesforce Connector Guide <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Account</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Asset</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Campaign</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Case</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Contact</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Contract</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>EmailTemplate</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Event</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Lead</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Magic_Item__c</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Opportunity</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Product2</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Solution</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>Parent</RelationshipName> <ObjectName>Task</ObjectName> </PolymorphicRelationship> </PolymorphicRelationships> </Query> <Query> <ObjectName>FeedItem</ObjectName> <Fields> <string>Id</string> <string>Type</string> <string>Body</string> 4www.coveo.com 47 Coveo Platform 7.0 | Salesforce Connector Guide <string>CreatedDate</string> <string>IsDeleted</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>CommentCount</string> <string>LikeCount</string> <string>LinkUrl</string> <string>ContentData</string> <string>ContentFileName</string> <string>ContentDescription</string> <string>ContentType</string> <string>ContentSize</string> </Fields> </Query> <Query> <ObjectName>FeedComment</ObjectName> <Fields> <string>Id</string> <string>FeedItemId</string> <string>CreatedDate</string> <string>CommentBody</string> <string>IsDeleted</string> <string>CommentType</string> <string>ParentId</string> <string>RelatedRecordId</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>InsertedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>CreatedBy</RelationshipName> <ObjectName>User</ObjectName> </PolymorphicRelationship> </PolymorphicRelationships> </Query> </ArrayOfQuery> What's Next? Create a mapping file for fields from obtained objects (see "Salesforce Mapping File Example for Standard Objects" on page 71). 6.6 Salesforce ObjectsToGet Configuration File Example for Knowledge Base Salesforce Knowledge Base content correspond to non-standard objects and fields. When your Salesforce organization contains Knowledge Base articles and you want to index their content, you must include specific queries to your custom ObjectsToGet configuration file. 4www.coveo.com 48 Coveo Platform 7.0 | Salesforce Connector Guide The ObjectsToGet configuration file example presented in this topic specifies to retrieve two arbitrary named Knowledge Base objects: l MyKBArticleType1 l MyKBArticleType2 Note: The Salesforce connector cannot index permissions of Knowledge Base articles like it can for other objects. It is therefore recommended to create a separate ObjectsToGet configuration file and source for Knowledge Base articles. The following XML code is an ObjectsToGet configuration file example for Knowledge Base articles. <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>MyKBArticleType1__ka</ObjectName> <Fields> <string>CaseAssociationCount</string> <string>LastModifiedDate</string> <string>ArticleNumber</string> <string>LastPublishedDate</string> <string>FirstPublishedDate</string> <string>SystemModstamp</string> <string>ArchivedDate</string> <string>CreatedDate</string> <string>IsDeleted</string> <string>Id</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> <ChildRelationships> <Query> <ObjectName>CaseArticles</ObjectName> <Fields> <string>CaseId</string> </Fields> </Query> </ChildRelationships> </Query> <Query> <ObjectName>MyKBArticleType1__kav</ObjectName> <Fields> <string>ArchivedDate</string> <string>IsVisibleInPrm</string> <string>Undecipherable_Content__c</string> <string>IsVisibleInApp</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>IsVisibleInPkb</string> 4www.coveo.com 49 Coveo Platform 7.0 | Salesforce Connector Guide <string>PublishStatus</string> <string>IsDeleted</string> <string>Id</string> <string>IsLatestVersion</string> <string>CreatedDate</string> <string>Title</string> <string>LastPublishedDate</string> <string>Summary</string> <string>FirstPublishedDate</string> <string>ArticleNumber</string> <string>Language</string> <string>UrlName</string> <string>VersionNumber</string> <string>IsVisibleInCsp</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> </Query> <Query> <ObjectName>MyKBArticleType2__ka</ObjectName> <Fields> <string>CaseAssociationCount</string> <string>LastModifiedDate</string> <string>ArticleNumber</string> <string>LastPublishedDate</string> <string>FirstPublishedDate</string> <string>SystemModstamp</string> <string>ArchivedDate</string> <string>CreatedDate</string> <string>IsDeleted</string> <string>Id</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> <ChildRelationships> <Query> <ObjectName>CaseArticles</ObjectName> <Fields> <string>CaseId</string> </Fields> </Query> </ChildRelationships> </Query> <Query> <ObjectName>MyKBArticleType2__kav</ObjectName> 4www.coveo.com 50 Coveo Platform 7.0 | Salesforce Connector Guide <Fields> <string>ArchivedDate</string> <string>IsVisibleInPrm</string> <string>IsVisibleInApp</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>IsVisibleInPkb</string> <string>PublishStatus</string> <string>IsDeleted</string> <string>Id</string> <string>IsLatestVersion</string> <string>CreatedDate</string> <string>Title</string> <string>LastPublishedDate</string> <string>Summary</string> <string>FirstPublishedDate</string> <string>ArticleNumber</string> <string>Language</string> <string>UrlName</string> <string>VersionNumber</string> <string>IsVisibleInCsp</string> <string>Recipe__c</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> </Query> </ArrayOfQuery> What's Next? Create a mapping file for fields from obtained objects (see "Salesforce Mapping File Example for Knowledge Base" on page 81). 6.7 Salesforce ObjectsToGet Configuration File Example for CRM Content With Salesforce CRM Content you can organize, share, search, and manage content within your organization and across key areas of the Salesforce application. CRM Content can include all file types, from traditional business documents such as Microsoft Office documents to audio files, video files, Web pages, and Google docs (see the Salesforce document Salesforce CRM Content Overview). When your Salesforce organization contains CRM Content and you want to index the content of these files, you must include additional queries to your custom ObjectsToGet configuration file. The following XML code is an ObjectsToGet configuration file example for Chatter files. 4www.coveo.com 51 Coveo Platform 7.0 | Salesforce Connector Guide <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>ContentVersion</ObjectName> <Fields> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>IsDeleted</string> <string>Id</string> <string>ContentDocumentId</string> <string>ContentModifiedById</string> <string>ContentModifiedDate</string> <string>ContentSize</string> <string>ContentUrl</string> <string>Description</string> <string>FeaturedContentBoost</string> <string>FeaturedContentDate</string> <string>FileType</string> <string>FirstPublishLocationId</string> <string>IsLatest</string> <string>NegativeRatingCount</string> <string>Origin</string> <string>OwnerId</string> <string>PathOnClient</string> <string>PositiveRatingCount</string> <string>PublishStatus</string> <string>RatingCount</string> <string>ReasonForChange</string> <string>TagCsv</string> <string>Title</string> <string>VersionData</string> <string>VersionNumber</string> </Fields> </Query> </ArrayOfQuery> The following XML code is an ObjectsToGet configuration file example for CRM Content. <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>ContentVersion</ObjectName> <Fields> <string>Id</string> <string>IsLatest</string> <string>ContentUrl</string> <string>Title</string> <string>IsDeleted</string> <string>ContentModifiedDate</string> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>PublishStatus</string> <string>VersionData</string> <string>ContentSize</string> <string>Origin</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>ContentDocument</RelationshipName> <Fields> <string>Title</string> </Fields> 4www.coveo.com 52 Coveo Platform 7.0 | Salesforce Connector Guide </ParentRelationship> <ParentRelationship> <RelationshipName>Owner</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>LastModifiedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Account</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Asset</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Campaign</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Case</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>CollaborationGroup</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Contact</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>ContentWorkspace</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Contract</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Dashboard</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>DashboardComponent</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> 4www.coveo.com 53 Coveo Platform 7.0 | Salesforce Connector Guide <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Event</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Lead</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Lost_Scroll__ka</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Magic_Item__c</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Magic_Spell__ka</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Opportunity</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Product2</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Report</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Site</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Solution</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>Task</ObjectName> </PolymorphicRelationship> <PolymorphicRelationship> <RelationshipName>FirstPublishLocation</RelationshipName> <ObjectName>User</ObjectName> </PolymorphicRelationship> </PolymorphicRelationships> </Query> </ArrayOfQuery> What's Next? Create a mapping file for fields from obtained objects (see "Salesforce Mapping File Example for CRM Content" on page 83). 6.8 Salesforce ObjectsToGet Configuration File Example for Chatter Objects A variety of Salesforce objects such as User, CollaborationGroup, Account, and Case can have Chatter feeds. The list of Salesforce objects having Chatter feeds can be customized and is retrieved 4www.coveo.com 54 Coveo Platform 7.0 | Salesforce Connector Guide dynamically by the Salesforce connector. Chatter posts and comments inherit the permissions of the record onto which they are posted, no matter if that record is public, private, a group or a user. Chatter feed comments are fetched along with their parent feed item as a child relationship, they do not require additional API calls. By default, the Salesforce connector supports the following Chatter objects and their types: l l l FeedItem for feed item of types: o TextPost : a direct text entry on a feed o LinkPost : a URL posting on a feed o ContentPost: an uploaded file on a feed o PollPost : a poll posted on a feed FeedComment for comments on a feed item of types o ContentComment: an uploaded file on a comment o TextComment: a direct text entry on a comment ContentVersion for Chatter files o FeedContent: File (ContentVersion) linked to Chatter comment You can add or remove some Chatter types (see "Indexing More Than the Built-in FeedItem Types" on page 69) such as the following: l Non default FeedItem types: o DashboardComponentSnapshot: a posting of a dashboard snapshot on a feed o TrackedChange: a change or group of changes to a tracked field o UserStatus: automatically generated when a user adds a post o ApprovalPost: automatically generated by a feed query on an approval item o CollaborationGroupCreated: automatically generated post on a user feed when the user creates a public group o ActivityEvent: generated event when a user or the API adds a task associated with a feed- enabled parent record (excluding email tasks on cases) o CaseCommentPost: generated event when a user adds a case comment for a case object o EmailMessageEvent: generated event when an email related to a case object is sent or received 4www.coveo.com 55 Coveo Platform 7.0 | Salesforce Connector Guide o CallLogPost: generated event when a user logs a call for a case through the user interface. This event is also generated by CTI (computer-telephony integration) calls. o ChangeStatusPost: generated event when a user changes the status of a case o AttachArticleEvent: generated event when a user attaches an article to a case CollaborationGroup l You can use metadata to link related Chatter items: Any type of feed item and it's comment(s): FeedItem.Id == FeedComment.FeedItemId l A feed item of type ContentPost and the corresponding uploaded Chatter file: FeedItem.RelatedRecordId == ContentVersion.Id l A feed comment of type ContentComment and the corresponding uploaded Chatter file: FeedComment.RelatedRecordId == ContentVersion.Id l The following code sample is the content of the ObjectsToGet configuration file example for Chatter feed for standard Service Cloud objects and fields. Important: l Both FeedItem and FeedComment objects must be present in the configuration file. l Only Chatter feeds for objects (ex.: User, CollaborationGroup, Account...) that are also present in the configuration file will be processed. <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query>...</Query> <Query>...</Query> <Query> <ObjectName>FeedItem</ObjectName> <Fields> <string>Id</string> <string>Type</string> <string>Body</string> <string>CreatedDate</string> <string>IsDeleted</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>CommentCount</string> <string>LikeCount</string> <string>LinkUrl</string> <string>ContentData</string> <string>ContentFileName</string> <string>ContentDescription</string> <string>ContentType</string> <string>ContentSize</string> </Fields> </Query> <Query> <ObjectName>FeedComment</ObjectName> <Fields> 4www.coveo.com 56 Coveo Platform 7.0 | Salesforce Connector Guide <string>Id</string> <string>FeedItemId</string> <string>CreatedDate</string> <string>CommentBody</string> <string>IsDeleted</string> <string>CommentType</string> <string>ParentId</string> <string>RelatedRecordId</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>CreatedBy</RelationshipName> <Fields> <string>Name</string> <string>Type</string> </Fields> </ParentRelationship> <ParentRelationship> <RelationshipName>InsertedBy</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> <PolymorphicRelationships> <PolymorphicRelationship> <RelationshipName>CreatedBy</RelationshipName> <ObjectName>User</ObjectName> </PolymorphicRelationship> </PolymorphicRelationships> </Query> <Query> <ObjectName>ContentVersion</ObjectName> <Fields> <string>CreatedDate</string> <string>LastModifiedDate</string> <string>SystemModstamp</string> <string>IsDeleted</string> <string>Id</string> <string>ContentDocumentId</string> <string>ContentModifiedById</string> <string>ContentModifiedDate</string> <string>ContentSize</string> <string>ContentUrl</string> <string>Description</string> <string>FeaturedContentBoost</string> <string>FeaturedContentDate</string> <string>FileType</string> <string>FirstPublishLocationId</string> <string>IsLatest</string> <string>NegativeRatingCount</string> <string>Origin</string> <string>OwnerId</string> <string>PathOnClient</string> <string>PositiveRatingCount</string> <string>PublishStatus</string> <string>RatingCount</string> <string>ReasonForChange</string> <string>TagCsv</string> <string>Title</string> <string>VersionData</string> <string>VersionNumber</string> </Fields> </Query> </ArrayOfQuery> 4www.coveo.com 57 Coveo Platform 7.0 | Salesforce Connector Guide What's Next? Create a mapping file for fields from obtained objects (see "Salesforce Mapping File Example for Chatter Objects" on page 85). 6.9 Salesforce Connector Configuration Recipes This topic provides Salesforce connector configuration solutions for various cases you may encounter when you want to optimize the searchability of your Salesforce content. 6.9.1 Indexing all Knowledge Base Versions and States A Knowledge Base (KB) article has a state and a version. By default, the connector fetches the latest version of an article with the online (published) status. Note: By default, the connector does not remove documents that are archived, but you can change this behavior (see "Excluding Archived Knowledge Base Articles" on page 60). The fields PublishStatus and IsLatestVersion respectively control which article version and state are fetched. Fetching all the versions and states means: l Fetch the online articles l Fetch the drafts articles l Fetch the latest archived articles l Fetch other archived articles The following ObjectsToGet configuration file example for an article of type Documentation gets Draft, Online , and Archived articles. <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>Documentation__ka</ObjectName> <Fields> <string>Id</string> <string>LastPublishedDate</string> </Fields> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <Fields> <string>Id</string> <string>Title</string> <string>PublishStatus</string> <string>IsLatestVersion</string> </Fields> <Conditions> <QueryCondition> <Field>PublishStatus</Field> 4www.coveo.com 58 Coveo Platform 7.0 | Salesforce Connector Guide <Operator>=</Operator> <Value>'Archived'</Value> </QueryCondition> <QueryCondition> <Field>IsLatestVersion</Field> <Operator>=</Operator> <Value>False</Value> </QueryCondition> </Conditions> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <Fields> <string>Id</string> <string>Title</string> <string>PublishStatus</string> <string>IsLatestVersion</string> </Fields> <Conditions> <QueryCondition> <Field>PublishStatus</Field> <Operator>=</Operator> <Value>'Archived'</Value> </QueryCondition> <QueryCondition> <Field>IsLatestVersion</Field> <Operator>=</Operator> <Value>True</Value> </QueryCondition> </Conditions> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <Fields> <string>Id</string> <string>Title</string> <string>PublishStatus</string> <string>IsLatestVersion</string> </Fields> <Conditions> <QueryCondition> <Field>PublishStatus</Field> <Operator>=</Operator> <Value>'Draft'</Value> </QueryCondition> </Conditions> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <Fields> <string>Id</string> <string>Title</string> <string>PublishStatus</string> <string>IsLatestVersion</string> </Fields> <Conditions> <QueryCondition> <Field>PublishStatus</Field> <Operator>=</Operator> <Value>'Online'</Value> </QueryCondition> </Conditions> </Query> </ArrayOfQuery> 4www.coveo.com 59 Coveo Platform 7.0 | Salesforce Connector Guide 6.9.2 Excluding Archived Knowledge Base Articles Archived KB articles can be removed in an incremental refresh using a destructive query as shown in the following ObjectsToGet configuration file example. This query will remove previously indexed documents from the index instead of adding/updating them. Important: l You do not need to specify fields or relationships for destructive queries. Found records will only be deleted. Keeping your ObjectsToGet short and sweet helps with debugging. l Non-replicateable deleted objects cannot be deleted using a destructive query. <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>Documentation__ka</ObjectName> <Fields> <string>Id</string> <string>LastPublishedDate</string> </Fields> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <Fields> <string>Id</string> <string>Title</string> </Fields> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <FoundRecordsAreDeleted>true</FoundRecordsAreDeleted> <Conditions> <QueryCondition> <Field>PublishStatus</Field> <Operator>=</Operator> <Value>'Archived'</Value> </QueryCondition> <QueryCondition> <Field>IsLatestVersion</Field> <Operator>=</Operator> <Value>True</Value> </QueryCondition> </Conditions> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <FoundRecordsAreDeleted>true</FoundRecordsAreDeleted> <Conditions> <QueryCondition> <Field>PublishStatus</Field> <Operator>=</Operator> <Value>'Archived'</Value> </QueryCondition> <QueryCondition> <Field>IsLatestVersion</Field> <Operator>=</Operator> <Value>False</Value> </QueryCondition> </Conditions> </Query> </ArrayOfQuery> 4www.coveo.com 60 Coveo Platform 7.0 | Salesforce Connector Guide 6.9.3 Indexing Knowledge Base Attachments The Salesforce connector processes attachments on KB articles differently compared to normal objects (which rely on the Attachment object). Attachments on KB articles are automatically indexed when fields ending with __Name__s are specified in the ObjectsToGet configuration file such is in the following example to index the attachment of an article of type Documentation. <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>Documentation__ka</ObjectName> <Fields> <string>Id</string> </Fields> </Query> <Query> <ObjectName>Documentation__kav</ObjectName> <Fields> <string>Id</string> <string>Attachment__Name__s</string> </Fields> </Query> </ArrayOfQuery> An entry in the mapping file must also exist. As you can see below, the name of the mapping is [NameOfArticleType] Attachment: <?xml version="1.0" encoding="Windows-1252" ?> <SalesForce> ... <Mapping type="Documentation Attachment"> <ContentType>binarydata</ContentType> ... </Mapping> ... </SalesForce> 6.9.4 Fetching Records With Parent Relationships That Must Be Incrementally Updated It is not uncommon to need to index a record with fields referring to a parent of a child relationship. The traditional way to achieve this is to use the <ChildRelationships/>, <ParentRelationships/> or <PolymorphicRelationships/> elements in a Query definition. However, using those element will give you records that will not be refreshed correctly. When record A references a field of the record B and record B changes, record A won't be updated in an incremental refresh. Let's take a specific example, where an Opportunity is referring to an Account name. The following ObjectsToGet configuration file example produces one Opportunity record with the metadata ["Id", "Account.Name"]: <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 4www.coveo.com 61 Coveo Platform 7.0 | Salesforce Connector Guide <Query> <ObjectName>Opportunity</ObjectName> <Fields> <string>Id</string> </Fields> <ParentRelationships> <ParentRelationship> <RelationshipName>Account</RelationshipName> <Fields> <string>Name</string> </Fields> </ParentRelationship> </ParentRelationships> </Query> </ArrayOfQuery> You can solve this problem using the foreign keys. You must create two queries instead of one. The following ObjectsToGet configuration file example produces one Opportunity record with the metadata ["AccountId"] and one Account record with the metadata ["Id", "Name"] . <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>Opportunity</ObjectName> <Fields> <string>AccountId</string> </Fields> </Query> <Query> <ObjectName>Account</ObjectName> <Fields> <string>Id</string> <string>Name</string> </Fields> </Query> </ArrayOfQuery> With metadata mapped to fields as follow: Opportunity AccountId: sfaccountid Account Id: sfaccountid Name: sfaccountname You must edit the CES [Index_Path]\Config\Config.txt file to link the two records using foreign keys as shown below: Important: Manually modifying the CES configuration file may have important advert consequences, particularly when your Coveo deployment includes one or more Mirror servers. Contact Coveo Support for assistance to set up foreign keys. <PhysicalIndex> ... <ForeignKeys> <ForeignKey ID="1"> <KeyField>sfaccountid</KeyField> <ValueField>sfaccountname</ValueField> 4www.coveo.com 62 Coveo Platform 7.0 | Salesforce Connector Guide <FreeTextSearch>false</FreeTextSearch> </ForeignKey> </ForeignKeys> ... </PhysicalIndex> 6.9.5 Fetching Child Relationship to Use for Folding Fetching child relationships which are used in folding (aka: no facet) so they play well with incremental refresh is done through results folding. Let's take a specific example, where a Case is referring to CaseComments. Similarly to the fetching parent relationship case, avoid using the <ChildRelationships/> element as shown below and producing one Case record with the metadata ["Id", "CaseComments.CommentBody"]. <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>Case</ObjectName> <Fields> <string>Id</string> </Fields> <ChildRelationships> <Query> <ObjectName>CaseComments</ObjectName> <Fields> <string>CommentBody</string> </Fields> </Query> </ChildRelationships> </Query> </ArrayOfQuery> Rather use two or more queries: <?xml version="1.0" encoding="utf-8"?> <ArrayOfQuery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Query> <ObjectName>Case</ObjectName> <Fields> <string>Id</string> </Fields> </Query> <Query> <ObjectName>CaseComment</ObjectName> <Fields> <string>Id</string> <string>ParentId</string> </Fields> </Query> </ArrayOfQuery> Now all that is left to do is to use the user interface folding component to fold CaseComments under Case documents like in the Coveo JavaScript Search (see Folding Component). 4www.coveo.com 63 Coveo Platform 7.0 | Salesforce Connector Guide 6.9.6 Fetch Child Relationship to Use to Increase or Reduce Results From Queries Fetching child relationships which are used to increase or reduce the number of results (aka: no facet) so they play well with incremental refresh is done through nested queries. Like in other cases, avoid using the <ChildRelationships/> element and rather use two or more queries. You can use the example from the previous recipe for the ObjectsToGet configuration file. You can then use the nested query in the query parameters or the query extension language of the user interface. A simple, but real use case is to query the Cases AND CaseComments documents but only return Cases as follows: @sfid=[[@syssfcaseid] @objecttype=CaseComment q] // Where q is the keyword. 6.9.7 Minimizing API Calls and Object Description Prefetching By default, the connector prefetches the descriptions of every object in the Salesforce organization to minimize the number of API calls used based on the following assumptions: l Fetching an object costs 1 API call. l Prefetching 200 objects costs 1 API call. l An organization typically has 500-1000 objects. l An ObjectsToGet configuration file typically queries 10-20 objects. Example: An organization has 1000 objects and the source query in the ObjectsToGet configuration file includes 20 objects. An incremental refresh is scheduled every 5 minutes, so 24 h / 5 min = 288 refreshes per day . l Without prefetching: 20 obj. * 288 incr. refr. = 5760 calls per day. l With prefetching: (1000 obj. / 200 obj. per prefetch) * 288 incr. refr. = 1440 calls per day . Using prefetching consumes four times less calls in this case. Prefetching object descriptions does not always minimize API calls. 4www.coveo.com 64 Coveo Platform 7.0 | Salesforce Connector Guide Example: An organization has 2000 objects and the source query in the ObjectsToGet configuration file includes 5 objects. An incremental refresh is scheduled every 5 minutes, so 24 h / 5 min = 288 refreshes per day . l Without prefetching: 5 obj. * 288 incr. refr. = 1440calls per day. l With prefetching: (2000 obj. / 200 obj. per prefetch) * 288 incr. refr. = 2880 calls per day . In this scenario, turning off prefetching is beneficial. You can turn prefetching off by setting the hidden Salesforce source parameter PrefetchObjectDescriptions to False (see "PrefetchObjectDescriptions" on page 103). The formula to determine the optimal value for the PrefetchObjectDescriptions parameter is: PrefetchObjectDescriptions = ObjectsToGet.Objects.Count > Organization.Objects.Count / 200 6.9.8 Fetching Records Faster Using the Turbo Mode Runner The connector default behavior when fetching records of a query is: 1. Make an API call to get page 1, and then wait for the records. 2. Process the records. 3. Make an API call to get page 2, and so on. For some queries, this process can take days. The alternative solution in such cases is to use the TurboMode runner. When to use Consider using the TurboMode runner when: l The query generally takes a long time to execute. l An investigation showed that Salesforce returns small pages of results (ex: 1-5 items per page). l An investigation showed that Salesforce takes a long time to generate a page (ex: 1-3 seconds per page). l The following disadvantages are acceptable: o More API calls are needed. o More free memory is needed. o Does not work for queries with an IN condition on Id. 4www.coveo.com 65 Coveo Platform 7.0 | Salesforce Connector Guide o Fetched items are not sorted (so pausing/resuming the connector on that query will refetch all the items). Important: A Salesforce source using the TurboMode runner for one of its queries must have its own dedicated credentials to prevent errors for other sources running in parallel. How to use You can activate the TurboMode runner in the ObjectsToGet configuration file as follows: <Query> <Runner>TurboMode</Runner> ... </Query> How it works With the Turbo Mode query runner, the Salesforce connector executes two query types in parallel: l Id fetcher One query asynchronously fetches all the ids of the records and puts them in a queue. This query is executed by 1 thread and is fast, regardless of the real query to execute. l Record fetchers Several queries representing the real query to execute, take up to 200 ids each, fetch the records, and put them in another queue. These queries are slow, but are executed in parallel by N threads. In practice, N = 8 , limited by a hard limit from Salesforce (see Query Locator). The query runner coordinates the threads and serves the fetched records to the caller as a simple only-readonce IEnumerable. Example: The following query applies to 100,000 records. SELECT Id, Subject, (SELECT Email FROM Shares) FROM Account With the default runner, if Salesforce sends pages of 5 records every 3 seconds, it will take more than 16 hours to fetch all the records. With the TurboMode runner, the Id fetcher query is: SELECT Id FROM Account and the Record fetcher queries are: SELECT Id, Subject, (SELECT Email FROM Shares) FROM Account WHERE Id IN (...) 4www.coveo.com 66 Coveo Platform 7.0 | Salesforce Connector Guide Note: Between fetching IDs and fetching records, records can be deleted in Salesforce. In this case, the IDs are simply ignored by Salesforce. 6.9.9 Reducing the Metadata Package Size by Scoping Parents of ContentVersion and Attachment Objects ContentVersion and Attachment objects look up their parent objects to resolve record permissions. The default behavior of the connector is to fetch the metadata package for all parents of those objects to determine their sharing models. For some Salesforce organizations, the fetched metadata package can become too big. You can specify a special InCondition on the field ParentObjectType in the ObjectsToGet configuration file to scope the parents of a record to specific values and consequently, reduce the size of the metadata package to fetch. Important: With this technique, permissions on records are not fully indexed. Only parent records of specified parent objects are considered to determine the permissions of records. Example: With the following query, the ContentVersion record permissions are the aggregation of parent Case and Opportunity records. <Query> <ObjectName>ContentVersion</ObjectName> <Fields> <string>Id</string> </Fields> <Conditions> <InCondition> <Field>ParentObjectType</Field> <AllowedValues> <SoqlString>Case</SoqlString> <SoqlString>Opportunity</SoqlString> </AllowedValues> </InCondition> </Conditions> </Query> 6.9.10 Choosing the Optimal Record Modification Date Field When indexing records, you can select from multiple fields such as the following to set the record modification date: l SystemModstamp: Updated when a user or a script modifies the record. l LastModifiedDate: Updated when a user modifies the record. l CreatedDate: Set when the record is created. The preferred field is SystemModstamp because it is updated more often. 4www.coveo.com 67 Coveo Platform 7.0 | Salesforce Connector Guide Example: In a frequent scenario where a Case is assigned to a user or a queue due to assignment rules, the OwnerId field is modified by an internal script. The SystemModstamp field is modified but not LastModifiedDate and CreatedDate. 6.9.11 Removing Leading Zeroes of a Field When a field is an Auto Number, the connector produces an extra metadata with the suffix __stripped that contains the value without the leading zeros. You can use this field when you want to show or use the values without the leading zeroes. Example: MyField__c: 0000123 MyField__c__stripped: 123 6.9.12 Using the Currency Field Converter The connector is able to interpret currencies. When the user crawling the source is configured with a Single Currency mode, extra metadata is generated for records. When a field is a currency, its value is converted to the user currency and a new metadata is created with the suffix _converted. 6.9.13 Using the FiscalYearResolver When a field is a date and has a value, the fiscal year resolver creates additional metadata on the records with the following suffixes: __fiscal_year __fiscal_quarter __fiscal_month __fiscal_week __fiscal_pretty_quarter You can turn off the creation of these extra metadata by setting the LoadFiscalYearMetadata hidden source parameter to False (see "LoadFiscalYearMetadata (Boolean)" on page 101). 6.9.14 Fixing the Feed Tracking Error You can get a typical Salesforce source error that looks like: Error with ID 'SALESFORCE_INVALID_QUERY': Cannot find child relationship 'Feeds' on object 'Products/Licenses' ('Case'). Make sure 'Feed Tracking' is enabled for this object in Salesforce. 4www.coveo.com 68 Coveo Platform 7.0 | Salesforce Connector Guide When indexing Chatter items, the connector checks the parent related to field on all Chatter objects to differentiate a Chatter object from a normal object. Some objects do not have the child relationship 'Feeds' because the feed tracking is disable. This relationship is how the connector obtains related Chatter object. You can resolve this error type by activating feed tracking (see Customizing Chatter Feed Tracking). 6.9.15 Indexing More Than the Built-in FeedItem Types By default, the connector indexes the following Chatter feed types: TextPost, LinkPost, ContentPost, and PollPost. In the ObjectsToGet configuration file, you can override this behavior using an InCondition in the query definition of FeedItem. Example: The following ObjectsToGet configuration file query indexes only FeedItem of types TextPost and TrackedChanged. <Query> <ObjectName>FeedItem</ObjectName> <Fields> <string>Id</string> </Fields> <Conditions> <InCondition> <Field>Type</Field> <AllowedValues> <SoqlString>TextPost</SoqlString> <SoqlString>TrackedChange</SoqlString> </AllowedValues> </InCondition> </Conditions> </Query> 4www.coveo.com 69 Coveo Platform 7.0 | Salesforce Connector Guide 7. Creating a Salesforce Mapping File The Coveo Salesforce connector can optionally use a mapping file to determine how to transfer values retrieved from Salesforce object fields to Coveo document fields. By default, when no mapping file is referenced in a source, the connector creates a Coveo document field for each Salesforce object field using the same name. A Salesforce mapping file specifies: l Salesforce objects, fields, and binary data to index. l The body of the indexed documents. l Item relationships You may want to create a mapping file and link it to a source when you want to: l Control which Salesforce object fields are indexed. Only those mapped are indexed. l Group two or more Salesforce object field to create one Coveo field. l Add a prefix such as sf to Coveo fields for example to distinguish them from fields with the same name from other types of sources. l Define a custom body for one or more objects to control what appears in search result excerpt and Quick View for these objects. l Manage custom elements. It is recommended to create separate mapping files with separate sources for the following types of Salesforce content: l Service Cloud standard and custom objects and fields l Knowledge base articles l CRM Content l Chatter To create a Salesforce mapping file 1. Refer to the most appropriate of the following topics to copy the content of the corresponding XML mapping file to start with a set of mappings: l "Salesforce Mapping File Example for Standard Objects" on page 71 l "Salesforce Mapping File Example for Knowledge Base" on page 81 4www.coveo.com 70 Coveo Platform 7.0 | Salesforce Connector Guide l "Salesforce Mapping File Example for CRM Content" on page 83 l "Salesforce Mapping File Example for Chatter Objects" on page 85 2. Using a text editor: a. Paste the content of the copied mapping file. b. When applicable to your Salesforce organization: l Modify or remove mappings for standard objects and fields. l Add mappings for custom objects and fields. Note: CES comes with built-in Salesforce Legacy connector fields where field names are prefixed with syssf (see API Reference syssf fields). You can reuse these fields with this second generation Salesforce connector to be able to use the out-of-the-box Coveo .NET Front-End CRM search interface. c. Save your mapping file. 3. Using an administrator account, connect to the Coveo Master server, and copy your custom mapping file to a location accessible to CES. Example: On the Coveo Master server, save the mapping file for Knowledge Base articles as: D:\CES7\Config\Salesforce_KB_mapping.xml. You will specify the full path to this file when you configure your Salesforce source (see "Mapping File" on page 98). What's Next? Configure an Email security provider needed by the Salesforce security provider (see "Configuring an Email Security Provider" on page 90). 7.1 Salesforce Mapping File Example for Standard Objects The basic mapping file example presented in this topic includes mappings for Salesforce Service Cloud standard objects and fields that can be useful to index. This example is a good starting point to create a new Salesforce mapping file. The example contains mapping for the following Service Cloud standard objects: l Binary data l Account l Case 4www.coveo.com 71 Coveo Platform 7.0 | Salesforce Connector Guide l Case comment l Contact l Event l Solution l Task l User l Attachment <?xml version="1.0" encoding="UTF-8" ?> <Salesforce> <CommonMapping> <Fields> <ContentType>binarydata</ContentType> <ModifiedDate>%[LastModifiedDate]</ModifiedDate> <CustomFields> <CustomField name="sourcetype">Salesforce</CustomField> <CustomField name="SfOrganizationId">%[coveo_organization_id]</CustomField> <CustomField name="sysauthor">%[Owner.Name]</CustomField> <CustomField name="sysdate">%[SystemModstamp]</CustomField> <CustomField name="sysSfId">%[Id]</CustomField> <CustomField name="SfId">%[Id]</CustomField> <CustomField name="SfName">%[Name]</CustomField> <CustomField name="SfCreatedDate">%[CreatedDate]</CustomField> <CustomField name="SfCreatedByName">%[CreatedBy.Name]</CustomField> <CustomField name="SfCreatedById">%[CreatedBy.Id]</CustomField> <CustomField name="SfIsDeleted">%[IsDeleted]</CustomField> <CustomField name="SfParticipantId">%[CreatedBy.Id];%[Owner.Id];%[LastModifiedBy.Id];% [Contact.Id]</CustomField> <CustomField name="SfParticipantName">%[CreatedBy.Name];%[Owner.Name];%[LastModifiedBy.Name];% [Contact.Name]</CustomField> </CustomFields> </Fields> </CommonMapping> <Mapping type="Account"> <Fields> <Title>%[Name]</Title> <Body>%[Description]</Body> <CustomFields> <CustomField name="objecttype">Account</CustomField> <CustomField name="objecttypename">Account</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfAccountAnnualRevenue">%[AnnualRevenue]</CustomField> <CustomField name="SfAccountAnnualRevenueConverted">%[AnnualRevenue_Converted]</CustomField> <CustomField name="SfAccountDescription">%[Description]</CustomField> <CustomField name="SfAccountId">%[Id]</CustomField> <CustomField name="SfAccountName">%[Name]</CustomField> <CustomField name="SfAccountNumber">%[AccountNumber]</CustomField> <CustomField name="SfAccountNumberOfEmployees">%[NumberOfEmployees]</CustomField> <CustomField name="SfAccountOwnership">%[Ownership]</CustomField> <CustomField name="SfAccountPhone">%[Phone]</CustomField> <CustomField name="SfAccountRating">%[Rating]</CustomField> <CustomField name="SfAccountSic">%[Sic]</CustomField> <CustomField name="SfAccountSicDesc">%[SicDesc]</CustomField> <CustomField name="SfAccountSite">%[Site]</CustomField> <CustomField name="SfAccountSource">%[AccountSource]</CustomField> <CustomField name="SfAccountTickerSymbol">%[TickerSymbol]</CustomField> <CustomField name="SfAccountType">%[Type]</CustomField> <CustomField name="SfAccountWebsite">%[Website]</CustomField> <CustomField name="SfCity">%[BillingCity]</CustomField> 4www.coveo.com 72 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfCountry">%[BillingCountry]</CustomField> <CustomField name="SfFax">%[Fax]</CustomField> <CustomField name="SfIndustry">%[Industry]</CustomField> <CustomField name="SfJigsaw">%[Jigsaw]</CustomField> <CustomField name="SfJigsawCompanyId">%[JigsawCompanyId]</CustomField> <CustomField name="SfLastActivityDate">%[LastActivityDate]</CustomField> <CustomField name="SfLastActivityDatefq">%[LastActivityDate_fiscalquarter]</CustomField> <CustomField name="SfLastActivityDatefy">%[LastActivityDate_fiscalyear]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfMasterRecordId">%[MasterRecord.Id]</CustomField> <CustomField name="SfMasterRecordName">%[MasterRecord.Name]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfParentId">%[Parent.Id]</CustomField> <CustomField name="SfParentName">%[Parent.Name]</CustomField> <CustomField name="SfPostalCode">%[BillingPostalCode]</CustomField> <CustomField name="SfState">%[BillingState]</CustomField> <CustomField name="SfStreet">%[BillingStreet]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="Case"> <Fields> <Title>%[Subject]</Title> <Body>%[Description]</Body> <CustomFields> <CustomField name="objecttype">Case</CustomField> <CustomField name="objecttypename">Case</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfAccountId">%[Account.Id]</CustomField> <CustomField name="SfAccountName">%[Account.Name]</CustomField> <CustomField name="SfAssetId">%[Asset.Id]</CustomField> <CustomField name="SfAssetName">%[Asset.Name]</CustomField> <CustomField name="SfCaseClosedDate">%[ClosedDate]</CustomField> <CustomField name="SfCaseClosedDatefq">%[ClosedDate_fiscalquarter]</CustomField> <CustomField name="SfCaseClosedDatefy">%[ClosedDate_fiscalyear]</CustomField> <CustomField name="SfCaseDescription">%[Description]</CustomField> <CustomField name="SfCaseId">%[Id]</CustomField> <CustomField name="SfCaseIsEscalated">%[IsEscalated]</CustomField> <CustomField name="SfCaseNumber">%[CaseNumber]</CustomField> <CustomField name="SfCaseOrigin">%[Origin]</CustomField> <CustomField name="SfCasePriority">%[Priority]</CustomField> <CustomField name="SfCaseReason">%[Reason]</CustomField> <CustomField name="SfCaseStatus">%[Status]</CustomField> <CustomField name="SfCaseSubject">%[Subject]</CustomField> <CustomField name="SfCaseSuppliedCompany">%[SuppliedCompany]</CustomField> <CustomField name="SfCaseSuppliedEmail">%[SuppliedEmail]</CustomField> <CustomField name="SfCaseSuppliedEmailDomainName">%[SuppliedEmail_DomainName]</CustomField> <CustomField name="SfCaseSuppliedEmailFullDomainName">%[SuppliedEmail_FullDomainName] </CustomField> <CustomField name="SfCaseSuppliedName">%[SuppliedName]</CustomField> <CustomField name="SfCaseType">%[Type]</CustomField> <CustomField name="SfContactId">%[Contact.Id]</CustomField> <CustomField name="SfContactName">%[Contact.Name]</CustomField> <CustomField name="SfGroupId">%[Owner_Group.Id]</CustomField> <CustomField name="SfGroupName">%[Owner_Group.Name]</CustomField> <CustomField name="SfIsClosed">%[IsClosed]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> 4www.coveo.com 73 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfParentCaseNumber">%[Parent.CaseNumber]</CustomField> <CustomField name="SfParentId">%[Parent.Id]</CustomField> <CustomField name="SfParentSubject">%[Parent.Subject]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="SfUserId">%[Owner_User.Id]</CustomField> <CustomField name="SfUserName">%[Owner_User.Name]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="CaseComment"> <Fields> <Title>%[Parent.Subject]</Title> <Body>%[CommentBody]</Body> <CustomFields> <CustomField name="objecttype">CaseComment</CustomField> <CustomField name="objecttypename">Case Comment</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfCaseCommentId">%[Id]</CustomField> <CustomField name="SfCaseId">%[Parent.Id]</CustomField> <CustomField name="SfCaseNumber">%[Parent.CaseNumber]</CustomField> <CustomField name="SfCaseSubject">%[Parent.Subject]</CustomField> <CustomField name="SfCommentBody">%[CommentBody]</CustomField> <CustomField name="SfIsPublished">%[IsPublished]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="Contact"> <Fields> <Title>%[Name]</Title> <Body>%[Description]</Body> <CustomFields> <CustomField name="objecttype">Contact</CustomField> <CustomField name="objecttypename">Contact</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfAccountId">%[Account.Id]</CustomField> <CustomField name="SfAccountName">%[Account.Name]</CustomField> <CustomField name="SfBirthdate">%[Birthdate]</CustomField> <CustomField name="SfBirthdatefq">%[Birthdate_fiscalquarter]</CustomField> <CustomField name="SfBirthdatefy">%[Birthdate_fiscalyear]</CustomField> <CustomField name="SfCity">%[MailingCity]</CustomField> <CustomField name="SfContactAssistantName">%[AssistantName]</CustomField> <CustomField name="SfContactAssistantPhone">%[AssistantPhone]</CustomField> <CustomField name="SfContactDepartment">%[Department]</CustomField> <CustomField name="SfContactDescription">%[Description]</CustomField> <CustomField name="SfContactFirstName">%[FirstName]</CustomField> <CustomField name="SfContactId">%[Id]</CustomField> <CustomField name="SfContactLastName">%[LastName]</CustomField> <CustomField name="SfContactName">%[Name]</CustomField> <CustomField name="SfContactPhone">%[Phone]</CustomField> <CustomField name="SfContactSalutation">%[Salutation]</CustomField> <CustomField name="SfContactTitle">%[Title]</CustomField> <CustomField name="SfCountry">%[MailingCountry]</CustomField> <CustomField name="SfEmail">%[Email]</CustomField> <CustomField name="SfEmailDomainName">%[Email_DomainName]</CustomField> 4www.coveo.com 74 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfEmailFullDomainName">%[Email_FullDomainName]</CustomField> <CustomField name="SfFax">%[Fax]</CustomField> <CustomField name="SfHomePhone">%[HomePhone]</CustomField> <CustomField name="SfJigsaw">%[Jigsaw]</CustomField> <CustomField name="SfJigsawContactId">%[JigsawContactId]</CustomField> <CustomField name="SfLastActivityDate">%[LastActivityDate]</CustomField> <CustomField name="SfLastActivityDatefq">%[LastActivityDate_fiscalquarter]</CustomField> <CustomField name="SfLastActivityDatefy">%[LastActivityDate_fiscalyear]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfLeadSource">%[LeadSource]</CustomField> <CustomField name="SfMasterRecordId">%[MasterRecord.Id]</CustomField> <CustomField name="SfMasterRecordName">%[MasterRecord.Name]</CustomField> <CustomField name="SfMobilePhone">%[MobilePhone]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfPostalCode">%[MailingPostalCode]</CustomField> <CustomField name="SfReportsToId">%[ReportsTo.Id]</CustomField> <CustomField name="SfReportsToName">%[ReportsTo.Name]</CustomField> <CustomField name="SfState">%[MailingState]</CustomField> <CustomField name="SfStreet">%[MailingStreet]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="Event"> <Fields> <Title>%[Subject]</Title> <Body>%[Subject]</Body> <CustomFields> <CustomField name="objecttype">Event</CustomField> <CustomField name="objecttypename">Event</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfAccountId">%[Account.Id]</CustomField> <CustomField name="SfAccountName">%[Account.Name]</CustomField> <CustomField name="SfActivityDate">%[ActivityDate]</CustomField> <CustomField name="SfActivityDatefq">%[ActivityDate_fiscalquarter]</CustomField> <CustomField name="SfActivityDatefy">%[ActivityDate_fiscalyear]</CustomField> <CustomField name="SfAssetId">%[What_Asset.Id]</CustomField> <CustomField name="SfAssetName">%[What_Asset.Name]</CustomField> <CustomField name="SfCampaignId">%[What_Campaign.Id]</CustomField> <CustomField name="SfCampaignName">%[What_Campaign.Name]</CustomField> <CustomField name="SfCaseId">%[What_Case.Id]</CustomField> <CustomField name="SfCaseName">%[What_Case.Name]</CustomField> <CustomField name="SfContactId">%[Who_Contact.Id]</CustomField> <CustomField name="SfContactName">%[Who_Contact.Name]</CustomField> <CustomField name="SfContractId">%[What_Contract.Id]</CustomField> <CustomField name="SfContractName">%[What_Contract.Name]</CustomField> <CustomField name="SfEventActivityDateTime">%[ActivityDateTime]</CustomField> <CustomField name="SfEventActivityDateTimefq">%[ActivityDateTime_fiscalquarter]</CustomField> <CustomField name="SfEventActivityDateTimefy">%[ActivityDateTime_fiscalyear]</CustomField> <CustomField name="SfEventDescription">%[Description]</CustomField> <CustomField name="SfEventDurationInMinutes">%[DurationInMinutes]</CustomField> <CustomField name="SfEventEndDateTime">%[EndDateTime]</CustomField> <CustomField name="SfEventEndDateTimefq">%[EndDateTime_fiscalquarter]</CustomField> <CustomField name="SfEventEndDateTimefy">%[EndDateTime_fiscalyear]</CustomField> <CustomField name="SfEventGroupEventType">%[GroupEventType]</CustomField> <CustomField name="SfEventId">%[Id]</CustomField> <CustomField name="SfEventIsAllDayEvent">%[IsAllDayEvent]</CustomField> <CustomField name="SfEventIsChild">%[IsChild]</CustomField> <CustomField name="SfEventIsGroupEvent">%[IsGroupEvent]</CustomField> <CustomField name="SfEventReminderDateTime">%[ReminderDateTime]</CustomField> <CustomField name="SfEventReminderDateTimefq">%[ReminderDateTime_fiscalquarter]</CustomField> 4www.coveo.com 75 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfEventReminderDateTimefy">%[ReminderDateTime_fiscalyear]</CustomField> <CustomField name="SfEventShowAs">%[ShowAs]</CustomField> <CustomField name="SfEventStartDateTime">%[StartDateTime]</CustomField> <CustomField name="SfEventStartDateTimefq">%[StartDateTime_fiscalquarter]</CustomField> <CustomField name="SfEventStartDateTimefy">%[StartDateTime_fiscalyear]</CustomField> <CustomField name="SfEventSubject">%[Subject]</CustomField> <CustomField name="SfIsArchived">%[IsArchived]</CustomField> <CustomField name="SfIsPrivate">%[IsPrivate]</CustomField> <CustomField name="SfIsRecurrence">%[IsRecurrence]</CustomField> <CustomField name="SfIsReminderSet">%[IsReminderSet]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfLeadId">%[Who_Lead.Id]</CustomField> <CustomField name="SfLeadName">%[Who_Lead.Name]</CustomField> <CustomField name="SfLocation">%[Location]</CustomField> <CustomField name="SfMagic_Item__cId">%[What_Magic_Item__c.Id]</CustomField> <CustomField name="SfMagic_Item__cName">%[What_Magic_Item__c.Name]</CustomField> <CustomField name="SfOpportunityId">%[What_Opportunity.Id]</CustomField> <CustomField name="SfOpportunityName">%[What_Opportunity.Name]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfProduct2Id">%[What_Product2.Id]</CustomField> <CustomField name="SfProduct2Name">%[What_Product2.Name]</CustomField> <CustomField name="SfRecurrenceDayOfMonth">%[RecurrenceDayOfMonth]</CustomField> <CustomField name="SfRecurrenceDayOfWeekMask">%[RecurrenceDayOfWeekMask]</CustomField> <CustomField name="SfRecurrenceEndDateOnly">%[RecurrenceEndDateOnly]</CustomField> <CustomField name="SfRecurrenceEndDateOnlyfq">%[RecurrenceEndDateOnly_fiscalquarter] </CustomField> <CustomField name="SfRecurrenceEndDateOnlyfy">%[RecurrenceEndDateOnly_fiscalyear] </CustomField> <CustomField name="SfRecurrenceInstance">%[RecurrenceInstance]</CustomField> <CustomField name="SfRecurrenceInterval">%[RecurrenceInterval]</CustomField> <CustomField name="SfRecurrenceMonthOfYear">%[RecurrenceMonthOfYear]</CustomField> <CustomField name="SfRecurrenceStartDateTime">%[RecurrenceStartDateTime]</CustomField> <CustomField name="SfRecurrenceStartDateTimefq">%[RecurrenceStartDateTime_fiscalquarter] </CustomField> <CustomField name="SfRecurrenceStartDateTimefy">%[RecurrenceStartDateTime_fiscalyear] </CustomField> <CustomField name="SfRecurrenceTimeZoneSidKey">%[RecurrenceTimeZoneSidKey]</CustomField> <CustomField name="SfRecurrenceType">%[RecurrenceType]</CustomField> <CustomField name="SfSolutionId">%[What_Solution.Id]</CustomField> <CustomField name="SfSolutionName">%[What_Solution.Name]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="SfWhatId">%[What.Id]</CustomField> <CustomField name="SfWhatName">%[What.Name]</CustomField> <CustomField name="SfWhoId">%[Who.Id]</CustomField> <CustomField name="SfWhoName">%[Who.Name]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="Solution"> <Fields> <Title>%[SolutionName]</Title> <Body>%[SolutionNote]</Body> <CustomFields> <CustomField name="objecttype">Solution</CustomField> <CustomField name="objecttypename">Solution</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfIsHtml">%[IsHtml]</CustomField> <CustomField name="SfIsPublished">%[IsPublished]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> 4www.coveo.com 76 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfSolutionId">%[Id]</CustomField> <CustomField name="SfSolutionIsPublishedInPublicKb">%[IsPublishedInPublicKb]</CustomField> <CustomField name="SfSolutionIsReviewed">%[IsReviewed]</CustomField> <CustomField name="SfSolutionName">%[SolutionName]</CustomField> <CustomField name="SfSolutionSolutionNote">%[SolutionNote]</CustomField> <CustomField name="SfSolutionSolutionNumber">%[SolutionNumber]</CustomField> <CustomField name="SfSolutionStatus">%[Status]</CustomField> <CustomField name="SfSolutionTimesUsed">%[TimesUsed]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="Task"> <Fields> <Title>%[Subject]</Title> <Body>%[Subject]</Body> <CustomFields> <CustomField name="objecttype">Task</CustomField> <CustomField name="objecttypename">Task</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfAccountId">%[Account.Id]</CustomField> <CustomField name="SfAccountName">%[Account.Name]</CustomField> <CustomField name="SfActivityDate">%[ActivityDate]</CustomField> <CustomField name="SfActivityDatefq">%[ActivityDate_fiscalquarter]</CustomField> <CustomField name="SfActivityDatefy">%[ActivityDate_fiscalyear]</CustomField> <CustomField name="SfAssetId">%[What_Asset.Id]</CustomField> <CustomField name="SfAssetName">%[What_Asset.Name]</CustomField> <CustomField name="SfCampaignId">%[What_Campaign.Id]</CustomField> <CustomField name="SfCampaignName">%[What_Campaign.Name]</CustomField> <CustomField name="SfCaseId">%[What_Case.Id]</CustomField> <CustomField name="SfCaseName">%[What_Case.Name]</CustomField> <CustomField name="SfContactId">%[Who_Contact.Id]</CustomField> <CustomField name="SfContactName">%[Who_Contact.Name]</CustomField> <CustomField name="SfContractId">%[What_Contract.Id]</CustomField> <CustomField name="SfContractName">%[What_Contract.Name]</CustomField> <CustomField name="SfIsArchived">%[IsArchived]</CustomField> <CustomField name="SfIsClosed">%[IsClosed]</CustomField> <CustomField name="SfIsRecurrence">%[IsRecurrence]</CustomField> <CustomField name="SfIsReminderSet">%[IsReminderSet]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfLeadId">%[Who_Lead.Id]</CustomField> <CustomField name="SfLeadName">%[Who_Lead.Name]</CustomField> <CustomField name="SfMagic_Item__cId">%[What_Magic_Item__c.Id]</CustomField> <CustomField name="SfMagic_Item__cName">%[What_Magic_Item__c.Name]</CustomField> <CustomField name="SfOpportunityId">%[What_Opportunity.Id]</CustomField> <CustomField name="SfOpportunityName">%[What_Opportunity.Name]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfProduct2Id">%[What_Product2.Id]</CustomField> <CustomField name="SfProduct2Name">%[What_Product2.Name]</CustomField> <CustomField name="SfRecurrenceDayOfMonth">%[RecurrenceDayOfMonth]</CustomField> <CustomField name="SfRecurrenceDayOfWeekMask">%[RecurrenceDayOfWeekMask]</CustomField> <CustomField name="SfRecurrenceEndDateOnly">%[RecurrenceEndDateOnly]</CustomField> <CustomField name="SfRecurrenceEndDateOnlyfq">%[RecurrenceEndDateOnly_fiscalquarter] </CustomField> <CustomField name="SfRecurrenceEndDateOnlyfy">%[RecurrenceEndDateOnly_fiscalyear] </CustomField> <CustomField name="SfRecurrenceInstance">%[RecurrenceInstance]</CustomField> 4www.coveo.com 77 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfRecurrenceInterval">%[RecurrenceInterval]</CustomField> <CustomField name="SfRecurrenceMonthOfYear">%[RecurrenceMonthOfYear]</CustomField> <CustomField name="SfRecurrenceStartDateOnly">%[RecurrenceStartDateOnly]</CustomField> <CustomField name="SfRecurrenceStartDateOnlyfq">%[RecurrenceStartDateOnly_fiscalquarter] </CustomField> <CustomField name="SfRecurrenceStartDateOnlyfy">%[RecurrenceStartDateOnly_fiscalyear] </CustomField> <CustomField name="SfRecurrenceTimeZoneSidKey">%[RecurrenceTimeZoneSidKey]</CustomField> <CustomField name="SfRecurrenceType">%[RecurrenceType]</CustomField> <CustomField name="SfSolutionId">%[What_Solution.Id]</CustomField> <CustomField name="SfSolutionName">%[What_Solution.Name]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="SfTaskCallDisposition">%[CallDisposition]</CustomField> <CustomField name="SfTaskCallType">%[CallType]</CustomField> <CustomField name="SfTaskDescription">%[Description]</CustomField> <CustomField name="SfTaskId">%[Id]</CustomField> <CustomField name="SfTaskPriority">%[Priority]</CustomField> <CustomField name="SfTaskStatus">%[Status]</CustomField> <CustomField name="SfTaskSubject">%[Subject]</CustomField> <CustomField name="SfWhatId">%[What.Id]</CustomField> <CustomField name="SfWhatName">%[What.Name]</CustomField> <CustomField name="SfWhoId">%[Who.Id]</CustomField> <CustomField name="SfWhoName">%[Who.Name]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="User"> <Fields> <Title>%[Name]</Title> <Body>%[Name]</Body> <CustomFields> <CustomField name="objecttype">User</CustomField> <CustomField name="objecttypename">User</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfCity">%[City]</CustomField> <CustomField name="SfContactId">%[Contact.Id]</CustomField> <CustomField name="SfContactName">%[Contact.Name]</CustomField> <CustomField name="SfCountry">%[Country]</CustomField> <CustomField name="SfEmail">%[Email]</CustomField> <CustomField name="SfEmailDomainName">%[Email_DomainName]</CustomField> <CustomField name="SfEmailFullDomainName">%[Email_FullDomainName]</CustomField> <CustomField name="SfFax">%[Fax]</CustomField> <CustomField name="SfFullPhotoUrl">%[FullPhotoUrl]</CustomField> <CustomField name="SfIsActive">%[IsActive]</CustomField> <CustomField name="SfLanguageLocaleKey">%[LanguageLocaleKey]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfManagerId">%[Manager.Id]</CustomField> <CustomField name="SfManagerName">%[Manager.Name]</CustomField> <CustomField name="SfMobilePhone">%[MobilePhone]</CustomField> <CustomField name="SfPostalCode">%[PostalCode]</CustomField> <CustomField name="SfProfileId">%[Profile.Id]</CustomField> <CustomField name="SfProfileName">%[Profile.Name]</CustomField> <CustomField name="SfSmallPhotoUrl">%[SmallPhotoUrl]</CustomField> <CustomField name="SfState">%[State]</CustomField> <CustomField name="SfStreet">%[Street]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="SfUserAboutMe">%[AboutMe]</CustomField> <CustomField name="SfUserAlias">%[Alias]</CustomField> <CustomField name="SfUserCommunityNickname">%[CommunityNickname]</CustomField> <CustomField name="SfUserCompanyName">%[CompanyName]</CustomField> 4www.coveo.com 78 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfUserDefaultGroupNotificationFrequency">% [DefaultGroupNotificationFrequency]</CustomField> <CustomField name="SfUserDepartment">%[Department]</CustomField> <CustomField name="SfUserDigestFrequency">%[DigestFrequency]</CustomField> <CustomField name="SfUserDivision">%[Division]</CustomField> <CustomField name="SfUserEmailEncodingKey">%[EmailEncodingKey]</CustomField> <CustomField name="SfUserEmployeeNumber">%[EmployeeNumber]</CustomField> <CustomField name="SfUserExtension">%[Extension]</CustomField> <CustomField name="SfUserFederationIdentifier">%[FederationIdentifier]</CustomField> <CustomField name="SfUserFirstName">%[FirstName]</CustomField> <CustomField name="SfUserForecastEnabled">%[ForecastEnabled]</CustomField> <CustomField name="SfUserId">%[Id]</CustomField> <CustomField name="SfUserLastName">%[LastName]</CustomField> <CustomField name="SfUserLocaleSidKey">%[LocaleSidKey]</CustomField> <CustomField name="SfUserName">%[Name]</CustomField> <CustomField name="SfUserPhone">%[Phone]</CustomField> <CustomField name="SfUserReceivesAdminInfoEmails">%[ReceivesAdminInfoEmails]</CustomField> <CustomField name="SfUserReceivesInfoEmails">%[ReceivesInfoEmails]</CustomField> <CustomField name="SfUserRoleId">%[UserRole.Id]</CustomField> <CustomField name="SfUserRoleName">%[UserRole.Name]</CustomField> <CustomField name="SfUserTimeZoneSidKey">%[TimeZoneSidKey]</CustomField> <CustomField name="SfUserTitle">%[Title]</CustomField> <CustomField name="SfUserUserPermissionsCallCenterAutoLogin">% [UserPermissionsCallCenterAutoLogin]</CustomField> <CustomField name="SfUserUserPermissionsChatterAnswersUser">% [UserPermissionsChatterAnswersUser]</CustomField> <CustomField name="SfUserUserPermissionsInteractionUser">%[UserPermissionsInteractionUser] </CustomField> <CustomField name="SfUserUserPermissionsKnowledgeUser">%[UserPermissionsKnowledgeUser] </CustomField> <CustomField name="SfUserUserPermissionsMarketingUser">%[UserPermissionsMarketingUser] </CustomField> <CustomField name="SfUserUserPermissionsMobileUser">%[UserPermissionsMobileUser]</CustomField> <CustomField name="SfUserUserPermissionsOfflineUser">%[UserPermissionsOfflineUser] </CustomField> <CustomField name="SfUserUserPermissionsSFContentUser">%[UserPermissionsSFContentUser] </CustomField> <CustomField name="SfUserUserPermissionsSiteforceContributorUser">% [UserPermissionsSiteforceContributorUser]</CustomField> <CustomField name="SfUserUserPermissionsSiteforcePublisherUser">% [UserPermissionsSiteforcePublisherUser]</CustomField> <CustomField name="SfUserUserPermissionsSupportUser">%[UserPermissionsSupportUser] </CustomField> <CustomField name="SfUserUserPreferencesActivityRemindersPopup">% [UserPreferencesActivityRemindersPopup]</CustomField> <CustomField name="SfUserUserPreferencesApexPagesDeveloperMode">% [UserPreferencesApexPagesDeveloperMode]</CustomField> <CustomField name="SfUserUserPreferencesContentEmailAsAndWhen">% [UserPreferencesContentEmailAsAndWhen]</CustomField> <CustomField name="SfUserUserPreferencesContentNoEmail">%[UserPreferencesContentNoEmail] </CustomField> <CustomField name="SfUserUserPreferencesDisCommentAfterLikeEmail">% [UserPreferencesDisCommentAfterLikeEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisMentionsCommentEmail">% [UserPreferencesDisMentionsCommentEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisProfPostCommentEmail">% [UserPreferencesDisProfPostCommentEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableAllFeedsEmail">% [UserPreferencesDisableAllFeedsEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableBookmarkEmail">% [UserPreferencesDisableBookmarkEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableChangeCommentEmail">% [UserPreferencesDisableChangeCommentEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableFileShareNotificationsForApi">% [UserPreferencesDisableFileShareNotificationsForApi]</CustomField> <CustomField name="SfUserUserPreferencesDisableFollowersEmail">% [UserPreferencesDisableFollowersEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableLaterCommentEmail">% [UserPreferencesDisableLaterCommentEmail]</CustomField> 4www.coveo.com 79 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfUserUserPreferencesDisableLikeEmail">%[UserPreferencesDisableLikeEmail] </CustomField> <CustomField name="SfUserUserPreferencesDisableMentionsPostEmail">% [UserPreferencesDisableMentionsPostEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableMessageEmail">% [UserPreferencesDisableMessageEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableProfilePostEmail">% [UserPreferencesDisableProfilePostEmail]</CustomField> <CustomField name="SfUserUserPreferencesDisableSharePostEmail">% [UserPreferencesDisableSharePostEmail]</CustomField> <CustomField name="SfUserUserPreferencesEnableAutoSubForFeeds">% [UserPreferencesEnableAutoSubForFeeds]</CustomField> <CustomField name="SfUserUserPreferencesEventRemindersCheckboxDefault">% [UserPreferencesEventRemindersCheckboxDefault]</CustomField> <CustomField name="SfUserUserPreferencesHideCSNDesktopTask">% [UserPreferencesHideCSNDesktopTask]</CustomField> <CustomField name="SfUserUserPreferencesHideCSNGetChatterMobileTask">% [UserPreferencesHideCSNGetChatterMobileTask]</CustomField> <CustomField name="SfUserUserPreferencesOptOutOfTouch">%[UserPreferencesOptOutOfTouch] </CustomField> <CustomField name="SfUserUserPreferencesReminderSoundOff">%[UserPreferencesReminderSoundOff] </CustomField> <CustomField name="SfUserUserPreferencesTaskRemindersCheckboxDefault">% [UserPreferencesTaskRemindersCheckboxDefault]</CustomField> <CustomField name="SfUserUserType">%[UserType]</CustomField> <CustomField name="SfUserUsername">%[Username]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="Attachment"> <Fields> <Title>%[Name]</Title> <CustomFields> <CustomField name="objecttype">Attachment</CustomField> <CustomField name="objecttypename">Attachment</CustomField> <CustomField name="sfinterfaceid">service</CustomField> <CustomField name="SfAccountId">%[Parent_Account.Id]</CustomField> <CustomField name="SfAccountName">%[Parent_Account.Name]</CustomField> <CustomField name="SfAssetId">%[Parent_Asset.Id]</CustomField> <CustomField name="SfAssetName">%[Parent_Asset.Name]</CustomField> <CustomField name="SfAttachmentBodyLength">%[BodyLength]</CustomField> <CustomField name="SfAttachmentDescription">%[Description]</CustomField> <CustomField name="SfAttachmentId">%[Id]</CustomField> <CustomField name="SfAttachmentName">%[Name]</CustomField> <CustomField name="SfCampaignId">%[Parent_Campaign.Id]</CustomField> <CustomField name="SfCampaignName">%[Parent_Campaign.Name]</CustomField> <CustomField name="SfCaseId">%[Parent_Case.Id]</CustomField> <CustomField name="SfCaseName">%[Parent_Case.Name]</CustomField> <CustomField name="SfContactId">%[Parent_Contact.Id]</CustomField> <CustomField name="SfContactName">%[Parent_Contact.Name]</CustomField> <CustomField name="SfContentType">%[ContentType]</CustomField> <CustomField name="SfContractId">%[Parent_Contract.Id]</CustomField> <CustomField name="SfContractName">%[Parent_Contract.Name]</CustomField> <CustomField name="SfEmailTemplateId">%[Parent_EmailTemplate.Id]</CustomField> <CustomField name="SfEmailTemplateName">%[Parent_EmailTemplate.Name]</CustomField> <CustomField name="SfEventId">%[Parent_Event.Id]</CustomField> <CustomField name="SfEventName">%[Parent_Event.Name]</CustomField> <CustomField name="SfIsPrivate">%[IsPrivate]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfLeadId">%[Parent_Lead.Id]</CustomField> <CustomField name="SfLeadName">%[Parent_Lead.Name]</CustomField> <CustomField name="SfMagic_Item__cId">%[Parent_Magic_Item__c.Id]</CustomField> <CustomField name="SfMagic_Item__cName">%[Parent_Magic_Item__c.Name]</CustomField> <CustomField name="SfOpportunityId">%[Parent_Opportunity.Id]</CustomField> 4www.coveo.com 80 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfOpportunityName">%[Parent_Opportunity.Name]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfParentId">%[Parent.Id]</CustomField> <CustomField name="SfParentName">%[Parent.Name]</CustomField> <CustomField name="SfProduct2Id">%[Parent_Product2.Id]</CustomField> <CustomField name="SfProduct2Name">%[Parent_Product2.Name]</CustomField> <CustomField name="SfSolutionId">%[Parent_Solution.Id]</CustomField> <CustomField name="SfSolutionName">%[Parent_Solution.Name]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="SfTaskId">%[Parent_Task.Id]</CustomField> <CustomField name="SfTaskName">%[Parent_Task.Name]</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="FeedItem"> <Fields> <Title>%[Title]</Title> <Body>%[LinkUrl] %[Body]</Body> <CustomFields> <CustomField name="sysfiletype">FeedItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="FeedComment"> <Fields> <Title>Comment by %[CreatedBy.Name]</Title> <Body>%[CommentBody]</Body> <CustomFields> <CustomField name="sysfiletype">FeedComment</CustomField> </CustomFields> </Fields> </Mapping> </Salesforce> 7.2 Salesforce Mapping File Example for Knowledge Base When your Salesforce organization includes Knowledge Base articles and you want to index their content, you must include additional mappings for Knowledge content types. The mapping file example presented in this topic maps two arbitrary named Knowledge Base objects: l MyKBArticleType1 l MyKBArticleType2 <?xml version="1.0" encoding="UTF-8" ?> <Salesforce> <CommonMapping> <Fields> <ContentType>binarydata</ContentType> <ModifiedDate>%[LastModifiedDate]</ModifiedDate> <CustomFields> <CustomField name="sourcetype">Salesforce</CustomField> <CustomField name="SfChannelsFlagMerged">Internal App:%[kav_IsVisibleInApp];Customer Portal:% [kav_IsVisibleInCsp];Public Knowledge Base:%[kav_IsVisibleInPkb];Partner Portal:%[kav_ IsVisibleInPrm];</CustomField> <CustomField name="SfOrganizationId">%[coveo_organization_id]</CustomField> <CustomField name="sysauthor">%[kav_CreatedBy.Name]</CustomField> <CustomField name="sysdate">%[kav_LastPublishedDate]</CustomField> <CustomField name="sysSfId">%[ka_id]</CustomField> 4www.coveo.com 81 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfId">%[ka_id]</CustomField> <CustomField name="SfKbId">%[ka_id]</CustomField> <CustomField name="KbId">%[ka_id]</CustomField> <CustomField name="SfCreatedDate">%[kav_LastPublishedDate]</CustomField> <CustomField name="SfCreatedBy">%[ka_CreatedBy.Name]</CustomField> <CustomField name="SfCreatedById">%[ka_CreatedBy.Id]</CustomField> <CustomField name="SfIsDeleted">%[kav_IsDeleted]</CustomField> <CustomField name="SfParticipantId">%[ka_CreatedBy.Id];%[kav_LastModifiedBy.Id];</CustomField> <CustomField name="SfParticipantName">%[CreatedBy.Name];%[kav_ LastModifiedBy.Name];</CustomField> </CustomFields> </Fields> </CommonMapping> <Mapping type="MyKBArticleType1"> <Fields> <Title>%[kav_Title]</Title> <Body>%[kav_Summary]</Body> <CustomFields> <CustomField name="objecttype">MyKBArticleType1</CustomField> <CustomField name="objecttypename">My KB Article Type1</CustomField> <CustomField name="sfinterfaceid">kb</CustomField> <CustomField name="SfCaseId">%[ka_CaseArticles.CaseId]</CustomField> <CustomField name="SfCreatedByName">%[kav_CreatedBy.Name]</CustomField> <CustomField name="SfKbArchivedDate">%[ka_ArchivedDate]</CustomField> <CustomField name="SfKbArchivedDatefq">%[ka_ArchivedDate_fiscalquarter]</CustomField> <CustomField name="SfKbArchivedDatefy">%[ka_ArchivedDate_fiscalyear]</CustomField> <CustomField name="SfKbArticleNumber">%[kav_ArticleNumber]</CustomField> <CustomField name="SfKbCaseAssociationCount">%[ka_CaseAssociationCount]</CustomField> <CustomField name="SfKbFirstPublishedDate">%[kav_FirstPublishedDate]</CustomField> <CustomField name="SfKbFirstPublishedDatefq">%[kav_FirstPublishedDate_fiscalquarter] </CustomField> <CustomField name="SfKbFirstPublishedDatefy">%[kav_FirstPublishedDate_fiscalyear] </CustomField> <CustomField name="SfKbIsLatestVersion">%[kav_IsLatestVersion]</CustomField> <CustomField name="SfKbIsVisibleInApp">%[kav_IsVisibleInApp]</CustomField> <CustomField name="SfKbIsVisibleInCsp">%[kav_IsVisibleInCsp]</CustomField> <CustomField name="SfKbIsVisibleInPkb">%[kav_IsVisibleInPkb]</CustomField> <CustomField name="SfKbIsVisibleInPrm">%[kav_IsVisibleInPrm]</CustomField> <CustomField name="SfKbLastPublishedDate">%[kav_LastPublishedDate]</CustomField> <CustomField name="SfKbLastPublishedDatefq">%[kav_LastPublishedDate_fiscalquarter] </CustomField> <CustomField name="SfKbLastPublishedDatefy">%[kav_LastPublishedDate_fiscalyear]</CustomField> <CustomField name="SfKbPublishStatus">%[kav_PublishStatus]</CustomField> <CustomField name="SfKbSummary">%[kav_Summary]</CustomField> <CustomField name="SfKbTitle">%[kav_Title]</CustomField> <CustomField name="SfKbUndecipherableContentC">%[kav_Undecipherable_Content__c]</CustomField> <CustomField name="SfKbUrlName">%[kav_UrlName]</CustomField> <CustomField name="SfKbVersionNumber">%[kav_VersionNumber]</CustomField> <CustomField name="SfLanguage">%[kav_Language]</CustomField> <CustomField name="SfLastModifiedById">%[kav_LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[kav_LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[kav_LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[kav_LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[kav_LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfSystemModstamp">%[kav_SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[kav_SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[kav_SystemModstamp_fiscalyear]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="MyKBArticleType2"> <Fields> <Title>%[kav_Title]</Title> <Body>%[kav_Summary]</Body> <CustomFields> <CustomField name="objecttype">MyKBArticleType2</CustomField> <CustomField name="objecttypename">My KB Article Type2</CustomField> <CustomField name="sfinterfaceid">kb</CustomField> 4www.coveo.com 82 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfCaseId">%[ka_CaseArticles.CaseId]</CustomField> <CustomField name="SfCreatedByName">%[kav_CreatedBy.Name]</CustomField> <CustomField name="SfKbArchivedDate">%[ka_ArchivedDate]</CustomField> <CustomField name="SfKbArchivedDatefq">%[ka_ArchivedDate_fiscalquarter]</CustomField> <CustomField name="SfKbArchivedDatefy">%[ka_ArchivedDate_fiscalyear]</CustomField> <CustomField name="SfKbArticleNumber">%[kav_ArticleNumber]</CustomField> <CustomField name="SfKbCaseAssociationCount">%[ka_CaseAssociationCount]</CustomField> <CustomField name="SfKbFirstPublishedDate">%[kav_FirstPublishedDate]</CustomField> <CustomField name="SfKbFirstPublishedDatefq">%[kav_FirstPublishedDate_fiscalquarter] </CustomField> <CustomField name="SfKbFirstPublishedDatefy">%[kav_FirstPublishedDate_fiscalyear] </CustomField> <CustomField name="SfKbIsLatestVersion">%[kav_IsLatestVersion]</CustomField> <CustomField name="SfKbIsVisibleInApp">%[kav_IsVisibleInApp]</CustomField> <CustomField name="SfKbIsVisibleInCsp">%[kav_IsVisibleInCsp]</CustomField> <CustomField name="SfKbIsVisibleInPkb">%[kav_IsVisibleInPkb]</CustomField> <CustomField name="SfKbIsVisibleInPrm">%[kav_IsVisibleInPrm]</CustomField> <CustomField name="SfKbLastPublishedDate">%[kav_LastPublishedDate]</CustomField> <CustomField name="SfKbLastPublishedDatefq">%[kav_LastPublishedDate_fiscalquarter] </CustomField> <CustomField name="SfKbLastPublishedDatefy">%[kav_LastPublishedDate_fiscalyear]</CustomField> <CustomField name="SfKbPublishStatus">%[kav_PublishStatus]</CustomField> <CustomField name="SfKbRecipeC">%[kav_Recipe__c]</CustomField> <CustomField name="SfKbSummary">%[kav_Summary]</CustomField> <CustomField name="SfKbTitle">%[kav_Title]</CustomField> <CustomField name="SfKbUrlName">%[kav_UrlName]</CustomField> <CustomField name="SfKbVersionNumber">%[kav_VersionNumber]</CustomField> <CustomField name="SfLanguage">%[kav_Language]</CustomField> <CustomField name="SfLastModifiedById">%[kav_LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[kav_LastModifiedBy.Name]</CustomField> <CustomField name="SfLastModifiedDate">%[kav_LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[kav_LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[kav_LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfSystemModstamp">%[kav_SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[kav_SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[kav_SystemModstamp_fiscalyear]</CustomField> <CustomField name="sysfiletype">SalesforceItem</CustomField> </CustomFields> </Fields> </Mapping> </Salesforce> 7.3 Salesforce Mapping File Example for CRM Content With Salesforce CRM Content you can organize, share, search, and manage content within your organization and across key areas of the Salesforce application. Content can include all file types, from traditional business documents such as Microsoft PowerPoint presentations to audio files, video files, Web pages, and Google docs (see the Salesforce document Salesforce CRM Content Overview). When your Salesforce organization includes CRM content and you want to index the content of these files, you must include additional mappings for CRM content type. The following Salesforce CRM content mapping file example is a good starting point. <?xml version="1.0" encoding="UTF-8" ?> <Salesforce> <CommonMapping> <Fields> <ContentType>binarydata</ContentType> <ModifiedDate>%[LastModifiedDate]</ModifiedDate> <CustomFields> 4www.coveo.com 83 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="sourcetype">Salesforce</CustomField> <CustomField name="SfOrganizationId">%[coveo_organization_id]</CustomField> <CustomField name="sysauthor">%[Owner.Name]</CustomField> <CustomField name="sysdate">%[SystemModstamp]</CustomField> <CustomField name="sysSfId">%[Id]</CustomField> <CustomField name="SfId">%[Id]</CustomField> <CustomField name="SfName">%[Name]</CustomField> <CustomField name="SfCreatedDate">%[CreatedDate]</CustomField> <CustomField name="SfCreatedByName">%[CreatedBy.Name]</CustomField> <CustomField name="SfCreatedById">%[CreatedBy.Id]</CustomField> <CustomField name="SfIsDeleted">%[IsDeleted]</CustomField> <CustomField name="SfParticipantId">%[CreatedBy.Id];%[Owner.Id];%[LastModifiedBy.Id];% [Contact.Id]</CustomField> <CustomField name="SfParticipantName">%[CreatedBy.Name];%[Owner.Name];%[LastModifiedBy.Name];% [Contact.Name]</CustomField> </CustomFields> </Fields> </CommonMapping> <Mapping type="ContentVersion"> <Fields> <Title>%[Title]</Title> <CustomFields> <CustomField name="objecttype">ContentVersion</CustomField> <CustomField name="objecttypename">Content</CustomField> <CustomField name="sfinterfaceid">standard</CustomField> <CustomField name="SfAccountId">%[FirstPublishLocation_Account.Id]</CustomField> <CustomField name="SfAccountName">%[FirstPublishLocation_Account.Name]</CustomField> <CustomField name="SfAssetId">%[FirstPublishLocation_Asset.Id]</CustomField> <CustomField name="SfAssetName">%[FirstPublishLocation_Asset.Name]</CustomField> <CustomField name="SfCampaignId">%[FirstPublishLocation_Campaign.Id]</CustomField> <CustomField name="SfCampaignName">%[FirstPublishLocation_Campaign.Name]</CustomField> <CustomField name="SfCaseId">%[FirstPublishLocation_Case.Id]</CustomField> <CustomField name="SfCaseName">%[FirstPublishLocation_Case.Name]</CustomField> <CustomField name="SfCollaborationGroupId">%[FirstPublishLocation_CollaborationGroup.Id] </CustomField> <CustomField name="SfCollaborationGroupName">%[FirstPublishLocation_CollaborationGroup.Name] </CustomField> <CustomField name="SfContactId">%[FirstPublishLocation_Contact.Id]</CustomField> <CustomField name="SfContactName">%[FirstPublishLocation_Contact.Name]</CustomField> <CustomField name="SfContentDocumentId">%[ContentDocument.Id]</CustomField> <CustomField name="SfContentDocumentTitle">%[ContentDocument.Title]</CustomField> <CustomField name="SfContentModifiedDate">%[ContentModifiedDate]</CustomField> <CustomField name="SfContentModifiedDatefq">%[ContentModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfContentModifiedDatefy">%[ContentModifiedDate_fiscalyear]</CustomField> <CustomField name="SfContentSize">%[ContentSize]</CustomField> <CustomField name="SfContentUrl">%[ContentUrl]</CustomField> <CustomField name="SfContentVersionId">%[Id]</CustomField> <CustomField name="SfContentVersionIsLatest">%[IsLatest]</CustomField> <CustomField name="SfContentVersionOrigin">%[Origin]</CustomField> <CustomField name="SfContentVersionPublishStatus">%[PublishStatus]</CustomField> <CustomField name="SfContentVersionTitle">%[Title]</CustomField> <CustomField name="SfContentWorkspaceId">%[FirstPublishLocation_ContentWorkspace.Id] </CustomField> <CustomField name="SfContentWorkspaceName">%[FirstPublishLocation_ContentWorkspace.Name] </CustomField> <CustomField name="SfContractId">%[FirstPublishLocation_Contract.Id]</CustomField> <CustomField name="SfContractName">%[FirstPublishLocation_Contract.Name]</CustomField> <CustomField name="SfDashboardComponentId">%[FirstPublishLocation_DashboardComponent.Id] </CustomField> <CustomField name="SfDashboardComponentName">%[FirstPublishLocation_DashboardComponent.Name] </CustomField> <CustomField name="SfDashboardId">%[FirstPublishLocation_Dashboard.Id]</CustomField> <CustomField name="SfDashboardName">%[FirstPublishLocation_Dashboard.Name]</CustomField> <CustomField name="SfEventId">%[FirstPublishLocation_Event.Id]</CustomField> <CustomField name="SfEventName">%[FirstPublishLocation_Event.Name]</CustomField> <CustomField name="SfFirstPublishLocationId">%[FirstPublishLocation.Id]</CustomField> <CustomField name="SfFirstPublishLocationName">%[FirstPublishLocation.Name]</CustomField> <CustomField name="SfLastModifiedById">%[LastModifiedBy.Id]</CustomField> <CustomField name="SfLastModifiedByName">%[LastModifiedBy.Name]</CustomField> 4www.coveo.com 84 Coveo Platform 7.0 | Salesforce Connector Guide <CustomField name="SfLastModifiedDate">%[LastModifiedDate]</CustomField> <CustomField name="SfLastModifiedDatefq">%[LastModifiedDate_fiscalquarter]</CustomField> <CustomField name="SfLastModifiedDatefy">%[LastModifiedDate_fiscalyear]</CustomField> <CustomField name="SfLeadId">%[FirstPublishLocation_Lead.Id]</CustomField> <CustomField name="SfLeadName">%[FirstPublishLocation_Lead.Name]</CustomField> <CustomField name="SfLost_Scroll__kaId">%[FirstPublishLocation_Lost_Scroll__ka.Id] </CustomField> <CustomField name="SfLost_Scroll__kaName">%[FirstPublishLocation_Lost_Scroll__ka.Name] </CustomField> <CustomField name="SfMagic_Item__cId">%[FirstPublishLocation_Magic_Item__c.Id]</CustomField> <CustomField name="SfMagic_Item__cName">%[FirstPublishLocation_Magic_Item__c.Name] </CustomField> <CustomField name="SfMagic_Spell__kaId">%[FirstPublishLocation_Magic_Spell__ka.Id] </CustomField> <CustomField name="SfMagic_Spell__kaName">%[FirstPublishLocation_Magic_Spell__ka.Name] </CustomField> <CustomField name="SfOpportunityId">%[FirstPublishLocation_Opportunity.Id]</CustomField> <CustomField name="SfOpportunityName">%[FirstPublishLocation_Opportunity.Name]</CustomField> <CustomField name="SfOwnerId">%[Owner.Id]</CustomField> <CustomField name="SfOwnerName">%[Owner.Name]</CustomField> <CustomField name="SfProduct2Id">%[FirstPublishLocation_Product2.Id]</CustomField> <CustomField name="SfProduct2Name">%[FirstPublishLocation_Product2.Name]</CustomField> <CustomField name="SfReportId">%[FirstPublishLocation_Report.Id]</CustomField> <CustomField name="SfReportName">%[FirstPublishLocation_Report.Name]</CustomField> <CustomField name="SfSiteId">%[FirstPublishLocation_Site.Id]</CustomField> <CustomField name="SfSiteName">%[FirstPublishLocation_Site.Name]</CustomField> <CustomField name="SfSolutionId">%[FirstPublishLocation_Solution.Id]</CustomField> <CustomField name="SfSolutionName">%[FirstPublishLocation_Solution.Name]</CustomField> <CustomField name="SfSystemModstamp">%[SystemModstamp]</CustomField> <CustomField name="SfSystemModstampfq">%[SystemModstamp_fiscalquarter]</CustomField> <CustomField name="SfSystemModstampfy">%[SystemModstamp_fiscalyear]</CustomField> <CustomField name="SfTaskId">%[FirstPublishLocation_Task.Id]</CustomField> <CustomField name="SfTaskName">%[FirstPublishLocation_Task.Name]</CustomField> <CustomField name="SfUserId">%[FirstPublishLocation_User.Id]</CustomField> <CustomField name="SfUserName">%[FirstPublishLocation_User.Name]</CustomField> </CustomFields> </Fields> </Mapping> </Salesforce> 7.4 Salesforce Mapping File Example for Chatter Objects Chatter feed items appear in various Salesforce objects. You can make the content of Chatter feed searchable. Once the Chatter objects are available (see "Salesforce ObjectsToGet Configuration File Example for Chatter Objects" on page 54), you must include appropriate mappings for these Chatter objects and fields. The following Chatter mapping file example is a good starting point. <?xml version="1.0" encoding="utf-8"?> <Salesforce> <Mapping type="FeedItem"> <Fields> <Title>%[Title]</Title> <Body>%[LinkUrl] %[Body]</Body> <CustomFields> <CustomField name="sysfiletype">FeedItem</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="FeedComment"> <Fields> <Title>Comment by %[CreatedBy.Name]</Title> 4www.coveo.com 85 Coveo Platform 7.0 | Salesforce Connector Guide <Body>%[CommentBody]</Body> <CustomFields> <CustomField name="sysfiletype">FeedComment</CustomField> </CustomFields> </Fields> </Mapping> <Mapping type="ContentVersion"> <Fields> <Title>%[Title]</Title> <CustomFields> <CustomField name="sysfiletype"> ContentVersion</CustomField> </CustomFields> </Fields> </Mapping> </Salesforce> Note: Starting with CES 7.0.7183 (November 2014 monthly release),FeedComment can have access to information on the FeedItem: 1. In your ObjectToGet configuration file, add all needed FeedItem fields [i.e. NetworkScope (<string>NetworkScope</string>] on a FeedComment (see FeedItem Fields). 2. In your Salesforce mapping file, add all needed mappings on the FeedComment with a FeedItem. [Field] relationship [i.e. <CustomField name="SFFeedItemNetworkScope">% [FeedItem.NetworkScope]</CustomField>] (see FeedItem Fields). 3. Add the custom field(s) in your Salesforce field set [i.e. SFFeedItemNetworkScope]. 4. On the Coveo server, access the Administration Tool. 5. Rebuild the Salesforce source. In a search interface, all needed FeedItem information appear on a FeedComment record. 4www.coveo.com 86 Coveo Platform 7.0 | Salesforce Connector Guide 8. Configuring a Salesforce Security Provider A Salesforce source requires a Salesforce security provider to index permissions on Salesforce items so that when end-users search for Salesforce content, in search results, they only see Salesforce items that they have permissions to see. Notes: l You do not need to perform this procedure when you want to index Knowledge Base articles. It is not possible to index Knowledge Base permissions so no Salesforce security providers is needed. l You can get familiar with how Coveo components deal with permissions on documents both at indexing and query time (see Security). To configure a Salesforce security provider 1. On the Coveo server, access the Administration Tool. 2. On the menu, select Configuration > Security. 3. In the navigation panel on the left, select Security Providers. 4. In the Security - Security Providers page, click Add. 5. In the Modify Security Provider page: 4www.coveo.com 87 Coveo Platform 7.0 | Salesforce Connector Guide a. In the Name box, enter a name of your choice for your Salesforce security provider. b. In the Security Provider Type list, select Salesforce. Note: In versions prior to the CES 7.0.5785 August 2013 monthly release, the Salesforce item corresponds to the source type now identified as Salesforce (Legacy). c. In the User Identity list, select the user identity that you created for the Salesforce organization that you want to index (see "Creating a Salesforce User Identity" on page 11). d. In the Client Id box, paste the Customer Key value that you obtained earlier (see "Getting Salesforce Client_ID and Client_Secret Values" on page 16). e. In the Client Secret box, paste the Customer Secret value that you obtained earlier (see "Getting 4www.coveo.com 88 Coveo Platform 7.0 | Salesforce Connector Guide Salesforce Client_ID and Client_Secret Values" on page 16). f. Select the Sandbox check box only when you want to use this security provider with a source for a Salesforce sandbox (test.salesforce.com) rather than for your Salesforce production environment (login.salesforce.com). g. Leave the Use Refresh Token check box cleared unless you want to use the refresh token authentication method. This method is typically used when an application configures the security provider (such as in the Coveo cloud platform). h. In the Working Folder box, you can change the default security provider working folder path (C:\tmp) when for example your Coveo server is equipped with a separate hard disk for temporary files. i. In the Security Cache Refresh Frequency box, consider changing the time interval (in minutes) at which the internal cache of the Salesforce security provider is refreshed. The default value is 60 minutes. The Salesforce security provider must refresh its internal cache to maintain the freshness of the Salesforce data used when the security cache is updated (see "Refreshing Security Caches" on page 110). Example: The internal cache of the Salesforce security provider contains the user profiles. If the profile of a user changes in Salesforce, the internal cache of the security provider must first be refreshed to make this change available for the next security cache update. Consider increasing the Security Cache Refresh Frequency value when you have more than 100,000 users. The rule of thumb is 60 minutes per 100,000 users. It is not recommended to reduce the value below 60 minutes to prevent increasing too much the number of API calls made to Salesforce. j. In the Email Security Provider list, select the Email, Active Directory, or custom security provider that you created earlier (see Salesforce Connector Deployment Overview). k. Leave the Allow Complex Identities option cleared as it does not apply to this type of security provider. l. Click Apply Changes. What's Next? Create your Salesforce source (see "Configuring and Indexing a Salesforce Source" on page 94). 4www.coveo.com 89 Coveo Platform 7.0 | Salesforce Connector Guide 8.1 Configuring an Email Security Provider An Email security provider is a simple email user identity container that can be used by another security provider to recognize users by their email addresses. When used by more than one security providers attached to sources of various types, an email security provider can act as a single sign-on system. An Email security provider does not connect to any system so it does not need a user identity. Note: You can get familiar with how Coveo components deal with permissions on documents both at indexing and query time. To configure an Email security provider 1. On the Coveo server, access the Administration Tool. 2. On the menu, select Configuration > Security. 3. In the navigation panel on the left, select Security Providers. 4. In the Security - Security Providers page, click Add. 5. In the Modify Security Provider page: a. In the Name box, enter a name of your choice for your Email security provider. b. In the Security Provider Type list, select Email. 4www.coveo.com 90 Coveo Platform 7.0 | Salesforce Connector Guide Note: With CES 7.0.5785 and 5935 (August and September 2013 monthly releases), the Email security provider DLL file is missing in the CES distribution so you will not see the Email option in the Security Provider Type list. To resolve this issue: i. Contact Coveo Support to get a copy of the Coveo.CES.CustomCrawlers.EmailSecurityProvider.dll file. ii. When you receive the file, using an administrator account, connect to the Coveo Master server, and then copy the file to the [CES_Path]\bin folder. iii. When your Coveo instance includes a Mirror server, also copy the file to the [CES_Path] \bin folder on the Coveo Mirror server. iv. Restart the CES service so that the new DLL is recognized. c. In the User Identity list, leave (none). d. Click Apply Changes. What's Next? Configure a security provider that will use this Email security provider. 8.2 Configuring an Active Directory Security Provider You must use an Active Directory (AD) security provider when you create a source to index the content of an Active Directory domain. Other security providers may need to use an Active Directory security provider to expand, map, or resolve users or groups defined in Active Directory. Coveo Enterprise Search (CES) comes with a default Active Directory security provider to which no user identity is assigned. In this case, the Active Directory security provider takes the CES service account as the user to access AD. When CES is in the same domain as AD, you can use the default Active Directory security provider as is. No configuration is needed. You may need to create another Active Directory security provider only when CES and AD are in different and untrusted domains. In this case, you only need to assign a user identity containing any user that has access to the other domain to be able to use the security provider to expand, map, or resolve users or groups defined in Active Directory of this domain. Note: You can get familiar with how Coveo components deal with permissions on documents both at indexing and query time. 4www.coveo.com 91 Coveo Platform 7.0 | Salesforce Connector Guide To create or modify an Active Directory security provider 1. On the Coveo server, access the Administration Tool. 2. Select Configuration > Security. 3. In the navigation panel on the left, select Security Providers. 4. In the Security Providers page: l Click Add to create a new security provider. OR l Click an existing Active Directory security provider to modify it. 5. In the Modify Security Provider page: a. In the Name box, enter a name to identify this security provider. b. In the Security Provider Type drop-down list: i. On a 32-bit server, select Active Directory (x86). ii. On a 64-bit server, select Active Directory (x64). 4www.coveo.com 92 Coveo Platform 7.0 | Salesforce Connector Guide c. In the User Identity section: i. In the drop-down list, select a user identity containing an account that has access to the desired domain. Example: When the user identity contains the domainA\OneUsername account, the security provider connects to Domain A Active Directory. Note: When User Identity is set to (none), the security provider takes the CES service account by default. ii. When needed, click Add, Edit, or Manage user identities respectively to create, modify, or manage user identities. d. In the Email Provider section: Note: The possibility to map Active Directory (AD) users to their email is available starting with CES 7.0.7338 (January 2015 monthly release). i. In the drop-down list, select the email provider that recognizes your users by their email addresses (see "Configuring an Email Security Provider" on page 90). Note: When you do not want to map Active Directory (AD) users to their email, select (none). ii. When needed, click Add, Edit, or Manage security providers respectively to create, modify, or manage email security providers. e. In the Parameters section, in rare cases the Coveo Support could instruct you to click Add Parameters to specify other security provider parameter names and values that could help to troubleshoot security provider issues. f. Leave the Allow Complex Identities option cleared as it does not apply to this type of security provider. g. Click Save or Apply Changes, depending whether you are creating or modifying a security provider. What's Next? When you are creating or modifying the security provider: l For an Active Directory source, configure and index the source. l To be used by another security provider, create or modify the other security provider. 4www.coveo.com 93 Coveo Platform 7.0 | Salesforce Connector Guide 9. Configuring and Indexing a Salesforce Source A source defines a set of configuration parameters for a specific Salesforce database. Note: When you have access to more than one Salesforce organization, you must define one source for each Salesforce organization that you want to index. To configure and index a Salesforce source 1. On the Coveo server, access the Administration Tool. 2. Select Index > Sources and Collections. 3. In the Collections section: a. Select an existing collection in which you want to add the new source. OR b. Click Add to create a new collection. 4. In the Sources section, click Add. The Add Source page that appears is organized in three sections. 5. In the General Settings section of the Add Source page: 4www.coveo.com 94 Coveo Platform 7.0 | Salesforce Connector Guide a. Enter the appropriate value for the following required parameters: Name A descriptive name of your choice for the connector source. Example: When the source only includes standard Salesforce objects, you could enter: MyCompany Salesforce Organization (Standard Objects) Source Type The connector used by this source. In this case, select Salesforce. Notes: l If you do not see Salesforce in the Source Type list, ensure that your current environment meets the requirements (see "Salesforce Connector Requirements" on page 10). l In versions prior to the CES 7.0.5785 August 2013 monthly release, the Salesforce item correspond to the source type now identified as Salesforce (Legacy). Addresses Enter the Salesforce Website URL: https://www.salesforce.com/ 4www.coveo.com 95 Coveo Platform 7.0 | Salesforce Connector Guide Fields Select the field set that you created for this source (see Salesforce Connector Deployment Overview). Refresh Schedule Time interval at which the index is automatically refreshed to keep the index content up-to-date. By default, the Every day option instructs CES to refresh the source everyday at 12 AM. The incremental refresh takes care of maintaining the source up-to-date, so you can select a longer interval such as Every Sunday. For a CRM Content source, since deleted items cannot be detected by incremental refreshes, you may want to select a shorter interval. Tip: After you create or modify the source configuration, and for each incremental refresh for changed or new items, a Coveo source typically performs the following number of API calls to your Salesforce organization: l One API call per about 1000 objects l One API call per attachment l One API call per about 1000 users l One API call per group/role/profile/permission sets With a normal usage, these calls alone shall not reach the Salesforce organization daily limit of API calls. Note: You can create new or modify existing source refresh schedules. b. Review the value for the following parameters that often do not need to be modified: Rating Change this value only when you want to globally change the rating associated with all items in this source relative to the rating to other sources. Example: When this source indexes a new repository that replaces a legacy repository, you may want to set this parameter to High, so that in the search interface, results from this source appear earlier in the list compared to those from the legacy repository. Document Types If you defined a custom document type set for this source, select it. Active Languages If you defined custom active language sets, ensure to select the most appropriate for this source. 4www.coveo.com 96 Coveo Platform 7.0 | Salesforce Connector Guide 6. In the Specific Connector Parameters & Options section of the Add Source page: a. Review the following parameters: ObjectsToGet File Enter the absolute full path(s) pointing to where you saved the custom ObjectsToGet configuration file(s) that you created (see "Creating a Salesforce ObjectsToGet Configuration File" on page 35). When you have more than one ObjectsToGet configuration files, separate the full file paths with a semicolon (;) character. Note: For versions prior to CES 7.0.6942 (August 2014 monthly release), the parameter can only contain one path. Example: D:\CES7\Config\SalesforceObjectsToGet.xml ;D:\CES7\Config\SalesforceObjectsToGet2.xml Client ID Enter the Customer Key value for the Salesforce organization that you want to index (see "Getting Salesforce Client_ID and Client_Secret Values" on page 16). Client Secret Enter the Customer Secret value for the Salesforce organization that you want to index (see "Getting Salesforce Client_ID and Client_Secret Values" on page 16). 4www.coveo.com 97 Coveo Platform 7.0 | Salesforce Connector Guide Mapping File Leave this parameter empty when you want to automatically map all available Salesforce metadata to CES fields using the same name If you created a mapping file, enter the absolute full path pointing to where you saved the mapping file that you created (see "Creating a Salesforce Mapping File" on page 70). Example: D:\CES7\Config\SalesforceMapping.xml Number of Refresh Threads When needed, change the number of simultaneous downloads that the connector can handle. The default value is 2. Sandbox Select this option only when you want the connector to connect to your Salesforce sandbox (test.salesforce.com) rather than to your Salesforce production environment (login.salesforce.com). Use Refresh Token Leave the Use Refresh Token check box cleared unless you want to use the refresh token authentication method. This method is typically used when an application configures the source (such as in the Coveo cloud platform). b. In the Parameters section, click Add Parameter when you want to show and configure advanced hidden source parameters (see "Modifying Hidden Salesforce Source Parameters" on page 101). c. In the Option section, the state of check boxes generally does not need to be changed: Index Subfolders Keep this check box selected (recommended). By doing so, all subfolders from the specified starting address are indexed. Index the document's metadata When selected, CES indexes all the document metadata, even metadata that are not associated with a field. The orphan metadata are added to the body of the document so that they can be searched using free text queries. When cleared (default), only the values of system and custom fields that have the Free Text Queries attribute selected will be searchable without using a field query. 4www.coveo.com 98 Coveo Platform 7.0 | Salesforce Connector Guide Example: A document has two metadata: l LastEditedBy containing the value Hector Smith l Department containing the value RH In CES, the custom field CorpDepartment is bound to the metadata Department and its Free Text Queries attribute is selected. When the Index the document's metadata option is cleared, searching for RH returns the document because a field is indexing this value. Searching for hector does not return the document because no field is indexing this value. When the Index the document's metadata option is selected, searching for hector also returns the document because CES indexed orphan metadata. Document's addresses are case-sensitive Leave the check box cleared. This parameter needs to be checked only in rare cases for systems in which distinct documents may have the same name but different casing. Generate a cached HTML version of indexed documents When you select this check box (recommended), at indexing time, CES creates HTML versions of indexed documents. In the search interfaces, users can then more rapidly review the content by clicking the Quick View link rather than opening the original document with the original application. Consider clearing this check box only when you do not want to use Quick View links or to save resources when building the source. Open results with cached version Leave this check box cleared (recommended) so that in the search interfaces, the main search result link opens the original document in Salesforce. Consider selecting this check box only when you do not want users to be able to open the original document but only see the HTML version of the document as a Quick View. In this case, you must also select Generate a cached HTML version of indexed documents. 7. In the Security section of the Add Source page: 4www.coveo.com 99 Coveo Platform 7.0 | Salesforce Connector Guide a. In the Security Provider drop-down list: Note: The selected security provider must have the same values as this source for the Client ID, Client Secret, and Sandbox parameters. i. For standard objects and fields and CRM Content sources, select the security provider that you created for this source (see "Configuring a Salesforce Security Provider" on page 87). ii. For a Knowledge Base source, select (none), since no security provider is required for this type of source. b. In the Authentication drop-down list, select the Salesforce user identity that you created for this source. c. Click Save to save the source configuration. 8. When the source is for Salesforce Knowledge Base articles, you have to add permissions at the source level. 9. Rebuild the source. 10. Validate that the source building process is executed without errors: l In the navigation panel on the left, click Status, and then validate that the indexing proceeds without errors. OR l Open the CES Console to monitor the source building activities. What's Next? Set an incremental refresh schedule for your source. If you encounter issues: 4www.coveo.com 100 Coveo Platform 7.0 | Salesforce Connector Guide l Solve typical issues that return error messages (see "Troubleshooting Salesforce Connector Issues" on page 108). l Consider adding and modifying default values of hidden source parameters (see "Modifying Hidden Salesforce Source Parameters" on page 101). 9.1 Modifying Hidden Salesforce Source Parameters The Add Source and Source: ... General pages of the Administration Tool present the parameters with which you can configure the connector for most Salesforce setups. More advanced and more rarely used parameters are hidden. You can choose to make one or more of these parameters appear in the Add Source and Source: ... General pages of the Administration Tool so that you can change their default value. Consider changing values of hidden parameters only when you encounter time out error messages or performance issues. The following list describes the available advanced hidden parameters for Salesforce sources. The parameter type (integer, string…) appears between parentheses following the parameter name. ExtractPrivateObjectsSharingPermissions (Boolean) Whether to retrieve and index sharing permissions of private objects, or not. The default is true, in which case when the UseNewPermissionModel parameter is also set to true, for a document with sharing permissions, you can see from the Index Browser a permission model with two levels for share permissions where the second level is READ ACCESS & SHARING for sharing permissions. Note: The ExtractPrivateObjectsSharingPermissions parameter is available with CES 7.0.6684+ (May 2014 monthly release). IndexSharingSettings (Boolean) Whether or not to retrieve and index content documents sharing settings. The default value is True. Indexing sharing settings require one API call per Salesforce record. When indexing sharing permissions is not important for your Salesforce organization, you can turn this option off to save API calls. IndexArchivedActivities (Boolean) Whether the connector should index archived activities (tasks and events). The default value is False. LoadFiscalYearMetadata (Boolean) Whether the connector should query the Salesforce API to add metadata about fiscal year information. 4www.coveo.com 101 Coveo Platform 7.0 | Salesforce Connector Guide The default value is True. The fiscal period metadata is available when the Fiscal Year feature is enabled in Salesforce (see How do I set Fiscal Year and start month?). The following table describes additional fiscal period metadata that will be added for every DateTime metadata that is already available on the item (ex.: if the item contains 2 metadata of type DateTime, then 8 new metadata will be added on the item). Name Description Sample Name Sample Value id The unique identifier for a given item. id 70130000000rz4C 2012 Every item in Salesforce has a unique ID. {ORIGINAL_ Contains the fiscal year of the period MyDateField_ METADATA_ that includes the date of the fiscal_year NAME}_fiscal_ {ORIGINAL_METADATA_NAME} year metadata. OBSOLETE _ fiscalyear {ORIGINAL_ Contains the fiscal quarter number of MyDateField_ METADATA_ the period that includes the date of the fiscal_ NAME}_fiscal_ {ORIGINAL_METADATA_NAME quarter quarter metadata. 2 OBSOLETE_ fiscalquarter {ORIGINAL_ Contains the fiscal month number of MyDateField_ METADATA_ the period that includes the date of the fiscal_month NAME}_fiscal_ {ORIGINAL_METADATA_NAME} month metadata. 20 OBSOLETE_ fiscalmonth {ORIGINAL_ Contains the fiscal week number of the MyDateField_ METADATA_ period that includes the date of the fiscal_week NAME}_fiscal_ {ORIGINAL_METADATA_NAME} week metadata. 42 OBSOLETE_ fiscalweek 4www.coveo.com 102 Coveo Platform 7.0 | Salesforce Connector Guide Name Description Sample Name Sample Value {ORIGINAL_ Contains the fiscal quarter in the MyDateField_ 2014-Q1 METADATA_ format {YEAR}-Q{QUARTER} of the fiscal_ NAME}_ {ORIGINAL_METADATA_NAME pretty_ fiscalquarter metadata. quarter TimeoutInSeconds (string) The timeout value for requests made to Salesforce, in seconds. The default value is 600 seconds. UseConnectorHelpers (Boolean) The Coveo Salesforce connector needs to access some information from the Salesforce Metadata API to properly index Salesforce item permissions. Currently, Salesforce requires a very high level of privileges for a user to be able to access this API, even in a read-only manner. The optional Coveo Connector Helpers Package provides an additional API that the connector can use to retrieve the needed information without a high-privilege user (see Using the Coveo Connector Helpers Package). With the Coveo Connector Helpers package installed in Salesforce, set the UseConnectorHelpers to true to take advantage of the package. When set to true while the Coveo Connector Helpers Package is not installed, the connector falls back to index Salesforce item permissions by directly accessing the Metadata API. The default value is false. Note: The UseConnectorHelpers parameter is available with CES 7.0.6607+ (April 2014 monthly release). PrefetchObjectDescriptions Whether to prefetch object descriptions or not. The default value is true. Prefetching object descriptions often minimizes the number of API calls made to your Salesforce organization, but may sometimes increase the number of calls (see "Minimizing API Calls and Object Description Prefetching" on page 64). The formula to determine the optimal value for the PrefetchObjectDescriptions parameter is: PrefetchObjectDescriptions = ObjectsToGet.Objects.Count > Organization.Objects.Count / 200 Use the following procedure only when you want to modify one or more of the above hidden source parameters. To modify hidden Salesforce source parameters 1. Refer to "Adding an Explicit Connector Parameter" on page 104 to add one or more Salesforce hidden source parameters. 2. For a new Salesforce source, access the Add Source page of the Administration Tool to modify the 4www.coveo.com 103 Coveo Platform 7.0 | Salesforce Connector Guide value of the newly added advanced parameter: a. Select Index > Sources and Collections. b. Under Collections, select the collection in which you want to add the source. c. Under Sources, click Add. d. In the Add Source page, edit the newly added advanced parameter value. 3. For an existing Salesforce source, access the Source: ... General page of the Administration Tool to modify the value of the newly added advanced parameter: a. Select Index > Sources and Collections. b. Under Collections, select the collection containing the source you want to modify. c. Under Sources, click the existing Salesforce source in which you want to modify the newly added advanced parameter. d. In the Source: ... General page, edit the newly added advanced parameter value. 9.2 Adding an Explicit Connector Parameter Connector parameters applying to all sources indexed using this connector are called explicit parameters. When you create or configure a source, the Coveo Administration Tool presents parameters with which you can configure the connector for most setups. For many connectors, more advanced and more rarely used parameters also exist but are hidden by default. CES then uses the default value associated with each of these hidden parameters. You can however choose to make one or more of these parameters appear in the Add Source and Source: ... General pages of the Administration Tool so that you can change their default value. To add an explicit connector parameter 1. On the Coveo server, access the Administration Tool. 2. Select Configuration > Connectors. 3. In the list of the Connectors page, select the connector for which you want to show advanced hidden parameters. 4. In the page for the selected connector, for each hidden parameter that you want to modify, in the Parameters section, click Add Parameter. Note: The Add Parameter is present only when hidden parameters are available for the selected connector. 4www.coveo.com 104 Coveo Platform 7.0 | Salesforce Connector Guide 5. In the Modify the parameters of the connector page: a. In the Type list, select the parameter type as specified in the parameter description. b. In the Name box, type the parameter name exactly as it appears in the parameter description. Parameter names are case sensitive. c. In the Default Value box, enter the default value specified in the parameter description. Important: Do not set the value that you want to use for a specific source. The value that you enter here will be used for all sources defined using this connector so it must be set to the recommended default value. You will be able to change the value for each source later, in the Add Source and Source: ... General pages of the Administration Tool. d. In the Label box, enter the label that you want to see for this parameter. Example: To easily link the label to the hidden parameter, you can simply use the parameter name, and if applicable, insert spaces between concatenated words. For the BatchSize hidden parameter, enter Batch Size for the label. Note: To create multilingual labels and quick help messages, use the following syntax: <@ln>text</@>, where ln is replaced by the language initials—the languages of the Administration Tool are English (en) and French (fr). 4www.coveo.com 105 Coveo Platform 7.0 | Salesforce Connector Guide Example: <@fr>Chemin d'accès du fichier de configuration</@><@en>Configuration File Path</@> is a label which is displayed differently in the French and English versions of the Administration Tool. Tip: The language of the Administration Tool can be modified by pressing the following keys: Ctrl+Alt+Page Up. e. Optionally, in Quick Help, enter the help text that you want to see for this parameter when clicking the question mark button that will appear beside the parameter value. Tip: Copy and paste the key elements from the parameter description. f. When Predefined values is selected in the Type parameter, in the Value box that appears, enter the parameter values that you want to see available in the drop-down parameter that will appear in the Administration Tool interface. Enter one value per line. The entered values must exactly match the values listed in the hidden parameter description. g. Select the Optional parameter check box when you want to identify this parameter as an optional parameter. When cleared, CES does not allow you to save changes when the parameter is empty. This parameter does not appear for Boolean and Predefined values parameter types. h. Select the Sensitive information check box for password or other sensitive parameter so that in the Administration Tool pages where the parameter appears, the typed characters appear as dots to mask them. This parameter appears only for the String type. Example: When you select the Sensitive information check box for a parameter, the characters typed for appear as follows in the text box: i. Select the Validate as an email address check box when you want CES to validate that the text string that a user enters in this parameter respects the format of a valid email address. This parameter appears only for the String type. j. In the Maximum length box, enter the maximum number of characters for the string. This parameter appears only for the String type. When you enter 0, the length of the string is not limited. k. Click Save. 6. Back in the Connector page, click Apply Changes. The hidden parameter now appears in the Add Source and Source: ... General pages of the Administration Tool for the selected source. You can change the parameter value from these pages. Refer to the documentation for each connector for details. 4www.coveo.com 106 Coveo Platform 7.0 | Salesforce Connector Guide Tip: When you want to modify a hidden source parameter, you must first delete it, and then redefine it with the modified values. 4www.coveo.com 107 Coveo Platform 7.0 | Salesforce Connector Guide 10. Troubleshooting Salesforce Connector Issues You can encounter the following error messages when attempting to index your Salesforce organization. Consult the proposed solutions to resolve issues. 10.1 API Security Token Required Error with ID 'SALESFORCE_UNABLE_TO_AUTHENTICATE': Failed to authenticate to Salesforce. Failed to connect to the login service. Raw error: {"error":"invalid_grant","error_description":"authentication failure - Failed: API security token required"} Failed to authenticate to Salesforce. Failed to connect to the login service. Raw error: {"error":"invalid_grant","error_description":"authentication failure - Failed: API security token required"} When an application such as the Coveo connector accesses Salesforce through the API, the security token must be appended to the password. Ensure that you appended the security token to the password in the user identity associated with this source (see Creating a Salesforce User Identity). 10.2 Expired Access/Refresh Token Error with ID 'SALESFORCE_UNABLE_TO_AUTHENTICATE': Failed to authenticate to Salesforce. Failed to connect to the login service. Raw error: {"error":"invalid_grant","error_description":"expired access/refresh token"} Failed to authenticate to Salesforce. Failed to connect to the login service. Raw error: {"error":"invalid_grant","error_description":"expired access/refresh token"} When the security provider and/or source User Refresh Token option is selected, you must supply a valid refresh token. The refresh token authentication method is not the recommended method. Clear the User Refresh Token to rather use the Security Token method (see "Creating a Salesforce User Identity" on page 11). 10.3 Missing ionic.zip File Error with ID 'SALESFORCE_UNABLE_TO_CONNECT': Could not load file or assembly 'Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=abcdefad942a3f5c' or one of its dependencies. The system cannot find the file specified. 4www.coveo.com 108 Coveo Platform 7.0 | Salesforce Connector Guide Could not load file or assembly 'Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=abcdefad942a3f5c' or one of its dependencies. The system cannot find the file specified. In the case of the CES 7.0.5785 (August 2013 monthly build) distribution, the required ionic.zip.dll file is missing. Contact Coveo Support to get a copy of this missing file. 4www.coveo.com 109 Coveo Platform 7.0 | Salesforce Connector Guide 11. Refreshing Security Caches Coveo Enterprise Search (CES) uses a security cache to quickly identify the security identity of a user performing a query. The security cache is updated daily at midnight by default to ensure that any security identity changes made in indexed repositories within the last 24 hours are effective in the security cache and consequently reflected in search results. You can change the security update schedule time or frequency. As described in the procedure below, you can also manually start the security cache update at anytime to ensure that all the latest permission changes made in all repositories will be effective shortly in search results. Notes: l Updating the cache sends requests to all repositories to get all users and groups. When repositories have a large number of users and groups, the repository servers and the Coveo Master server may consume noticeable resources to process the requests. This is why by default, the security cache update is scheduled only once a day during a typical off-peak period. l When you want to update the security cache for changes made only to one or a few specific security groups, you can efficiently do that using the Security Browser to find each of these groups and then click Update permissions for: [group_name]. l The security cache does not contain document permission information. The index does. When the permissions on index documents change in a given repository, the change becomes effective in the index following an incremental refresh, a full refresh, or a rebuild of the corresponding source. The type of source action needed to update permission changes depend on the source connector type. l Starting with CES 7.0.7183 (November 2014 monthly release), the security cache update performance is improved by automatically disabling the update of invalid security entities in the cache. The invalid security entities remain in the security cache to allow to return indexed documents that would still be associated with these entities, but the entity relationships are cleared and these entities will no longer be updated. If invalid security entities return to a valid state, their update in the security cache will automatically be re-enabled. Example: In the security cache, the group G contains the user U. Document1 allows the group G, and Document2 allows the user U. When the group G or the user U are tagged invalid, the relationship between the group G or the user U is cleared in the security cache. When user U performs the query, only Document2 is returned. The external security cache rather stores document-level permissions which are not indexed because they are listed in a separate directory. 4www.coveo.com 110 Coveo Platform 7.0 | Salesforce Connector Guide Example: When mycompany\JSmith queries a repository for which document-level permissions are not indexed, CES has to access the security directory and determine which documents are accessible to mycompany\JSmith. To avoid repeating this lengthy process, CES keeps the permissions granted to mycompany\JSmith in the external security cache for future reference. You can also manually refresh the security caches between scheduled refreshes. To manually refresh the security caches 1. On the Coveo server, access the Administration Tool. 2. On the menu, select Status > Details. 3. In the Details page, in the Content Security section: a. Click Update Cache Now to start the security cache update process. Starting with CES 7.0.7183 (November 2014 monthly release), while the update is ongoing, you can click the [Monitor Update Progress] link that appears to go to the Mirrors page where you can monitor the security cache update progress reported by a percentage value for each mirror. Note: In the CES Console, a message similar to the following one appears, allowing you to monitor the security cache update progress: Updating security cache (10%). Processed security items: 351515/3498585 When the update is completed, the line changes to: Done updating security cache. b. In rare cases where one or more of your sources uses late-binding, click Clear External Security Cache Now when you want to reset the external security cache to ensure that permissions for all queries are up-to-date. CES starts rebuilding the cache from scratch using security providers to ask repositories the permissions for all late-binding source documents matching incoming queries. In the CES Console, the following message appears: 4www.coveo.com 111 Coveo Platform 7.0 | Salesforce Connector Guide The External Security Cache was cleared. Note: You can enable late-binding for a source from its Permissions page. 4www.coveo.com 112
© Copyright 2024