text
stringlengths
24
5.1k
static void settestsearchfeedelements(string communityid, string q, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. 718apex reference guide chatterfeeds class • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelements(communityid, q, sortparam) apex developer guide: testing connectapi code settestsearchfeedelements(communityid, q, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. api version 44.0 signature public static void settestsearchfeedelements(string communityid, string q, boolean threadedcommentscollapsed, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. result type: connectapi.feedelementpage 719apex reference guide chatterfeeds class object containing test data. return value type: void see also: searchfeedelements(communityid, q, threadedcommentscollapsed) apex developer guide: testing connectapi code settestsearchfeedelements(communityid, q, pageparam, pagesize, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelements(string communityid, string q, string pageparam, integer pagesize, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null.d q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. result type: connectapi.feedelementpage object containing test data. 720apex reference guide chatterfeeds class return value type: void see also: searchfeedelements(communityid, q, pageparam, pagesize) apex developer guide: testing connectapi code settestsearchfeedelements(communityid, q, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the
same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelements(string communityid, string q, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. 721apex reference guide chatterfeeds class • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelements(communityid, q, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestsearchfeedelements(communityid, q, pageparam, pagesize, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. api version 44.0 signature public static void settestsearchfeedelements(string communityid, string q, string pageparam, integer pagesize, boolean threadedcommentscollapsed, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string 722apex reference guide chatterfeeds class page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelements(communityid, q, pageparam, pagesize, threadedcommentscollapsed) apex developer guide: testing connectapi code settestsearchfeedelements(communityid, q, recentcommentcount, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelements(string communityid, string q, integer recentcommentcount, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q
type: string 723apex reference guide chatterfeeds class required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelements(communityid, q, recentcommentcount, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 724apex reference guide chatterfeeds class signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, moderation, and pendingreview. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, q) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedelementpage result) 725apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, moderation, and pendingreview. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by
oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code 726apex reference guide chatterfeeds class settestsearchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder 727apex reference guide chatterfeeds class values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam,
q, filter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 32.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedfilter filter, connectapi.feedelementpage result) 728apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. the only valid value is home. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.feedfilter 729apex reference guide chatterfeeds class specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value
is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 730apex reference guide chatterfeeds class signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, streams, and topics. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feed type is userprofile, subjectid can be any user id. if feedtype is any other value, subjectid must be the id of the context user or the alias me. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, q) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 731apex reference guide chatterfeeds class signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, streams, and topics. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder order of feed items in the feed. • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home
, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string search term. searches keywords in the user or group name. a minimum of one character is required. this parameter doesn’t support wildcards. this parameter is required. 732
apex reference guide chatterfeeds class result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, streams, and topics. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer 733apex reference guide chatterfeeds class maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code 734apex reference guide chatterfeeds class settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter, result) register a connectapi.feedelementpage object to be returned when searchfeedelementsinfeed is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 35.0 signature public static void settestsearchfeedelementsinfeed(string community
id, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. 735apex reference guide chatterfeeds class pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string one or more keywords to search for in the feed elements visible to the context user. the search string can contain wildcards and must contain at least two characters that aren’t wildcards. see wildcards. filter type: connectapi.feedfilter value must be connectapi.feedfilter.communityscoped. filters the feed to include only feed elements that are scoped to experience cloud sites. feed elements that are always visible in all sites are filtered out. currently, feed elements scoped to sites have a user or a group parent record. however, other parent record types could be scoped to sites in the future. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, customfilter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. 736apex reference guide chatterfeeds class api version 40.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, string customfilter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type
: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: 737apex reference guide chatterfeeds class • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string one or more keywords to search for in the feed elements visible to the context user. the search string can contain wildcards and must contain at least two characters that aren’t wildcards. see wildcards. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, customfilter) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, 738apex reference guide chatterfeeds class connectapi.feedsortorder sortparam, string q, boolean showinternalonly, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default
size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. 739apex reference guide chatterfeeds class q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly) apex developer guide: testing connectapi code settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, filter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 32.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, boolean showinternalonly, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. 740apex reference guide chatterfeeds class feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must
contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean 741apex reference guide chatterfeeds class specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, filter) apex developer guide: testing connectapi code 742apex reference guide chatterfeeds class settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, customfilter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestsearchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, boolean showinternalonly, string customfilter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. 743apex reference guide chatter
feeds class pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. cusotmfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, customfilter) apex developer guide: testing connectapi code 744apex reference guide chatterfeeds class settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelementsinfilterfeed(string communityid, string subjectid, string keyprefix, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, q) apex developer guide: testing connectapi code 745apex reference guide chatterfeeds class settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelementsinfilterfeed(string communityid, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string
page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. 746apex reference guide chatterfeeds class • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelementsinfilterfeed(string communityid, string subjectid, string keyprefix, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string 747apex reference guide chatterfeeds class a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds.
if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. 748apex reference guide chatterfeeds class return value type: void see also: searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code settestsearchstreams(communityid, q, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstream(communityid, q) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestsearchstreams(string communityid, string q, connectapi.chatterstreampage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.chatterstreampage object containing test data. return value type: void see also: searchstreams(communityid, q) apex developer guide: testing connectapi code 749apex reference guide chatterfeeds class settestsearchstreams(communityid, q, sortparam, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstream(communityid, q, sortparam) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestsearchstreams(string communityid, string q, connectapi.sortorder sortparam, connectapi.chatterstreampage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. result type: connectapi.chatterstreampage object containing test data. return value type: void see also: searchstreams(communityid, q, sortparam) apex developer guide: testing connectapi code 750apex reference guide chatterfeeds class settestsearchstreams(communityid, q, pageparam, pagesize, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstreams(communityid, q, pageparam, pagesize) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestsearchstreams(string communityid, string q, integer pageparam, integer pagesize, connectapi.chatterstreampage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. result type: connectapi.chatterstreampage object containing test data. return value type: void see also: searchstreams(communityid, q, page
param, pagesize) apex developer guide: testing connectapi code 751apex reference guide chatterfeeds class settestsearchstreams(communityid, q, pageparam, pagesize, sortparam, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstreams(communityid, q, pageparam, pagesize, sortparam) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestsearchstreams(string communityid, string q, integer pageparam, integer pagesize, connectapi.sortorder sortparam, connectapi.chatterstreampage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. result type: connectapi.chatterstreampage object containing test data. 752apex reference guide chatterfeeds class return value type: void see also: searchstreams(communityid, q, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestsearchstreams(communityid, q, pageparam, pagesize, sortparam, globalscope, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstreams(communityid, q, pageparam, pagesize, sortparam, globalscope) method is called in a test context. use the method with the same parameters or you receive an exception. api version 41.0 signature public static void settestsearchstreams(string communityid, string q, integer pageparam, integer pagesize, connectapi.sortorder sortparam, boolean globalscope, connectapi.chatterstreampage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). 753apex reference guide chatterfeeds class • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. globalscope type: boolean specifies whether to get streams from all the context user’s experience cloud sites, regardless of the communityid value. result type: connectapi.chatterstreampage object containing test data. return value type: void retired chatterfeeds methods the following methods for chatterfeeds are retired. in this section: deletefeeditem(communityid, feeditemid) delete a feed item. getcommentsforfeeditem(communityid, feeditemid) get comments for a feed item. getcommentsforfeeditem(communityid, feeditemid, pageparam, pagesize) get a page of comments for a feed item. getfeeditem(communityid, feeditemid)
get a feed item. getfeeditembatch(communityid, feeditemids) get a list of feed items. getfeeditemsfromfeed(communityid, feedtype) get feed items from the company, home, and moderation feeds. getfeeditemsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam) get a page of sorted feed items from the company, home, and moderation feeds. getfeeditemsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed items from the company, home, and moderation feeds. each feed item contains no more than the specified number of comments. getfeeditemsfromfeed(communityid, feedtype, subjectid) get feed items from a feed for a user or record. getfeeditemsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed for a user or record. 754apex reference guide chatterfeeds class getfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed for a user or record. each feed item includes no more than the specified number of comments. getfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly) get a page of sorted feed items from a record feed for a user or record. each feed item includes no more than the specified number of comments. specify whether to return feed items posted by internal (non-experience cloud site) users only. getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix) get feed items from a feed filtered by a key prefix for a user. getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed filtered by a key prefix for a user. getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed filtered by a key prefix for a user. each feed item contains no more than the specified number of comments. getfeeditemsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed items from a feed filtered by a key prefix for a user. include only feed items that have been updated since the time specified in the updatedsince parameter. getfeeditemsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed items from the company, home, and moderation feeds. include only feed items that have been updated since the time specified in the updatedsince parameter. each feed item contains no more than the specified number of comments. getfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed items from the files, groups, news, people, and record feeds. include only feed items that have been updated since the time specified in the updatedsince parameter. each feed item contains no more than the specified number of comments. getfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly) get a page of feed items from a record feed. include only feed items that have been updated since the time specified in the updatedsince parameter. specify whether to return feed items posted by internal (non-experience cloud site) users only. getfeedpoll(communityid, feeditemid) get the poll associated with a feed item. getlikesforfeeditem(communityid, feeditemid) get likes for a feed item. getlikesforfeeditem(communityid, feeditemid, pageparam, pagesize) get a page of likes for a feed item. likefeeditem(communityid, feeditemid) like a feed item for the context user. postcomment(communityid, feeditemid, text) post a plain-text comment to a feed item. postcomment(communityid, feeditemid, comment, feeditemfileupload) post a rich-text comment to a feed item. use this method to include mentions
and to attach a file to a comment. 755apex reference guide chatterfeeds class postfeedelement(communityid, feedelement, feedelementfileupload) post a rich-text feed element. include mentions and hashtag topics, attach a file to a feed element, and associate action link groups with a feed element. you can also use this method to share a feed element and add a comment. postfeeditem(communityid, feedtype, subjectid, text) post a plain-text feed item. postfeeditem(communityid, feedtype, subjectid, feediteminput, feeditemfileupload) post a rich-text feed item to a feed. use this method to include mentions and hashtag topics and to attach a file to a feed item. you can also use this method to share a feed item and add a comment. searchfeeditems(communityid, q) get the feed items that match the search criteria. searchfeeditems(communityid, q, sortparam) get the sorted feed items that match the search criteria. searchfeeditems(communityid, q, pageparam, pagesize) get a page of feed items that match the search criteria. searchfeeditems(communityid, q, pageparam, pagesize, sortparam) get a page of sorted feed items that match the search criteria. searchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam) get a page of sorted feed items that match the search criteria. searchfeeditemsinfeed(communityid, feedtype, q) get the feed items from the company, home, and moderation feeds that match the search criteria. searchfeeditemsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q) get a page of sorted feed items from the company, home, and moderation feeds that match the search criteria. searchfeeditemsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed items from the company, home, and moderation feeds that match the search criteria. each feed item includes no more than the specified number of comments. searchfeeditemsinfeed(communityid, feedtype, subjectid, q) get the feed items from a feed that match the search criteria. searchfeeditemsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q) get a page of sorted feed items from a feed for a user or record that match the search criteria. searchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed items from a feed that match the search criteria. each feed item includes no more than the specified number of comments. searchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly) get a page of sorted feed items from a feed for a user or record that match the search criteria. each feed item includes no more than the specified number of comments. specify whether to return feed items posted by internal (non-experience cloud site) users only. searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, q) get the feed items that match the search criteria from a feed filtered by a key prefix for a user. searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q) get a page of sorted feed items that match the search criteria from a feed filtered by a key prefix for a user. 756apex reference guide chatterfeeds class searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed items that match the search criteria from a feed filtered by a key prefix for a user. each feed item includes no more than the specified number of comments. sharefeedelement(communityid, subjectid, feedelementtype, originalfeedelementid) share the originalfeedelementid as the context user. sharefeeditem(communityid, feedtype, subjectid, originalfeeditemid) share the originalfeeditemid to the feed specified by the feedtype. updatebookmark(communityid, feeditemid, isbookmarkedbycurrentuser) bookmark a feed item or remove a bookmark from a feed item. voteonfeedpoll(communityid, feeditemid, mychoiceid) vote or change your vote
on a feed poll. settestgetfeeditemsfromfeed(communityid, feedtype, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeeditemsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeeditemsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, result) register a connectapi.feeditempage object to be returned when the matching getfeeditemsfromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when the matching getfeeditemsfromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. 757apex reference guide chatterfeeds class settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when the matching getfeeditemsfromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. settestgetfeeditemsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, updatedsince, result) register a connectapi.feeditempage object to be returned when the getfeeditemsfromfilterfeedupdatedsince method is called in a test context. settestgetfeeditemsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, connectapi.feeditempage, results) register a connectapi.feeditempage object to be returned when getfeeditemsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, result) register a connectapi.feeditempage object to be returned when getfeeditemsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an
exception. settestgetfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly, result) register a connectapi.feeditempage object to be returned when getfeeditemsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestsearchfeeditems(communityid, q, result) register a test feed item page to be returned when searchfeeditems(communityid, q) is called during a test. settestsearchfeeditems(communityid, q, sortparam, result) register a test feed item page to be returned when searchfeeditems(string, string, connectapi.feedsortorder) is called during a test. settestsearchfeeditems(communityid, q, pageparam, pagesize, result) register a test feed item page to be returned when searchfeeditems(string, string, string, integer) is called during a test. settestsearchfeeditems(communityid, q, pageparam, pagesize, sortparam, result) register a test feed item page to be returned when searchfeeditems(string, string, string, integer, connectapi.feedsortorder) is called during a test. settestsearchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam, result) register a test feed item page to be returned when searchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam) is called during a test. settestsearchfeeditemsinfeed(communityid, feedtype, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. 758apex reference guide chatterfeeds class settestsearchfeeditemsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfilterfeed(communityid, feedtype, subjectid, keyprefix, page
param, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeeditemsinfilterfeed(communityid, feedtype, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. deletefeeditem(communityid, feeditemid) delete a feed item. api version 28.0–31.0 important: in version 32.0 and later, use deletefeedelement(communityid, feedelementid). 759apex reference guide chatterfeeds class requires chatter yes signature public static void deletefeeditem(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. return value type: void getcommentsforfeeditem(communityid, feeditemid) get comments for a feed item. api version 28.0–31.0 important: in version 32.0 and later, use getcommentsforfeedelement(communityid, feedelementid). available to guest users 31.0 only requires chatter yes signature public static connectapi.commentpage getcommentsforfeeditem(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. 760apex reference guide chatterfeeds class feeditemid type: string id for a feed item. return value type: connectapi.commentpage getcommentsforfeeditem(communityid, feeditemid, pageparam, pagesize) get a page of comments for a feed item. api version 28.0–31.0 important: in version 32.0 and later, use getcommentsforfeedelement(communityid, feedelementid, pageparam, pagesize). available to guest users 31.0 only requires chatter yes signature public static connectapi.commentpage getcommentsforfeeditem(string communityid, string feeditemid, string pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 761apex reference guide chatterfeeds class return value type: connectapi.commentpage getfeeditem(communityid, feeditemid) get a feed item. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelement(communityid, feedelementid). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditem getfeeditem(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. return value type: connectapi.feeditem note: triggers on feeditem objects run before their attachment and capabilities information is saved, which means that connectapi.feeditem.attachment information and connectapi.feedelement.capabilities information may not be available in the trigger. getfeeditembatch(communityid, feeditemids) get a list of feed items. api version 31.0–31.0 762apex reference guide chatterfeeds class important: in version 32.0 and later, use getfeedelementbatch(communityid, feedelementids). requires chatter yes signature public static connectapi.batchresult[] getfeeditembatch
(string communityid, list<string> feeditemids) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemids type: list<string> a list of up to 500 feed item ids. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.feeditem object and errors for feed items that didn’t load. example // create a list of feed items. connectapi.feeditempage feeditempage = connectapi.chatterfeeds.getfeeditemsfromfeed(null, connectapi.feedtype.company); system.debug(feeditempage); // create a list of feed item ids. list<string> feeditemids = new list<string>(); for (connectapi.feeditem afeeditem : feeditempage.items){ feeditemids.add(afeeditem.id); } // get info about the feed items in the list. connectapi.batchresult[] batchresults = connectapi.chatterfeeds.getfeeditembatch(null, feeditemids); for (connectapi.batchresult batchresult : batchresults) { if (batchresult.issuccess()) { // operation was successful. // print the header for each feed item. connectapi.feeditem afeeditem; if(batchresult.getresult() instanceof connectapi.feeditem) { afeeditem = (connectapi.feeditem) batchresult.getresult(); 763apex reference guide chatterfeeds class } system.debug('success'); system.debug(afeeditem.header.text); } else { // operation failed. print errors. system.debug('failure'); system.debug(batchresult.geterrormessage()); } } getfeeditemsfromfeed(communityid, feedtype) get feed items from the company, home, and moderation feeds. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfeed(communityid, feedtype). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. return value type: connectapi.feeditempage 764apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfeed(communityid, feedtype, result) apex developer guide: testing connectapi code getfeeditemsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam) get a page of sorted feed items from the company, home, and moderation feeds. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer 765apex reference guide chatterfeeds class number of feed items per page. valid values are from 1
through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeeditemsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed items from the company, home, and moderation feeds. each feed item contains no more than the specified number of comments. api version 29.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam). available to guest users 31.0 only requires chatter yes 766apex reference guide chatterfeeds class signature public static connectapi.feeditempage getfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. 767apex reference guide chatterfeeds class sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest).
use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeeditemsfromfeed(communityid, feedtype, subjectid) get feed items from a feed for a user or record. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfeed(communityid, feedtype, subjectid). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. 768apex reference guide chatterfeeds class subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, result) apex developer guide: testing connectapi code getfeeditemsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed for a user or record. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string 769apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • re
levance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code 770apex reference guide chatterfeeds class getfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed for a user or record. each feed item includes no more than the specified number of comments. api version 29.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. 771apex reference guide chatterfeeds class • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also
: settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly) get a page of sorted feed items from a record feed for a user or record. each feed item includes no more than the specified number of comments. specify whether to return feed items posted by internal (non-experience cloud site) users only. 772apex reference guide chatterfeeds class api version 30.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string 773apex reference guide chatterfeeds class page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly, result) apex developer guide: testing connectapi code getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix) get feed items from a feed filtered by a key prefix for a user. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix). 774apex reference guide chatterfeeds class requires chatter yes signature
public static connectapi.feeditempage getfeeditemsfromfilterfeed(string communityid, string subjectid, string keyprefix) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, result) apex developer guide: testing connectapi code getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed filtered by a key prefix for a user. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam). 775apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfilterfeed(string communityid, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage 776apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed items from a feed filtered by a key prefix for a user. each feed item contains no more than the specified number of comments. api version 29.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam). requires chatter yes signature public static connect
api.feeditempage getfeeditemsfromfilterfeed(string communityid, string subjectid, string keyprefix, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. 777apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code 778apex reference guide chatterfeeds class getfeeditemsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed items from a feed filtered by a key prefix for a user. include only feed items that have been updated since the time specified in the updatedsince parameter. api version 30.0–31.0 important: in version 32.0 and later, use getfeedelementsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince). requires chatter yes signature public static connectapi.feeditempage getfeeditemsfromfilterfeedupdatedsince(string communityid, string subjectid, string keyprefix, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3.
density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. 779apex reference guide chatterfeeds class pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string opaque token containing information about the last modified date of the feed. do not construct this token. to retrieve this token, call getfeeditemsfromfilterfeed and take the value from the updatestoken property of the connectapi.feeditempage response body. return value type: connectapi.feeditempage usage this method returns only feed items that have been updated since the time specified in the updatedsince argument. a feed item is considered to be updated if it was created since the last feed request, or if sort=lastmodifieddatedesc and a comment was added to the feed item since the last feed request. adding likes and topics doesn’t update a feed item. to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeeditemsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, updatedsince, result) apex developer guide: testing connectapi code getfeeditemsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed items from the company, home, and moderation feeds. include only feed items that have been updated since the time specified in the updatedsince parameter. each feed item contains no more than the specified number of comments. api version 30.0–31.0 important: in version 32.0 and later, use getfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince). available to guest users 31.0 only 780apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feeditempage getfeeditemsupdatedsince(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feeditempage response body. return value type: connectapi.feeditempage 781apex reference guide chatterfeeds class usage
this method returns only feed items that have been updated since the time specified in the updatedsince argument. a feed item is considered to be updated if it was created since the last feed request, or if sort=lastmodifieddatedesc and a comment was added to the feed item since the last feed request. adding likes and topics doesn’t update a feed item. to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. example this example gets the feed items in the company feed and grabs the updatestoken property from the returned object. it then passes the value of updatestoken to the getfeeditemsupdatedsince method to get the feed items updated since the first call: // get the feed items in the company feed and return the updatestoken string communityid = null; // get the feed and extract the update token connectapi.feeditempage page = connectapi.chatterfeeds.getfeeditemsfromfeed(communityid, connectapi.feedtype.company); // page.updatestoken is opaque and has a value like '2:1384549034000' // get the feed items that changed since the provided updatestoken connectapi.feeditempage feeditems= connectapi.chatterfeeds.getfeeditemsupdatedsince (communityid, connectapi.feedtype.company, 1, connectapi.feeddensity.allupdates, null, 1, page.updatestoken); see also: settestgetfeeditemsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, connectapi.feeditempage, results) apex developer guide: testing connectapi code getfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed items from the files, groups, news, people, and record feeds. include only feed items that have been updated since the time specified in the updatedsince parameter. each feed item contains no more than the specified number of comments. api version 30.0–31.0 important: in version 32.0 and later, use getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince). available to guest users 31.0 only 782
apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feeditempage getfeeditemsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of these values: • files • groups • news • people • record subjectid type: string if feedtype is connectapi.record, subjectid can be any record id, including a group id. otherwise, it must be the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 783apex reference guide chatterfeeds class updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feeditempage response body. return value type: connectapi.feeditempage usage this method returns only feed items that have been updated since the time specified in the updatedsince argument. a feed item is considered to be updated if it was created since the last feed request, or if sort=lastmodifieddatedesc and a comment was added to the feed item since the last feed request. adding likes and topics doesn’t update a feed item. to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. example this example gets the feed items in the news feed and grabs the updatestoken property from the returned object. it then passes the value of updatestoken to the getfeeditemsupdatedsince method to get the feed items updated since the first call: // get the feed items in the news feed and return the updatestoken string communityid = null; string subjectid = 'me'; // get the feed and extract the update token connectapi.feeditempage page = connectapi.chatterfeeds.getfeeditemsfromfeed(communityid, connectapi.feedtype.news, subjectid); // page.updatestoken is opaque and has a value like '2:1384549034000' // get the feed items that changed since the provided updatestoken connectapi.feeditempage feeditems= connectapi.chatterfeeds.getfeeditemsupdatedsince (communityid, connectapi.feedtype.news, subjectid, 1, connectapi.feeddensity.allupdates, null, 1, page.updatestoken); see also: settestgetfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, result) apex developer guide: testing connectapi code getfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly) get a page of feed items from a record feed. include only feed items that have been updated since the time specified in the updatedsince parameter. specify whether to return feed items posted by internal (non-experience cloud site) users only. 784apex reference guide chatterfeeds class api version 30.0–31.0 important: in version 32.0 and later, use getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize,
updatedsince, showinternalonly). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage getfeeditemsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string 785apex reference guide chatterfeeds class page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feeditempage response body. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. return value type: connectapi.feeditempage usage this method returns only feed items that have been updated since the time specified in the updatedsince argument. a feed item is considered to be updated if it was created since the last feed request, or if sort=lastmodifieddatedesc and a comment was added to the feed item since the last feed request. adding likes and topics doesn’t update a feed item. if showinternalonly is true and digital experiences is enabled, feed items from experience cloud sites are included. otherwise, only feed items from the internal site are included. to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. example this example gets the feed items in the news feed and grabs the updatestoken property from the returned object. it then passes the value of updatestoken to the getfeeditemsupdatedsince method to get the feed items updated since the first call: // get the feed items in the news feed and return the updatestoken string communityid = null; string subjectid = 'me'; // get the feed and extract the update token connectapi.feeditempage page = connectapi.chatterfeeds.getfeeditemsfromfeed(communityid, connectapi.feedtype.news, subjectid); // page.updatestoken is opaque and has a value like '2:1384549034000' // get the feed items that changed since the provided updatestoken connectapi.feeditempage feeditems= connectapi.chatterfeeds.getfeeditemsupdatedsince 786apex reference guide chatterfeeds class (communityid, connectapi.feedtype.news, subjectid, 1, connectapi.feeddensity.allupdates, null, 1, page.updatestoken, true); see also: settestgetfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly, result) apex developer guide: testing connectapi code getfeedpoll(communityid, feeditemid) get the poll associated with a feed item. api version 28.0–31.0 important: in version 32.0 and later, use getfeedelementpoll(communityid, feedelementid). requires chatter yes signature public static connectapi.feedpoll getfeed
poll(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. return value type: connectapi.feedpoll note: triggers on feeditem objects run before their attachment and capabilities information is saved, which means that connectapi.feeditem.attachment information and connectapi.feedelement.capabilities information may not be available in the trigger. getlikesforfeeditem(communityid, feeditemid) get likes for a feed item. 787apex reference guide chatterfeeds class api version 28.0–31.0 important: in version 32.0 and later, use getlikesforfeedelement(communityid, feedelementid). available to guest users 31.0 only requires chatter yes signature public static connectapi.chatterlikepage getlikesforfeeditem(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. return value type: connectapi.chatterlikepage getlikesforfeeditem(communityid, feeditemid, pageparam, pagesize) get a page of likes for a feed item. api version 28.0–31.0 important: in version 32.0 and later, use getlikesforfeedelement(communityid, feedelementid, pageparam, pagesize). available to guest users 31.0 only requires chatter yes 788apex reference guide chatterfeeds class signature public static connectapi.chatterlikepage getlikesforfeeditem(string communityid, string feeditemid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chatterlikepage likefeeditem(communityid, feeditemid) like a feed item for the context user. api version 28.0–31.0 important: in version 32.0 and later, use likefeedelement(communityid, feedelementid). requires chatter yes signature public static connectapi.chatterlike likefeeditem(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. 789apex reference guide chatterfeeds class feeditemid type: string id for a feed item. return value type: connectapi.chatterlike if the context user already liked the feed item, this method is a non-operation and returns the existing like. postcomment(communityid, feeditemid, text) post a plain-text comment to a feed item. api version 28.0–31.0 important: in version 32.0 and later, use postcommenttofeedelement(communityid, feedelementid, text). requires chatter yes signature public static connectapi.comment postcomment(string communityid, string feeditemid, string text) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. text type: string the text of the comment. mentions are downgraded to plain text. to include a mention that links to a user, call postcomment(communityid, feeditemid, comment, feeditemfileupload) and pass the mention in a connectapi.commentinput object. return value type: connectapi.comment 790apex reference guide chatterfeeds class usage if hashtags or links are detected in text, they’re included in the comment as hashtag and link segments. mentions aren’t detected in text and aren’t separated out of the text. feed items and comments can contain up to 10,000 characters. postcomment(communityid, feeditemid, comment, feeditemfileupload
) post a rich-text comment to a feed item. use this method to include mentions and to attach a file to a comment. api version 28.0–31.0 important: in version 32.0 and later, use postcommenttofeedelement(communityid, feedelementid, comment, feedelementfileupload). requires chatter yes signature public static connectapi.comment postcomment(string communityid, string feeditemid, connectapi.commentinput comment, connectapi.binaryinput feeditemfileupload) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. comment type: connectapi.commentinput in the commentinput object, specify rich text, including @mentions. optionally, in the commentinput.attachment property, specify an existing file or a new file feeditemfileupload type: connectapi.binaryinput if you specify a newfileattachmentinput object in the commentinput.attachment property, specify the new binary file to attach in this argument. otherwise, do not specify a value. return value type: connectapi.comment 791apex reference guide chatterfeeds class usage feed items and comments can contain up to 10,000 characters. sample: posting a comment with a new file attachment to post a comment and upload and attach a new file to the comment, create a connectapi.commentinput object and a connectapi.binaryinput object to pass to the connectapi.chatterfeeds.postcomment method. string communityid = null; string feeditemid = '0d5d0000000kcd1'; connectapi.commentinput input = new connectapi.commentinput(); connectapi.messagebodyinput messageinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegment; textsegment = new connectapi.textsegmentinput(); textsegment.text = 'comment text body'; messageinput.messagesegments = new list<connectapi.messagesegmentinput>(); messageinput.messagesegments.add(textsegment); input.body = messageinput; connectapi.newfileattachmentinput attachmentinput = new connectapi.newfileattachmentinput(); attachmentinput.description = 'the description of the file'; attachmentinput.title = 'contentfile.txt'; input.attachment = attachmentinput; string filecontents = 'this is the content of the file.'; blob fileblob = blob.valueof(filecontents); connectapi.binaryinput binaryinput = new connectapi.binaryinput(fileblob, 'text/plain', 'contentfile.txt'); connectapi.comment commentrep = connectapi.chatterfeeds.postcomment(communityid, feeditemid, input, binaryinput); postfeedelement(communityid, feedelement, feedelementfileupload) post a rich-text feed element. include mentions and hashtag topics, attach a file to a feed element, and associate action link groups with a feed element. you can also use this method to share a feed element and add a comment. api version 31.0–35.0 important: in version 36.0 and later, this method is no longer available because you can’t create a feed post and upload a binary file in the same call. upload files to salesforce first, and then use postfeedelement(communityid, feedelement) to create the feed post and attach the files. requires chatter yes 792apex reference guide chatterfeeds class signature public static connectapi.feedelement postfeedelement(string communityid, connectapi.feedelementinput feedelement, connectapi.binaryinput feedelementfileupload) parameters communityid type: string id for an experience cloud site, internal, or null. feedelement type: connectapi.feedelementinput specify rich text, including mentions. optionally, specify a link, a poll, an existing file, or a new file. feedelementfileupload type: connectapi.binaryinput specify the new binary file to attach to the post only if you also specify a newfileattachmentinput object in the feedelement parameter. otherwise, pass null. return value type: connectapi.feedelement example for posting a feed element with a new (binary) file connecta
pi.feediteminput input = new connectapi.feediteminput(); input.subjectid = 'me'; connectapi.contentcapabilityinput contentinput = new connectapi.contentcapabilityinput(); contentinput.title = 'title'; connectapi.feedelementcapabilitiesinput capabilities = new connectapi.feedelementcapabilitiesinput(); capabilities.content = contentinput; input.capabilities = capabilities; string text = 'these are the contents of the new file.'; blob myblob = blob.valueof(text); connectapi.binaryinput bininput = new connectapi.binaryinput(myblob, 'text/plain', 'filename'); connectapi.chatterfeeds.postfeedelement(network.getnetworkid(), input, bininput); postfeeditem(communityid, feedtype, subjectid, text) post a plain-text feed item. api version 28.0–31.0 793apex reference guide chatterfeeds class important: in version 32.0 and later, use postfeedelement(communityid, subjectid, feedelementtype, text). requires chatter yes signature public static connectapi.feeditem postfeeditem(string communityid, connectapi.feedtype feedtype, string subjectid, string text) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of the following: • news • record • userprofile use record to post to a group. subjectid type: string the value depends on the feedtype: • news—id of the context user or the keyword me. • record—id of any record with a feed, including groups. • userprofile—id of any user. text type: string text of the feed item. mentions are downgraded to plain text. to include a mention that links to the user, call the postfeeditem(communityid, feedtype, subjectid, feediteminput, feeditemfileupload) method and pass the mention in a connectapi.feediteminput object. return value type: connectapi.feeditem note: triggers on feeditem objects run before their attachment and capabilities information is saved, which means that connectapi.feeditem.attachment information and connectapi.feedelement.capabilities information may not be available in the trigger. 794apex reference guide chatterfeeds class usage feed items and comments can contain up to 10,000 characters. posts to connectapi.feedtype.userprofile in api versions 23.0 and 24.0 created user status updates, not feed items. for posts to the user profile feed in those api versions, the character limit is 1,000 characters. postfeeditem(communityid, feedtype, subjectid, feediteminput, feeditemfileupload) post a rich-text feed item to a feed. use this method to include mentions and hashtag topics and to attach a file to a feed item. you can also use this method to share a feed item and add a comment. api version 28.0–31.0 important: in version 32.0 and later, use postfeedelement(communityid, feedelement, feedelementfileupload). requires chatter yes signature public static connectapi.feeditem postfeeditem(string communityid, connectapi.feedtype feedtype, string subjectid, connectapi.feediteminput feediteminput, connectapi.binaryinput feeditemfileupload) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of the following: • news • record • userprofile to post a feed item to a group, use record and use a group id as the subjectid. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. feediteminput type: connectapi.feediteminput 795apex reference guide chatterfeeds class in the feediteminput object, specify rich text. optionally, in
the feediteminput.attachment property, specify a link, a poll, an existing file, or a new file. feeditemfileupload type: connectapi.binaryinput if you specify a newfileattachmentinput object in the feediteminput.attachment property, specify the new binary file to attach in this argument. otherwise, do not specify a value. return value type: connectapi.feeditem note: triggers on feeditem objects run before their attachment and capabilities information is saved, which means that connectapi.feeditem.attachment information and connectapi.feedelement.capabilities information may not be available in the trigger. usage feed items and comments can contain up to 10,000 characters.posts to connectapi.feedtype.userprofile in api versions 23.0 and 24.0 created user status updates, not feed items. for posts to the user profile feed in those api versions, the character limit is 1,000 characters. example for sharing a feed item and adding a comment to share a feed item and add a comment, create a connectapi.feediteminput object containing the comment and the feed item to share. then pass the object to connectapi.chatterfeeds.postfeeditem in the feediteminput argument. the message segments in the message body input are used as the comment. connectapi.feediteminput input = new connectapi.feediteminput(); input.originalfeeditemid = '0d5d0000000juag'; connectapi.messagebodyinput body = new connectapi.messagebodyinput(); list<connectapi.messagesegmentinput> segmentlist = new list<connectapi.messagesegmentinput>(); connectapi.textsegmentinput textsegment = new connectapi.textsegmentinput(); textsegment.text = 'i hope you enjoy this post i found in another group.'; segmentlist.add((connectapi.messagesegmentinput)textsegment); body.messagesegments = segmentlist; input.body = body; connectapi.chatterfeeds.postfeeditem(null, connectapi.feedtype.userprofile, 'me', input, null); example for posting a mention to a user profile feed to post to a user profile feed and include an @mention, call the connectapi.chatterfeeds.postfeeditem method. string communityid = null; connectapi.feedtype feedtype = connectapi.feedtype.userprofile; connectapi.feediteminput input = new connectapi.feediteminput(); connectapi.messagebodyinput messageinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegment; 796apex reference guide chatterfeeds class connectapi.mentionsegmentinput mentionsegment = new connectapi.mentionsegmentinput(); messageinput.messagesegments = new list<connectapi.messagesegmentinput>(); textsegment = new connectapi.textsegmentinput(); textsegment.text = 'hey there '; messageinput.messagesegments.add(textsegment); mentionsegment.id = '005d0000001llo1'; messageinput.messagesegments.add(mentionsegment); textsegment = new connectapi.textsegmentinput(); textsegment.text = '. how are you?'; messageinput.messagesegments.add(textsegment); input.body = messageinput; connectapi.feeditem feeditemrep = connectapi.chatterfeeds.postfeeditem(communityid, feedtype, 'me', input, null); searchfeeditems(communityid, q) get the feed items that match the search criteria. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelements(communityid, q). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditems(string communityid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. 797apex reference guide chatterfeeds class return value type: connectapi.feeditempage
usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditems(communityid, q, result) apex developer guide: testing connectapi code searchfeeditems(communityid, q, sortparam) get the sorted feed items that match the search criteria. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelements(communityid, q, sortparam). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditems(string communityid, string q, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. sortparam type: connectapi.feedsortorder values are: 798apex reference guide chatterfeeds class • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditems(communityid, q, sortparam, result) apex developer guide: testing connectapi code searchfeeditems(communityid, q, pageparam, pagesize) get a page of feed items that match the search criteria. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelements(communityid, q, pageparam, pagesize). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditems(string communityid, string q, string pageparam, integer pagesize) 799apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditems(communityid, q, pageparam, pagesize, result) apex developer guide: testing connectapi code searchfeeditems(communityid, q, pageparam, pagesize, sortparam) get a page of sorted feed items that match the search criteria. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelements(communityid, q, pageparam, pagesize, sortparam). available to guest users 31.0 only requires chatter yes 800apex reference guide chatterfeeds class signature public static connectapi.feeditempage
searchfeeditems(string communityid, string q, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage 801apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditems(communityid, q, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code searchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam) get a page of sorted feed items that match the search criteria. api version 29.0–31.0 important: in version 32.0 and later, use searchfeedelements(communityid, q, recentcommentcount, pageparam, pagesize, sortparam). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditems(string communityid, string q, integer recentcommentcount, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. 802apex reference guide chatterfeeds class pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feeditempage usage to test code that uses
this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code searchfeeditemsinfeed(communityid, feedtype, q) get the feed items from the company, home, and moderation feeds that match the search criteria. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfeed(communityid, feedtype, q). 803apex reference guide chatterfeeds class available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfeed(communityid, feedtype, q, result) apex developer guide: testing connectapi code searchfeeditemsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q) get a page of sorted feed items from the company, home, and moderation feeds that match the search criteria. api version 28.0–31.0 804apex reference guide chatterfeeds class important: in version 32.0 and later, use searchfeedelementsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. 805apex reference guide chatterfeeds class q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with set
test). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeeditemsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed items from the company, home, and moderation feeds that match the search criteria. each feed item includes no more than the specified number of comments. api version 29.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string 806apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage 807apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeeditemsinfeed(communityid, feedtype, subjectid, q) get the feed items from a feed that match the search criteria. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfeed(communityid, feedtype, subjectid, q). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfeed(string communityid, connectapi.
feedtype feedtype, string subjectid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, and streams. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feed type is userprofile, subjectid can be any user id. if feedtype is any other value, subjectid must be the id of the context user or the alias me. q type: string 808apex reference guide chatterfeeds class required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, q, result) apex developer guide: testing connectapi code searchfeeditemsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q) get a page of sorted feed items from a feed for a user or record that match the search criteria. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype 809apex reference guide chatterfeeds class type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, and streams. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder order of feed items in the feed. • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string search term. searches keywords in the user or group name. a minimum of one character is required. this parameter doesn’t support wildcards. this parameter is required. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see
also: settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code 810apex reference guide chatterfeeds class searchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed items from a feed that match the search criteria. each feed item includes no more than the specified number of comments. api version 29.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, and streams. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. 811apex reference guide chatterfeeds class • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code 812apex reference guide chatterfeeds class searchfeeditemsinfeed(communityid, feedtype, subjectid, recent
commentcount, density, pageparam, pagesize, sortparam, q, showinternalonly) get a page of sorted feed items from a feed for a user or record that match the search criteria. each feed item includes no more than the specified number of comments. specify whether to return feed items posted by internal (non-experience cloud site) users only. api version 30.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly). available to guest users 31.0 only requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. 813apex reference guide chatterfeeds class • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, result) apex developer guide: testing connectapi code 814apex reference guide chatterfeeds class searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, q) get the feed items that match the search criteria from a feed filtered by a key prefix for a user. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, q). requires chatter yes signature public static connectapi.feeditem
page searchfeeditemsinfilterfeed(string communityid, string subjectid, string keyprefix, string q) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage 815apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, q, result) apex developer guide: testing connectapi code searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q) get a page of sorted feed items that match the search criteria from a feed filtered by a key prefix for a user. api version 28.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q). requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfilterfeed(string communityid, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. 816apex reference guide chatterfeeds class pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfilterfeed(communityid, feedtype, subjectid, keyprefix, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed items
that match the search criteria from a feed filtered by a key prefix for a user. each feed item includes no more than the specified number of comments. api version 29.0–31.0 important: in version 32.0 and later, use searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q). 817apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feeditempage searchfeeditemsinfilterfeed(string communityid, string subjectid, string keyprefix, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: 818apex reference guide chatterfeeds class • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feeditempage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeeditemsinfilterfeed(communityid, feedtype, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code sharefeedelement(communityid, subjectid, feedelementtype, originalfeedelementid) share the originalfeedelementid as the context user. api version 31.0–38.0 important: in version 39.0 and later, use postfeedelement(communityid, feedelement) or updatefeedelement(communityid, feedelementid, feedelement) with the connectapi. feedentitysharecapabilityinput to share a feed entity with a feed element. requires chatter yes 819apex reference guide chatterfeeds class signature public static connectapi.feedelement sharefeedelement(string communityid, string subjectid, connectapi.feedelementtype feedelementtype, string originalfeedelementid) parameters communityid type: string
id for an experience cloud site, internal, or null. subjectid type: string the id of the user or group with whom to share the feed element. feedelementtype type: connectapi.feedelementtype values are: • bundle—a container of feed elements. a bundle also has a body made up of message segments that can always be gracefully degraded to text-only values. • feeditem—a feed item has a single parent and is scoped to oneexperience cloud site or across all experience cloud sites. a feed item can have capabilities such as bookmarks, canvas, content, comment, link, poll. feed items have a body made up of message segments that can always be gracefully degraded to text-only values. • recommendation—a recommendation is a feed element with a recommendations capability. a recommendation suggests records to follow, groups to join, or applications that are helpful to the context user. originalfeedelementid type: string the id of the feed element to share. return value type: connectapi.feedelement example connectapi.chatterfeeds.sharefeedelement(null, '0f9rr0000004cpw', connectapi.feedelementtype.feeditem, '0d5rr0000004gxc'); sharefeeditem(communityid, feedtype, subjectid, originalfeeditemid) share the originalfeeditemid to the feed specified by the feedtype. api version 28.0–31.0 important: • in version 32.0–38.0, use sharefeedelement(communityid, subjectid, feedelementtype, originalfeedelementid). 820apex reference guide chatterfeeds class • in version 39.0 and later, use postfeedelement(communityid, feedelement) or updatefeedelement(communityid, feedelementid, feedelement) with the connectapi. feedentitysharecapabilityinput. requires chatter yes signature public static connectapi.feeditem sharefeeditem(string communityid, connectapi.feedtype feedtype, string subjectid, string originalfeeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of the following: • news • record • userprofile to share a feed item with a group, use record and use a group id as the subjectid. subjectid type: string the value depends on the value of feedtype: • news—subjectid must be the id of the context user or the keyword me. • record—subjectid can be a group id or the id of the context user (or me). • userprofile—subjectid can be any user id. originalfeeditemid type: string the id of the feed item to share. return value type: connectapi.feeditem 821apex reference guide chatterfeeds class example to share a feed item with a group, pass in the experience cloud site id (or null), the feed type record, the group id, and the id of the feed item to share. connectapi.chatterfeeds.sharefeeditem(null, connectapi.feedtype.record, '0f9d00000000izf', '0d5d0000000juag'); updatebookmark(communityid, feeditemid, isbookmarkedbycurrentuser) bookmark a feed item or remove a bookmark from a feed item. api version 28.0–31.0 important: in version 32.0 and later, use updatefeedelementbookmarks(communityid, feedelementid, bookmarks) or updatefeedelementbookmarks(communityid, feedelementid, isbookmarkedbycurrentuser). requires chatter yes signature public static connectapi.feeditem updatebookmark(string communityid, string feeditemid, boolean isbookmarkedbycurrentuser) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. isbookmarkedbycurrentuser type: boolean —specifying true adds the feed item to the list of bookmarks for the context user. specify false to remove a bookmark. return value type: connectapi.feeditem voteonfeedpoll(communityid, feeditemid, mychoiceid) vote or change your vote on a feed poll. 822apex reference guide chatterfeeds class api version 28.0–31.0
important: in version 32.0 and later, use voteonfeedelementpoll(communityid, feedelementid, mychoiceid). requires chatter yes signature public static connectapi.feedpoll voteonfeedpoll(string communityid, string feeditemid, string mychoiceid) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id of the feed item that is associated with the poll. mychoiceid type: string id of the item in the poll you’re voting for. return value type: connectapi.feedpoll settestgetfeeditemsfromfeed(communityid, feedtype, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 28.0–31.0 signature public static void settestgetfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, connectapi.feeditempage result) parameters communityid type: string 823apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsfromfeed(communityid, feedtype) apex developer guide: testing connectapi code settestgetfeeditemsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 28.0–31.0 signature public static void settestgetfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. 824apex reference guide chatterfeeds class pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeeditemsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code
throws an exception. api version 29.0–31.0 signature public static void settestgetfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) 825apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage object containing test data. 826apex reference guide chatterfeeds class return value type: void see also: getfeeditemsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 28.0–31.0 signature public static void settestgetfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. result type: connectapi.feeditempage object containing test data. 827apex reference guide chatterfeeds class return value type: void see also: getfeeditemsfromfeed(communityid, feedtype, subjectid) apex developer guide: testing connectapi code settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, page
param, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 28.0–31.0 signature public static void settestgetfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 828apex reference guide chatterfeeds class sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 29.0–31.0 signature public static void settestgetfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) parameters communityid type: string 829apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum
number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage 830apex reference guide chatterfeeds class object containing test data. return value type: void see also: getfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly, result) register a connectapi.feeditempage object to be returned when getfeeditemsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 30.0–31.0 signature public static void settestgetfeeditemsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. 831apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer
number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly) apex developer guide: testing connectapi code 832
apex reference guide chatterfeeds class settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, result) register a connectapi.feeditempage object to be returned when the matching getfeeditemsfromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. api version 28.0–31.0 signature public static void settestgetfeeditemsfromfilterfeed(string communityid, string subjectid, string keyprefix, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix) apex developer guide: testing connectapi code settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when the matching getfeeditemsfromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. api version 28.0–31.0 833apex reference guide chatterfeeds class signature public static void settestgetfeeditemsfromfilterfeed(string communityid, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage object containing test data. 834apex reference guide chatterfeeds class return value type: void see also: getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feeditempage object to be returned when the matching getfeeditemsfromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. api version 29.0–31.0 signature public static void settestgetfeeditemsfromfilterfeed(string communityid, string subjectid, string keyprefix, integer recentcommentcount
, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. 835apex reference guide chatterfeeds class • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeeditemsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, updatedsince, result) register a connectapi.feeditempage object to be returned when the getfeeditemsfromfilterfeedupdatedsince method is called in a test context. api version 30.0–31.0 836apex reference guide chatterfeeds class signature public static void settestgetfeeditemsfromfilterfeedupdatedsince(string communityid, string subjectid, string keyprefix, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string updatedsince, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from
records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. 837apex reference guide chatterfeeds class • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. updatedsince type: string opaque token containing information about the last modified date of the feed. do not construct this token. to retrieve this token, call getfeeditemsfromfilterfeed and take the value from the updatestoken property of the connectapi.feeditempage response body. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, updatedsince) apex developer guide: testing connectapi code settestgetfeeditemsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, connectapi.feeditempage, results) register a connectapi.feeditempage object to be returned when getfeeditemsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 30.0–31.0 signature public static void settestgetfeeditemsupdatedsince(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feeditempage results) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype 838apex reference guide chatterfeeds class type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feeditempage response body. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince) apex developer guide: testing connectapi code settestgetfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density,
pageparam, pagesize, updatedsince, result) register a connectapi.feeditempage object to be returned when getfeeditemsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 30.0–31.0 839apex reference guide chatterfeeds class signature public static void settestgetfeeditemsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of these values: • files • groups • news • people • record subjectid type: string if feedtype is connectapi.record, subjectid can be any record id, including a group id. otherwise, it must be the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string 840apex reference guide chatterfeeds class an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feeditempage response body. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince) apex developer guide: testing connectapi code settestgetfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly, result) register a connectapi.feeditempage object to be returned when getfeeditemsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 30.0–31.0 signature public static void settestgetfeeditemsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of these values: • files • groups • news • people • record 841apex reference guide chatterfeeds class subjectid type: string if feedtype is connectapi.record, subjectid can be any record id, including a group id. otherwise, it must be the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens
are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feeditempage response body. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. result type: connectapi.feeditempage object containing test data. return value type: void see also: getfeeditemsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly) apex developer guide: testing connectapi code 842apex reference guide chatterfeeds class settestsearchfeeditems(communityid, q, result) register a test feed item page to be returned when searchfeeditems(communityid, q) is called during a test. api version 28.0–31.0 signature public static void searchfeeditems(string communityid, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage object containing test data. return value type: void see also: searchfeeditems(communityid, q) apex developer guide: testing connectapi code settestsearchfeeditems(communityid, q, sortparam, result) register a test feed item page to be returned when searchfeeditems(string, string, connectapi.feedsortorder) is called during a test. api version 28.0–31.0 signature public static void settestsearchfeeditems(string communityid, string q, connectapi.feedsortorder sortparam, connectapi.feeditempage result) 843apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage the feed item test page. return value type: void see also: searchfeeditems(communityid, q, sortparam) apex developer guide: testing connectapi code settestsearchfeeditems(communityid, q, pageparam, pagesize, result) register a test feed item page to be returned when searchfeeditems(string, string, string, integer) is called during a test. api version 28.0–31.0 844apex reference guide chatterfeeds class signature public static void settestsearchfeeditems(string communityid, string q, string pageparam, integer pagesize, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain
at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. result type: connectapi.feeditempage the test feed item page. return value type: void see also: searchfeeditems(communityid, q, pageparam, pagesize) apex developer guide: testing connectapi code settestsearchfeeditems(communityid, q, pageparam, pagesize, sortparam, result) register a test feed item page to be returned when searchfeeditems(string, string, string, integer, connectapi.feedsortorder) is called during a test. api version 28.0–31.0 signature public static void settestsearchfeeditems(string communityid, string q, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) 845apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage the test feed item page. return value type: void see also: searchfeeditems(communityid, q, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code 846apex reference guide chatterfeeds class settestsearchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam, result) register a test feed item page to be returned when searchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam) is called during a test. api version 29.0–31.0 signature public static void settestsearchfeeditems(string communityid, string q, integer recentcommentcount, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.
feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. 847apex reference guide chatterfeeds class sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. result type: connectapi.feeditempage the test feed item page. return value type: void see also: searchfeeditems(communityid, q, recentcommentcount, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestsearchfeeditemsinfeed(communityid, feedtype, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0–31.0 signature public static void settestsearchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage object containing test data. 848apex reference guide chatterfeeds class return value type: void see also: searchfeeditemsinfeed(communityid, feedtype, q) apex developer guide: testing connectapi code settestsearchfeeditemsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0–31.0 signature public static void settestsearchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. 849apex reference guide chatterfeeds class • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds
. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage object containing test data. return value type: void see also: searchfeeditemsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code settestsearchfeeditemsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0–31.0 signature public static void settestsearchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. 850apex reference guide chatterfeeds class feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage object containing test data. 851apex reference guide chatterfeeds class return value type: void see also: searchfeeditemsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0–31.0 signature public static void settestsearch
feeditemsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, and streams. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage object containing test data. 852apex reference guide chatterfeeds class return value type: void see also: searchfeeditemsinfeed(communityid, feedtype, subjectid, q) apex developer guide: testing connectapi code settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0–31.0 signature public static void settestsearchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, and streams. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 853apex reference guide chatterfeeds class sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage object containing test data. return value type: void see also: searchfeeditemsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q) apex developer guide: testing
connectapi code settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0–31.0 signature public static void settestsearchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feeditempage result) 854apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, and streams. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. 855apex reference guide chatterfeeds class sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage object containing test data. return value type: void see also: searchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code settestsearchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0–31.0 signature public static void settestsearchfeeditemsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcomment
count, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, boolean showinternalonly, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, and streams. 856apex reference guide chatterfeeds class subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean 857apex reference guide chatterfeeds class specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. result type: connectapi.feeditempage object containing test data. return value type: void see also: searchfeeditemsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly) apex developer guide: testing connectapi code settestsearchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0–31.0 signature public static void settestsearchfeeditemsinfilterfeed(string communityid, string subjectid, string keyprefix, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f
9. q type: string 858apex reference guide chatterfeeds class required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage specify the test feed item page. return value type: void see also: searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, q) apex developer guide: testing connectapi code settestsearchfeeditemsinfilterfeed(communityid, feedtype, subjectid, keyprefix, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0–31.0 signature public static void settestsearchfeeditemsinfilterfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string id of the context user or the alias me. keyprefix type: string 859apex reference guide chatterfeeds class a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage specify the test feed item page. return value type: void see also: searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code 860apex reference guide chatterfeeds class settestsearchfeeditemsinfilterfeed(communityid, feedtype, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feeditempage object to be returned when the matching connectapi.searchfeeditemsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0–31.0 signature public static void settestsearchfeeditemsinfilterfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string keyprefix, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize,
connectapi.feedsortorder sortparam, string q, connectapi.feeditempage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. 861apex reference guide chattergroups class pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer number of feed items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. sorts the returned feed by the most recently created feed item, or by the most recently modified feed item. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feeditempage specify the test feed item page. return value type: void see also: searchfeeditemsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q) apex developer guide: testing connectapi code chattergroups class information about groups, such as the group’s members, photo, and the groups the specified user is a member of. add members to a group, remove members, and change the group photo. 862apex reference guide chattergroups class namespace connectapi chattergroups methods the following are methods for chattergroups. all methods are static. in this section: addmember(communityid, groupid, userid) add a user to a group as a standard member. addmemberwithrole(communityid, groupid, userid, role) add a user with a role to a group. addrecord(communityid, groupid, recordid) associate a record with a group. creategroup(communityid, groupinput) create a group. deletebannerphoto(communityid, groupid) delete the group banner photo. deletegroup(communityid, groupid) delete a group. deletemember(communityid, membershipid) remove a member from a group. deletephoto(communityid, groupid) delete the group photo. getannouncements(communityid, groupid) get the first page of announcements in a group. getannouncements(communityid, groupid, pageparam, pagesize) get a page of announcements in a group. getbannerphoto(communityid, group
id) get the group banner photo. getgroup(communityid, groupid) get information about a group. getgroupbatch(communityid, groupids) get information about a list of groups. getgroupmembershiprequest(communityid, requestid) get information about a request to join a private group. getgroupmembershiprequests(communityid, groupid) get information about every request to join a private group. getgroupmembershiprequests(communityid, groupid, status) get information about every request to join a private group that has a specified status. 863apex reference guide chattergroups class getgroups(communityid) get the first page of groups. getgroups(communityid, pageparam, pagesize) get a page of groups. getgroups(communityid, pageparam, pagesize, archivestatus) get a page of groups with an archive status. getmember(communityid, membershipid) get information about a group member. getmembers(communityid, groupid) get the first page of information about the members of a group. getmembers(communityid, groupid, pageparam, pagesize) get a page of information about the members of a group. getmembershipbatch(communityid, membershipids) get information about a list of group memberships. getmychattersettings(communityid, groupid) get the context user’s chatter settings for a group. getphoto(communityid, groupid) get the photo for a group. getrecord(communityid, grouprecordid) get a record associated with a group. getrecords(communityid, groupid) get the first page of records associated with a group. getrecords(communityid, groupid, pageparam, pagesize) get a page of records associated with a group. inviteusers(groupid, invite) invite internal and external users to join a group. postannouncement(communityid, groupid, announcement) post an announcement to a group. removerecord(communityid, grouprecordid) remove the association of a record with a group. requestgroupmembership(communityid, groupid) request membership in a private group. searchgroups(communityid, q) get the first page of groups that match the search criteria. searchgroups(communityid, q, pageparam, pagesize) get a page of groups that match the search criteria. searchgroups(communityid, q, archivestatus, pageparam, pagesize) get a page of groups with the archive status that match the search criteria. setbannerphoto(communityid, groupid, fileid, versionnumber) set an uploaded file as the group banner photo. 864apex reference guide chattergroups class setbannerphoto(communityid, groupid, fileupload) set a file that hasn’t been uploaded as the group banner photo. setbannerphotowithattributes(communityid, groupid, bannerphoto) set and crop an uploaded file as the group banner photo. setbannerphotowithattributes(communityid, groupid, bannerphoto, fileupload) set and crop a file that hasn’t been uploaded as the group banner photo. setphoto(communityid, groupid, fileid, versionnumber) set an uploaded file as the group photo. setphoto(communityid, groupid, fileupload) set a file that hasn’t been uploaded as the group photo. setphotowithattributes(communityid, groupid, photo) set and crop an uploaded file as the group photo. setphotowithattributes(communityid, groupid, photo, fileupload) set and crop a file that hasn’t been uploaded as the group photo. updategroup(communityid, groupid, groupinput) update the settings of a group. updategroupmember(communityid, membershipid, role) update the role of a group member. updatemychattersettings(communityid, groupid, emailfrequency) update the context user’s email frequency for a group. updaterequeststatus(communityid, requestid, status) update a request to join a private group. updaterequeststatus(communityid, requestid, status, responsemessage) update a request to join a private group and optionally provide a message when the request is denied. addmember(communityid, groupid, userid) add a user to a group as a standard member. api version 28.0 requires chatter yes sign
ature public static connectapi.groupmember addmember(string communityid, string groupid, string userid) 865apex reference guide chattergroups class parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. userid type: string id for a user. return value type: connectapi.groupmember usage to execute this method, the context user must be the group owner or moderator. addmemberwithrole(communityid, groupid, userid, role) add a user with a role to a group. api version 29.0 requires chatter yes signature public static connectapi.groupmember addmemberwithrole(string communityid, string groupid, string userid, connectapi.groupmembershiptype role) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. userid type: string 866apex reference guide chattergroups class id for a user. role type: connectapi.groupmembershiptype the group membership type. one of these values: • groupmanager • standardmember return value type: connectapi.groupmember usage to execute this method, the context user must be the group owner or moderator. addrecord(communityid, groupid, recordid) associate a record with a group. api version 34.0 requires chatter yes signature public static connectapi.grouprecord addrecord(string communityid, string groupid, string recordid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id of the group with which to associate the record. recordid type: string id of the record to associate with the group. return value type: connectapi.grouprecord 867apex reference guide chattergroups class creategroup(communityid, groupinput) create a group. api version 29.0 requires chatter yes signature public static connectapi.chattergroupdetail creategroup(string, communityid, connectapi.chattergroupinput groupinput) parameters communityid type: string, id for an experience cloud site, internal, or null. groupinput type: connectapi.chattergroupinput the properties of the group. return value type: connectapi.chattergroupdetail deletebannerphoto(communityid, groupid) delete the group banner photo. api version 36.0 requires chatter yes signature public static void deletebannerphoto(string communityid, string groupid) parameters communityid type: string 868apex reference guide chattergroups class id for an experience cloud site, internal, or null. groupid type: string id of the group. return value type: void usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. deletegroup(communityid, groupid) delete a group. api version 29.0 requires chatter yes signature public static void deletegroup(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: void deletemember(communityid, membershipid) remove a member from a group. api version 28.0 869apex reference guide chattergroups class requires chatter yes signature public static void deletemember(string communityid, string membershipid) parameters communityid type: string id for an experience cloud site, internal, or null. membershipid type: string id for a membership. return value type: void usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. deletephoto(communityid, groupid) delete the group photo. api version 28.0 requires chatter yes signature public static void deletephoto(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. 870
apex reference guide chattergroups class return value type: void usage this method is only successful when the context user is the group manager or owner, or has modify all data permission. getannouncements(communityid, groupid) get the first page of announcements in a group. api version 31.0 requires chatter yes signature public static connectapi.announcementpage getannouncements(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: connectapi.announcementpage usage to post an announcement, get information about an announcement, update the expiration date of an announcement, or delete an announcement, use the methods of the connectapi.announcements class. getannouncements(communityid, groupid, pageparam, pagesize) get a page of announcements in a group. api version 31.0 871apex reference guide chattergroups class requires chatter yes signature public static connectapi.announcementpage getannouncements(string communityid, string groupid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.announcementpage usage to post an announcement, get information about an announcement, update the expiration date of an announcement, or delete an announcement, use the methods of the connectapi.announcements class. getbannerphoto(communityid, groupid) get the group banner photo. api version 36.0 requires chatter yes signature public static connectapi.bannerphoto getbannerphoto(string communityid, string groupid) 872apex reference guide chattergroups class parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string the id of the group. return value type: connectapi.bannerphoto getgroup(communityid, groupid) get information about a group. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chattergroupdetail getgroup(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: connectapi.chattergroupdetail getgroupbatch(communityid, groupids) get information about a list of groups. 873apex reference guide chattergroups class api version 31.0 requires chatter yes signature public static connectapi.batchresult[] getgroupbatch(string communityid, list<string> groupids) parameters communityid type: string id for an experience cloud site, internal, or null. groupids type: list<string> a list of up to 500 group ids. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.chattergroup object and errors embedded in the results for groups that didn’t load. example // create a list of groups. connectapi.chattergrouppage grouppage = connectapi.chattergroups.getgroups(null); // create a list of group ids. list<string> groupids = new list<string>(); for (connectapi.chattergroup agroup : grouppage.groups){ groupids.add(agroup.id); } // get info about all the groups in the list. connectapi.batchresult[] batchresults = connectapi.chattergroups.getgroupbatch(null, groupids); for (connectapi.batchresult batchresult : batchresults) { if (batchresult
.issuccess()) { // operation was successful. // print the number of members in each group. connectapi.chattergroup agroup; if(batchresult.getresult() instanceof connectapi.chattergroup) { agroup = (connectapi.chattergroup) batchresult.getresult(); } 874apex reference guide chattergroups class system.debug('success'); system.debug(agroup.membercount); } else { // operation failed. print errors. system.debug('failure'); system.debug(batchresult.geterrormessage()); } } see also: getmembershipbatch(communityid, membershipids) getgroupmembershiprequest(communityid, requestid) get information about a request to join a private group. api version 28.0 requires chatter yes signature public static connectapi.groupmembershiprequest getgroupmembershiprequest(string communityid, string requestid) parameters communityid type: string id for an experience cloud site, internal, or null. requestid type: string the id of a request to join a private group. return value type: connectapi.groupmembershiprequest usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. 875apex reference guide chattergroups class getgroupmembershiprequests(communityid, groupid) get information about every request to join a private group. api version 28.0 requires chatter yes signature public static connectapi.groupmembershiprequests getgroupmembershiprequests(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: connectapi.groupmembershiprequests usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. getgroupmembershiprequests(communityid, groupid, status) get information about every request to join a private group that has a specified status. api version 28.0 requires chatter yes signature public static connectapi.groupmembershiprequests getgroupmembershiprequests(string communityid, string groupid, connectapi.groupmembershiprequeststatus status) 876apex reference guide chattergroups class parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. status type: connectapi.groupmembershiprequeststatus status—status of a request to join a private group. • accepted • declined • pending return value type: connectapi.groupmembershiprequests usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. getgroups(communityid) get the first page of groups. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chattergrouppage getgroups(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. 877apex reference guide chattergroups class return value type: connectapi.chattergrouppage getgroups(communityid, pageparam, pagesize) get a page of groups. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chattergrouppage getgroups(string communityid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chattergrouppage getgroups(communityid, pageparam, pagesize, archivestatus) get a page of groups with an archive status. api version 29.0 878apex reference guide chattergroups class available to guest
users 31.0 requires chatter yes signature public static connectapi.chattergrouppage getgroups(string communityid, integer pageparam, integer pagesize, connectapi.grouparchivestatus archivestatus) parameters communityid type: string id for an experience cloud site, internal, or null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. archivestatus type: connectapi.grouparchivestatus archive status of groups. • all—all groups, including groups that are archived and groups that aren’t archived. • archived—groups that are archived. • notarchived—groups that aren’t archived. if you pass in null, the default value is all. return value type: connectapi.chattergrouppage getmember(communityid, membershipid) get information about a group member. api version 28.0 requires chatter yes 879apex reference guide chattergroups class signature public static connectapi.groupmember getmember(string communityid, string membershipid) parameters communityid type: string id for an experience cloud site, internal, or null. membershipid type: string id for a membership. return value type: connectapi.groupmember getmembers(communityid, groupid) get the first page of information about the members of a group. api version 28.0 available to guest users 36.0 requires chatter yes signature public static connectapi.groupmemberpage getmembers(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: connectapi.groupmemberpage 880apex reference guide chattergroups class getmembers(communityid, groupid, pageparam, pagesize) get a page of information about the members of a group. api version 28.0 available to guest users 36.0 requires chatter yes signature public static connectapi.groupmemberpage getmembers(string communityid, string groupid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.groupmemberpage getmembershipbatch(communityid, membershipids) get information about a list of group memberships. api version 31.0 881apex reference guide chattergroups class requires chatter yes signature public static connectapi.batchresult[] getmembershipbatch(string communityid, list<string> membershipids) parameters communityid type: string id for an experience cloud site, internal, or null. membershipids type: list<string> a list of up to 500 group membership ids. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.groupmember object and errors embedded in the results for group memberships that didn’t load. example // get members of a group. connectapi.groupmemberpage memberspage = connectapi.chattergroups.getmembers(null, '0f9d00000000oot'); // create a list of membership ids. list<string> memberslist = new list<string>(); for (connectapi.groupmember groupmember : memberspage.members){ memberslist.add(groupmember.id); } // get info about all group memberships in the list. connectapi.batchresult[] batchresults = connectapi.chattergroups.getmembershipbatch(null, memberslist); for (connectapi.batch
result batchresult : batchresults) { if (batchresult.issuccess()) { // operation was successful. // print the first name of each member. connectapi.groupmember groupmember; if(batchresult.getresult() instanceof connectapi.groupmember) { groupmember = (connectapi.groupmember) batchresult.getresult(); } system.debug('success'); system.debug(groupmember.user.firstname); } 882
apex reference guide chattergroups class else { // operation failed. print errors. system.debug('failure'); system.debug(batchresult.geterrormessage()); } } see also: getgroupbatch(communityid, groupids) getmychattersettings(communityid, groupid) get the context user’s chatter settings for a group. api version 28.0 requires chatter yes signature public static connectapi.groupchattersettings getmychattersettings(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: connectapi.groupchattersettings getphoto(communityid, groupid) get the photo for a group. api version 28.0 883apex reference guide chattergroups class requires chatter yes signature public static connectapi.photo getphoto(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: connectapi.photo getrecord(communityid, grouprecordid) get a record associated with a group. api version 34.0 requires chatter yes signature public static connectapi.grouprecord getrecord(string communityid, string grouprecordid) parameters communityid type: string id for an experience cloud site, internal, or null. grouprecordid type: string id of the group record. return value type: connectapi.grouprecord 884apex reference guide chattergroups class getrecords(communityid, groupid) get the first page of records associated with a group. api version 33.0 requires chatter yes signature public static connectapi.grouprecordpage getrecords(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. return value type: connectapi.grouprecordpage getrecords(communityid, groupid, pageparam, pagesize) get a page of records associated with a group. api version 33.0 requires chatter yes signature public static connectapi.grouprecordpage getrecords(string communityid, string groupid, integer pageparam, integer pagesize) parameters communityid type: string 885apex reference guide chattergroups class id for an experience cloud site, internal, or null. groupid type: string id for a group. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.grouprecordpage inviteusers(groupid, invite) invite internal and external users to join a group. api version 39.0 requires chatter yes signature public static connectapi.invitations inviteusers(string groupid, connectapi.inviteinput invite) parameters groupid type: string id of the group. invite type: connectapi.inviteinput a connectapi.inviteinput body. return value type: connectapi.invitations 886apex reference guide chattergroups class postannouncement(communityid, groupid, announcement) post an announcement to a group. api version 31.0 requires chatter yes signature public static connectapi.announcement postannouncement(string communityid, string groupid, connectapi.announcementinput announcement) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. announcement type: connectapi.announcementinput a connectapi.announcementinput object. return value type: connectapi.announcement usage use an announcement to highlight information. users can discuss, like, and post comments on announcements. deleting the feed post
deletes the announcement. to post an announcement, get information about an announcement, update the expiration date of an announcement, or delete an announcement, use the methods of the connectapi.announcements class. removerecord(communityid, grouprecordid) remove the association of a record with a group. api version 34.0 887apex reference guide chattergroups class requires chatter yes signature public static void removerecord(string communityid, string grouprecordid) parameters communityid type: string id for an experience cloud site, internal, or null. grouprecordid type: string id of the group record. return value type: void requestgroupmembership(communityid, groupid) request membership in a private group. api version 28.0 requires chatter yes signature public static connectapi.groupmembershiprequest requestgroupmembership(string communityid, string groupid) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. 888apex reference guide chattergroups class return value type: connectapi.groupmembershiprequest sample: requesting to join a private group this sample code calls connectapi.chattergroups.requestgroupmembership to request to join a private group. string communityid = null; id groupid = '0f9x00000000haz'; connectapi.groupmembershiprequest membershiprequest = connectapi.chattergroups.requestgroupmembership(communityid, groupid); searchgroups(communityid, q) get the first page of groups that match the search criteria. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chattergrouppage searchgroups(string communityid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. can be specified as null. return value type: connectapi.chattergrouppage 889apex reference guide chattergroups class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchgroups(communityid, q, result) apex developer guide: testing connectapi code searchgroups(communityid, q, pageparam, pagesize) get a page of groups that match the search criteria. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chattergrouppage searchgroups(string communityid, string q, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. can be specified as null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 890apex reference guide chattergroups class return value type: connectapi.chattergrouppage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchgroups(communityid, q, pageparam, pagesize, result) apex developer guide: testing connectapi code searchgroups(communityid, q, archivestatus, pageparam, pagesize) get a page of groups with the archive status that match the search criteria. api version 29.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chattergrouppage searchgroups(string communityid, string q, connectapi.grouparchivestatus archivestatus, integer pageparam, integer pagesize) parameters communityid
type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. can be specified as null. archivestatus type: connectapi.grouparchivestatus archive status of groups. • all—all groups, including groups that are archived and groups that aren’t archived. • archived—groups that are archived. 891apex reference guide chattergroups class • notarchived—groups that aren’t archived. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chattergrouppage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchgroups(communityid, q, archivestatus, pageparam, pagesize, result) apex developer guide: testing connectapi code setbannerphoto(communityid, groupid, fileid, versionnumber) set an uploaded file as the group banner photo. api version 36.0 requires chatter yes signature public static connectapi.bannerphoto setbannerphoto(string communityid, string groupid, string fileid, integer versionnumber) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string the id of the group. 892apex reference guide chattergroups class fileid type: string the id of the already uploaded file. the key prefix must be 069, and the image must be smaller than 8 mb. versionnumber type: integer version number of the existing file. specify either an existing version number or, to get the latest version, specify null. return value type: connectapi.bannerphoto usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. setbannerphoto(communityid, groupid, fileupload) set a file that hasn’t been uploaded as the group banner photo. api version 36.0 requires chatter yes signature public static connectapi.bannerphoto setbannerphoto(string communityid, string groupid, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string the id of the group. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. 893apex reference guide chattergroups class return value type: connectapi.bannerphoto usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. setbannerphotowithattributes(communityid, groupid, bannerphoto) set and crop an uploaded file as the group banner photo. api version 36.0 requires chatter yes signature public static connectapi.bannerphoto setbannerphotowithattributes(string communityid, string groupid, connectapi.bannerphotoinput bannerphoto) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string the id of the group. bannerphoto type: connectapi.bannerphotoinput a connectapi.bannerphotoinput object that specifies the id and version of the file, and how to crop the file. return value type: connectapi.bannerphoto usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. 894apex reference guide chattergroups class setbannerphotowithattributes(communityid, groupid, bannerphoto, fileupload) set and crop a file that hasn’
t been uploaded as the group banner photo. api version 36.0 requires chatter yes signature public static connectapi.bannerphoto setbannerphotowithattributes(string communityid, string groupid, connectapi.bannerphotoinput bannerphoto, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string the id of the group. bannerphoto type: connectapi.bannerphotoinput a connectapi.bannerphotoinput object specifying the cropping parameters. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. return value type: connectapi.bannerphoto usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. setphoto(communityid, groupid, fileid, versionnumber) set an uploaded file as the group photo. 895apex reference guide chattergroups class api version 28.0 requires chatter yes signature public static connectapi.photo setphoto(string communityid, string groupid, string fileid, integer versionnumber) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. fileid type: string id of a file already uploaded. the key prefix must be 069, and the file must be an image that is smaller than 2 gb. versionnumber type: integer version number of the existing file. specify either an existing version number or, to get the latest version, specify null. return value type: connectapi.photo usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. sample: updating a group photo with an existing file when a group is created, it doesn’t have a group photo. you can set an existing photo that has already been uploaded to salesforce as the group photo. the key prefix must be 069 and the file size must be less than 2 gb. string communityid = null; id groupid = '0f9x00000000hak'; id fileid = '069x00000001ion'; // set photo connectapi.photo photo = connectapi.chattergroups.setphoto(communityid, groupid, fileid, null); 896apex reference guide chattergroups class setphoto(communityid, groupid, fileupload) set a file that hasn’t been uploaded as the group photo. api version 28.0 requires chatter yes signature public static connectapi.photo setphoto(string communityid, string groupid, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. return value type: connectapi.photo usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. sample: uploading a new file and using it as a group photo when a group is created, it doesn’t have a group photo. you can upload a photo and set it as the group photo. string communityid = null; id groupid = '0f9x00000000hap'; id photoid = '069x00000001ioo'; // set photo list<contentversion> groupphoto = [select c.versiondata from contentversion c where contentdocumentid=:photoid]; connectapi.binaryinput binary = new connectapi.binaryinput(groupphoto.get(0).versiondata, 897apex reference guide chattergroups class 'image/png', 'image.png'); connectapi.photo photo = connectapi.chattergroups.setphoto(communityid, groupid, binary); setphotowithattributes(communityid, groupid, photo) set and crop an uploaded
file as the group photo. api version 29.0 requires chatter yes signature public static connectapi.photo setphotowithattributes(string communityid, string groupid, connectapi.photoinput photo) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. photo type: connectapi.photoinput a connectapi.photoinput object that specifies the id and version of the file, and how to crop the file. return value type: connectapi.photo usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. setphotowithattributes(communityid, groupid, photo, fileupload) set and crop a file that hasn’t been uploaded as the group photo. 898apex reference guide chattergroups class api version 29.0 requires chatter yes signature public static connectapi.photo setphotowithattributes(string communityid, string groupid, connectapi.photoinput photo, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. photo type: connectapi.photoinput a connectapi.photoinput object that specifies how to crop the file specified in fileupload. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. return value type: connectapi.photo usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. photos are processed asynchronously and might not be visible right away. updategroup(communityid, groupid, groupinput) update the settings of a group. api version 28.0 requires chatter yes 899apex reference guide chattergroups class signature public static connectapi.chattergroup updategroup(string communityid, string groupid, connectapi.chattergroupinput groupinput) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. groupinput type: connectapi.chattergroupinput a connectapi.chattergroupinput object. return value type: connectapi.chattergroup usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. use this method to update any settings in the connectapi.chattergroupinput class. these settings include the group title and text in the “information” section, whether the group is public or private, and whether the group is archived. example this example archives a group. string groupid = '0f9d00000000qsz'; string communityid = null; connectapi.chattergroupinput groupinput = new connectapi.chattergroupinput(); groupinput.isarchived = true; connectapi.chattergroups.updategroup(communityid, groupid, groupinput); updategroupmember(communityid, membershipid, role) update the role of a group member. api version 29.0 requires chatter yes 900apex reference guide chattergroups class signature public static connectapi.chattergroup updategroupmember(string communityid, string membershipid, connectapi.groupmembershiptype role) parameters communityid type: string id for an experience cloud site, internal, or null. membershipid type: string id for a membership. role type: connectapi.groupmembershiptype the group membership type. one of these values: • groupmanager • standardmember return value type: connectapi.chattergroup usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. updatemychattersettings(communityid, groupid, emailfrequency) update the context user’s email frequency for a group. api version 28.0 requires chatter yes signature public static connectapi.groupchattersettings updatemychattersettings(string communityid, string groupid, connectapi.groupemailfrequency email
frequency) parameters communityid type: string 901apex reference guide chattergroups class id for an experience cloud site, internal, or null. groupid type: string id for a group. emailfrequency type: connectapi.groupemailfrequency frequency with which a user receives email. • eachpost • dailydigest • weeklydigest • never • usedefault the value usedefault uses the value set in a call to updatechattersettings(communityid, userid, defaultgroupemailfrequency). return value type: connectapi.groupchattersettings updaterequeststatus(communityid, requestid, status) update a request to join a private group. api version 28.0 requires chatter yes signature public static connectapi.groupmembershiprequest updaterequeststatus(string communityid, string requestid, connectapi.groupmembershiprequeststatus status) parameters communityid type: string id for an experience cloud site, internal, or null. requestid type: string id for a request to join a private group. status type: connectapi.groupmembershiprequeststatus 902apex reference guide chattergroups class status of the request: • accepted • declined the pending value of the enum is not valid in this method. return value type: connectapi.groupmembershiprequest usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. sample: accepting or declining a request to join a private group this sample code calls connectapi.chattergroups.updaterequeststatus and passes it the membership request id and an connectapi.groupmembershiprequeststatus.accepted status. you can also pass connectapi.groupmembershiprequeststatus.declined. string communityid = null; id groupid = '0f9x00000000haz'; string requestid = '0i5x000000001sncaa'; connectapi.groupmembershiprequest membershiprequestrep = connectapi.chattergroups.updaterequeststatus(communityid, requestid, connectapi.groupmembershiprequeststatus.accepted); updaterequeststatus(communityid, requestid, status, responsemessage) update a request to join a private group and optionally provide a message when the request is denied. api version 35.0 requires chatter yes signature public static connectapi.groupmembershiprequest updaterequeststatus(string communityid, string requestid, connectapi.groupmembershiprequeststatus status, string responsemessage) parameters communityid type: string id for an experience cloud site, internal, or null. 903apex reference guide chattergroups class requestid type: string id for a request to join a private group. status type: connectapi.groupmembershiprequeststatus status of the request: • accepted • declined the pending value of the enum is not valid in this method. responsemessage type: string provide a message to the user if their membership request is declined. the value of this property is used only when the value of the status property is declined. the maximum length is 756 characters. return value type: connectapi.groupmembershiprequest usage this method is successful only when the context user is the group manager or owner, or has modify all data permission. chattergroups test methods the following are the test methods for chattergroups. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. settestsearchgroups(communityid, q, result) register a connectapi.chattergrouppage object to be returned when the matching connectapi.searchgroups method is called in a test context. use the test method with the same parameters or you receive an exception. api version 29.0 signature public static void settestsearchgroups(string communityid, string q, connectapi.chattergrouppage result) parameters communityid type: string 904apex reference guide chattergroups class id for an experience cloud site, internal, or null. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. can be specified as null. result type: connectapi.chattergrouppage test connecta
pi.chattergrouppage object. return value type: void see also: searchgroups(communityid, q) apex developer guide: testing connectapi code settestsearchgroups(communityid, q, pageparam, pagesize, result) register a connectapi.chattergrouppage object to be returned when the matching connectapi.searchgroups method is called in a test context. use the test method with the same parameters or you receive an exception. api version 28.0 signature public static void settestsearchgroups(string communityid, string q, integer pageparam, integer pagesize, connectapi.chattergrouppage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. can be specified as null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer 905apex reference guide chattergroups class specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. result type: connectapi.chattergrouppage test connectapi.chattergrouppage object. return value type: void see also: searchgroups(communityid, q, pageparam, pagesize) apex developer guide: testing connectapi code settestsearchgroups(communityid, q, archivestatus, pageparam, pagesize, result) register a connectapi.chattergrouppage object to be returned when the matching connectapi.searchgroups method is called in a test context. use the test method with the same parameters or you receive an exception. api version 29.0 signature public static void settestsearchgroups(string communityid, string q, connectapi.grouparchivestatus, archivestatus, integer pageparam, integer pagesize, connectapi.chattergrouppage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. can be specified as null. archivestatus type: connectapi.grouparchivestatus archive status of groups. • all—all groups, including groups that are archived and groups that aren’t archived. • archived—groups that are archived. • notarchived—groups that aren’t archived. 906apex reference guide chattermessages class pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. result type: connectapi.chattergrouppage test connectapi.chattergrouppage object. return value type: void see also: searchgroups(communityid, q, archivestatus, pageparam, pagesize) apex developer guide: testing connectapi code chattermessages class get, send, search, and reply to private messages. you can also get and search private conversations, mark conversations as read, and get a count of unread private messages. namespace connectapi usage private messages and direct messages are different features. direct messages are newer and offer a richer feature set for private communication in experience cloud sites. direct messages are a capability within chatter feeds. to work with direct messages, use the chatterfeeds class. chattermessages methods the following are methods for chattermessages. all methods are static. in this section: getconversation(conversationid) get a conversation. getconversation(conversationid, pageparam, pagesize) get a page of a conversation. getconversation(communityid, conversationid) get a conversation from an experience cloud site. 907apex reference guide chattermessages class getconversation(communityid, conversationid, pageparam, pagesize) get a page of a conversation from an experience cloud site. getconversations() get the most recent conversations.
getconversations(pageparam, pagesize) get a page of conversations. getconversations(communityid) get the most recent conversations from an experience cloud site. getconversations(communityid, pageparam, pagesize) get a page of conversations from an experience cloud site. getmessage(messageid) get a message. getmessage(communityid, messageid) get a message from an experience cloud site. getmessages() get the most recent messages. getmessages(pageparam, pagesize) get a page of messages. getmessages(communityid) get the most recent messages from an experience cloud site. getmessages(communityid, pageparam, pagesize) get a page of messages from an experience cloud site. getunreadcount() get the number of conversations that are marked unread. getunreadcount(communityid) get the number of conversations that are marked unread in an experience cloud site. markconversationread(conversationid, read) mark a conversation as read or unread. markconversationread(communityid, conversationid, read) mark a conversation as read or unread in an experience cloud site. replytomessage(text, inreplyto) reply to a message. replytomessage(communityid, text, inreplyto) reply to a message in an experience cloud site. searchconversation(conversationid, q) get a conversation that matches the search criteria. searchconversation(conversationid, pageparam, pagesize, q) get a conversation with a page of messages that match the search criteria. searchconversation(communityid, conversationid, q) get a conversation with messages that match the search criteria in an experience cloud site. 908apex reference guide chattermessages class searchconversation(communityid, conversationid, pageparam, pagesize, q) get a conversation with a page of messages that match the search criteria in an experience cloud site. searchconversations(q) get conversations in which member names and messages match the search criteria. searchconversations(pageparam, pagesize, q) get a page of conversations in which member names and messages match the search criteria. searchconversations(communityid, q) get conversations in which member names and messages match the search criteria in an experience cloud site. searchconversations(communityid, pageparam, pagesize, q) get a page of conversations in which member names and messages match the search criteria in an experience cloud site. searchmessages(q) get messages that match the search criteria. searchmessages(pageparam, pagesize, q) get a page of messages that match the search criteria. searchmessages(communityid, q) get messages that match the search criteria in an experience cloud site. searchmessages(communityid, pageparam, pagesize, q) get a page of messages that match the search criteria in an experience cloud site. sendmessage(text, recipients) send a message to a list of recipients. sendmessage(communityid, text, recipients) send a message to a list of recipients in an experience cloud site. getconversation(conversationid) get a conversation. api version 29.0 requires chatter yes signature public static connectapi.chatterconversation getconversation(string conversationid) parameters conversationid type: string id for the conversation. 909apex reference guide chattermessages class return value type: connectapi.chatterconversation getconversation(conversationid, pageparam, pagesize) get a page of a conversation. api version 29.0 requires chatter yes signature public static connectapi.chatterconversation getconversation(string conversationid, string pageparam, integer pagesize) parameters conversationid type: string id for the conversation. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chatterconversation getconversation(communityid, conversationid)
get a conversation from an experience cloud site. api version 30.0 requires chatter yes 910apex reference guide chattermessages class signature public static connectapi.chatterconversation getconversation(string communityid, string conversationid) parameters communityid type:string id for an experience cloud site, internal, or null. conversationid type: string id for the conversation. return value type: connectapi.chatterconversation getconversation(communityid, conversationid, pageparam, pagesize) get a page of a conversation from an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chatterconversation getconversation(string communityid, string conversationid, string pageparam, string pagesize) parameters communityid type:string id for an experience cloud site, internal, or null. conversationid type: string id for the conversation. pageparam type:string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. 911apex reference guide chattermessages class pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chatterconversation getconversations() get the most recent conversations. api version 29.0 requires chatter yes signature public static connectapi.chatterconversationpage getconversations() return value type: connectapi.chatterconversationpage getconversations(pageparam, pagesize) get a page of conversations. api version 29.0 requires chatter yes signature public static connectapi.chatterconversationpage getconversations(string pageparam, integer pagesize) parameters pageparam type: string 912apex reference guide chattermessages class specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chatterconversationpage getconversations(communityid) get the most recent conversations from an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chatterconversationpage getconversations(string communityid) parameters communityid type:string id for an experience cloud site, internal, or null. return value type: connectapi.chatterconversationpage getconversations(communityid, pageparam, pagesize) get a page of conversations from an experience cloud site. api version 30.0 requires chatter yes 913apex reference guide chattermessages class signature public static connectapi.chatterconversationpage getconversations(string communityid, string pageparam, integer pagesize) parameters communityid type:string id for an experience cloud site, internal, or null. pageparam type:string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chatterconversationpage getmessage(messageid) get a message. api version 29.0 requires chatter yes signature public static connectapi.chattermessage getmessage(string messageid) parameters messageid type: string id for the message. return value type: connectapi.chattermessage 914apex reference guide chattermessages class getmessage(communityid, messageid) get a message from an experience cloud site. api
version 30.0 requires chatter yes signature public static connectapi.chattermessage getmessage(string communityid, string messageid) parameters communityid type:string id for an experience cloud site, internal, or null. messageid type: string id for the message. return value type:connectapi.chattermessage getmessages() get the most recent messages. api version 29.0 requires chatter yes signature public static connectapi.chattermessagepage getmessages() return value type: connectapi.chattermessagepage 915apex reference guide chattermessages class getmessages(pageparam, pagesize) get a page of messages. api version 29.0 requires chatter yes signature public static connectapi.chattermessagepage getmessages(string pageparam, integer pagesize) parameters pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chattermessagepage getmessages(communityid) get the most recent messages from an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chattermessagepage getmessages(string communityid) 916apex reference guide chattermessages class parameters communityid type:string id for an experience cloud site, internal, or null. return value type: connectapi.chattermessagepage getmessages(communityid, pageparam, pagesize) get a page of messages from an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chattermessagepage getmessages(string communityid, string pageparam, integer pagesize) parameters communityid type:string id for an experience cloud site, internal, or null. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chattermessagepage getunreadcount() get the number of conversations that are marked unread. 917apex reference guide chattermessages class api version 29.0 requires chatter yes signature public static connectapi.unreadconversationcount getunreadcount() return value type: connectapi.unreadconversationcount if there are fewer than 50 unread conversations, connectapi.ureadconversationcount returns the exact number of unread conversations and the hasmore property is false. if there are more than 50 unread conversations, connectapi.ureadconversationcount returns 50 unread conversations and the hasmore property is true. example connectapi.unreadconversationcount unread = connectapi.chattermessages.getunreadcount(); getunreadcount(communityid) get the number of conversations that are marked unread in an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.unreadconversationcount getunreadcount(string communityid) parameters communityid type:string id for an experience cloud site, internal, or null. return value type: connectapi.unreadconversationcount 918apex reference guide chattermessages class if there are fewer than 50 unread conversations, connectapi.ureadconversationcount returns the exact number of unread conversations and the hasmore property is false. if there are more than 50 unread conversations, connectapi.ureadconversationcount returns 50 unread conversations and the hasmore property is true. markconversationread(conversationid, read) mark a conversation as read or unread. api version 29.0 requires
chatter yes signature public static connectapi.chatterconversationsummary markconversationread(string conversationid, boolean read) parameters conversationid type: string id for the conversation. read type: boolean specify whether the conversation is read (true) or not (false). return value type: connectapi.chatterconversationsummary markconversationread(communityid, conversationid, read) mark a conversation as read or unread in an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chatterconversationsummary markconversationread(string communityid, string conversationid, boolean read) 919apex reference guide chattermessages class parameters communityid type:string id for an experience cloud site, internal, or null. conversationid type: string id for the conversation. read type: boolean specify whether the conversation is read (true) or not (false). return value type: connectapi.chatterconversationsummary replytomessage(text, inreplyto) reply to a message. api version 29.0 requires chatter yes signature public static connectapi.chattermessage replytomessage(string text, string inreplyto) parameters text type: string text of the message. can’t be empty or over 10,000 characters. inreplyto type: string id of the message that is being responded to. return value type: connectapi.chattermessage replytomessage(communityid, text, inreplyto) reply to a message in an experience cloud site. 920apex reference guide chattermessages class api version 30.0 requires chatter yes signature public static connectapi.chattermessage replytomessage(string communityid, string text, string inreplyto) parameters communityid type:string id for an experience cloud site, internal, or null. text type: string text of the message. can’t be empty or over 10,000 characters. inreplyto type: string id of the message that is being responded to. return value type: connectapi.chattermessage searchconversation(conversationid, q) get a conversation that matches the search criteria. api version 29.0 requires chatter yes signature public static connectapi.chatterconversation searchconversation(string conversationid, string q) 921apex reference guide chattermessages class parameters conversationid type: string id for the conversation. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterconversation searchconversation(conversationid, pageparam, pagesize, q) get a conversation with a page of messages that match the search criteria. api version 29.0 requires chatter yes signature public static connectapi.chatterconversation searchconversation(string conversationid, string pageparam, integer pagesize, string q) parameters conversationid type: string id for the conversation. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. 922apex reference guide chattermessages class return value type: connectapi.chatterconversation searchconversation(communityid, conversationid, q) get a conversation with messages that match the search criteria in an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chatterconversation searchconversation(string communityid, string conversationid, string q) parameters communityid type
:string id for an experience cloud site, internal, or null. conversationid type: string id for the conversation. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterconversation searchconversation(communityid, conversationid, pageparam, pagesize, q) get a conversation with a page of messages that match the search criteria in an experience cloud site. api version 30.0 requires chatter yes 923apex reference guide chattermessages class signature public static connectapi.chatterconversation searchconversation(string communityid, string conversationid, string pageparam, integer pagesize, string q) parameters communityid type:string id for an experience cloud site, internal, or null. conversationid type: string id for the conversation. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterconversation searchconversations(q) get conversations in which member names and messages match the search criteria. api version 29.0 requires chatter yes signature public static connectapi.chatterconversationpage searchconversations(string q) 924apex reference guide chattermessages class parameters q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterconversationpage searchconversations(pageparam, pagesize, q) get a page of conversations in which member names and messages match the search criteria. api version 29.0 requires chatter yes signature public static connectapi.chatterconversationpage searchconversations(string pageparam, integer pagesize, string q) parameters pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterconversationpage searchconversations(communityid, q) get conversations in which member names and messages match the search criteria in an experience cloud site. 925apex reference guide chattermessages class api version 30.0 requires chatter yes signature public static connectapi.chatterconversationpage searchconversations(string communityid, string q) parameters communityid type:string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterconversationpage searchconversations(communityid, pageparam, pagesize, q) get a page of conversations in which member names and messages match the search criteria in an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chatterconversationpage searchconversations(string communityid, string pageparam, integer pagesize, string q) parameters communityid type:string id for an experience cloud site, internal, or null. 926apex
reference guide chattermessages class pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterconversationpage searchmessages(q) get messages that match the search criteria. api version 29.0 requires chatter yes signature public static connectapi.chattermessagepage searchmessages(string q) parameters q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chattermessagepage searchmessages(pageparam, pagesize, q) get a page of messages that match the search criteria. 927apex reference guide chattermessages class api version 29.0 requires chatter yes signature public static connectapi.chattermessagepage searchmessages(string pageparam, integer pagesize, string q) parameters pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chattermessagepage searchmessages(communityid, q) get messages that match the search criteria in an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chattermessagepage searchmessages(string communityid, string q) 928apex reference guide chattermessages class parameters communityid type:string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chattermessagepage searchmessages(communityid, pageparam, pagesize, q) get a page of messages that match the search criteria in an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chattermessagepage searchmessages(string communityid, string pageparam, integer pagesize, string q) parameters communityid type:string id for an experience cloud site, internal, or null. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. 929apex reference guide chattermessages class return value type: connectapi.chattermessagepage sendmessage(text, recipients) send a message to a list of recipients. api version 29.0 requires chatter yes signature public static connectapi.chattermessage sendmessage(string text, string recipients) parameters text type: string text of the message. can’t be empty or over 10,000 characters. recipients type: string up to nine comma-separated ids of the users receiving the message. return
value type: connectapi.chattermessage sendmessage(communityid, text, recipients) send a message to a list of recipients in an experience cloud site. api version 30.0 requires chatter yes signature public static connectapi.chattermessage sendmessage(string communityid, string text, string recipients) 930apex reference guide chatterusers class parameters communityid type:string id for an experience cloud site, internal, or null. text type: string text of the message. can’t be empty or over 10,000 characters. recipients type: string up to nine comma-separated ids of users to receive the message. return value type: connectapi.chattermessage chatterusers class access information about users, such as activity, followers, subscriptions, files, and groups. namespace connectapi chatterusers methods the following are methods for chatterusers. all methods are static. in this section: exportuseractivities(communityid, userid) export chatter-related user activity, such as bookmarks, topic endorsements, and votes. follow(communityid, userid, subjectid) follow a user or record. getchattersettings(communityid, userid) get the default chatter settings for a user. getfollowers(communityid, userid) get the first page of followers for a user. getfollowers(communityid, userid, pageparam, pagesize) get a page of followers for a user. getfollowings(communityid, userid) get the first page of users and records that a user follows. getfollowings(communityid, userid, pageparam) get a page of users and records that a user follows. 931apex reference guide chatterusers class getfollowings(communityid, userid, pageparam, pagesize) get a page with the specified number of users and records that a user follows. getfollowings(communityid, userid, filtertype) get the first page of records, filtered by key prefix, that a user follows. getfollowings(communityid, userid, filtertype, pageparam) get a page of records, filtered by key prefix, that a user follows. getfollowings(communityid, userid, filtertype, pageparam, pagesize) get a page with the specified number of records, filtered by key prefix, that a user follows. getreputation(communityid, userid) get a user’s reputation. getuser(communityid, userid) get information about a user. getuserbatch(communityid, userids) get information about a list of users. getusergroups(communityid, userid) get a user’s groups. getusergroups(communityid, userid, pageparam, pagesize) get a page of a user’s groups. getusers(communityid) get the first page of users. getusers(communityid, pageparam, pagesize) get a page of users. purgeuseractivities(communityid, userid) start a job to purge chatter-related user activity, such as bookmarks, topic endorsements, and votes. searchusergroupdetails(communityid, userid, q) get the user’s groups that match the search criteria. searchusergroupdetails(communityid, userid, q, pageparam, pagesize) get a page of a user’s groups that match the search criteria. searchusers(communityid, q) get the first page of users that match the search criteria. searchusers(communityid, q, pageparam, pagesize) get a page of users that match the search criteria. searchusers(communityid, q, searchcontextid, pageparam, pagesize) get a page of users that match the search criteria. updatechattersettings(communityid, userid, defaultgroupemailfrequency) update the default chatter settings for a user. updateuser(communityid, userid, userinput) update the about me section for a user. 932
apex reference guide chatterusers class exportuseractivities(communityid, userid) export chatter-related user activity, such as bookmarks, topic endorsements, and votes. api version 42.0 requires chatter yes signature public static connectapi.useractivitiesjob exportuseractivities(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. return value type: connectapi.useractivitiesjob usage the following activities can be exported. • bookmark—user bookmarked a post. • chatteractivity—total counts of posts and comments made and likes and comments received for a user. • chatterlike—user liked a post or comment. • comment—user commented on a post. • companyverify—user verified comment. • downvote—user downvoted a post or comment. • feedentityread—user read a post. • feedread—user read a feed. • mute—user muted a post. • post—user made a post. • topicendorsement—user endorsed another user on a topic or received endorsement on a topic. • upvote—user upvoted a post or comment. 933apex reference guide chatterusers class follow(communityid, userid, subjectid) follow a user or record. api version 28.0 requires chatter yes signature public static connectapi.subscription follow(string communityid, string userid, string subjectid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. subjectid type: string id of the user or record to follow. return value type: connectapi.subscription example chatterusers.connectapi.subscription subscriptiontorecord = connectapi.chatterusers.follow(null, 'me', '001rr000002g4y0'); see also: unfollow a record getchattersettings(communityid, userid) get the default chatter settings for a user. api version 28.0 934apex reference guide chatterusers class requires chatter yes signature public static connectapi.userchattersettings getchattersettings(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. return value type: connectapi.userchattersettings getfollowers(communityid, userid) get the first page of followers for a user. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.followerpage getfollowers(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string 935apex reference guide chatterusers class id for a user. return value type: connectapi.followerpage getfollowers(communityid, userid, pageparam, pagesize) get a page of followers for a user. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.followerpage getfollowers(string communityid, string userid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.followerpage 936apex reference guide chatterusers class getfollowings(communityid, userid) get the first page of users and records that a user follows. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.followingpage getfollowings(string communityid, string
userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. return value type: connectapi.followingpage getfollowings(communityid, userid, pageparam) get a page of users and records that a user follows. api version 28.0 available to guest users 32.0 requires chatter yes 937apex reference guide chatterusers class signature public static connectapi.followingpage getfollowings(string communityid, string userid, integer pageparam) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. return value type: connectapi.followingpage getfollowings(communityid, userid, pageparam, pagesize) get a page with the specified number of users and records that a user follows. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.followingpage getfollowings(string communityid, string userid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string 938apex reference guide chatterusers class id for a user. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.followingpage getfollowings(communityid, userid, filtertype) get the first page of records, filtered by key prefix, that a user follows. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.followingpage getfollowings(string communityid, string userid, string filtertype) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. filtertype type: string specifies the key prefix to filter the type of objects returned. a key prefix is the first three characters of the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. 939apex reference guide chatterusers class return value type: connectapi.followingpage getfollowings(communityid, userid, filtertype, pageparam) get a page of records, filtered by key prefix, that a user follows. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.followingpage getfollowings(string communityid, string userid, string filtertype, integer pageparam) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. filtertype type: string specifies the key prefix to filter the type of objects returned. a key prefix is the first three characters of the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. return value type: connectapi.followingpage getfollowings(communityid, userid, filtertype, pageparam, pagesize) get a page with the specified number of records, filtered by key prefix, that a user follows. 940apex reference guide chatterusers class api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.followingpage getfollowings(string communityid, string userid, string filtertype, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. filtertype
type: string specifies the key prefix to filter the type of objects returned. a key prefix is the first three characters of the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.followingpage getreputation(communityid, userid) get a user’s reputation. api version 32.0 941apex reference guide chatterusers class available to guest users 32.0 requires chatter yes signature public static connectapi.reputation getreputation(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. return value type: connectapi.reputation getuser(communityid, userid) get information about a user. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.usersummary getuser(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. 942apex reference guide chatterusers class userid type: string id for a user. return value type: connectapi.userdetail usage if the user is external, the properties that the connectapi.userdetail output class shares with the connectapi.usersummary output class can have non-null values. other properties are always null. getuserbatch(communityid, userids) get information about a list of users. api version 31.0 available to guest users 32.0 requires chatter yes signature public static connectapi.batchresult[] getuserbatch(string communityid, list<string> userids) parameters communityid type: string id for an experience cloud site, internal, or null. userids type: list<string> a list of up to 500 user ids. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.user object and errors for users that didn’t load. 943apex reference guide chatterusers class example // get users in an organization. connectapi.userpage userpage = connectapi.chatterusers.getusers(null); // create a list of user ids. list<string> userlist = new list<string>(); for (connectapi.user user : userpage.users){ userlist.add(user.id); } // get info about all users in the list. connectapi.batchresult[] batchresults = connectapi.chatterusers.getuserbatch(null, userlist); for (connectapi.batchresult batchresult : batchresults) { if (batchresult.issuccess()) { // operation was successful. // print each user's username. connectapi.userdetail user; if(batchresult.getresult() instanceof connectapi.userdetail) { user = (connectapi.userdetail) batchresult.getresult(); } system.debug('success'); system.debug(user.username); } else { // operation failed. print errors. system.debug('failure'); system.debug(batchresult.geterrormessage()); } } getusergroups(communityid, userid) get a user’s groups. api version 45.0 available to guest users 45.0 requires chatter yes signature public static connectapi.usergroupdetailpage getusergroups(string communityid, string userid) 944apex reference guide chatterusers class parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. return value type: connectapi.usergroupdetailpage getusergroups(communityid
, userid, pageparam, pagesize) get a page of a user’s groups. api version 45.0 available to guest users 45.0 requires chatter yes signature public static connectapi.usergroupdetailpage getusergroups(string communityid, string userid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer 945apex reference guide chatterusers class specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.usergroupdetailpage getusers(communityid) get the first page of users. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.userpage getusers(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.userpage getusers(communityid, pageparam, pagesize) get a page of users. api version 28.0 available to guest users 32.0 requires chatter yes 946apex reference guide chatterusers class signature public static connectapi.userpage getusers(string communityid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.userpage purgeuseractivities(communityid, userid) start a job to purge chatter-related user activity, such as bookmarks, topic endorsements, and votes. api version 42.0 requires chatter yes signature public static connectapi.useractivitiesjob purgeuseractivities(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. 947apex reference guide chatterusers class return value type: connectapi.useractivitiesjob usage the following activities can be purged with this method. • bookmark—user bookmarked a post. • chatteractivity—total counts of posts and comments made and likes and comments received for a user. • chatterlike—user liked a post or comment. • companyverify—user verified comment. • downvote—user downvoted a post or comment. • feedentityread—user read a post. • feedread—user read a feed. • mute—user muted a post. • topicendorsement—user endorsed another user on a topic or received endorsement on a topic. • upvote—user upvoted a post or comment. to delete a user’s posts and comments, use these methods, respectively. • deletefeedelement(communityid, feedelementid) • deletecomment(communityid, commentid) searchusergroupdetails(communityid, userid, q) get the user’s groups that match the search criteria. api version 45.0 available to guest users 45.0 requires chatter yes signature public static connectapi.usergroupdetailpage searchusergroupdetails(string communityid, string userid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. 948apex reference guide chatterusers class userid type: string id for a user. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.usergroupdetailpage searchusergroupdetails(communityid, userid, q, pageparam, pagesize
) get a page of a user’s groups that match the search criteria. api version 45.0 available to guest users 45.0 requires chatter yes signature public static connectapi.usergroupdetailpage searchusergroupdetails(string communityid, string userid, string q, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer 949apex reference guide chatterusers class number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.usergroupdetailpage searchusers(communityid, q) get the first page of users that match the search criteria. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.userpage searchusers(string communityid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.userpage 950apex reference guide chatterusers class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchusers(communityid, q, result) apex developer guide: testing connectapi code searchusers(communityid, q, pageparam, pagesize) get a page of users that match the search criteria. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.userpage searchusers(string communityid, string q, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 951apex reference guide chatterusers class return value type: connectapi.userpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchusers(communityid, q, pageparam, pagesize, result) apex developer guide: testing connectapi code searchusers(communityid, q, searchcontextid, pageparam, pagesize) get a page of users that match the search criteria. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.userpage searchusers(string communityid, string q, string searchcontextid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. searchcontextid type: string a feed item id that filters search results for feed @mentions. more useful results are listed first. when you specify this argument, you cannot query more than 500 results and you cannot use wildcards in the search term. 952apex reference guide chatterusers class pageparam type: integer number of the
page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.userpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchusers(communityid, q, searchcontextid, pageparam, pagesize, result) apex developer guide: testing connectapi code updatechattersettings(communityid, userid, defaultgroupemailfrequency) update the default chatter settings for a user. api version 28.0 requires chatter yes signature public static connectapi.userchattersettings updatechattersettings(string communityid, string userid, connectapi.groupemailfrequency defaultgroupemailfrequency) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. defaultgroupemailfrequency type: connectapi.groupemailfrequency 953apex reference guide chatterusers class frequency with which a user receives email. values are: • eachpost • dailydigest • weeklydigest • never • usedefault don’t pass the value usedefault for the defaultgroupemailfrequency parameter because calling updatechattersettings sets the default value. return value type: connectapi.userchattersettings updateuser(communityid, userid, userinput) update the about me section for a user. api version 29.0 requires chatter yes signature public static connectapi.userdetail updateuser(string communityid, string userid, connectapi.userinput userinput) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. userinput type: connectapi.userinput specifies the updated information. return value type: connectapi.userdetail 954apex reference guide chatterusers class chatterusers test methods the following are the test methods for chatterusers. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. in this section: settestsearchusers(communityid, q, result) register a connectapi.userpage object to be returned when the matching connectapi.searchusers method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchusers(communityid, q, pageparam, pagesize, result) register a connectapi.userpage object to be returned when the matching connectapi.searchusers method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchusers(communityid, q, searchcontextid, pageparam, pagesize, result) register a connectapi.userpage object to be returned when the matching connectapi.searchusers method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchusers(communityid, q, result) register a connectapi.userpage object to be returned when the matching connectapi.searchusers method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0 signature public static void settestsearchusers(string communityid, string q, connectapi.userpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.userpage object containing test data. 955apex reference guide chatterusers class return value type: void see also: searchusers(communityid, q) apex developer guide: testing connectapi code settestsearchusers(communityid, q, pageparam, pagesize, result) register a connectapi.userpage object to be returned when the matching connecta
pi.searchusers method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0 signature public static void settestsearchusers(string communityid, string q, integer pageparam, integer pagesize, connectapi.userpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. result type: connectapi.userpage object containing test data. 956apex reference guide chatterusers class return value type: void see also: searchusers(communityid, q, pageparam, pagesize) apex developer guide: testing connectapi code settestsearchusers(communityid, q, searchcontextid, pageparam, pagesize, result) register a connectapi.userpage object to be returned when the matching connectapi.searchusers method is called in a test context. use the method with the same parameters or you receive an exception. api version 28.0 signature public static void settestsearchusers(string communityid, string q, string searchcontextid, integer pageparam, integer pagesize, connectapi.userpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. searchcontextid type: string a feed item id that filters search results for feed @mentions. more useful results are listed first. when you specify this argument, you cannot query more than 500 results and you cannot use wildcards in the search term. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. result type: connectapi.userpage object containing test data. 957apex reference guide chatterusers class return value type: void see also: searchusers(communityid, q, searchcontextid, pageparam, pagesize) apex developer guide: testing connectapi code retired chatterusers methods the following methods for chatterusers are retired. in this section: deletephoto(communityid, userid) delete a user’s photo. getgroups(communityid, userid) get the groups that a user is a member of. getgroups(communityid, userid, pageparam, pagesize) get a page of groups that a user is a member of. getphoto(communityid, userid) get a user’s photo. searchusergroups(communityid, userid, q) get the user’s groups that match the search criteria. searchusergroups(communityid, userid, q, pageparam, pagesize) get a page of a user’s groups that match the search criteria. setphoto(communityid, userid, fileid, versionnumber) set an uploaded file as a user’s photo. setphoto(communityid, userid, fileupload) set a file that hasn’t been uploaded as the user’s photo. setphotowithattributes(communityid, userid, photo) set and crop an uploaded file as a user’s photo. setphotowithattributes(communityid, userid, photo, fileupload) set and crop a file that hasn’t been uploaded as a user’s photo. deletephoto(communityid, userid) delete a user’s photo. api version 28.0–34.0 important: in version 35.0 and later, use connectapi.userprofiles.deletephoto(communityid, userid) 958apex reference guide chatterusers
class signature public static void deletephoto(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. return value type: void getgroups(communityid, userid) get the groups that a user is a member of. api version 28.0–44.0 important: in version 45.0 and later, use getusergroups(communityid, userid). available to guest users 32.0–44.0 requires chatter yes signature public static connectapi.usergrouppage getgroups(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. 959apex reference guide chatterusers class return value type: connectapi.usergrouppage getgroups(communityid, userid, pageparam, pagesize) get a page of groups that a user is a member of. api version 28.0–44.0 important: in version 45.0 and later, use getusergroups(communityid, userid, pageparam, pagesize). available to guest users 32.0–44.0 requires chatter yes signature public static connectapi.usergrouppage getgroups(string communityid, string userid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.usergrouppage getphoto(communityid, userid) get a user’s photo. 960apex reference guide chatterusers class api version 28.0–34.0 important: in version 35.0 and later, use connectapi.userprofiles.getphoto(communityid, userid). available to guest users 32.0 requires chatter yes signature public static connectapi.photo getphoto(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. return value type: connectapi.photo searchusergroups(communityid, userid, q) get the user’s groups that match the search criteria. api version 30.0–44.0 important: in version 45.0 and later, use searchusergroupdetails(communityid, userid, q). available to guest users 32.0–44.0 requires chatter yes 961apex reference guide chatterusers class signature public static connectapi.usergrouppage searchusergroups(string communityid, string userid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.usergrouppage searchusergroups(communityid, userid, q, pageparam, pagesize) get a page of a user’s groups that match the search criteria. api version 30.0–44.0 important: in version 45.0 and later, use searchusergroupdetails(communityid, userid, q, pageparam, pagesize). available to guest users 32.0–44.0 requires chatter yes signature public static connectapi.usergrouppage searchusergroups(string communityid, string userid, string q, integer pageparam, integer pagesize) parameters communityid type: string 962apex reference guide chatterusers class id for an experience cloud site, internal, or null. userid type: string id for a user.
q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.usergrouppage setphoto(communityid, userid, fileid, versionnumber) set an uploaded file as a user’s photo. api version 28.0–34.0 important: in version 35.0 and later, use connectapi.userprofiles.setphoto(communityid, userid, fileid, versionnumber) requires chatter yes signature public static connectapi.photo setphoto(string communityid, string userid, string fileid, integer versionnumber) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. 963apex reference guide chatterusers class fileid type: string id of a file already uploaded. the file must be an image, and be smaller than 2 gb. versionnumber type: integer version number of the existing file. specify either an existing version number, or null to get the latest version. return value type: connectapi.photo usage photos are processed asynchronously and might not be visible right away. setphoto(communityid, userid, fileupload) set a file that hasn’t been uploaded as the user’s photo. api version 28.0–34.0 important: in version 35.0 and later, use connectapi.userprofiles.setphoto(communityid, userid, fileupload) requires chatter yes signature public static connectapi.photo setphoto(string communityid, string userid, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. 964apex reference guide chatterusers class return value type: connectapi.photo usage photos are processed asynchronously and might not be visible right away. setphotowithattributes(communityid, userid, photo) set and crop an uploaded file as a user’s photo. api version 29.0–34.0 important: in version 35.0 and later, use connectapi.userprofiles.setphotowithattributes(communityid, userid, photo) requires chatter yes signature public static connectapi.photo setphotowithattributes(string communityid, string userid, connectapi.photoinput photo) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. photo type: connectapi.photoinput a connectapi.photoinput object specifying the file id, version number, and cropping parameters. return value type: connectapi.photo usage photos are processed asynchronously and might not be visible right away. 965apex reference guide clm class setphotowithattributes(communityid, userid, photo, fileupload) set and crop a file that hasn’t been uploaded as a user’s photo. api version 29.0–34.0 important: in version 35.0 and later, use connectapi.userprofiles.setphotowithattributes(communityid, userid, photo, fileupload) requires chatter yes signature public static connectapi.photo setphotowithattributes(string communityid, string userid, connectapi.photoinput photo, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. photo type: connectapi.photoinput a connectapi
.photoinput object specifying the cropping parameters. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. return value type: connectapi.photo usage photos are processed asynchronously and might not be visible right away. clm class create and update contract lifecycle management (clm) contracts using object id. 966apex reference guide clm class namespace connectapi clm methods the following are methods for clm. all methods are static. in this section: createcontract(contractinputpayload) create contracts using the object id. updatecontract(contractinputpayload) update contracts using the object id. createcontract(contractinputpayload) create contracts using the object id. api version 56.0 requires chatter no signature public static connectapi.contractoutputrepresentation createcontract(connectapi.contractinputrepresentation contractinputpayload) parameters contractinputpayload type: connectapi.contractinputrepresentation on page 1575 input payload to create contract. return value type: connectapi.contractoutputrepresentation on page 1759 updatecontract(contractinputpayload) update contracts using the object id. api version 56.0 967apex reference guide commercebuyerexperience class requires chatter no signature public static connectapi.contractoutputrepresentation updatecontract(connectapi.contractinputrepresentation contractinputpayload) parameters contractinputpayload type: connectapi.contractinputrepresentation on page 1575 input payload to update contract. return value type: connectapi.contractoutputrepresentation on page 1759 commercebuyerexperience class create, delete, or get commerce addresses. get order delivery group, order item, order shipments, shipment items, and order summaries. get adjustments for order items and order summaries. namespace connectapi commercebuyerexperience methods these methods are for commercebuyerexperience. all methods are static. in this section: addordertocart(webstoreid, ordersummaryid, ordertocartinput) add an order to a cart using a webstore order summary. addordertocart(webstoreid, ordersummaryid, ordertocartinput, effectiveaccountid) add an order to a cart for a specific account using a webstore order summary. calculateadjustmentaggregates(webstoreid, ordersummaryids) submit a job to calculate adjustment aggregates for a list of order summary ids. createcommerceaccountaddress(webstoreid, accountid, addressinput) create a commerce account address for a webstore account. deletecommerceaccountaddress(webstoreid, accountid, addressid) delete a commerce account address for a webstore. getcommerceaccountaddress(webstoreid, accountid) get a commerce account address for a webstore. 968apex reference guide commercebuyerexperience class getcommerceaccountaddress(webstoreid, accountid, defaultonly) get commerce account addresses for a webstore and account. getcommerceaccountaddress(webstoreid, accountid, defaultonly, addresstype, fields, pagetoken, pagesize, sortorder) get commerce account addresses for a webstore and account. getcommerceaccountaddress(webstoreid, accountid, addresstype, excludeunsupportedcountries) get commerce account addresses for a webstore and account. getcommerceaccountaddress(webstoreid, accountid, defaultonly, addresstype, excludeunsupportedcountries) get commerce account addresses for a webstore and account. getcommerceaccountaddress(webstoreid, accountid, defaultonly, addresstype, excludeunsupportedcountries, fields, pagetoken, pagesize, sortorder) get commerce account addresses for a webstore and account. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid) get order delivery group summaries. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, pagesize) get order delivery group summaries. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, pageparam) get a page of order delivery group summaries. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields) get order delivery group summaries with specific fields. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, pageparam, fields) get a page of order delivery
group summaries with specific fields. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields, pagesize) get order delivery group summaries with specific fields. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields, sortparam) get a sorted list of order delivery group summaries with specific fields. getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields, pagesize, sortparam) get a sorted list of order delivery group summaries with specific fields. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid) get order item summaries. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, pagesize) get order item summaries. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid) get order item summaries for a delivery group summary. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, pagesize) get order item summaries for a delivery group summary. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, pageparam) get a page of order item summaries for a delivery group summary. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields) get order item summaries for a delivery group summary with specific fields. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pagesize) get order item summaries for a delivery group summary with specific fields. 969apex reference guide commercebuyerexperience class getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pageparam) get a page of order item summaries for a delivery group summary with specific fields. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, sortparam) get a sorted list of order item summaries for a delivery group summary with specific fields. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pagesize, sortparam) get a sorted page of order item summaries for a delivery group summary with specific fields. getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pageparam, pagesize, sortparam, includeadjustmentdetails) get a sorted page of order item summaries for a delivery group summary with specific fields and include adjustment details. getorderitemsummaryadjustments(webstoreid, ordersummaryid, orderitemsummaryadjustmentcollectioninput) get adjustments for order items. getorderitemsummaryadjustments(webstoreid, ordersummaryid, orderitemsummaryadjustmentcollectioninput, effectiveaccountid) get adjustments for order items. getordershipmentitems(webstoreid, shipmentid) get order shipment items. getordershipmentitems(webstoreid, shipmentid, effectiveaccountid) get order shipment items. getordershipmentitems(webstoreid, shipmentid, effectiveaccountid, fields) get order shipment items with specific fields. getordershipmentitems(webstoreid, shipmentid, effectiveaccountid, fields, pagetoken, pagesize) get a page of order shipment items with specific fields. getordershipmentitems(webstoreid, shipmentid, effectiveaccountid, fields, pagetoken, pagesize, sortorder) get a sorted page of order shipment items. getordershipments(webstoreid, ordersummaryid) get order shipments. getordershipments(webstoreid, ordersummaryid, effectiveaccountid) get order shipments. getordershipments(webstoreid, ordersummaryid, effectiveaccountid, fields) get order shipments with specific fields. getordershipments(webstoreid, ordersummaryid, effectiveaccountid, fields, pagesize, pagetoken) get a page of order shipments with specific fields. getordershipments(webstoreid, ordersummaryid, effectiveaccountid, fields, pagesize, pagetoken, sortorder) get a sorted page of order shipments with specific fields. getordersummaries(webstoreid) get order summaries. getordersummaries(webstoreid, effectiveaccountid)
get order summaries. getordersummaries(webstoreid, effectiveaccountid, fields) get order summaries with specific fields. getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken) get a page of order summaries with specific fields. 970apex reference guide commercebuyerexperience class getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder) get a sorted page of order summaries with specific fields. getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder, earliestdate, latestdate) get a sorted page of order summaries with specific fields within a specific date range. getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder, earliestdate, latestdate, ownerscoped) get a sorted page of order summaries with specific fields within a specific date range and scoped to orders owned by the context user. getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder, earliestdate, latestdate, ownerscoped, includeadjustmentdetails) get a sorted page of order summaries with specific fields within a specific date range and scoped to orders owned by the context user. getordersummary(webstoreid, ordersummaryid, effectiveaccountid) get an order summary. getordersummary(webstoreid, ordersummaryid, effectiveaccountid, fields) get an order summary with fields. getordersummary(webstoreid, ordersummaryid, effectiveaccountid, fields, includeadjustmentdetails) get an order summary with fields and include adjustment details. getordersummaryadjustments(webstoreid, ordersummaryid) get adjustments for an order summary. getordersummaryadjustments(webstoreid, ordersummaryid, effectiveaccountid) get adjustments for an order summary. updatecommerceaccountaddress(webstoreid, accountid, addressid, addressinput) update a commerce account address for a webstore. addordertocart(webstoreid, ordersummaryid, ordertocartinput) add an order to a cart using a webstore order summary. api version 57.0 requires chatter no signature public static connectapi.ordertocartresult addordertocart(string webstoreid, string ordersummaryid, connectapi.ordertocartinput ordertocartinput) parameters webstoreid type: string 971apex reference guide commercebuyerexperience class id of the webstore. ordersummaryid type: string id of the order summary. ordertocartinput type: connectapi.ordertocartinput input value indicating which cart the order should be added to. return value type: connectapi.ordertocartresult addordertocart(webstoreid, ordersummaryid, ordertocartinput, effectiveaccountid) add an order to a cart for a specific account using a webstore order summary. api version 57.0 requires chatter no signature public static connectapi.ordertocartresult addordertocart(string webstoreid, string ordersummaryid, connectapi.ordertocartinput ordertocartinput, string effectiveaccountid) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. ordertocartinput type: connectapi.ordertocartinput input value indicating which cart the order should be added to. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. 972apex reference guide commercebuyerexperience class return value type: connectapi.ordertocartresult calculateadjustmentaggregates(webstoreid, ordersummaryids) submit a job to calculate adjustment aggregates for a list of order summary ids. api version 55.0 requires chatter no signature public static connectapi.ordersummaryadjustmentaggregatesasyncoutput calculateadjustmentaggregates(string webstoreid, connectapi.ordersummaryadjustmentaggregatesasyncinput ordersummaryids) parameters webstoreid type: string id of the webstore. ordersummaryids type: connectapi.ordersummaryadjustmentaggregatesasyncinput a connectapi.ordersummaryadjustmentaggregatesasyncinput class with
a list of order summary ids. return value type: connectapi.ordersummaryadjustmentaggregatesasyncoutput createcommerceaccountaddress(webstoreid, accountid, addressinput) create a commerce account address for a webstore account. api version 54.0 requires chatter no 973apex reference guide commercebuyerexperience class signature public static connectapi.commerceaddressoutput createcommerceaccountaddress(string webstoreid, string accountid, connectapi.commerceaddressinput addressinput) parameters webstoreid type: string id of the webstore. accountid type: string id of the account. addressinput type: connectapi.commerceaddressinput information about the address you want to create. return value type: connectapi.commerceaddressoutput deletecommerceaccountaddress(webstoreid, accountid, addressid) delete a commerce account address for a webstore. api version 54.0 requires chatter no signature public static void deletecommerceaccountaddress(string webstoreid, string accountid, string addressid) parameters webstoreid type: string id of the webstore. accountid type: string id of the account. addressid type: string 974apex reference guide commercebuyerexperience class id of the address. return value type: void getcommerceaccountaddress(webstoreid, accountid) get a commerce account address for a webstore. api version 54.0 requires chatter no signature public static connectapi.commerceaddresscollection getcommerceaccountaddress(string webstoreid, string accountid) parameters webstoreid type: string id of the webstore. accountid type: string id of the account. return value type: connectapi.commerceaddresscollection getcommerceaccountaddress(webstoreid, accountid, defaultonly) get commerce account addresses for a webstore and account. you can get the default address by itself, or you can get all of the addresses for the account. api version 54.0 requires chatter no 975apex reference guide commercebuyerexperience class signature public static connectapi.commerceaddresscollection getcommerceaccountaddress(string webstoreid, string accountid, boolean defaultonly) parameters webstoreid type: string id of the webstore. accountid type: string id of the account. defaultonly type: boolean indicate if you only want the default address (true) or all addresses for the account (false). the default value is false. return value type: connectapi.commerceaddresscollection getcommerceaccountaddress(webstoreid, accountid, defaultonly, addresstype, fields, pagetoken, pagesize, sortorder) get commerce account addresses for a webstore and account. api version 54.0 requires chatter no signature public static connectapi.commerceaddresscollection getcommerceaccountaddress(string webstoreid, string accountid, boolean defaultonly, list<string> addresstype, list<string> fields, string pagetoken, integer pagesize, connectapi.commerceaddresssort sortorder) parameters webstoreid type: string id of the webstore. accountid type: string id of the account. 976apex reference guide commercebuyerexperience class defaultonly type: boolean indicate if you want only the default address (true) or all addresses for the account (false). the default value is false. addresstype type: list<string> type of address, for example, billing or shipping. fields type: list<string> a list of custom fields for the address. pagetoken type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortorder type: connectapi.commerceaddresssort sort order for commerce addresses. • createddateasc—sort in ascending order of created date. • createddatedesc—sort in descending order of created date. • nameasc—sort in ascending order of name. • namedesc—sort in descending order of name. return value type: connectapi.commerceaddresscollection get
commerceaccountaddress(webstoreid, accountid, addresstype, excludeunsupportedcountries) get commerce account addresses for a webstore and account. api version 57.0 requires chatter no 977apex reference guide commercebuyerexperience class signature public static connectapi.commerceaddresscollection getcommerceaccountaddress(string webstoreid, string accountid, list<string> addresstype, boolean excludeunsupportedcountries) parameters webstoreid type: string id of the webstore. accountid type: string id of the account. addresstype type: list<string> type of address, for example, billing or shipping. excludeunsupportedcountries type: boolean indicate if you want to retrieve all addresses (false) or only addresses of type shipping that are in countries included in the store’s shiptocountries list (true). the default value is false. return value type: connectapi.commerceaddresscollection getcommerceaccountaddress(webstoreid, accountid, defaultonly, addresstype, excludeunsupportedcountries) get commerce account addresses for a webstore and account. api version 57.0 requires chatter no signature public static connectapi.commerceaddresscollection getcommerceaccountaddress(string webstoreid, string accountid, boolean defaultonly, list<string> addresstype, boolean excludeunsupportedcountries) 978apex reference guide commercebuyerexperience class parameters webstoreid type: string id of the webstore. accountid type: string id of the account. defaultonly type: boolean indicate if you want only the default address (true) or all addresses for the account (false). the default value is false. addresstype type: list<string> type of address, for example, billing or shipping. excludeunsupportedcountries type: boolean indicate if you want to retrieve all addresses (false) or only addresses of type shipping that are in countries included in the store’s shiptocountries list (true). the default value is false. return value type: connectapi.commerceaddresscollection getcommerceaccountaddress(webstoreid, accountid, defaultonly, addresstype, excludeunsupportedcountries, fields, pagetoken, pagesize, sortorder) get commerce account addresses for a webstore and account. api version 57.0 requires chatter no signature public static connectapi.commerceaddresscollection getcommerceaccountaddress(string webstoreid, string accountid, boolean defaultonly, list<string> addresstype, boolean excludeunsupportedcountries, list<string> fields, string pagetoken, integer pagesize, connectapi.commerceaddresssort sortorder) parameters webstoreid type: string 979apex reference guide commercebuyerexperience class id of the webstore. accountid type: string id of the account. defaultonly type: boolean indicate if you want only the default address (true) or all addresses for the account (false). the default value is false. addresstype type: list<string> type of address, for example, billing or shipping. excludeunsupportedcountries type: boolean indicate if you want to retrieve all addresses (false) or only addresses of type shipping that are in countries included in the store’s shiptocountries list (true). the default value is false. fields type: list<string> a list of custom fields for the address. pagetoken type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortorder type: connectapi.commerceaddresssort sort order for commerce addresses. values are: • createddateasc—sort in ascending order of created date. • createddatedesc—sort in descending order of created date. • nameasc—sort in ascending order of name. • namedesc—sort in descending order of name. return value type: connectapi.commerceaddresscollection getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid) get order delivery group summaries. api version 51.0
980apex reference guide commercebuyerexperience class requires chatter no signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. return value type: connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, pagesize) get order delivery group summaries. api version 51.0 requires chatter no signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, integer pagesize) parameters webstoreid type: string 981apex reference guide commercebuyerexperience class id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, pageparam) get a page of order delivery group summaries. api version 51.0 requires chatter no signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string pageparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. 982
apex reference guide commercebuyerexperience class pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. return value type: connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields) get order delivery group summaries with specific fields. api version 51.0 requires chatter no signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, list<string> fields) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. fields type: list<string> list of up to 15 order delivery group summary or order delivery method fields to display in the ui in each item row. return value type: connectapi.orderdeliverygroupsummarycollection 983apex reference guide commercebuyerexperience class getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, pageparam, fields) get a page of order delivery group summaries with specific fields. api version 51.0 requires chatter no signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string pageparam, list<string> fields) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. fields type: list<string> list of up to 15 order delivery group summary or order delivery method fields to display in the ui in each item row. return value type: connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields, pagesize) get order delivery group summaries with specific fields. 984apex reference guide commercebuyerexperience class api version 51.0 requires chatter no signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, list<string> fields, integer pagesize) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. fields type: list<string> list of up to 15 order delivery group summary or order delivery method fields to display in the ui in each item row. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields, sortparam) get a sorted list of order delivery group summaries with specific fields. api version 51.0 requires chatter no 985apex reference guide commercebuyerexperience class signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, list<string> fields, connectapi.orderdeliverygroupsummarysort sortparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the