Salesforce ObjectsToGet Configuration File Example for Knowledge Base
The ObjectsToGet configuration file example presented in this topic specifies to retrieve two arbitrary named Knowledge Base objects:
-
MyKBArticleType1
-
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>
<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>
<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).