text
stringlengths 24
5.1k
|
---|
comma-separated list of up to 100 managed content ids. specify either managed content ids or content keys. contentkeys type: list<string> comma-separated list of up to 50 content keys. specify either managed content ids or content keys. contenttypefqn type: string fully qualified name of the managed content type. language type: string language locale for the managed content, for example, en_us. if the requested translation isn’t available, the language defaults to the configured fallback language or the channel’s default language. if the content isn’t available in the fallback language and the channel’s default language, we return an error. publishstartdate type: string 1285apex reference guide managedcontentdelivery class iso 8601 formatted publish start date. publishenddate type: string iso 8601 formatted publish end date. includecontentbody type: boolean specifies whether to return the content body (true) or the content summary (false). if unspecified, the default value is false. referencedepth type: integer an integer 0–3 specifying the depth of references. if you specify 0, the references property of the connectapi.managedcontentdeliverydocumentcollection output class is null. if unspecified, the default value is 0. expandreferences type: boolean specifies whether to include details of references (true) or summaries of references (false) in the output class. if unspecified, the default value is false. referencesaslist type: boolean specifies whether to return the references as a list in the referenceslist property of the connectapi.managedcontentdeliverydocumentcollection output class (true). if you specify false, the references are returned as key value pairs in the references property. if unspecified, the default value is false. 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 250. if you pass in null, the default size is 25. if you specify true for expandreferences or includecontentbody, the maximum page size you can specify is 25. showabsoluteurl type: boolean specifies whether to show absolute urls in the output class (true) or not (false). the default value is false. return value type: connectapi.managedcontentdeliverydocumentcollection getmanagedcontentsforsite(siteid, managedcontentids, contentkeys, contenttypefqn, language, publishstartdate, publishenddate, includecontentbody, referencedepth, expandreferences, referencesaslist, pageparam, pagesize) get a collection of published contents for an experience cloud site. 1286apex reference guide managedcontentdelivery class api version 55.0—57.0 in version 58.0 and later, use getmanagedcontentsforsite(siteid, managedcontentids, contentkeys, contenttypefqn, language, publishstartdate, publishenddate, includecontentbody, referencedepth, expandreferences, referencesaslist, pageparam, pagesize, showabsoluteurl). available to guest users 55.0—57.0 requires chatter no signature public static connectapi.managedcontentdeliverydocumentcollection getmanagedcontentsforsite(string siteid, list<string> managedcontentids, list<string> contentkeys, string contenttypefqn, string language, string publishstartdate, string publishenddate, boolean includecontentbody, integer referencedepth, boolean expandreferences, boolean referencesaslist, integer pageparam, integer pagesize) parameters siteid type: string id for the experience cloud site. managedcontentids type: list<string> comma-separated list of up to 100 managed content ids. specify either managed content ids or content keys. contentkeys type: list<string> comma-separated list of up to 50 content keys. specify either managed content ids or content keys. contenttypefqn type: string fully qualified name of the managed content type. language type: string language locale for the managed content, for example, en_us. if the requested translation isn’t available, the language defaults to the configured fallback language or the channel’s default language. if the content isn’t available in the fallback language and the channel’s default language, we return an error. |
publishstartdate type: string iso 8601 formatted publish start date. 1287apex reference guide managedcontentdelivery class publishenddate type: string iso 8601 formatted publish end date. includecontentbody type: boolean specifies whether to return the content body (true) or the content summary (false). if unspecified, the default value is false. referencedepth type: integer an integer 0–3 specifying the depth of references. if you specify 0, the references property of the connectapi.managedcontentdeliverydocumentcollection output class is null. if unspecified, the default value is 0. expandreferences type: boolean specifies whether to include details of references (true) or summaries of references (false) in the output class. if unspecified, the default value is false. referencesaslist type: boolean specifies whether to return the references as a list in the referenceslist property of the connectapi.managedcontentdeliverydocumentcollection output class (true). if you specify false, the references are returned as key value pairs in the references property. if unspecified, the default value is false. 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 250. if you pass in null, the default size is 25. if you specify true for expandreferences or includecontentbody, the maximum page size you can specify is 25. return value type: connectapi.managedcontentdeliverydocumentcollection getmanagedcontentsforsite(siteid, managedcontentids, contentkeys, contenttypefqn, language, publishstartdate, publishenddate, includecontentbody, referencedepth, expandreferences, referencesaslist, pageparam, pagesize, showabsoluteurl) get a collection of published contents for an experience cloud site. api version 58.0 1288apex reference guide managedcontentdelivery class available to guest users 58.0 requires chatter no signature public static connectapi.managedcontentdeliverydocumentcollection getmanagedcontentsforsite(string siteid, list<string> managedcontentids, list<string> contentkeys, string contenttypefqn, string language, string publishstartdate, string publishenddate, boolean includecontentbody, integer referencedepth, boolean expandreferences, boolean referencesaslist, integer pageparam, integer pagesize, boolean showabsoluteurl) parameters siteid type: string id for the experience cloud site. managedcontentids type: list<string> comma-separated list of up to 100 managed content ids. specify either managed content ids or content keys. contentkeys type: list<string> comma-separated list of up to 50 content keys. specify either managed content ids or content keys. contenttypefqn type: string fully qualified name of the managed content type. language type: string language locale for the managed content, for example, en_us. if the requested translation isn’t available, the language defaults to the configured fallback language or the channel’s default language. if the content isn’t available in the fallback language and the channel’s default language, we return an error. publishstartdate type: string iso 8601 formatted publish start date. publishenddate type: string iso 8601 formatted publish end date. includecontentbody type: boolean specifies whether to return the content body (true) or the content summary (false). if unspecified, the default value is false. 1289apex reference guide managedtopics class referencedepth type: integer an integer 0–3 specifying the depth of references. if you specify 0, the references property of the connectapi.managedcontentdeliverydocumentcollection output class is null. if unspecified, the default value is 0. expandreferences type: boolean specifies whether to include details of references (true) or summaries of references (false) in the output class. if unspecified, the default value is false. referencesaslist type: boolean specifies whether to return the references as a list in the referenceslist property of the connectapi.managedcontentdeliverydocumentcollection output class (true). if you specify false, the references are returned as key value pairs in the references property. if unspecified, the default value is false. 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 250. if you pass in null, the default size is 25. if you specify true for expandreferences or includecontentbody, the maximum page size you can specify is 25. showabsoluteurl type: boolean specifies whether to show absolute urls in the output class (true) or not (false). the default value is false. return value type: connectapi.managedcontentdeliverydocumentcollection managedtopics class get managed topics in an experience cloud site. create, delete, and reorder managed topics. namespace connectapi managedtopics methods the following are methods for managedtopics. all methods are static. in this section: createmanagedtopic(communityid, recordid, managedtopictype) create a managed topic of a specific type for an experience cloud site. 1290apex reference guide managedtopics class createmanagedtopic(communityid, recordid, managedtopictype, parentid) create a child managed topic for an experience cloud site. createmanagedtopicbyname(communityid, name, managedtopictype) create a managed topic of a specific type by name for an experience cloud site. createmanagedtopicbyname(communityid, name, managedtopictype, parentid) create a child managed topic by name for an experience cloud site. deletemanagedtopic(communityid, managedtopicid) delete a managed topic from an experience cloud site. getmanagedtopic(communityid, managedtopicid) get a managed topic in an experience cloud site. getmanagedtopic(communityid, managedtopicid, depth) get a managed topic, including its parent and children managed topics, in an experience cloud site. getmanagedtopics(communityid) get the featured and navigational managed topics for an experience cloud site. getmanagedtopics(communityid, managedtopictype) get managed topics of the specified type for an experience cloud site. getmanagedtopics(communityid, managedtopictype, depth) get managed topics of the specified type, including their parent and children managed topics, in an experience cloud site. getmanagedtopics(communityid, managedtopictype, recordids, depth) get managed topics of the specified type, including their parent and children managed topics, that are associated with topics in an experience cloud site. getmanagedtopics(communityid, managedtopictype, pageparam, pagesize) get a page of managed topics. reordermanagedtopics(communityid, managedtopicpositioncollection) reorder the relative positions of managed topics in an experience cloud site. createmanagedtopic(communityid, recordid, managedtopictype) create a managed topic of a specific type for an experience cloud site. api version 32.0 requires chatter no signature public static connectapi.managedtopic createmanagedtopic(string communityid, string recordid, connectapi.managedtopictype managedtopictype) 1291apex reference guide managedtopics class parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string id of the topic. managedtopictype type: connectapi.managedtopictype specify the type of managed topic. • content—topics that are associated with native content. • featured—topics that are featured, for example, on the experience cloud site home page, but don’t provide overall navigation. • navigational—topics that display in a navigational menu in the experience cloud site. a topic can be associated with all three managed topic types, so a topic can be a featured, navigational, and content topic. you can create up to 25 featured and 5,000 content topics. you can create up to eight levels of navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 navigational topics. return value type: connectapi.managedtopic usage only community managers (users with the create and set up experiences or manage experiences permission) can create managed topics. createmanagedtopic(communityid, recordid, managedtopictype, parentid) create a child managed topic for an experience cloud site. api version 35.0 requires chatter no signature public static connectapi.managedtopic createmanagedtopic(string communityid, string recordid, connect |
api.managedtopictype managedtopictype, string parentid) 1292apex reference guide managedtopics class parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string id of the topic. managedtopictype type: connectapi.managedtopictype specify navigational for the type of managed topic to create a child managed topic. you can create up to 25 featured and 5,000 content topics. you can create up to eight levels of navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 navigational topics. parentid type: string id of the parent managed topic. you can create up to eight levels (parent, direct children, their children, etc.) of managed topics and up to 10 children managed topics per managed topic. return value type: connectapi.managedtopic usage only community managers (users with the create and set up experiences or manage experiences permission) can create managed topics. createmanagedtopicbyname(communityid, name, managedtopictype) create a managed topic of a specific type by name for an experience cloud site. api version 32.0 requires chatter no signature public static connectapi.managedtopic createmanagedtopicbyname(string communityid, string name, connectapi.managedtopictype managedtopictype) 1293apex reference guide managedtopics class parameters communityid type: string id for an experience cloud site, internal, or null. name type: string name of the topic. managedtopictype type: connectapi.managedtopictype specify the type of managed topic. • content—topics that are associated with native content. • featured—topics that are featured, for example, on the experience cloud site home page, but don’t provide overall navigation. • navigational—topics that display in a navigational menu in the experience cloud site. a topic can be associated with all three managed topic types, so a topic can be a featured, navigational, and content topic. you can create up to 25 featured and 5,000 content topics. you can create up to eight levels of navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 navigational topics. return value type: connectapi.managedtopic usage only community managers (users with the create and set up experiences or manage experiences permission) can create managed topics. createmanagedtopicbyname(communityid, name, managedtopictype, parentid) create a child managed topic by name for an experience cloud site. api version 35.0 requires chatter no signature public static connectapi.managedtopic createmanagedtopicbyname(string communityid, string name, connectapi.managedtopictype managedtopictype, string parentid) 1294apex reference guide managedtopics class parameters communityid type: string id for an experience cloud site, internal, or null. name type: string name of the topic. managedtopictype type: connectapi.managedtopictype specify navigational for the type of managed topic to create a child managed topic. you can create up to 25 featured and 5,000 content topics. you can create up to eight levels of navigational managed topics with 25 top-level topics and 10 children topics per level for a maximum of 2,775 navigational topics. parentid type: string id of the parent managed topic. you can create up to eight levels (parent, direct children, their children, etc.) of managed topics and up to 10 children managed topics per managed topic. return value type: connectapi.managedtopic usage only community managers (users with the create and set up experiences or manage experiences permission) can create managed topics. deletemanagedtopic(communityid, managedtopicid) delete a managed topic from an experience cloud site. api version 32.0 requires chatter no signature public static deletemanagedtopic(string communityid, string managedtopicid) parameters communityid type: string 1295apex reference guide managedtopics class id for an experience cloud site, internal, or null. managedtopicid type: string id of managed topic. return value type: void usage only community managers (users with the |
create and set up experiences or manage experiences permission) can delete managed topics. getmanagedtopic(communityid, managedtopicid) get a managed topic in an experience cloud site. api version 32.0 available to guest users 32.0 requires chatter no signature public static connectapi.managedtopic getmanagedtopic(string communityid, string managedtopicid) parameters communityid type: string id for an experience cloud site, internal, or null. managedtopicid type: string id of managed topic. return value type: connectapi.managedtopic 1296apex reference guide managedtopics class getmanagedtopic(communityid, managedtopicid, depth) get a managed topic, including its parent and children managed topics, in an experience cloud site. api version 35.0 available to guest users 35.0 requires chatter no signature public static connectapi.managedtopic getmanagedtopic(string communityid, string managedtopicid, integer depth) parameters communityid type: string id for an experience cloud site, internal, or null. managedtopicid type: string id of managed topic. depth type: integer specify an integer 1–8. if you specify 1, the children property of the connectapi.managedtopic output class is null. if you specify 2, the children property of the connectapi.managedtopic output class contains the direct children managed topics, if any, of the managed topic. if you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. if depth isn’t specified, it defaults to 1. return value type: connectapi.managedtopic getmanagedtopics(communityid) get the featured and navigational managed topics for an experience cloud site. to get the content topics for an experience cloud site, use getmanagedtopics(communityid, managedtopictype). api version 32.0 1297apex reference guide managedtopics class available to guest users 32.0 requires chatter no signature public static connectapi.managedtopiccollection getmanagedtopics(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.managedtopiccollection getmanagedtopics(communityid, managedtopictype) get managed topics of the specified type for an experience cloud site. api version 32.0 available to guest users 32.0 requires chatter no signature public static connectapi.managedtopiccollection getmanagedtopics(string communityid, connectapi.managedtopictype managedtopictype) parameters communityid type: string id for an experience cloud site, internal, or null. managedtopictype type: connectapi.managedtopictype 1298apex reference guide managedtopics class type of managed topic. • content—topics that are associated with native content. • featured—topics that are featured, for example, on the experience cloud site home page, but don’t provide overall navigation. • navigational—topics that display in a navigational menu in the experience cloud site. a topic can be associated with all three managed topic types, so a topic can be a featured, navigational, and content topic. if you specify content, up to 50 topics are returned. if you want more than 50 content topics, use getmanagedtopics(communityid, managedtopictype, pageparam, pagesize). return value type: connectapi.managedtopiccollection getmanagedtopics(communityid, managedtopictype, depth) get managed topics of the specified type, including their parent and children managed topics, in an experience cloud site. api version 35.0 available to guest users 35.0 requires chatter no signature public static connectapi.managedtopiccollection getmanagedtopics(string communityid, connectapi.managedtopictype managedtopictype, integer depth) parameters communityid type: string id for an experience cloud site, internal, or null. managedtopictype type: connectapi.managedtopictype type of managed topic. • content—topics that are associated with native content. • featured—topics that are featured, for example, on the experience cloud site home page, but don’t provide overall navigation. • navigational—topics that display in a navig |
ational menu in the experience cloud site. a topic can be associated with all three managed topic types, so a topic can be a featured, navigational, and content topic. 1299apex reference guide managedtopics class depth type: integer specify an integer 1–8. if you specify 1, the children property of the connectapi.managedtopic output class is null. if you specify 2, the children property of the connectapi.managedtopic output class contains the direct children managed topics, if any, of the managed topic. if you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. if depth isn’t specified, it defaults to 1. return value type: connectapi.managedtopiccollection getmanagedtopics(communityid, managedtopictype, recordids, depth) get managed topics of the specified type, including their parent and children managed topics, that are associated with topics in an experience cloud site. api version 38.0 available to guest users 38.0 requires chatter no signature public static connectapi.managedtopiccollection getmanagedtopics(string communityid, connectapi.managedtopictype managedtopictype, list<string> recordids, integer depth) parameters communityid type: string id for an experience cloud site, internal, or null. managedtopictype type: connectapi.managedtopictype type of managed topic. • content—topics that are associated with native content. • featured—topics that are featured, for example, on the experience cloud site home page, but don’t provide overall navigation. • navigational—topics that display in a navigational menu in the experience cloud site. a topic can be associated with all three managed topic types, so a topic can be a featured, navigational, and content topic. 1300apex reference guide managedtopics class recordids type: list<string> a list of up to 100 topic ids associated with the managed topics. if you list more than 10 topic ids, you can’t specify 2–8 for depth. depth type: integer specify an integer 1–8. if you specify 1, the children property of the connectapi.managedtopic output class is null. if you specify 2, the children property of the connectapi.managedtopic output class contains the direct children managed topics, if any, of the managed topic. if you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. if depth isn’t specified, it defaults to 1. return value type: connectapi.managedtopiccollection getmanagedtopics(communityid, managedtopictype, pageparam, pagesize) get a page of managed topics. api version 44.0 available to guest users 44.0 requires chatter no signature public static connectapi.managedtopiccollection getmanagedtopics(string communityid, connectapi.managedtopictype managedtopictype, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. managedtopictype type: connectapi.managedtopictype type of managed topic. • content—topics that are associated with native content. • featured—topics that are featured, for example, on the experience cloud site home page, but don’t provide overall navigation. • navigational—topics that display in a navigational menu in the experience cloud site. 1301apex reference guide managedtopics class a topic can be associated with all three managed topic types, so a topic can be a featured, navigational, and content topic. 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 50. return value type: connectapi.managedtopiccollection reordermanagedtopics(communityid, managedtopicpositioncollection) reorder the relative positions of managed topics in an experience cloud site. api version 32.0 requires chatter no signature public static connectapi.managedtopiccollection reordermanagedtopics(string communityid, connectapi.managedtopicpositioncollectioninput managedtopicpositioncollection) parameters communityid type: string |
id for an experience cloud site, internal, or null. managedtopicpositioncollection type: connectapi.managedtopicpositioncollectioninput a collection of relative positions of managed topics. this collection can include only featured and navigational topics and doesn’t have to include all managed topics. return value type: connectapi.managedtopiccollection usage only community managers (users with the create and set up experiences or manage experiences permission) can reorder managed topics. 1302apex reference guide managedtopics class you can reorder parent managed topics or children managed topics with the same parent. if you don’t include all managed topics in the connectapi.managedtopicpositioncollectioninput, the managed topics are reordered by respecting the positions indicated in the connectapi.managedtopicpositioncollectioninput and then by pushing down any managed topics that aren’t included in the connectapi.managedtopicpositioncollectioninput to the next available position. example if you have these managed topics: managed topic position managedtopica 0 managedtopicb 1 managedtopicc 2 managedtopicd 3 managedtopice 4 and you reorder managed topics by including this information in connectapi.managedtopicpositioncollectioninput: managed topic position managedtopicd 0 managedtopice 2 the result is: managed topic position managedtopicd 0 managedtopica 1 managedtopice 2 managedtopicb 3 managedtopicc 4 retired managedtopics methods the following methods for managedtopics are retired. 1303apex reference guide managedtopics class in this section: getmanagedtopics(communityid, managedtopictype, recordid, depth) get managed topics of the specified type, including their parent and children managed topics, that are associated with a given topic in an experience cloud site. getmanagedtopics(communityid, managedtopictype, recordid, depth) get managed topics of the specified type, including their parent and children managed topics, that are associated with a given topic in an experience cloud site. api version 35.0–37.0 important: in version 38.0 and later, use getmanagedtopics(communityid, managedtopictype, recordids, depth). available to guest users 35.0 requires chatter no signature public static connectapi.managedtopiccollection getmanagedtopics(string communityid, connectapi.managedtopictype managedtopictype, string recordid, integer depth) parameters communityid type: string id for an experience cloud site, internal, or null. managedtopictype type: connectapi.managedtopictype type of managed topic. • content—topics that are associated with native content. • featured—topics that are featured, for example, on the experience cloud site home page, but don’t provide overall navigation. • navigational—topics that display in a navigational menu in the experience cloud site. a topic can be associated with all three managed topic types, so a topic can be a featured, navigational, and content topic. recordid type: string id of the topic associated with the managed topics. 1304apex reference guide marketingintegration class depth type: integer specify an integer 1–8. if you specify 1, the children property of the connectapi.managedtopic output class is null. if you specify 2, the children property of the connectapi.managedtopic output class contains the direct children managed topics, if any, of the managed topic. if you specify 3–8, you get the direct children managed topics and their children managed topics if there are any. if depth isn’t specified, it defaults to 1. return value type: connectapi.managedtopiccollection marketingintegration class get, save, and submit a microsites marketing integration form for an experience cloud site. namespace connectapi marketingintegration methods the following are methods for marketingintegration. all methods are static. marketingintegration methods make calls to marketing cloud rest apis to create, query, and insert data to the data extension object. if marketing cloud rest apis return errors, connectinapex error messages include the error code and message from marketing cloud. in this section: getform(siteid, formid) get a marketing integration form for an experience cloud site. saveform(siteid, forminput) save a marketing integration form for an experience cloud site. submit |
form(siteid, formid, formsubmissioninput) submit a marketing integration form for an experience cloud site. getform(siteid, formid) get a marketing integration form for an experience cloud site. api version 53.0 requires chatter no 1305apex reference guide marketingintegration class signature public static connectapi.form getform(string siteid, string formid) parameters siteid type: string id for the experience cloud site. formid type: string id of the form. return value type: connectapi.form saveform(siteid, forminput) save a marketing integration form for an experience cloud site. api version 53.0 requires chatter no signature public static connectapi.form saveform(string siteid, connectapi.forminput forminput) parameters siteid type: string id for the experience cloud site. forminput type: connectapi.forminput a connectapi.forminput object to save. return value type: connectapi.form 1306apex reference guide mentions class usage this method attempts to create a read-only data extension in marketing cloud. a marketing cloud admin can change the read-only setting. we recommend keeping the data extension as read-only to maintain schema consistency with the form. submitform(siteid, formid, formsubmissioninput) submit a marketing integration form for an experience cloud site. api version 53.0 available to guest users 53.0 requires chatter no signature public static connectapi.formsubmission submitform(string siteid, string formid, connectapi.formsubmissioninput formsubmissioninput) parameters siteid type: string id for the experience cloud site. formid type: string id of the form. formsubmissioninput type: connectapi.formsubmissioninput a connectapi.formsubmissioninput object to submit. return value type: connectapi.formsubmission mentions class access information about mentions. a mention is an “@” character followed by a user or group name. when a user or group is mentioned, they receive a notification. 1307apex reference guide mentions class namespace connectapi mentions methods the following are methods for mentions. all methods are static. in this section: getmentioncompletions(communityid, q, contextid) get the first page of possible users and groups to mention in a feed item body or comment body. getmentioncompletions(communityid, q, contextid, type, pageparam, pagesize) get a page of possible mention proposals of the specified type. getmentionvalidations(communityid, parentid, recordids, visibility) get information about whether the mentions are valid for the context user. getmentioncompletions(communityid, q, contextid) get the first page of possible users and groups to mention in a feed item body or comment body. api version 29.0 requires chatter yes signature public static connectapi.mentioncompletionpage getmentioncompletions (string communityid, string q, string contextid) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string a search term for matching user and group names. searching for a group requires a minimum of 2 characters. searching for a user doesn’t require a minimum number of characters. this parameter does not support wildcards. contextid type: string a feed item id (for a mention in a comment) or a feed subject id (for a mention in a feed item) that narrows search results, with more useful results listed first. use a group id for groups that allow customers to ensure mention completion results include customers. 1308apex reference guide mentions class return value type: connectapi.mentioncompletionpage usage call this method to generate a page of proposed mentions that a user can choose from when they enter characters after @ in a feed item body or a comment body. 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: settestgetmentioncompletions(communityid, q, contextid, result) apex developer guide: testing connectapi code getmention |
completions(communityid, q, contextid, type, pageparam, pagesize) get a page of possible mention proposals of the specified type. api version 29.0 requires chatter yes signature public static connectapi.mentions getmentioncompletions (string communityid, string q, string contextid, connectapi.mentioncompletiontype type, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string a search term for matching user and group names. searching for a group requires a minimum of 2 characters. searching for a user doesn’t require a minimum number of characters. this parameter does not support wildcards. contextid type: string a feed item id (for a mention in a comment) or a feed subject id (for a mention in a feed item) that narrows search results, with more useful results listed first. use a group id for groups that allow customers to ensure mention completion results include customers. 1309apex reference guide mentions class type type: connectapi.mentioncompletiontype type of mention completion. • all—all mention completions, regardless of the type of record to which the mention refers. • group—mention completions for groups. • user—mention completions for users. 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.mentioncompletionpage usage call this method to generate a page of proposed mentions that a user can choose from when they enter characters after @ in a feed item body or a comment body. 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: settestgetmentioncompletions(communityid, q, contextid, type, pageparam, pagesize, result) apex developer guide: testing connectapi code getmentionvalidations(communityid, parentid, recordids, visibility) get information about whether the mentions are valid for the context user. api version 29.0 requires chatter yes signature public static connectapi.mentions getmentionvalidations(string communityid, string parentid, list<string> recordids, connectapi.feeditemvisibilitytype visibility) 1310apex reference guide mentions class parameters communityid type: string id for an experience cloud site, internal, or null. parentid type: string the feed item parent id. recordids type: list<string> a comma-separated list of ids to be mentioned. the maximum value is 25. visibility type: connectapi.feeditemvisibilitytype type of users who can see a feed item. • allusers—visibility is not limited to internal users. • internalusers—visibility is limited to internal users. return value type: connectapi.mentionvalidations usage call this method to check whether the record ids returned from a call to connectapi.mentions.getmentioncompletions are valid for the context user. for example, the context users can’t mention private groups they don’t belong to. if such a group were included in the list of mention validations, the connectapi.mentionvalidations.haserrors property would be true and the group would have a connectapi.mentionvalidation.valdiationstatus of disallowed. mentions test methods these are the test methods for mentions. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. settestgetmentioncompletions(communityid, q, contextid, result) register a connectapi.mentioncompletionpage object to be returned when getmentioncompletions(string, string, string) is called in a test context. api version 29.0 signature public static void settestgetmentioncompletions (string communityid, string q, string contextid, connectapi.mentioncompletionpage result) 1311apex reference |
guide mentions class parameters communityid type: string id for an experience cloud site, internal, or null. q type: string a search term for matching user and group names. searching for a group requires a minimum of 2 characters. searching for a user doesn’t require a minimum number of characters. this parameter does not support wildcards. contextid type: string a feed item id (for a mention in a comment) or a feed subject id (for a mention in a feed item) that narrows search results, with more useful results listed first. use a group id for groups that allow customers to ensure mention completion results include customers. result type: connectapi.mentioncompletionpage a connectapi.mentioncompletionpage object containing test data. return value type: void see also: getmentioncompletions(communityid, q, contextid) apex developer guide: testing connectapi code settestgetmentioncompletions(communityid, q, contextid, type, pageparam, pagesize, result) register a connectapi.mentioncompletionpage object to be returned when getmentioncompletions(string, string, string, connectapi.mentioncompletiontype, integer, integer) is called in a test context. api version 29.0 signature public static void settestgetmentioncompletions (string communityid, string q, string contextid, connectapi.mentioncompletiontype type, integer pageparam, integer pagesize, connectapi.mentioncompletionpage result) parameters communityid type: string id for an experience cloud site, internal, or null. 1312apex reference guide missions class q type: string a search term for matching user and group names. searching for a group requires a minimum of 2 characters. searching for a user doesn’t require a minimum number of characters. this parameter does not support wildcards. contextid type: string a feed item id (for a mention in a comment) or a feed subject id (for a mention in a feed item) that narrows search results, with more useful results listed first. use a group id for groups that allow customers to ensure mention completion results include customers. type type: connectapi.mentioncompletiontype type of mention completion. • all—all mention completions, regardless of the type of record to which the mention refers. • group—mention completions for groups. • user—mention completions for users. 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.mentioncompletionpage a connectapi.mentioncompletionpage object containing test data. return value type: void see also: getmentioncompletions(communityid, q, contextid, type, pageparam, pagesize) apex developer guide: testing connectapi code missions class export and purge mission activity for users. get a user’s mission progress. update mission activity counts for users. namespace connectapi missions methods the following are methods for missions. all methods are static. 1313apex reference guide missions class in this section: exportusermissionsactivities(communityid, userid) export mission activity for a user. getusermissionsprogress(communityid, userid) get mission activity progress for a user. purgeusermissionsactivities(communityid, userid) start a job to purge mission activity for a user. purgeusermissionsactivities(communityid) start a job to purge mission activity for all users. updateusermissionactivitycount(activitytype, activitycount, communityid, userid) update the mission activity count for a user. exportusermissionsactivities(communityid, userid) export mission activity for a user. api version 45.0 requires chatter no signature public static connectapi.usermissionactivitiesjob exportusermissionsactivities(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.usermission |
activitiesjob usage you can export these activities with this method. • feeditemansweraquestion—user answered a question. 1314apex reference guide missions class • feeditemlikesomething—user liked a post or comment. • feeditemmarkanswerasbest—user marked an answer as the best answer. • feeditempostquestion—user posted a question. • feeditemreceiveacomment—user received a comment on a post. • feeditemreceivealike—user received a like on a post or comment. • feeditemreceiveananswer—user received an answer to a question. • feeditemwriteacomment—user commented on a post. • feeditemwriteapost—user made a post. • feeditemyouranswermarkedbest—user’s answer was marked as the best answer. getusermissionsprogress(communityid, userid) get mission activity progress for a user. api version 46.0 requires chatter no signature public static connectapi.usermissionactivitycollection getusermissionsprogress(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.usermissionactivitycollection purgeusermissionsactivities(communityid, userid) start a job to purge mission activity for a user. api version 45.0 1315apex reference guide missions class requires chatter no signature public static connectapi.usermissionactivitiesjob purgeusermissionsactivities(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.usermissionactivitiesjob usage this method purges these activities. • feeditemansweraquestion—user answered a question. • feeditemlikesomething—user liked a post or comment. • feeditemmarkanswerasbest—user marked an answer as the best answer. • feeditempostquestion—user posted a question. • feeditemreceiveacomment—user received a comment on a post. • feeditemreceivealike—user received a like on a post or comment. • feeditemreceiveananswer—user received an answer to a question. • feeditemwriteacomment—user commented on a post. • feeditemwriteapost—user made a post. • feeditemyouranswermarkedbest—user’s answer was marked as the best answer. purgeusermissionsactivities(communityid) start a job to purge mission activity for all users. api version 49.0 requires chatter no 1316apex reference guide missions class signature public static connectapi.usermissionactivitiesjob purgeusermissionsactivities(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.usermissionactivitiesjob usage this method purges these activities. • feeditemansweraquestion—user answered a question. • feeditemlikesomething—user liked a post or comment. • feeditemmarkanswerasbest—user marked an answer as the best answer. • feeditempostquestion—user posted a question. • feeditemreceiveacomment—user received a comment on a post. • feeditemreceivealike—user received a like on a post or comment. • feeditemreceiveananswer—user received an answer to a question. • feeditemwriteacomment—user commented on a post. • feeditemwriteapost—user made a post. • feeditemyouranswermarkedbest—user’s answer was marked as the best answer. updateusermissionactivitycount(activitytype, activitycount, communityid, userid) update the mission activity count for a user. api version 45.0 requires chatter no signature public static connectapi.usermissionactivitystatus updateusermissionactivitycount(connectapi.usermissionactivitytype activitytype, integer activitycount, string communityid, string userid) 1317apex reference guide namedcredentials class parameters activitytype type: connectapi.usermissionactivitytype type of mission activity for a user. values are: • feeditemansweraquestion—user answered a question. • feed |
itemlikesomething—user liked a post or comment. • feeditemmarkanswerasbest—user marked an answer as the best answer. • feeditempostquestion—user posted a question. • feeditemreceiveacomment—user received a comment on a post. • feeditemreceivealike—user received a like on a post or comment. • feeditemreceiveananswer—user received an answer to a question. • feeditemwriteacomment—user commented on a post. • feeditemwriteapost—user made a post. • feeditemyouranswermarkedbest—user’s answer was marked as the best answer. activitycount type: integer number of mission activities of the specified type for the user. communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. return value type: connectapi.usermissionactivitystatus namedcredentials class create, refresh, get, delete, and update credentials. create, get, delete, and update external credentials. create, get, delete, and update named credentials. get the url for the oauth token flow for an external credential. namespace connectapi namedcredentials methods the following are methods for namedcredentials. all methods are static. 1318apex reference guide namedcredentials class in this section: createcredential(requestbody) create a credential. createcredential(requestbody, action) refresh an oauth or aws roles anywhere credential. createexternalcredential(requestbody) create an external credential. createnamedcredential(requestbody) create a named credential. deletecredential(externalcredential, principalname, principaltype) delete a credential. deleteexternalcredential(developername) delete an external credential. deletenamedcredential(developername) delete a named credential. getcredential(externalcredential, principalname, principaltype) get a credential. getexternalcredential(developername) get an external credential, including the named credentials and principals associated with it and the type and status of each principal. getexternalcredentials() get external credentials that the user can authenticate to. getnamedcredential(developername) get a named credential. getnamedcredentials() get a list of named credentials for the org. getoauthcredentialauthurl(requestbody) get the url for the oauth token flow for an external credential. updatecredential(requestbody) update a credential. updateexternalcredential(developername, requestbody) update an external credential. updatenamedcredential(developername, requestbody) update a named credential. createcredential(requestbody) create a credential. api version 56.0 1319apex reference guide namedcredentials class requires chatter no signature public static connectapi.credential createcredential(connectapi.credentialinput requestbody) parameters requestbody type: connectapi.credentialinput a connectapi.credentialinput class. return value type: connectapi.credential createcredential(requestbody, action) refresh an oauth or aws roles anywhere credential. api version 58.0 requires chatter no signature public static connectapi.credential createcredential(connectapi.credentialinput requestbody, connectapi.createcredentialaction action) parameters requestbody type: connectapi.credentialinput a connectapi.credentialinput class. action type: connectapi.createcredentialaction action to take when creating the credential. value is: • refresh return value type: connectapi.credential 1320apex reference guide namedcredentials class createexternalcredential(requestbody) create an external credential. api version 58.0 requires chatter no signature public static connectapi.externalcredential createexternalcredential(connectapi.externalcredentialinput requestbody) parameters requestbody type: connectapi.externalcredentialinput input used to create or update an external credential. return value type: connectapi.externalcredential createnamedcredential( |
requestbody) create a named credential. api version 58.0 requires chatter no signature public static connectapi.namedcredential createnamedcredential(connectapi.namedcredentialinput requestbody) parameters requestbody type: connectapi.namedcredentialinput input used to create or update a named credential. 1321apex reference guide namedcredentials class return value type: connectapi.namedcredential deletecredential(externalcredential, principalname, principaltype) delete a credential. api version 56.0 requires chatter no signature public static void deletecredential(string externalcredential, string principalname, connectapi.credentialprincipaltype principaltype) parameters externalcredential type: string fully qualified developer name of the external credential. principalname type: string name of the external credential named principal. principaltype type: connectapi.credentialprincipaltype type of credential principal. values are: • awsstsprincipal • namedprincipal • peruserprincipal return value type: void deleteexternalcredential(developername) delete an external credential. api version 58.0 1322apex reference guide namedcredentials class requires chatter no signature public static void deleteexternalcredential(string developername) parameters developername type: string fully qualified developer name of the external credential. return value type: void deletenamedcredential(developername) delete a named credential. api version 58.0 requires chatter no signature public static void deletenamedcredential(string developername) parameters developername type: string fully qualified developer name of the named credential. return value type: void getcredential(externalcredential, principalname, principaltype) get a credential. api version 56.0 1323apex reference guide namedcredentials class requires chatter no signature public static connectapi.credential getcredential(string externalcredential, string principalname, connectapi.credentialprincipaltype principaltype) parameters externalcredential type: string fully qualified developer name of the external credential. principalname type: string name of the external credential named principal. principaltype type: connectapi.credentialprincipaltype type of credential principal. values are: • awsstsprincipal • namedprincipal • peruserprincipal return value type: connectapi.credential getexternalcredential(developername) get an external credential, including the named credentials and principals associated with it and the type and status of each principal. api version 56.0 requires chatter no signature public static connectapi.externalcredential getexternalcredential(string developername) parameters developername type: string 1324apex reference guide namedcredentials class fully qualified developer name of the external credential. return value type: connectapi.externalcredential getexternalcredentials() get external credentials that the user can authenticate to. api version 56.0 requires chatter no signature public static connectapi.externalcredentiallist getexternalcredentials() return value type: connectapi.externalcredentiallist getnamedcredential(developername) get a named credential. api version 58.0 requires chatter no signature public static connectapi.namedcredential getnamedcredential(string developername) parameters developername type: string fully qualified developer name of the named credential. return value type: connectapi.namedcredential 1325apex reference guide namedcredentials class getnamedcredentials() get a list of named credentials for the org. api version 58.0 requires chatter no signature public static connectapi.namedcredentiallist getnamedcredentials() return value type: connectapi.namedcredentiallist getoauthcredentialauthurl(requestbody) get the url for the oauth token flow for an external credential. |
api version 56.0 requires chatter no signature public static connectapi.oauthcredentialauthurl getoauthcredentialauthurl(connectapi.oauthcredentialauthurlinput requestbody) parameters requestbody type: connectapi.oauthcredentialauthurlinput a connectapi.oauthcredentialauthurlinput class indicating the oauth authentication flow. return value type: connectapi.oauthcredentialauthurl 1326apex reference guide namedcredentials class usage accepts input parameters representing a specific external credential and, optionally, a named principal. returns the url a user must visit to begin the authentication flow, ultimately returning authentication tokens to salesforce. use this method as part of building a customized or branded user interface to help users initiate authentication. example connectapi.oauthcredentialauthurlinput input = new connectapi.oauthcredentialauthurlinput(); input.externalcredential = 'myexternalcredentialdevelopername'; input.principaltype = connectapi.credentialprincipaltype.peruserprincipal; input.principalname = 'myprincipal'; // only required when principaltype = namedprincipal connectapi.oauthcredentialauthurl output = connectapi.namedcredentials.getoauthcredentialauthurl(input); string authenticationurl = output.authenticationurl; // redirect users to this url to authenticate in the browser updatecredential(requestbody) update a credential. api version 56.0 requires chatter no signature public static connectapi.credential updatecredential(connectapi.credentialinput requestbody) parameters requestbody type: connectapi.credentialinput a connectapi.credentialinput class. return value type: connectapi.credential updateexternalcredential(developername, requestbody) update an external credential. 1327apex reference guide namedcredentials class api version 58.0 requires chatter no signature public static connectapi.externalcredential updateexternalcredential(string developername, connectapi.externalcredentialinput requestbody) parameters developername type: string fully qualified developer name of the external credential. requestbody type: connectapi.externalcredentialinput input used to create or update an external credential. return value type: connectapi.externalcredential updatenamedcredential(developername, requestbody) update a named credential. api version 58.0 requires chatter no signature public static connectapi.namedcredential updatenamedcredential(string developername, connectapi.namedcredentialinput requestbody) parameters developername type: string fully qualified developer name of the named credential. 1328apex reference guide navigationmenu class requestbody type: connectapi.namedcredentialinput input used to create or update a named credential. return value type: connectapi.namedcredential navigationmenu class get navigation menu items for an experience cloud site. namespace connectapi navigationmenu methods these methods are for navigationmenu. all methods are static. in this section: getcommunitynavigationmenu(communityid, navigationlinksetid, navigationlinksetdevelopername, publishstatus, includeimageurl, addhomemenuitem, menuitemtypestoskip) get navigation menu items for an experience cloud site. getcommunitynavigationmenu(communityid, navigationlinksetid, navigationlinksetdevelopername, publishstatus, includeimageurl, addhomemenuitem, menuitemtypestoskip, effectiveaccountid) get navigation menu items for an experience cloud based on an effective account. getcommunitynavigationmenu(communityid, navigationlinksetid, navigationlinksetdevelopername, publishstatus, includeimageurl, addhomemenuitem, menuitemtypestoskip) get navigation menu items for an experience cloud site. api version 52.0 available to guest users 52.0 requires chatter no 1329apex reference guide navigationmenu class signature public static connectapi.navigationmenuitemcollection getcommunitynavigationmenu(string communityid, string navigationlinksetid, string navigationlinksetdevelopername, connectapi.publishstatus publishstatus |
, boolean includeimageurl, boolean addhomemenuitem, list<connectapi.navigationmenuitemtype> menuitemtypestoskip) parameters communityid type: string id of an experience cloud site. navigationlinksetid type: string id of the navigation link set. navigationlinksetdevelopername type: string developer name of the navigation link set. publishstatus type: connectapi.publishstatus publish status of the navigation menu item. values are: • draft • live includeimageurl type: boolean specifies whether to include the image url with the menu item (true) or not (false). addhomemenuitem type: boolean specifies whether to add the home menu item (true) or not (false). menuitemtypestoskip type: list<connectapi.navigationmenuitemtype> list of menu item types to filter out of the results. values are: • datasourcedriven—menu items dynamically added from a data source. • event—event, such as logging in, logging out, or switching accounts. • externallink—url outside of your site. • globalaction—lets users create records that aren’t related to other records. • internallink—relative url inside your site. • menulabel—menu label. • modal—modal, such as account switcher. • navigationaltopic—dropdown list with links to the navigational topics in your site. • salesforceobject—objects such as accounts, cases, contacts, and custom objects. • systemlink—system link, such as a link to builder, workspaces, or setup. 1330apex reference guide navigationmenu class return value type: connectapi.navigationmenuitemcollection usage supported navigation menu item types are: • datasourcedriven—menu items dynamically added from a data source. • event—event, such as logging in, logging out, or switching accounts. • externallink—url outside of your site. • globalaction—lets users create records that aren’t related to other records. • internallink—relative url inside your site. • menulabel—menu label. • modal—modal, such as account switcher. • navigationaltopic—dropdown list with links to the navigational topics in your site. • salesforceobject—objects such as accounts, cases, contacts, and custom objects. • systemlink—system link, such as a link to builder, workspaces, or setup. getcommunitynavigationmenu(communityid, navigationlinksetid, navigationlinksetdevelopername, publishstatus, includeimageurl, addhomemenuitem, menuitemtypestoskip, effectiveaccountid) get navigation menu items for an experience cloud based on an effective account. api version 54.0 available to guest users 54.0 requires chatter no signature public static connectapi.navigationmenuitemcollection getcommunitynavigationmenu(string communityid, string navigationlinksetid, string navigationlinksetdevelopername, connectapi.publishstatus publishstatus, boolean includeimageurl, boolean addhomemenuitem, list<connectapi.navigationmenuitemtype> menuitemtypestoskip, string effectiveaccountid) parameters communityid type: string id of an experience cloud site. 1331apex reference guide navigationmenu class navigationlinksetid type: string id of the navigation link set. navigationlinksetdevelopername type: string developer name of the navigation link set. publishstatus type: connectapi.publishstatus publish status of the navigation menu item. values are: • draft • live includeimageurl type: boolean specifies whether to include the image url with the menu item (true) or not (false). addhomemenuitem type: boolean specifies whether to add the home menu item (true) or not (false). menuitemtypestoskip type: list<connectapi.navigationmenuitemtype> list of menu item types to filter out of the results. values are: • datasourcedriven—menu items dynamically added from a data source. • event—event, such as logging in, logging out, or switching accounts. • externallink—url outside of your site. • globalaction—lets users create records that aren’t related to other records. • internallink—relative url inside your site. • menulabel—menu label. • modal—modal, such as account |
switcher. • navigationaltopic—dropdown list with links to the navigational topics in your site. • salesforceobject—objects such as accounts, cases, contacts, and custom objects. • systemlink—system link, such as a link to builder, workspaces, or setup. effectiveaccountid type: string id of the account for which the request is made. if unspecified, defaults to the account id for the context user. return value type: connectapi.navigationmenuitemcollection usage supported navigation menu item types are: 1332 |
apex reference guide nextbestaction class • datasourcedriven—menu items dynamically added from a data source. • event—event, such as logging in, logging out, or switching accounts. • externallink—url outside of your site. • globalaction—lets users create records that aren’t related to other records. • internallink—relative url inside your site. • menulabel—menu label. • modal—modal, such as account switcher. • navigationaltopic—dropdown list with links to the navigational topics in your site. • salesforceobject—objects such as accounts, cases, contacts, and custom objects. • systemlink—system link, such as a link to builder, workspaces, or setup. nextbestaction class execute recommendation strategies, get recommendations, manage recommendation reactions. namespace connectapi usage community users can't access this class. portal and guest users can access strategies only through the suggested actions component. nextbestaction methods the following are methods for nextbestaction. all methods are static. in this section: deleterecommendationreaction(reactionid) delete a recommendation reaction. executestrategy(strategyname, maxresults, contextrecordid) execute a strategy. executestrategy(strategyname, maxresults, contextrecordid, debugtrace) execute a strategy and request a trace. executestrategy(strategyname, strategyinput) execute a strategy using an input class. getrecommendation(recommendationid) get a recommendation. getrecommendationreaction(reactionid) get a recommendation reaction. getrecommendationreactions(onbehalfofid, createdbyid, targetid, contextrecordid, pageparam, pagesize) get recommendation reactions. 1333apex reference guide nextbestaction class setrecommendationreaction(reaction) record user reactions to recommendations. deleterecommendationreaction(reactionid) delete a recommendation reaction. api version 45.0 requires chatter no signature public static void deleterecommendationreaction(string reactionid) parameters reactionid type: string id of the recommendation reaction. return value type: void usage users with the manage next best action recommendations or modify all data permission can delete recommendation reactions. executestrategy(strategyname, maxresults, contextrecordid) execute a strategy. api version 45.0 available to guest users 45.0 requires chatter no 1334apex reference guide nextbestaction class signature public static connectapi.nbarecommendations executestrategy(string strategyname, integer maxresults, string contextrecordid) parameters strategyname type: string name of the strategy. maxresults type: integer maximum number of results. valid values are from 1 to 25. the default is 3. contextrecordid type: string id of the context record. for example, if the next best action is on a case detail page, the id of the case. return value type: connectapi.nbarecommendations executestrategy(strategyname, maxresults, contextrecordid, debugtrace) execute a strategy and request a trace. api version 45.0 available to guest users 45.0 requires chatter no signature public static connectapi.nbarecommendations executestrategy(string strategyname, integer maxresults, string contextrecordid, boolean debugtrace) parameters strategyname type: string name of the strategy. maxresults type: integer 1335apex reference guide nextbestaction class maximum number of results. valid values are from 1 to 25. the default is 3. contextrecordid type: string id of the context record. for example, if the next best action is on a case detail page, the id of the case. debugtrace type: boolean specifies whether to return trace and debug information in the response (true) or not (false). return value type: connectapi.nbarecommendations executestrategy(strategyname, strategyinput) execute a strategy using an input class. api version 45.0 available to guest users 45.0 requires chatter no signature public static connectapi.nbarecommendations executestrategy(string strategyname, connectapi.nbastrategyinput strategyinput) parameters strategyname type: string |
name of the strategy. strategyinput type: connectapi.nbastrategyinput a connectapi.nbastrategyinput body. return value type: connectapi.nbarecommendations 1336apex reference guide nextbestaction class getrecommendation(recommendationid) get a recommendation. api version 45.0 requires chatter no signature public static connectapi.recommendation getrecommendation(string recommendationid) parameters recommendationid type: string id of the recommendation. return value type: connectapi.recommendation getrecommendationreaction(reactionid) get a recommendation reaction. api version 45.0 requires chatter no signature public static connectapi.recommendationreaction getrecommendationreaction(string reactionid) parameters reactionid type: string id of the recommendation reaction. 1337apex reference guide nextbestaction class return value type: connectapi.recommendationreaction usage users with the manage next best action recommendations or modify all data permission can get recommendation reactions. getrecommendationreactions(onbehalfofid, createdbyid, targetid, contextrecordid, pageparam, pagesize) get recommendation reactions. api version 45.0 requires chatter no signature public static connectapi.recommendationreactions getrecommendationreactions(string onbehalfofid, string createdbyid, string targetid, string contextrecordid, integer pageparam, integer pagesize) parameters onbehalfofid type: string use the id of the user who is indirectly reacting to the recommendation to filter the results. createdbyid type: string use the id of the user or record that created the recommendation reaction to filter the results. targetid type: string use the id of the target to filter the results. contextrecordid type: string use the id of a context record to filter the results. 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. 1338apex reference guide omnichannelinventoryservice class return value type: connectapi.recommendationreactions usage users with the manage next best action recommendations or modify all data permission can get recommendation reactions. setrecommendationreaction(reaction) record user reactions to recommendations. api version 45.0 available to guest users 48.0 requires chatter no signature public static connectapi.recommendationreaction setrecommendationreaction(connectapi.recommendationreactioninput reaction) parameters reaction type: connectapi.recommendationreactioninput a connectapi.recommendationreactioninput object representing a reaction to a recommendation produced by a recommendation strategy. return value type: connectapi.recommendationreaction omnichannelinventoryservice class route orders to inventory locations in order management. namespace connectapi 1339apex reference guide omnichannelinventoryservice class omnichannelinventoryservice methods the following are methods for omnichannelinventoryservice. all methods are static. in this section: createreservation(createreservationinputrepresentation) create an inventory reservation in omnichannel inventory. fulfillreservation(fulfillreservationinputrepresentation) fulfill one or more inventory reservations. getinventoryavailability(inventoryavailabilityinputrepresentation) retrieve inventory availability data for one or more products at one or more inventory locations or location groups. getinventoryavailabilityuploadstatus(uploadid) retrieve the status of an inventory availability upload job. getpublishlocationstructurestatus(uploadid) retrieve the status of a publish location structure job. publishlocationstructure() asynchronously publish information about your inventory locations and location groups to omnichannel inventory. the publish includes records whose isenabled and shouldsyncwithoci fields are both true. this method returns an id that you can use to retrieve the status of the publish job. releasereservation(releasereservationinputrepresentation) release one or more existing inventory reservations to free up that inventory. submitinventoryavailabilityupload(fileupload) upload an inventory availability data file to omnichannel inventory. transferreservation(transfer |
reservationinputrepresentation) transfer one or more inventory reservations between locations or location groups. this api doesn’t change physical quantities, but reduces the reserved quantity at the source and increases it at the destination. createreservation(createreservationinputrepresentation) create an inventory reservation in omnichannel inventory. api version 51.0 requires chatter no signature public static connectapi.ocicreatereservationoutputrepresentation createreservation(connectapi.ocicreatereservationinputrepresentation createreservationinputrepresentation) 1340apex reference guide omnichannelinventoryservice class parameters createreservationinputrepresentation type: connectapi.ocicreatereservationinputrepresentation data to reserve inventory at one or more omnichannel inventory locations or location groups. return value type: connectapi.ocicreatereservationoutputrepresentation fulfillreservation(fulfillreservationinputrepresentation) fulfill one or more inventory reservations. api version 51.0 requires chatter no signature public static connectapi.ocifulfillreservationoutputrepresentation fulfillreservation(connectapi.ocifulfillreservationinputrepresentation fulfillreservationinputrepresentation) parameters fulfillreservationinputrepresentation type: connectapi.ocifulfillreservationinputrepresentation wraps a list of inventory reservations to fulfill. return value type: connectapi.ocifulfillreservationoutputrepresentation getinventoryavailability(inventoryavailabilityinputrepresentation) retrieve inventory availability data for one or more products at one or more inventory locations or location groups. api version 51.0 requires chatter no 1341apex reference guide omnichannelinventoryservice class signature public static connectapi.ocigetinventoryavailabilityoutputrepresentation getinventoryavailability(connectapi.ocigetinventoryavailabilityinputrepresentation inventoryavailabilityinputrepresentation) parameters inventoryavailabilityinputrepresentation type: connectapi.ocigetinventoryavailabilityinputrepresentation details of a request to retrieve inventory availability. return value type: connectapi.ocigetinventoryavailabilityoutputrepresentation getinventoryavailabilityuploadstatus(uploadid) retrieve the status of an inventory availability upload job. api version 51.0 requires chatter no signature public static connectapi.ociuploadinventoryavailabilitystatusoutputrepresentation getinventoryavailabilityuploadstatus(string uploadid) parameters uploadid type: string the upload id of the upload job. return value type: connectapi.ociuploadinventoryavailabilitystatusoutputrepresentation getpublishlocationstructurestatus(uploadid) retrieve the status of a publish location structure job. api version 51.0 1342apex reference guide omnichannelinventoryservice class requires chatter no signature public static connectapi.ocipublishlocationstructurestatusoutputrepresentation getpublishlocationstructurestatus(string uploadid) parameters uploadid type: string the upload id of the publish job. return value type: connectapi.ocipublishlocationstructurestatusoutputrepresentation publishlocationstructure() asynchronously publish information about your inventory locations and location groups to omnichannel inventory. the publish includes records whose isenabled and shouldsyncwithoci fields are both true. this method returns an id that you can use to retrieve the status of the publish job. api version 51.0 requires chatter no signature public static connectapi.ocipublishlocationstructureoutputrepresentation publishlocationstructure() return value type: connectapi.ocipublishlocationstructureoutputrepresentation releasereservation(releasereservationinputrepresentation) release one or more existing inventory reservations to free up that inventory. api version 51.0 1343apex reference guide omnichannelinventoryservice class requires chatter no signature public static connectapi.ocireleasereservationoutputrepresentation releasereservation(connectapi.ocireleasereservationinputrepresentation releasereservationinputrepresentation) parameters releasereservationinputrepresentation type: connectapi.ocireleasereservationinputrepresentation details of one or more inventory reservations to release. return value type: connectapi.ocireleasereservationoutputrepresentation submitinventoryavailabilityupload(fileupload) upload an inventory availability data file to omn |
ichannel inventory. api version 51.0 requires chatter no signature public static connectapi.ociuploadinventoryavailabilityoutputrepresentation submitinventoryavailabilityupload(connectapi.binaryinput fileupload) parameters fileupload type: connectapi.binaryinput json file containing inventory availability data. return value type: connectapi.ociuploadinventoryavailabilityoutputrepresentation usage to create an inventory data file, format the data as a series of json entries representing locations and individual inventory records. 1344apex reference guide omnichannelinventoryservice class inventory import data considerations: • separate the top-level entries with line feeds, not commas. each entry must be on a single line. • when the system reads a location entry, it assigns the subsequent inventory entries to that location until it reads another location entry. • for each location entry, specify "mode":"update". • each inventory record entry requires a unique recordid. best practice is to use a uuid. the record id protects against importing duplicate data. • each inventory record entry requires an effectivedate. • each futures entry requires a nonzero quantity and a future expecteddate. • the system only creates or updates entries that are included in the data. it doesn’t delete entries that aren’t included. however, if an included entry has an empty value, that value is deleted. note: the file size limit is 10 mb, and it must be in json format. for larger data sets, you can use the headless commerce api or split the data into multiple files. the headless commerce api accepts gzip or json files up to 100 mb in size. this example illustrates the data format: note: for readability, this example shows the first few entries on multiple lines. in the import file, each location and inventory record entry must be on a single line. { "location":"warehouse-a", // location identifier "mode":"update" // must be update (other operations might be available in future releases) } { "recordid":"0a87539d-f3dd-47bc-91c7-9c752e39dbe0", // unique identifier for the inventory record "onhand":10, "sku":"12389156", "effectivedate":"2020-12-08t14:05:22.790896-07:00", "futures":[ // list of future restocks { "quantity":1, "expecteddate":"2021-04-18t14:05:22.781-07:00" }, { "quantity":5, "expecteddate":"2021-05-18t14:05:22.781-07:00" } ], "safetystockcount":0 } { "recordid":"0a87539d-f3dd-47bc-91c7-9c752e312345", "onhand":10, "sku":"9485728", "effectivedate":"2020-12-08t14:05:22.790896-07:00", "futures":[ { "quantity":10, "expecteddate":"2021-04-18t14:05:22.781-07:00" } 1345apex reference guide orchestration class ], "safetystockcount":0 } {"location":"warehouse-b","mode":"update"} {"recordid":"0a87539d-f3dd-47bc-91c7-9c75abc123de","onhand":10,"sku":"12389156","effectivedate":"2020-12-08t14:05:22.790896-07:00","futures":[{"quantity":1,"expecteddate":"2021-04-18t14:05:22.781-07:00"}],"safetystockcount":0} {"recordid":"0a87539d-f3dd-47bc-91c7-9c75abc98765","onhand":10,"sku":"93867201","effectivedate":"2020-12-08t14:05:22.790896-07:00","futures":[{"quantity":5,"expecteddate":"2021-04-18t14:05:22.781-07:00"}],"safetystockcount":0} transferreservation(transferreservationinputrepresentation) transfer one or more inventory reservations between locations or location groups. this api doesn’t change physical quantities, but red |
uces the reserved quantity at the source and increases it at the destination. api version 51.0 requires chatter no signature public static connectapi.ocitransferreservationoutputrepresentation transferreservation(connectapi.ocitransferreservationinputrepresentation transferreservationinputrepresentation) parameters transferreservationinputrepresentation type: connectapi.ocitransferreservationinputrepresentation wraps a list of inventory reservation transfers and specifies whether a single failure cancels the entire list. return value type: connectapi.ocitransferreservationoutputrepresentation orchestration class get orchestration instances. namespace connectapi orchestration methods the following are methods for orchestration. all methods are static. 1346apex reference guide orderpaymentsummary class in this section: getorchestrationinstancecollection(relatedrecordid) get orchestration instances associated with a salesforce record that’s configured as a context record for orchestration interactive steps. getorchestrationinstancecollection(relatedrecordid) get orchestration instances associated with a salesforce record that’s configured as a context record for orchestration interactive steps. api version 54.0 requires chatter no signature public static connectapi.orchestrationinstancecollection getorchestrationinstancecollection(string relatedrecordid) parameters relatedrecordid type: string the id of a record configured as a context record for orchestration interactive steps. return value type: connectapi.orchestrationinstancecollection orderpaymentsummary class work with payments in order management. namespace connectapi orderpaymentsummary methods the following are methods for orderpaymentsummary. all methods are static. 1347apex reference guide orderpaymentsummary class in this section: createorderpaymentsummary(orderpaymentsummaryinput) create an orderpaymentsummary for an ordersummary. specify a payment authorization or payments that share the same payment method. in an org with the multicurrency feature enabled, the orderpaymentsummary inherits the currencyisocode value from the ordersummary. createorderpaymentsummary(orderpaymentsummaryinput) create an orderpaymentsummary for an ordersummary. specify a payment authorization or payments that share the same payment method. in an org with the multicurrency feature enabled, the orderpaymentsummary inherits the currencyisocode value from the ordersummary. api version 48.0 requires chatter no signature public static connectapi.createorderpaymentsummaryoutputrepresentation createorderpaymentsummary(connectapi.createorderpaymentsummaryinputrepresentation orderpaymentsummaryinput) parameters orderpaymentsummaryinput type: connectapi.createorderpaymentsummaryinputrepresentation the ordersummary and payment authorization or payments. return value type: connectapi.createorderpaymentsummaryoutputrepresentation example string ordersummaryid = '1osxx0000004ccg'; string paymentid1 = '0a3xx0000000085aaa'; string paymentid2 = '0a3xx0000000085bbb'; connectapi.createorderpaymentsummaryinputrepresentation orderpaymentsummaryinput = new connectapi.createorderpaymentsummaryinputrepresentation(); orderpaymentsummaryinput.ordersummaryid = ordersummaryid; list<string> paymentlist = new list<string>(); paymentlist.add(paymentid1); paymentlist.add(paymentid2); orderpaymentsummaryinput.paymentids = paymentlist; 1348apex reference guide ordersummary class connectapi.createorderpaymentsummaryoutputrepresentation result = connectapi.orderpaymentsummary.createorderpaymentsummary(orderpaymentsummaryinput); ordersummary class work with orders in order management. namespace connectapi ordersummary methods the following are methods for ordersummary. all methods are static. in this section: adjustpreview(ordersummaryid, adjustinput) retrieve the expected results of adjusting the price of one or more orderitemsummaries from an ordersummary, without actually executing the adjustment. the response data contains the financial changes that would result from submitting the proposed adjustment. adjustsubmit(ordersummaryid, adjustinput) adjust the price of one or more orderitemsummaries from an ordersummary, and create corresponding change orders. createcreditmemo(ordersummaryid, creditmemoinput) create a credit memo to represent the refund for one or more change orders associated with an ordersummary. create |
multipleinvoices(invoicesinput) create invoices to represent the charges for one or more change orders. create invoices for change orders that increase order amounts, such as for return fees. when you ensure the refund for a return, include the invoices for any associated return fees in the request. ensurefundsasync(ordersummaryid, ensurefundsinput) ensure funds for an invoice and apply them to it. if needed, capture authorized funds by sending a request to a payment provider. this method inserts a background operation into an asynchronous job queue and returns the id of that operation so you can track its status. payment gateway responses appear in the payment gateway log and do not affect the background operation status. ensurerefundsasync(ordersummaryid, ensurerefundsinput) ensure refunds for a creditmemo or excess funds by sending a request to a payment provider. this method inserts a background operation into an asynchronous job queue and returns the id of that operation so you can track its status. payment gateway responses appear in the payment gateway log and do not affect the background operation status. multipleensurefundsasync(multipleensurefundsinput) ensure and apply funds for one or more invoices. if needed, capture authorized funds by sending a request to a payment provider. this method inserts a background operation into an asynchronous job queue and returns the id of that operation so you can track its status. payment gateway responses appear in the payment gateway log and do not affect the background operation status. previewcancel(ordersummaryid, changeinput) retrieve the expected change order values for canceling one or more orderitemsummaries from an ordersummary, without actually executing the cancel. 1349apex reference guide ordersummary class previewreturn(ordersummaryid, changeinput) retrieve the expected change order values for a simple return of one or more orderitemsummaries from an ordersummary, without actually executing the return. submitcancel(ordersummaryid, changeinput) cancel one or more orderitemsummaries from an ordersummary, and create a corresponding change order. submitreturn(ordersummaryid, changeinput) return one or more orderitemsummaries from an ordersummary, and create a corresponding change order. this return is a simple return that creates a change order but not a returnorder. adjustpreview(ordersummaryid, adjustinput) retrieve the expected results of adjusting the price of one or more orderitemsummaries from an ordersummary, without actually executing the adjustment. the response data contains the financial changes that would result from submitting the proposed adjustment. api version 49.0 requires chatter no signature public static connectapi.adjustordersummaryoutputrepresentation adjustpreview(string ordersummaryid, connectapi.adjustorderitemsummaryinputrepresentation adjustinput) parameters ordersummaryid type: string id of the ordersummary. adjustinput type: connectapi.adjustorderitemsummaryinputrepresentation price adjustments to orderitemsummaries that together make up a price adjustment to an order, with options for adjusting items in the process of being fulfilled. return value type: connectapi.adjustordersummaryoutputrepresentation usage when a price adjustment is applied to an orderitemsummary, its quantities are considered in three groups: pre-fulfillment quantityavailabletofulfill, which is equal to quantityordered - quantitycanceled - quantityallocated 1350apex reference guide ordersummary class in-fulfillment quantityallocated - quantityfulfilled post-fulfillment quantityavailabletoreturn, which is equal to quantityfulfilled - quantityreturninitiated you can apply adjustments to these groups in three different ways, controlled by the allocateditemschangeordertype input property: • distribute the adjustment evenly between pre-fulfillment and post-fulfillment quantities. ignore in-fulfillment quantities. submitting the adjustment would create one change order for the adjustments to pre-fulfillment quantities and one change order for the adjustments to post-fulfillment quantities. • distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. submitting the adjustment would create one change order for the adjustments to both pre-fulfillment and in-fulfillment quantities, and one change order for the adjustments to post-fulfillment quantities. • distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. submitting the adjustment would create one change order for the adjustments to pre |
-fulfillment quantities, one change order for the adjustments to in-fulfillment quantities, and one change order for the adjustments to post-fulfillment quantities. see also: createcreditmemo(ordersummaryid, creditmemoinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) adjustsubmit(ordersummaryid, adjustinput) adjustsubmit(ordersummaryid, adjustinput) adjust the price of one or more orderitemsummaries from an ordersummary, and create corresponding change orders. api version 49.0 requires chatter no signature public static connectapi.adjustordersummaryoutputrepresentation adjustsubmit(string ordersummaryid, connectapi.adjustorderitemsummaryinputrepresentation adjustinput) parameters ordersummaryid type: string id of the ordersummary. adjustinput type: connectapi.adjustorderitemsummaryinputrepresentation 1351apex reference guide ordersummary class price adjustments to orderitemsummaries that together make up a price adjustment to an order, with options for adjusting items in the process of being fulfilled. return value type: connectapi.adjustordersummaryoutputrepresentation usage when a price adjustment is applied to an orderitemsummary, its quantities are considered in three groups: pre-fulfillment quantityavailabletofulfill, which is equal to quantityordered - quantitycanceled - quantityallocated in-fulfillment quantityallocated - quantityfulfilled post-fulfillment quantityavailabletoreturn, which is equal to quantityfulfilled - quantityreturninitiated you can apply adjustments to these groups in three different ways, controlled by the allocateditemschangeordertype input property: • distribute the adjustment evenly between pre-fulfillment and post-fulfillment quantities. ignore in-fulfillment quantities. create one change order for the adjustments to pre-fulfillment quantities and one change order for the adjustments to post-fulfillment quantities. • distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. create one change order for the adjustments to both pre-fulfillment and in-fulfillment quantities, and one change order for the adjustments to post-fulfillment quantities. • distribute the adjustment evenly between pre-fulfillment, in-fulfillment, and post-fulfillment quantities. create one change order for the adjustments to pre-fulfillment quantities, one change order for the adjustments to in-fulfillment quantities, and one change order for the adjustments to post-fulfillment quantities. after submitting a price adjustment, process refunds as appropriate: • if the discount only applied to orderitemsummaries for which payment hasn’t been captured, it doesn’t require a refund. this situation normally applies to orderitemsummaries in the us that haven’t been fulfilled. • if the discount applied to orderitemsummaries that haven’t been fulfilled and for which payment has been captured, process a refund. in this case, pass the totalexcessfundsamount from the output representation to the ensurerefundsasync() method. • if the discount applied to orderitemsummaries that have been fulfilled, process a refund. pass the postfulfillmentchangeorderid from the output representation to the createcreditmemo() method, then pass the creditmemo to the ensurerefundsasync() method. • if the discount applied to both fulfilled and unfulfilled orderitemsummaries for which payment has been captured, process both refunds. pass the postfulfillmentchangeorderid from the output representation to the createcreditmemo() method, then pass the credit memo and the totalexcessfundsamount from the output representation to the ensurerefundsasync() method. see also: createcreditmemo(ordersummaryid, creditmemoinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) adjustpreview(ordersummaryid, adjustinput) 1352apex reference guide ordersummary class createcreditmemo(ordersummaryid, creditmemoinput) create a credit memo to represent the refund for one or more change orders associated with an ordersummary. api version 48.0 requires chatter no signature public static connectapi.createcreditmemooutputrepresentation createcreditmemo(string ordersummaryid, connectapi.createcreditmemoinputrepresentation creditmemoinput) parameters ordersummaryid type: string id of the |
ordersummary. creditmemoinput type: connectapi.createcreditmemoinputrepresentation the list of change order ids. return value type: connectapi.createcreditmemooutputrepresentation createmultipleinvoices(invoicesinput) create invoices to represent the charges for one or more change orders. create invoices for change orders that increase order amounts, such as for return fees. when you ensure the refund for a return, include the invoices for any associated return fees in the request. api version 56.0 requires chatter no signature public static connectapi.createmultipleinvoicesfromchangeordersoutputrepresentation createmultipleinvoices(connectapi.createmultipleinvoicesfromchangeordersinputrepresentation invoicesinput) 1353apex reference guide ordersummary class parameters invoicesinput type: connectapi.createmultipleinvoicesfromchangeordersinputrepresentation data about the change orders to create invoices for. return value type: connectapi.createmultipleinvoicesfromchangeordersoutputrepresentation see also: ensurerefundsasync(ordersummaryid, ensurerefundsinput) createreturnorder(returnorderinput) returnitems(returnorderid, returnitemsinput) ensurefundsasync(ordersummaryid, ensurefundsinput) ensure funds for an invoice and apply them to it. if needed, capture authorized funds by sending a request to a payment provider. this method inserts a background operation into an asynchronous job queue and returns the id of that operation so you can track its status. payment gateway responses appear in the payment gateway log and do not affect the background operation status. api version 48.0 requires chatter no signature public static connectapi.ensurefundsasyncoutputrepresentation ensurefundsasync(string ordersummaryid, connectapi.ensurefundsasyncinputrepresentation ensurefundsinput) parameters ordersummaryid type: string id of the ordersummary. ensurefundsinput type: connectapi.ensurefundsasyncinputrepresentation the id of the invoice. return value type: connectapi.ensurefundsasyncoutputrepresentation 1354apex reference guide ordersummary class usage this method checks the orderpaymentsummaries associated with the specified ordersummary for funds to apply to the invoice balance following this logic: note: if multiple orderpaymentsummaries have equal balanceamount values, their order of selection is random. 1. verify that the invoice balance doesn’t exceed the total balanceamount of all the orderpaymentsummaries associated with the ordersummary. 2. if an orderpaymentsummary has a balanceamount equal to the invoice balance, apply the funds from that orderpaymentsummary. 3. if no exact match was found, apply funds from the orderpaymentsummary with the largest balanceamount. 4. if the invoice still has a balance to ensure, repeat steps 2 and 3 until the full balance is ensured or no captured funds remain. 5. if the invoice still has a balance, look for an orderpaymentsummary with an authorized amount equal to the remaining invoice balance. if one exists, capture and apply the funds from that orderpaymentsummary. 6. if no exact match was found, capture and apply funds from the orderpaymentsummary with the largest authorized amount. 7. if the invoice still has a balance to ensure, repeat steps 5 and 6 until the full balance is ensured. note: if the method creates a payment, the payment record’s clientcontext value isn’t predictable. don't use it in custom logic. see also: multipleensurefundsasync(multipleensurefundsinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) ensure refunds for a creditmemo or excess funds by sending a request to a payment provider. this method inserts a background operation into an asynchronous job queue and returns the id of that operation so you can track its status. payment gateway responses appear in the payment gateway log and do not affect the background operation status. api version 48.0 requires chatter no signature public static connectapi.ensurerefundsasyncoutputrepresentation ensurerefundsasync(string ordersummaryid, connectapi.ensurerefundsasyncinputrepresentation ensurerefundsinput) parameters ordersummaryid type: string id of the ordersummary. 1355apex reference guide ordersummary |
class ensurerefundsinput type: connectapi.ensurerefundsasyncinputrepresentation id of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. at least one is required. also includes any invoices for fees that reduce the refund amount, such as return fees. if multiple payment methods are available, you can specify how to distribute the refund. return value type: connectapi.ensurerefundsasyncoutputrepresentation usage this method applies the refund to the orderpaymentsummaries associated with the specified ordersummary following this logic. note: if multiple orderpaymentsummaries have equal availabletorefund amounts, their order of selection is random. 1. verify that the creditmemo balance and excess funds amount don't exceed the total availabletorefund amount of all the orderpaymentsummaries associated with the ordersummary. 2. if sequences is specified, follow these steps. a. traverse the sequences list in order and apply the specified refund amounts to the specified orderpaymentsummaries. b. if the specified creditmemo and excess funds are fully refunded, or if isallowpartial is true, then the action stops here. 3. if a creditmemo is specified, follow these steps. a. if an orderpaymentsummary has an availabletorefund amount matching the creditmemo’s remaining balance, apply the refund to that payment. b. if no exact match was found, apply the refund to the orderpaymentsummary with the largest availabletorefund amount. c. if the creditmemo has any remaining balance, repeat steps a and b until that balance is fully refunded. 4. if an excess funds amount is specified, follow these steps. a. examine those orderpaymentsummaries. if one has an availabletorefund amount matching the excess funds amount, apply the refund to that orderpaymentsummary. b. if no exact match was found, apply the refund to the orderpaymentsummary with the largest availabletorefund amount. c. if any excess funds amount remains, repeat steps a and b until it’s fully refunded. note: if the method creates a refund, the refund record’s clientcontext value isn’t predictable. don't use it in custom logic. see also: createreturnorder(returnorderinput) returnitems(returnorderid, returnitemsinput) createmultipleinvoices(invoicesinput) 1356apex reference guide ordersummary class multipleensurefundsasync(multipleensurefundsinput) ensure and apply funds for one or more invoices. if needed, capture authorized funds by sending a request to a payment provider. this method inserts a background operation into an asynchronous job queue and returns the id of that operation so you can track its status. payment gateway responses appear in the payment gateway log and do not affect the background operation status. api version 56.0 requires chatter no signature public static connectapi.multipleasyncoutputrepresentation multipleensurefundsasync(connectapi.multipleensurefundsasyncinputrepresentation multipleensurefundsinput) parameters multipleensurefundsinput type: connectapi.multipleensurefundsasyncinputrepresentation list of invoices and the associated ordersummaries. return value type: connectapi.multipleasyncoutputrepresentation usage for each invoice in the request, this method checks the orderpaymentsummaries associated with the specified ordersummary for funds to apply to the invoice balance following this logic. note: if multiple orderpaymentsummaries have equal balanceamount values, their order of selection is random. 1. verify that the invoice balance doesn’t exceed the total balanceamount of all the orderpaymentsummaries associated with the ordersummary. 2. if an orderpaymentsummary has a balanceamount equal to the invoice balance, apply the funds from that orderpaymentsummary. 3. if no exact match was found, apply funds from the orderpaymentsummary with the largest balanceamount. 4. if the invoice still has a balance to ensure, repeat steps 2 and 3 until the full balance is ensured or no captured funds remain. 5. if the invoice still has a balance, look for an orderpaymentsummary with an authorized amount equal to the remaining invoice balance. if one exists, capture and apply the funds from that orderpaymentsummary. 6. if no exact match was found, capture and apply funds from the orderpaymentsummary with the largest authorized amount. |
7. if the invoice still has a balance to ensure, repeat steps 5 and 6 until the full balance is ensured. 1357apex reference guide ordersummary class note: if the method creates a payment, the payment record’s clientcontext value isn’t predictable. don't use it in custom logic. see also: ensurefundsasync(ordersummaryid, ensurefundsinput) previewcancel(ordersummaryid, changeinput) retrieve the expected change order values for canceling one or more orderitemsummaries from an ordersummary, without actually executing the cancel. api version 48.0 requires chatter no signature public static connectapi.previewcanceloutputrepresentation previewcancel(string ordersummaryid, connectapi.changeinputrepresentation changeinput) parameters ordersummaryid type: string id of the ordersummary. changeinput type: connectapi.changeinputrepresentation a list of changes to orderitemsummaries that make up an order change, such as a cancel or return. return value type: connectapi.previewcanceloutputrepresentation see also: createcreditmemo(ordersummaryid, creditmemoinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) submitcancel(ordersummaryid, changeinput) previewreturn(ordersummaryid, changeinput) retrieve the expected change order values for a simple return of one or more orderitemsummaries from an ordersummary, without actually executing the return. 1358apex reference guide ordersummary class api version 48.0 requires chatter no signature public static connectapi.previewreturnoutputrepresentation previewreturn(string ordersummaryid, connectapi.changeinputrepresentation changeinput) parameters ordersummaryid type: string id of the ordersummary. changeinput type: connectapi.changeinputrepresentation a list of changes to orderitemsummaries that make up an order change, such as a cancel or return. return value type: connectapi.previewreturnoutputrepresentation see also: createcreditmemo(ordersummaryid, creditmemoinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) submitreturn(ordersummaryid, changeinput) submitcancel(ordersummaryid, changeinput) cancel one or more orderitemsummaries from an ordersummary, and create a corresponding change order. api version 48.0 requires chatter no signature public static connectapi.submitcanceloutputrepresentation submitcancel(string ordersummaryid, connectapi.changeinputrepresentation changeinput) 1359apex reference guide ordersummary class parameters ordersummaryid type: string id of the ordersummary. changeinput type: connectapi.changeinputrepresentation a list of changes to orderitemsummaries that make up an order change, such as a cancel or return. return value type: connectapi.submitcanceloutputrepresentation see also: createcreditmemo(ordersummaryid, creditmemoinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) previewcancel(ordersummaryid, changeinput) submitreturn(ordersummaryid, changeinput) return one or more orderitemsummaries from an ordersummary, and create a corresponding change order. this return is a simple return that creates a change order but not a returnorder. api version 48.0 requires chatter no signature public static connectapi.submitreturnoutputrepresentation submitreturn(string ordersummaryid, connectapi.changeinputrepresentation changeinput) parameters ordersummaryid type: string id of the ordersummary. changeinput type: connectapi.changeinputrepresentation a list of changes to orderitemsummaries that make up an order change, such as a cancel or return. return value type: connectapi.submitreturnoutputrepresentation 1360apex reference guide ordersummarycreation class usage after submitting a return, process a refund. pass the changeorderid from the output representation to the createcreditmemo() method, then pass the credit memo to the ensurerefundsasync() method. see also: createcreditmemo(ordersummaryid, creditmemoinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) previewreturn(ordersummaryid, changeinput) order |
summarycreation class create order summaries in order management. namespace connectapi ordersummarycreation methods the following are methods for ordersummarycreation. all methods are static. in this section: createordersummary(ordersummaryinput) create an ordersummary based on an order. that order is considered the original order for the ordersummary. subsequent change orders that apply to the ordersummary are also represented as orders. you can specify whether the order is managed in salesforce order management or by an external system. most salesforce order management apis can run only on orders that it manages. createordersummary(ordersummaryinput) create an ordersummary based on an order. that order is considered the original order for the ordersummary. subsequent change orders that apply to the ordersummary are also represented as orders. you can specify whether the order is managed in salesforce order management or by an external system. most salesforce order management apis can run only on orders that it manages. api version 48.0 requires chatter no signature public static connectapi.ordersummaryoutputrepresentation createordersummary(connectapi.ordersummaryinputrepresentation ordersummaryinput) 1361apex reference guide organization class parameters ordersummaryinput type: connectapi.ordersummaryinputrepresentation input object that wraps the id of the source order. return value type: connectapi.ordersummaryoutputrepresentation organization class access information about an org. namespace connectapi organization methods the following are methods for organization. all methods are static. in this section: getsettings() get information about the context user and the org, including which features are enabled. getsettings() get information about the context user and the org, including which features are enabled. api version 28.0 requires chatter no signature public static connectapi. organizationsettings getsettings() return value type: connectapi.organizationsettings pardotbusinessunitcontext class get the pardot business units the context user has access to. 1362apex reference guide pardotbusinessunitcontext class namespace connectapi pardotbusinessunitcontext methods the following are methods for pardotbusinessunitcontext. all methods are static. in this section: getbusinessunitcontext() get the pardot business units the context user has access to. getbusinessunitcontextbyiscurrentstatus(iscurrent) get the pardot business units the context user has access to by specifying the current status. getbusinessunitcontext() get the pardot business units the context user has access to. api version 55.0 requires chatter no signature public static connectapi.pardotbusinessunitcontextoutput getbusinessunitcontext() return value type: connectapi.pardotbusinessunitcontextoutput getbusinessunitcontextbyiscurrentstatus(iscurrent) get the pardot business units the context user has access to by specifying the current status. api version 55.0 requires chatter no 1363apex reference guide payments class signature public static connectapi.pardotbusinessunitcontextoutput getbusinessunitcontextbyiscurrentstatus(boolean iscurrent) parameters iscurrent type: boolean specifies whether to return only the business unit that’s selected as the context user's current business unit context in the business unit switcher of the pardot lightning app (true) or to return only the business units that aren’t selected as the context user's current business unit context (false). return value type: connectapi.pardotbusinessunitcontextoutput payments class authorize a payment, capture an authorized payment, and refund an authorized payment. namespace connectapi payments methods the following are methods for payments. all methods are static. in this section: authorize(authorizepayment) authorize a payment. postauth(postauthorizepayment) confirms that the merchant is ready to capture payment of an existing pre-authorized transaction. reverseauthorization(authreversalinput, authorizationid) reverses a payment authorization. capture(authcaptureinput, authorizationid) capture an authorized payment. refund(referencedrefundinput, paymentid) refund an authorized payment. sale(sale) captures a payment without any prior authorization and creates a payment entity. the payment sale transaction is a combination of an authorize transaction and capture transaction. this payment sale method allows merchants to request that the funds are trans |
ferred to the merchant account in a single command, with no further action (such as charging a credit card) from the merchant. 1364apex reference guide payments class tokenizepaymentmethod(tokenizepaymentmethodinput) method to take the input parameters of the payment method you want to tokenize and then pass them to the payment gateway's tokenization service. the results of the tokenization request are returned as a response from the payment gateway. authorize(authorizepayment) authorize a payment. api version 51.0 requires chatter no signature global static connectapi.authorizationresponse authorize(connectapi.authorizationrequest authorizepayment) parameters authorizepayment type: connectapi.authorizationrequest represents a payment authorization. return value type: connectapi.authorizationresponse postauth(postauthorizepayment) confirms that the merchant is ready to capture payment of an existing pre-authorized transaction. api version 54.0 requires chatter no signature global static connectapi.postauthorizationresponse postauth(connectapi.postauthrequest postauthorizepayment) 1365apex reference guide payments class parameters postauthorizepayment type: connectapi.postauthrequest information about the payment, payment method, and payment gateway from the original payment authorization. return value type: connectapi.postauthorizationresponse reverseauthorization(authreversalinput, authorizationid) reverses a payment authorization. api version 51.0 requires chatter no signature global static connectapi.authorizationreversalresponse reverseauthorization(connectapi.authorizationreversalrequest authreversalinput, string authorizationid) parameters authreversalinput type: connectapi.authorizationreversalrequest input information for the payment authorization reversal. authorizationid type: string the id of the payment authorization to be reversed. return value type: connectapi.authorizationreversalresponse capture(authcaptureinput, authorizationid) capture an authorized payment. to access payments methods, you need the following permissions. • salesforce order management license • paymentsapiuser user permission. this permission is available with the salesforce order management license. your salesforce admin assigns it to your profile. 1366apex reference guide payments class api version 50.0 requires chatter no signature global static connectapi.captureresponse capture(connectapi.capturerequest authcaptureinput, string authorizationid) parameters authcaptureinput type: connectapi.capturerequest a connectapi.capturerequest object with information about the payment capture. authorizationid type: string id of the payment authorization. required. return value type: connectapi.captureresponse refund(referencedrefundinput, paymentid) refund an authorized payment. to access payments methods, you need the following permissions. • salesforce order management license • paymentsapiuser user permission. this permission is available with the salesforce order management license. your salesforce admin assigns it to your profile. api version 50.0 requires chatter no signature global static connectapi.referencedrefundresponse refund(connectapi.referencedrefundrequest referencedrefundinput, string paymentid) 1367apex reference guide payments class parameters referencedrefundinput type: connectapi.referencedrefundrequest a connectapi.referencedrefundrequest object with information about the refund. paymentid type: string id of the payment to be refunded. required. return value type: connectapi.referencedrefundresponse sale(sale) captures a payment without any prior authorization and creates a payment entity. the payment sale transaction is a combination of an authorize transaction and capture transaction. this payment sale method allows merchants to request that the funds are transferred to the merchant account in a single command, with no further action (such as charging a credit card) from the merchant. api version 54.0 requires chatter no signature global static connectapi.saleresponse sale(connectapi.salerequest sale) parameters sale type: connectapi.salerequest payment sale input class. return value type: connectapi.saleresponse tokenizepaymentmethod(tokenizepaymentmethodinput) method to take the input parameters |
of the payment method you want to tokenize and then pass them to the payment gateway's tokenization service. the results of the tokenization request are returned as a response from the payment gateway. api version 52.0 1368apex reference guide personalization class requires chatter no signature global static connectapi.paymentmethodtokenizationresponse tokenizepaymentmethod(connectapi.paymentmethodtokenizationrequest tokenizepaymentmethodinput) parameters tokenizepaymentmethodinput type: connectapi.paymentmethodtokenizationrequest information about the payment method to be tokenized. return value type: connectapi.paymentmethodtokenizationresponse usage accepts input parameters representing a payment method and passes them in a tokenization request to the payment gateway. the results of the tokenization request are returned as a response from the payment gateway. if the tokenization was successful, the response contains the tokenized value and details about the tokenization process. otherwise, the response contains an error message and details about the error. example connectapi.paymentmethodtokenizationrequest request = new connectapi.paymentmethodtokenizationrequest(); request.paymentgatewayid = ‘0b0xx0000001ja5aae’; connectapi.cardpaymentmethodrequest cpmrequest = new connectapi.cardpaymentmethodrequest(); cpmrequest.cardholdername = ‘jo manager’; cpmrequest.expirymonth = 11; cpmrequest.expiryyear = 2222; cpmrequest.cardnumber = ‘4111111111111111’; cpmrequest.cvv = ‘111’; cpmrequest.cardcategory = connectapi.cardcategory.creditcard; cpmrequest.cardtype = connectapi.cardtype.visa.name(); request.cardpaymentmethod = cpmrequest; connectapi.paymentmethodtokenizationresponse response = connectapi.payments.tokenizepaymentmethod(request); personalization class get assigned personalization audiences that match the user context. create, get, update, and delete an audience. get personalization targets that match the user context, based on the assigned audiences that include the user. create and update targets. get and delete a target. 1369apex reference guide personalization class namespace connectapi note: personalization varies what the user can see in the browser but doesn’t secure data in any way. to prevent users accessing sensitive data, use standard salesforce security features, such as sharing rules and permission sets. personalization methods the following are methods for personalization. all methods are static. in this section: createaudience(communityid, audience) create an audience. createtargets(communityid, target) create targets. deleteaudience(communityid, audienceid) delete an audience. deletetarget(communityid, targetid) delete a target. getaudience(communityid, audienceid, includeaudiencecriteria) get an audience. getaudiencebatch(communityid, audienceids) get audience information for a comma-separated list of audience ids. getaudiences(communityid, ipaddress, domain, userid, publishstatus, includeaudiencecriteria, targettypes, recordid) get a list of assigned audiences that match the user context and record information. getaudiences(communityid, ipaddress, domain, userid, publishstatus, includeaudiencecriteria, targettypes) get a list of assigned audiences that match the user context. gettarget(communityid, targetid) get a target. gettargetbatch(communityid, targetids) get target information for a comma-separated list of target ids. gettargets(communityid, ipaddress, domain, userid, publishstatus, recordid, targettypes, includeaudience, includeallmatchingtargetswithingroup, groupnames) get a list of targets that match the user context, based on the assigned audiences that include the user. updateaudience(communityid, audienceid, audience) update an audience. updatetargets(communityid, target) update targets. createaudience(communityid, audience) create an audience. 1370apex reference guide personalization class api version 48.0 requires chatter no signature public static connectapi.audience createaudience(string communityid, connectapi.audienceinput audience) |
parameters communityid type: string id of the experience cloud site. audience type: connectapi.audienceinput a connectapi.audienceinput object that defines the audience. return value type: connectapi.audience createtargets(communityid, target) create targets. api version 48.0 requires chatter no signature public static connectapi.targetcollection createtargets(string communityid, connectapi.targetcollectioninput target) parameters communityid type: string id of the experience cloud site. 1371apex reference guide personalization class target type: connectapi.targetcollectioninput a connectapi.targetcollectioninput object that defines the targets. return value type: connectapi.targetcollection deleteaudience(communityid, audienceid) delete an audience. api version 48.0 requires chatter no signature public static void deleteaudience(string communityid, string audienceid) parameters communityid type: string id of the experience cloud site. audienceid type: string id of the audience. return value type: void deletetarget(communityid, targetid) delete a target. api version 48.0 requires chatter no 1372apex reference guide personalization class signature public static void deletetarget(string communityid, string targetid) parameters communityid type: string id of the experience cloud site. targetid type: string id of the target. return value type: void getaudience(communityid, audienceid, includeaudiencecriteria) get an audience. api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.audience getaudience(string communityid, string audienceid, boolean includeaudiencecriteria) parameters communityid type: string id of the experience cloud site. audienceid type: string id of the audience. includeaudiencecriteria type: boolean 1373apex reference guide personalization class specifies whether to include audience criteria (true) or not (false). if unspecified, defaults to false. return value type: connectapi.audience getaudiencebatch(communityid, audienceids) get audience information for a comma-separated list of audience ids. api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.batchresult[] getaudiencebatch(string communityid, list<string> audienceids) parameters communityid type: string id of the experience cloud site. audienceids type: list<string> comma-separated list of audience ids. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.audience object and errors for audiences that didn’t load. getaudiences(communityid, ipaddress, domain, userid, publishstatus, includeaudiencecriteria, targettypes, recordid) get a list of assigned audiences that match the user context and record information. 1374apex reference guide personalization class api version 51.0 available to guest users 51.0 requires chatter no signature public static connectapi.audiencecollection getaudiences(string communityid, string ipaddress, string domain, string userid, connectapi.publishstatus publishstatus, boolean includeaudiencecriteria, list<string> targettypes, string recordid) parameters communityid type: string id for an experience cloud site, internal, or null. ipaddress type: string ip address of the user. if null, no audiences with location criteria are returned. domain type: string name of the user’s salesforce custom domain. if null, no audiences with domain criteria are returned. userid type: string id of the user. if null, defaults to the id of the context user. publishstatus type: connectapi.publishstatus publish status of the audience. values are: • draft • live if null, defaults to live. includeaudiencecriteria type: boolean specifies whether to include audience criteria (true) or not (false). if unspecified, defaults to false. targettypes type: list<string> |
comma-separated list of target types to filter the results. supported values include: • experiencevariation (version 48.0 and later) 1375apex reference guide personalization class • custom object api names, such as customobjectname__c (version 48.0 and later) • navigationlinkset (version 49.0 and later) • topic (version 49.0 and later) • collaborationgroup (version 49.0 and later) • knowledgearticle (version 49.0 and later) • contentdocument (version 49.0 and later) • managedcontent (version 49.0 and later) • report (version 49.0 and later) • dashboard (version 49.0 and later) if null, all target types are returned. recordid type: string id of the record for field based criteria. if null, all applicable audiences with field based criteria are returned. return value type: connectapi.audiencecollection getaudiences(communityid, ipaddress, domain, userid, publishstatus, includeaudiencecriteria, targettypes) get a list of assigned audiences that match the user context. api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.audiencecollection getaudiences(string communityid, string ipaddress, string domain, string userid, connectapi.publishstatus publishstatus, boolean includeaudiencecriteria, list<string> targettypes) parameters communityid type: string id of the experience cloud site. 1376apex reference guide personalization class ipaddress type: string ip address of the user. if null, no audiences with location criteria are returned. domain type: string name of the user’s salesforce custom domain. if null, no audiences with domain criteria are returned. userid type: string id of the user. if null, defaults to the id of the context user. publishstatus type: connectapi.publishstatus publish status of the audience. values are: • draft • live if null, defaults to live. includeaudiencecriteria type: boolean specifies whether to include audience criteria (true) or not (false). if unspecified, defaults to false. targettypes type: list<string> comma-separated list of target types to filter the results. supported values include: • experiencevariation (version 48.0 and later) • custom object api names, such as customobjectname__c (version 48.0 and later) • navigationlinkset (version 49.0 and later) • topic (version 49.0 and later) • collaborationgroup (version 49.0 and later) • knowledgearticle (version 49.0 and later) • contentdocument (version 49.0 and later) • managedcontent (version 49.0 and later) • report (version 49.0 and later) • dashboard (version 49.0 and later) if null, all target types are returned. return value type: connectapi.audiencecollection gettarget(communityid, targetid) get a target. 1377apex reference guide personalization class api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.target gettarget(string communityid, string targetid) parameters communityid type: string id of the experience cloud site. targetid type: string id of the target. return value type: connectapi.target gettargetbatch(communityid, targetids) get target information for a comma-separated list of target ids. api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.batchresult[] gettargetbatch(string communityid, list<string> targetids) 1378apex reference guide personalization class parameters communityid type: string id for an experience cloud site, internal, or null. targetids type: list<string> comma-separated list of target ids. return value type: connectapi.batchresult the connectapi.batchresult.getresult() method returns a connectapi.target object and errors for targets that didn’t load. gettargets(communityid, ipaddress, domain, userid, publishstatus, recordid, targettypes, includeaudience, include |
allmatchingtargetswithingroup, groupnames) get a list of targets that match the user context, based on the assigned audiences that include the user. api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.targetcollection gettargets(string communityid, string ipaddress, string domain, string userid, connectapi.publishstatus publishstatus, string recordid, list<string> targettypes, boolean includeaudience, boolean includeallmatchingtargetswithingroup, list<string> groupnames) parameters communityid type: string id of the experience cloud site. ipaddress type: string ip address of the user. if null, no audiences with location criteria are returned. 1379apex reference guide personalization class domain type: string name of the user’s salesforce custom domain. if null, no audiences with domain criteria are returned. userid type: string id of the user. if null, the default is the id of the context user. publishstatus type: connectapi.publishstatus publish status of the target. values are: • draft • live recordid type: string id of the record, if you want to specify field based criteria in audiences. targettypes type: list<string> comma-separated list of target types to filter the results. supported values include: • experiencevariation (version 48.0 and later) • custom object api names, such as customobjectname__c (version 48.0 and later) • navigationlinkset (version 49.0 and later) • topic (version 49.0 and later) • collaborationgroup (version 49.0 and later) • knowledgearticle (version 49.0 and later) • contentdocument (version 49.0 and later) • managedcontent (version 49.0 and later) • report (version 49.0 and later) • dashboard (version 49.0 and later) if null, all target types are returned. includeaudience type: boolean specifies whether to include the matching audience (true) or not (false). if null, the default is false. includeallmatchingtargetswithingroup type: boolean specifies whether to include all the matching targets within a target group (true) or not (false). if null, the default is false. if false, the first matching target within each group, based on priority within the group, is returned. groupnames type: list<string> a comma-separated list of group names. groups bundle related target and audience pairs. 1380apex reference guide personalization class return value type: connectapi.targetcollection updateaudience(communityid, audienceid, audience) update an audience. api version 48.0 requires chatter no signature public static connectapi.audience updateaudience(string communityid, string audienceid, connectapi.audienceinput audience) parameters communityid type: string id of the experience cloud site. audienceid type: string id of the audience. audience type: connectapi.audienceinput a connectapi.audienceinput object that defines the updates to the audience. return value type: connectapi.audience updatetargets(communityid, target) update targets. api version 48.0 requires chatter no 1381apex reference guide pick ticket class signature public static connectapi.targetcollection updatetargets(string communityid, connectapi.targetcollectionupdateinput target) parameters communityid type: string id of the experience cloud site. target type: connectapi.targetcollectionupdateinput a connectapi.targetcollectionupdateinput object that defines the updates for the targets. return value type: connectapi.targetcollection pick ticket class create tickets to fulfill orders. namespace connectapi pick ticket methods these methods are for pick tickets. all methods are static. in this section: distributepickedquantities(distributepickedquantitiesinput) distribute picked quantities among orders in a pick ticket. distributepickedquantities(distributepickedquantitiesinput) distribute picked quantities among orders in a pick ticket. api version 58.0 requires chatter no 1382 |
apex reference guide questionandanswers class signature public static connectapi.distributepickedquantitiesoutputrepresentation distributepickedquantities(connectapi.distributepickedquantitiesinputrepresentation distributepickedquantitiesinput) parameters distributepickedquantitiesinput type: connectapi.distributepickedquantitiesinputrepresentation input to distribute picked quantities. return value type: connectapi.distributepickedquantitiesoutputrepresentation questionandanswers class access question and answers suggestions. namespace connectapi in this section: questionandanswers methods questionandanswers methods the following are methods for questionandanswers. all methods are static. in this section: getsuggestions(communityid, q, subjectid, includearticles, maxresults) get question and answers suggestions. settestgetsuggestions(communityid, q, subjectid, includearticles, maxresults, result) register a connectapi.questionandanswerssuggestions object to be returned when getsuggestions is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. updatequestionandanswers(communityid, feedelementid, questionandanswerscapability) choose or change the best answer for a question. getsuggestions(communityid, q, subjectid, includearticles, maxresults) get question and answers suggestions. api version 32.0 1383apex reference guide questionandanswers class requires chatter no signature public static connectapi.questionandanswerssuggestions getsuggestions(string communityid, string q, string subjectid, boolean includearticles, integer maxresults) 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. subjectid type: string specify a subject id to search only questions on that object. if the id is a topic or a user, the id is ignored. includearticles type: boolean specify true to include knowledge articles in the search results. to return only questions, specify false. maxresults type: integer the maximum number of results to return for each type of item. possible values are 1–10. the default value is 5. return value type: connectapi.questionandanswerssuggestions 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: settestgetsuggestions(communityid, q, subjectid, includearticles, maxresults, result) apex developer guide: testing connectapi code settestgetsuggestions(communityid, q, subjectid, includearticles, maxresults, result) register a connectapi.questionandanswerssuggestions object to be returned when getsuggestions is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. 1384apex reference guide questionandanswers class api version 32.0 signature public static void settestgetsuggestions(string communityid, string q, string subjectid, boolean includearticles, integer maxresults, connectapi.questionandanswerssuggestions 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. subjectid type: string specify a subject id to search only questions on that object. if the id is a topic or a user, the id is ignored. includearticles type: boolean specify true to include knowledge articles in the search results. to return only questions, specify false. maxresults type: integer the maximum number of results to return for each type of item. possible values are 1–10. the default value is 5. result type: connectapi.questionandanswerssuggestions object containing test data. return value type: void see also: getsuggestions(communityid, q, subjectid, includearticles, maxresults) apex developer guide: testing connectapi code updatequestionandanswers( |
communityid, feedelementid, questionandanswerscapability) choose or change the best answer for a question. 1385apex reference guide recommendations class api version 32.0 requires chatter yes signature public static connectapi.questionandanswerscapability updatequestionandanswers(string communityid, string feedelementid, connectapi.questionandanswerscapabilityinput questionandanswerscapability) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. questionandanswerscapability type: connectapi.questionandanswerscapabilityinput specify the best answer (comment id) for the question. return value type: connectapi.questionandanswerscapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. example connectapi.questionandanswerscapabilityinput qainput = new connectapi.questionandanswerscapabilityinput(); qainput.bestanswerid = '0d7d00000000lmakay'; connectapi.questionandanswerscapability qa = connectapi.questionandanswers.updatequestionandanswers(null, '0d5d0000000xzjj', qainput); recommendations class get and reject chatter, custom, and static recommendations. create, get, update, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. for next best action recommendations, see nextbestaction class. 1386apex reference guide recommendations class namespace connectapi recommendations methods the following are methods for recommendations. all methods are static. in this section: createrecommendationaudience(communityid, recommendationaudience) create an audience for a custom recommendation. createrecommendationaudience(communityid, name) create an audience for a custom recommendation. createrecommendationdefinition(communityid, recommendationdefinition) create a custom recommendation definition. createrecommendationdefinition(communityid, name, title, actionurl, actionurlname, explanation) create a custom recommendation definition with the specified parameters. createscheduledrecommendation(communityid, scheduledrecommendation) create a scheduled custom recommendation. createscheduledrecommendation(communityid, recommendationdefinitionid, rank, enabled, recommendationaudienceid, channel) create a scheduled custom recommendation with the specified parameters. deleterecommendationaudience(communityid, recommendationaudienceid) delete a custom recommendation audience. deleterecommendationdefinition(communityid, recommendationdefinitionid) delete a custom recommendation definition. deleterecommendationdefinitionphoto(communityid, recommendationdefinitionid) delete a custom recommendation definition photo. deletescheduledrecommendation(communityid, scheduledrecommendationid, deletedefinitioniflast) delete a scheduled custom recommendation. getrecommendationaudience(communityid, recommendationaudienceid) get information about a custom recommendation audience. getrecommendationaudiencemembership(communityid, recommendationaudienceid) get the members of a custom recommendation audience. getrecommendationaudiencemembership(communityid, recommendationaudienceid, pageparam, pagesize) get a page of custom recommendation audience members. getrecommendationaudiences(communityid) get custom recommendation audiences. getrecommendationaudiences(communityid, pageparam, pagesize) get a page of custom recommendation audiences. getrecommendationdefinition(communityid, recommendationdefinitionid) get a custom recommendation definition. 1387apex reference guide recommendations class getrecommendationdefinitionphoto(communityid, recommendationdefinitionid) get a custom recommendation definition photo. getrecommendationdefinitions(communityid) get custom recommendation definitions. getrecommendationforuser(communityid, userid, action, objectid) get the chatter, custom, or static recommendation for the context user for the specified action and object id. getrecommendationsforuser(communityid, userid, contextaction, contextobjectid, channel, maxresults) get the chatter recommendations, such as user, group, file, article, record, and topic recommendations for the context user. get the custom and static recommendations for the context user. getrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, channel, maxresults) get the chatter, custom, and static recommendations for the context user for the specified action. getrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, channel, |
maxresults) get the chatter, custom, and static recommendations for the context user for the specified action and object category. getscheduledrecommendation(communityid, scheduledrecommendationid) get a scheduled custom recommendation. getscheduledrecommendations(communityid, channel) get scheduled custom recommendations. rejectrecommendationforuser(communityid, userid, action, objectid) reject a chatter, custom, or static recommendation for the context user for the specified action and object id. rejectrecommendationforuser(communityid, userid, action, objectenum) reject a static recommendation for the context user. updaterecommendationaudience(communityid, recommendationaudienceid, recommendationaudience) update a custom recommendation audience. updaterecommendationdefinition(communityid, recommendationdefinitionid, name, title, actionurl, actionurlname, explanation) update a custom recommendation definition with the specified parameters. updaterecommendationdefinition(communityid, recommendationdefinitionid, recommendationdefinition) update a custom recommendation definition. updaterecommendationdefinitionphoto(communityid, recommendationdefinitionid, fileupload) update a custom recommendation definition photo with a file that hasn’t been uploaded. updaterecommendationdefinitionphoto(communityid, recommendationdefinitionid, fileid, versionnumber) update a custom recommendation definition photo with an uploaded file. updaterecommendationdefinitionphotowithattributes(communityid, recommendationdefinitionid, photo) update a custom recommendation definition photo with an uploaded file that requires cropping. updaterecommendationdefinitionphotowithattributes(communityid, recommendationdefinitionid, photo, fileupload) update a custom recommendation definition photo with a file that hasn’t been uploaded and requires cropping. updatescheduledrecommendation(communityid, scheduledrecommendationid, scheduledrecommendation) update a scheduled custom recommendation. updatescheduledrecommendation(communityid, scheduledrecommendationid, rank, enabled, recommendationaudienceid) update a scheduled custom recommendation with the specified parameters. 1388apex reference guide recommendations class createrecommendationaudience(communityid, recommendationaudience) create an audience for a custom recommendation. api version 35.0 requires chatter no signature public static connectapi.recommendationaudience createrecommendationaudience(string communityid, connectapi.recommendationaudienceinput recommendationaudience) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationaudience type: connectapi.recommendationaudienceinput a connectapi.recommendationaudienceinput object. return value type: connectapi.recommendationaudience usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. createrecommendationaudience(communityid, name) create an audience for a custom recommendation. api version 35.0 requires chatter no 1389apex reference guide recommendations class signature public static connectapi.recommendationaudience createrecommendationaudience(string communityid, string name) parameters communityid type: string id for an experience cloud site, internal, or null. name type: string name of the audience. return value type: connectapi.recommendationaudience usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. createrecommendationdefinition(communityid, recommendationdefinition) create a custom recommendation definition. api version 35.0 requires chatter no signature public static connectapi.recommendationdefinition createrecommendationdefinition(string communityid, connectapi.recommendationdefinitioninput recommendationdefinition) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinition type: connectapi.recommendationdefinitioninput 1390apex reference guide recommendations class a connectapi.recommendationdefinitioninput object. return value type: connectapi.recommendationdefinition usage recommendation definitions allow you to create custom recommendations that appear in experience cloud sites, encouraging users to watch videos |
, take training and more. community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. these recommendations appear by default on the customer service template. they appear on the home and question detail pages and in the feed in salesforce mobile web. they also appear anywhere community managers add recommendations using experience builder in the customer service template. so that users don’t see the same recommendations all the time, salesforce periodically removes and brings back custom recommendations that haven’t been accepted or dismissed. createrecommendationdefinition(communityid, name, title, actionurl, actionurlname, explanation) create a custom recommendation definition with the specified parameters. api version 35.0 requires chatter no signature public static connectapi.recommendationdefinition createrecommendationdefinition(string communityid, string name, string title, string actionurl, string actionurlname, string explanation) parameters communityid type: string id for an experience cloud site, internal, or null. name type: string name of the custom recommendation definition. the name is displayed in setup. 1391apex reference guide recommendations class title type: string title of the custom recommendation definition. actionurl type: string url for acting on the custom recommendation, for example, the url to join a group. actionurlname type: string text label for the action url in the user interface, for example, “launch.” explanation type: string explanation, or body, of the custom recommendation. return value type: connectapi.recommendationdefinition usage recommendation definitions allow you to create custom recommendations that appear in experience cloud sites, encouraging users to watch videos, take training and more. community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. these recommendations appear by default on the customer service template. they appear on the home and question detail pages and in the feed in salesforce mobile web. they also appear anywhere community managers add recommendations using experience builder in the customer service template. so that users don’t see the same recommendations all the time, salesforce periodically removes and brings back custom recommendations that haven’t been accepted or dismissed. createscheduledrecommendation(communityid, scheduledrecommendation) create a scheduled custom recommendation. api version 35.0 requires chatter no 1392apex reference guide recommendations class signature public static connectapi.scheduledrecommendation createscheduledrecommendation(string communityid, connectapi.scheduledrecommendationinput scheduledrecommendation) parameters communityid type: string id for an experience cloud site, internal, or null. scheduledrecommendation type: connectapi.scheduledrecommendationinput a connectapi.scheduledrecommendationinput object. return value type: connectapi.scheduledrecommendation usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. createscheduledrecommendation(communityid, recommendationdefinitionid, rank, enabled, recommendationaudienceid, channel) create a scheduled custom recommendation with the specified parameters. api version 36.0 requires chatter no signature public static connectapi.scheduledrecommendation createscheduledrecommendation(string communityid, string recommendationdefinitionid, integer rank, boolean enabled, string recommendationaudienceid, connectapi.recommendationchannel channel) parameters communityid type: string id for an experience cloud site, internal, or null. 1393apex reference guide recommendations class recommendationdefinitionid type: string id of the custom recommendation definition. rank type: integer relative rank of the scheduled custom recommendation indicated by ascending whole numbers starting with 1. setting the rank |
is comparable to an insertion into an ordered list. the scheduled custom recommendation is inserted into the position specified by the rank. the rank of all the scheduled custom recommendations after it is pushed down. see ranking scheduled custom recommendations example. if the specified rank is larger than the size of the list, the scheduled custom recommendation is put at the end of the list. the rank of the scheduled custom recommendation is the size of the list, instead of the one specified. if a rank is not specified, the scheduled custom recommendation is put at the end of the list. enabled type: boolean indicates whether scheduling is enabled. if true, the custom recommendation is enabled and appears in experience cloud sites. if false, custom recommendations in feeds in salesforce mobile web aren’t removed, but no new custom recommendations appear. in customer service and partner central sites, disabled custom recommendations no longer appear. recommendationaudienceid type: string id of the custom recommendation definition that this scheduled recommendation schedules. channel type: connectapi.recommendationchannel a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. use these channel values; you can’t rename or create other channels. return value type: connectapi.scheduledrecommendation 1394apex reference guide recommendations class usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. ranking scheduled custom recommendations example if you have these scheduled custom recommendations: scheduled recommendations rank scheduledrecommendationa 1 scheduledrecommendationb 2 scheduledrecommendationc 3 and you include this information in the scheduled custom recommendation input: scheduled recommendation rank scheduledrecommendationd 2 the result is: scheduled recommendation rank scheduledrecommendationa 1 scheduledrecommendationd 2 scheduledrecommendationb 3 scheduledrecommendationc 4 deleterecommendationaudience(communityid, recommendationaudienceid) delete a custom recommendation audience. api version 35.0 requires chatter no 1395apex reference guide recommendations class signature public static void deleterecommendationaudience(string communityid, string recommendationaudienceid) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationaudienceid type: string id of the custom recommendation audience. return value type: void usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. deleterecommendationdefinition(communityid, recommendationdefinitionid) delete a custom recommendation definition. api version 35.0 requires chatter no signature public static void deleterecommendationdefinition(string communityid, string recommendationdefinitionid) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string 1396apex reference guide recommendations class id of the custom recommendation definition. return value type: void usage community managers can access, create |
, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. deleterecommendationdefinitionphoto(communityid, recommendationdefinitionid) delete a custom recommendation definition photo. api version 35.0 requires chatter yes signature public static void deleterecommendationdefinitionphoto(string communityid, string recommendationdefinitionid) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. return value type: void usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. 1397apex reference guide recommendations class deletescheduledrecommendation(communityid, scheduledrecommendationid, deletedefinitioniflast) delete a scheduled custom recommendation. api version 35.0 requires chatter no signature public static void deletescheduledrecommendation(string communityid, string scheduledrecommendationid, boolean deletedefinitioniflast) parameters communityid type: string id for an experience cloud site, internal, or null. scheduledrecommendationid type: string id of the scheduled custom recommendation. deletedefinitioniflast type: boolean if true and if this is the last scheduled custom recommendation of a custom recommendation definition, deletes the custom recommendation definition. default is false. return value type: void usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. deleting a scheduled custom recommendation is comparable to a deletion in an ordered list. all scheduled custom recommendations after the deleted scheduled custom recommendation receive a new, higher rank automatically. getrecommendationaudience(communityid, recommendationaudienceid) get information about a custom recommendation audience. 1398apex reference guide recommendations class api version 35.0 requires chatter no signature public static connectapi.recommendationaudience getrecommendationaudience(string communityid, string recommendationaudienceid) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationaudienceid type: string id of the custom recommendation audience. return value type: connectapi.recommendationaudience usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. getrecommendationaudiencemembership(communityid, recommendationaudienceid) get the members of a custom recommendation audience. api version 35.0 requires chatter no signature public static connectapi.userreferencepage getrecommendationaudiencemembership(string communityid, string recommendationaudienceid) 1399apex reference guide recommendations class parameters communityid type: string id for an experience cloud site, internal, or null. recommendationaudienceid type: string id of the custom recommendation audience. return value type: connectapi.userreferencepage usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. getrecommendationaudiencemembership(communityid, recommendationaudienceid, pageparam, pagesize) get a page of custom recommendation audience members. api version 35.0 requires chatter no signature public static connectapi.userreferencepage get |
recommendationaudiencemembership(string communityid, string recommendationaudienceid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationaudienceid type: string id of the custom recommendation audience. pageparam type: integer 1400apex reference guide recommendations 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 members per page. return value type: connectapi.userreferencepage usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. getrecommendationaudiences(communityid) get custom recommendation audiences. api version 35.0 requires chatter no signature public static connectapi.recommendationaudiencepage getrecommendationaudiences(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.recommendationaudiencepage usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. 1401apex reference guide recommendations class getrecommendationaudiences(communityid, pageparam, pagesize) get a page of custom recommendation audiences. api version 35.0 requires chatter no signature public static connectapi.recommendationaudiencepage getrecommendationaudiences(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 audiences per page. return value type: connectapi.recommendationaudiencepage usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. getrecommendationdefinition(communityid, recommendationdefinitionid) get a custom recommendation definition. api version 35.0 1402apex reference guide recommendations class requires chatter no signature public static connectapi.recommendationdefinition getrecommendationdefinition(string communityid, string recommendationdefinitionid) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. return value type: connectapi.recommendationdefinition usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. getrecommendationdefinitionphoto(communityid, recommendationdefinitionid) get a custom recommendation definition photo. api version 35.0 requires chatter yes signature public static connectapi.photo getrecommendationdefinitionphoto(string communityid, string recommendationdefinitionid) parameters communityid type: string 1403apex reference guide recommendations class id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. return value type: connectapi.photo usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom |
recommendation definitions, and scheduled custom recommendations. getrecommendationdefinitions(communityid) get custom recommendation definitions. api version 35.0 requires chatter no signature public static connectapi.recommendationdefinitionpage getrecommendationdefinitions(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.recommendationdefinitionpage usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. 1404apex reference guide recommendations class getrecommendationforuser(communityid, userid, action, objectid) get the chatter, custom, or static recommendation for the context user for the specified action and object id. api version 33.0 requires chatter yes signature public static connectapi.recommendationcollection getrecommendationforuser(string communityid, string userid, connectapi.recommendationactiontype action, string objectid) 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. objectid type: string specifies the object to act on. • if action is follow, objectid is a user id, file id, record id, or topic id (version 36.0 and later). • if action is join, objectid is a group id. • if action is view, objectid is a user id, file id, group id, record id, custom recommendation id (version 34.0 and later), the enum today for static recommendations (version 35.0 and later), or an article id (version 37.0 and later). return value type: connectapi.recommendationcollection 1405apex reference guide recommendations 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: settestgetrecommendationforuser(communityid, userid, action, objectid, result) apex developer guide: testing connectapi code getrecommendationsforuser(communityid, userid, contextaction, contextobjectid, channel, maxresults) get the chatter recommendations, such as user, group, file, article, record, and topic recommendations for the context user. get the custom and static recommendations for the context user. api version 36.0 available to guest users 38.0 note: only article and file recommendations are available to guest users. requires chatter yes signature public static connectapi.recommendationcollection getrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype contextaction, string contextobjectid, connectapi.recommendationchannel channel, integer maxresults) 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. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow 1406apex reference guide recommendations class • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, record id, or topic id. • if contextaction is view, contextobjectid is a user id, file id, group id, record id, or article id (version 37.0 and later). use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. |
channel type: connectapi.recommendationchannel a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. return value type: connectapi.recommendationcollection usage if you want to get recommendations based on a recent action performed, such as following a user, use contextaction and contextobjectid together. for example, if you just followed pam, you specify follow for contextaction and pam’s user id for contextobjectid. this method only recommends users who are followed by people who follow pam. in this example, john follows pam so the method returns a recommendation for you to follow suzanne since john also follows suzanne. 1407apex reference guide recommendations class 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: settestgetrecommendationsforuser(communityid, userid, contextaction, contextobjectid, channel, maxresults, result) apex developer guide: testing connectapi code getrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, channel, maxresults) get the chatter, custom, and static recommendations for the context user for the specified action. api version 36.0 available to guest users 38.0 note: only article and file recommendations are available to guest users. requires chatter yes signature public static connectapi.recommendationcollection getrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, connectapi.recommendationactiontype contextaction, string contextobjectid, connectapi.recommendationchannel channel, integer maxresults) 1408apex reference guide recommendations class 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, record id, or topic id. • if contextaction is view, contextobjectid is a user id, file id, group id, record id, or article id (version 37.0 and later). use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. channel type: connectapi.recommendationchannel a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to |
define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. 1409apex reference guide recommendations class • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. return value type: connectapi.recommendationcollection usage if you want to get recommendations based on a recent action performed, such as following a user, use contextaction and contextobjectid together. for example, if you just followed pam, you specify follow for contextaction and pam’s user id for contextobjectid. this method only recommends users who are followed by people who follow pam. in this example, john follows pam so the method returns a recommendation for you to follow suzanne since john also follows suzanne. 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: settestgetrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, channel, maxresults, result) apex developer guide: testing connectapi code 1410apex reference guide recommendations class getrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, channel, maxresults) get the chatter, custom, and static recommendations for the context user for the specified action and object category. api version 36.0 available to guest users 38.0 note: only article and file recommendations are available to guest users. requires chatter yes signature public static connectapi.recommendationcollection getrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, string objectcategory, connectapi.recommendationactiontype contextaction, string contextobjectid, connectapi.recommendationchannel channel, integer maxresults) 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. objectcategory type: string • if action is follow, objectcategory is users, files, topics, or records. • if action is join, objectcategory is groups. • if action is view, objectcategory is users, files, groups, records, custom, apps, or articles (version 37.0 and later). 1411apex reference guide recommendations class you can also specify a key prefix, the first three characters of the object id, as the objectcategory. valid values are: • if action is follow, objectcategory is 005 (users), 069 (files), 0to (topics), or 001 (accounts), for example. • if action is join, objectcategory is 0f9 (groups). • if action is view, objectcategory is 005 (users), 069 (files), 0f9 (groups), 0rd (custom recommendations), t (static recommendations), 001 (accounts), or ka0 (articles), for example, (version 370 and later). contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobject |
id is a user id, file id, record id, or topic id. • if contextaction is view, contextobjectid is a user id, file id, group id, record id, or article id (version 37.0 and later). use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. channel type: connectapi.recommendationchannel a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. 1412apex reference guide recommendations class return value type: connectapi.recommendationcollection usage if you want to get recommendations based on a recent action performed, such as following a user, use contextaction and contextobjectid together. for example, if you just followed pam, you specify follow for contextaction and pam’s user id for contextobjectid. this method only recommends users who are followed by people who follow pam. in this example, john follows pam so the method returns a recommendation for you to follow suzanne since john also follows suzanne. 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: settestgetrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, channel, maxresults, result) apex developer guide: testing connectapi code getscheduledrecommendation(communityid, scheduledrecommendationid) get a scheduled custom recommendation. api version 35.0 requires chatter no 1413apex reference guide recommendations class signature public static connectapi.scheduledrecommendation getscheduledrecommendation(string communityid, string scheduledrecommendationid) parameters communityid type: string id for an experience cloud site, internal, or null. scheduledrecommendationid type: string id of the scheduled custom recommendation. return value type: connectapi.scheduledrecommendation usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. getscheduledrecommendations(communityid, channel) get scheduled custom recommendations. api version 36.0 requires chatter no signature public static connectapi.scheduledrecommendationpage getscheduledrecommendations(string communityid, connectapi.recommendationchannel channel) parameters communityid type: string id for an experience cloud site, internal, or null. channel type: connectapi.recommendationchannel 1414apex reference guide recommendations class a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not |
used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. return value type: connectapi.scheduledrecommendationpage usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. rejectrecommendationforuser(communityid, userid, action, objectid) reject a chatter, custom, or static recommendation for the context user for the specified action and object id. api version 33.0 requires chatter yes signature public static rejectrecommendationforuser(string communityid, string userid, connectapi.recommendationactiontype action, string objectid) parameters communityid type: string 1415apex reference guide recommendations class id for an experience cloud site, internal, or null. userid type: string id for the context user or the keyword me. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. supported values are: • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. objectid type: string specifies the object to take action on. • if action is follow, objectid is a user id, file id, record id, or topic id (version 36.0 and later). • if action is join, objectid is a group id. • if action is view, objectid is a custom recommendation id, the enum today for static recommendations, or an article id (version 37.0 and later). return value type: void rejectrecommendationforuser(communityid, userid, action, objectenum) reject a static recommendation for the context user. api version 34.0 requires chatter yes signature public static rejectrecommendationforuser(string communityid, string userid, connectapi.recommendationactiontype action, connectapi.recommendedobjecttype objectenum) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string 1416apex reference guide recommendations class id for the context user or the keyword me. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. supported values are: • view—view a static recommendation. objectenum type: connectapi.recommendedobjecttype specifies the object type to take action on. • today—static recommendations that don’t have an id, for example, the today app recommendation. return value type: void updaterecommendationaudience(communityid, recommendationaudienceid, recommendationaudience) update a custom recommendation audience. api version 35.0 requires chatter no signature public static connectapi.recommendationaudience updaterecommendationaudience(string communityid, string recommendationaudienceid, connectapi.recommendationaudienceinput recommendationaudience) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationaudienceid type: string id of the custom recommendation audience. recommendationaudience type: connectapi.recommendationaudienceinput a connectapi.recommendationaudienceinput object. 1417apex reference guide recommendations class return value type: connectapi.recommendationaudience usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. |
updaterecommendationdefinition(communityid, recommendationdefinitionid, name, title, actionurl, actionurlname, explanation) update a custom recommendation definition with the specified parameters. api version 35.0 requires chatter no signature public static connectapi.recommendationdefinition updaterecommendationdefinition(string communityid, string recommendationdefinitionid, string name, string title, string actionurl, string actionurlname, string explanation recommendationdefinition) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. name type: string name of the custom recommendation definition. the name is displayed in setup. title type: string title of the custom recommendation definition. actionurl type: string url for acting on the custom recommendation, for example, the url to join a group. 1418apex reference guide recommendations class actionurlname type: string text label for the action url in the user interface, for example, “launch.” explanation type: string explanation, or body, of the custom recommendation. return value type: connectapi.recommendationdefinition usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. updaterecommendationdefinition(communityid, recommendationdefinitionid, recommendationdefinition) update a custom recommendation definition. api version 35.0 requires chatter no signature public static connectapi.recommendationdefinition updaterecommendationdefinition(string communityid, string recommendationdefinitionid, connectapi.recommendationdefinitioninput recommendationdefinition) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. recommendationdefinition type: connectapi.recommendationdefinitioninput 1419apex reference guide recommendations class a connectapi.recommendationdefinitioninput object containing the properties to update. return value type: connectapi.recommendationdefinition usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. updaterecommendationdefinitionphoto(communityid, recommendationdefinitionid, fileupload) update a custom recommendation definition photo with a file that hasn’t been uploaded. api version 35.0 requires chatter yes signature public static connectapi.photo updaterecommendationdefinitionphoto(string communityid, string recommendationdefinitionid, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. return value type: connectapi.photo 1420apex reference guide recommendations class usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. updaterecommendationdefinitionphoto(communityid, recommendationdefinitionid, fileid, versionnumber) update a custom recommendation definition photo with an uploaded file. api version 35.0 requires chatter yes signature public static connectapi.photo updaterecommendationdefinitionphoto(string communityid, string recommendationdefinitionid, string fileid, integer versionnumber) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. 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 community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission 1421apex reference guide recommendations class can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. updaterecommendationdefinitionphotowithattributes(communityid, recommendationdefinitionid, photo) update a custom recommendation definition photo with an uploaded file that requires cropping. api version 35.0 requires chatter yes signature public static connectapi.photo updaterecommendationdefinitionphotowithattributes(string communityid, string recommendationdefinitionid, connectapi.photoinput photo) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. photo type: connectapi.photoinput a connectapi.photoinput object specifying the file id, version number, and cropping parameters. return value type: connectapi.photo usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. updaterecommendationdefinitionphotowithattributes(communityid, recommendationdefinitionid, photo, fileupload) update a custom recommendation definition photo with a file that hasn’t been uploaded and requires cropping. 1422apex reference guide recommendations class api version 35.0 requires chatter yes signature public static connectapi.photo updaterecommendationdefinitionphotowithattributes(string communityid, string recommendationdefinitionid, connectapi.photoinput photo, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. 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 community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. updatescheduledrecommendation(communityid, scheduledrecommendationid, scheduledrecommendation) update a scheduled custom recommendation. api version 35.0 1423apex reference guide recommendations class requires chatter no signature public static connectapi.scheduledrecommendation updatescheduledrecommendation(string communityid, string scheduledrecommendationid, connectapi.scheduledrecommendationinput scheduledrecommendation) parameters communityid type: string id for an experience cloud site, internal, or null. scheduledrecommendationid type: string id of the scheduled custom recommendation. scheduledrecommendation type: connectapi.scheduledrecommendationinput a connectapi.scheduledrecommendationinput object containing the properties to update. return value type: connectapi.scheduledrecommendation usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. ranking scheduled custom recommendations example if you have these scheduled custom recommendations: scheduled recommendations rank scheduledrecommendationa 1 scheduledrecommendationb 2 scheduledrecommendationc 3 and you include this information in the scheduled custom recommendation input: scheduled recommendation rank scheduledrecommendationd 2 1424apex reference guide recommend |
ations class the result is: scheduled recommendation rank scheduledrecommendationa 1 scheduledrecommendationd 2 scheduledrecommendationb 3 scheduledrecommendationc 4 updatescheduledrecommendation(communityid, scheduledrecommendationid, rank, enabled, recommendationaudienceid) update a scheduled custom recommendation with the specified parameters. api version 35.0 requires chatter no signature public static connectapi.scheduledrecommendation updatescheduledrecommendation(string communityid, string scheduledrecommendationid, integer rank, boolean enabled, string recommendationaudienceid) parameters communityid type: string id for an experience cloud site, internal, or null. scheduledrecommendationid type: string id of the scheduled custom recommendation. rank type: integer relative rank of the scheduled custom recommendation indicated by ascending whole numbers starting with 1. setting the rank is comparable to an insertion into an ordered list. the scheduled custom recommendation is inserted into the position specified by the rank. the rank of all the scheduled custom recommendations after it is pushed down. see ranking scheduled custom recommendations example. if the specified rank is larger than the size of the list, the scheduled custom recommendation is put at the end of the list. the rank of the scheduled custom recommendation is the size of the list, instead of the one specified. if a rank is not specified, the scheduled custom recommendation is put at the end of the list. 1425apex reference guide recommendations class enabled type: boolean indicates whether scheduling is enabled. if true, the custom recommendation is enabled and appears in experience cloud sites. if false, custom recommendations in feeds in salesforce mobile web aren’t removed, but no new custom recommendations appear. in customer service and partner central sites, disabled custom recommendations no longer appear. recommendationaudienceid type: string id of the custom recommendation definition that this scheduled recommendation schedules. return value type: connectapi.scheduledrecommendation usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. ranking scheduled custom recommendations example if you have these scheduled custom recommendations: scheduled recommendations rank scheduledrecommendationa 1 scheduledrecommendationb 2 scheduledrecommendationc 3 and you include this information in the scheduled custom recommendation input: scheduled recommendation rank scheduledrecommendationd 2 the result is: scheduled recommendation rank scheduledrecommendationa 1 scheduledrecommendationd 2 scheduledrecommendationb 3 scheduledrecommendationc 4 1426apex reference guide recommendations class recommendations test methods the following are the test methods for recommendations. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. in this section: settestgetrecommendationforuser(communityid, userid, action, objectid, result) register a connectapi.recommendationcollection object to be returned when getrecommendationforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetrecommendationsforuser(communityid, userid, contextaction, contextobjectid, channel, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, channel, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, channel, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetrecommendationforuser(communityid, userid, action, objectid |
, result) register a connectapi.recommendationcollection object to be returned when getrecommendationforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 33.0 requires chatter yes signature public static void settestgetrecommendationforuser(string communityid, string userid, connectapi.recommendationactiontype action, string objectid, connectapi.recommendationcollection result) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string 1427apex reference guide recommendations class id for the context user or the keyword me. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. objectid type: string specifies the object to take action on. • if action is follow, objectid is a user id, file id, record id, or topic id (version 36.0 and later). • if action is join, objectid is a group id. • if action is view, objectid is a user id, file id, group id, record id, custom recommendation id, the enum today for static recommendations, or an article id (version 37.0 and later). result type: connectapi.recommendationcollection object containing test data. return value type: void see also: getrecommendationforuser(communityid, userid, action, objectid) apex developer guide: testing connectapi code settestgetrecommendationsforuser(communityid, userid, contextaction, contextobjectid, channel, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 36.0 requires chatter yes signature public static void settestgetrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype contextaction, string contextobjectid, 1428apex reference guide recommendations class connectapi.recommendationchannel channel, integer maxresults, connectapi.recommendationcollection result) 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. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, record id, or topic id. • if contextaction is view, contextobjectid is a user id, file id, group id, record id, or article id (version 37.0 and later). use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. channel type: connectapi.recommendationchannel a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in |
the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. 1429apex reference guide recommendations class maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. result type: connectapi.recommendationcollection object containing test data. return value type: void see also: getrecommendationsforuser(communityid, userid, contextaction, contextobjectid, channel, maxresults) apex developer guide: testing connectapi code settestgetrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, channel, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 36.0 requires chatter yes signature public static void settestgetrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, connectapi.recommendationactiontype contextaction, string contextobjectid, connectapi.recommendationchannel channel, integer maxresults, connectapi.recommendationcollection result) 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. action type: connectapi.recommendationactiontype 1430apex reference guide recommendations class specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, record id, or topic id. • if contextaction is view, contextobjectid is a user id, file id, group id, record id, or article id (version 37.0 and later). use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. channel type: connectapi.recommendationchannel a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. result type: connectapi.recommendationcollection 1431apex reference guide recommendations class object containing test data. return value type: void see also: getrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, channel, maxresults) apex developer guide: testing connectapi code settestgetrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, channel, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same |
parameters or the code throws an exception. api version 36.0 requires chatter yes signature public static void settestgetrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, string objectcategory, connectapi.recommendationactiontype contextaction, string contextobjectid, connectapi.recommendationchannel channel, integer maxresults, connectapi.recommendationcollection result) 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. 1432 |
apex reference guide recommendations class objectcategory type: string • if action is follow, objectcategory is users, files, records, or topics. • if action is join, objectcategory is groups. • if action is view, objectcategory is users, files, groups, records,custom, apps, or articles (version 37.0 and later). you can also specify a key prefix, the first three characters of the object id, as the objectcategory. valid values are: • if action is follow, objectcategory is 005 (users), 069 (files), 0to (topics), or 001 (accounts), for example. • if action is join, objectcategory is 0f9 (groups). • if action is view, objectcategory is 005 (users), 069 (files), 0f9 (groups), 0rd (custom recommendations), t (static recommendations), 001 (accounts), or ka0 (articles), for example, (version 370 and later). contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, record id, or topic id. • if contextaction is view, contextobjectid is a user id, file id, group id, record id, or article id (version 37.0 and later). use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. channel type: connectapi.recommendationchannel a way to tie custom recommendations together. for example, display recommendations in specific places in the ui or show recommendations based on time of day or geographic locations. values are: • customchannel1—custom recommendation channel. not used by default. work with your community manager to define custom channels. for example, community managers can use experience builder to determine where recommendations appear. • customchannel2—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel3—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel4—custom recommendation channel. not used by default. work with your community manager to define custom channels. • customchannel5—custom recommendation channel. not used by default. work with your community manager to define custom channels. 1433apex reference guide recommendations class • defaultchannel—default recommendation channel. recommendations appear by default on the home and question detail pages of customer service and partner central experience builder templates. they also appear in the feed in the salesforce mobile web and anywhere community managers add recommendations using experience builder. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. result type: connectapi.recommendationcollection object containing test data. return value type: void see also: getrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, channel, maxresults) apex developer guide: testing connectapi code retired recommendations methods the following methods for recommendations are retired. in this section: createscheduledrecommendation(communityid, recommendationdefinitionid, rank, enabled, recommendationaudienceid) create a scheduled custom recommendation with the specified parameters. getrecommendationsforuser(communityid, userid, contextaction, contextobjectid, maxresults) get the chatter recommendations, such as user, group, file, and record recommendations for the context user. get the custom and static recommendations for the context user. getrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, maxresults) get the chatter, custom, and static recommendations for the context user for the specified action. getrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, maxresults) get the chatter, custom, and static recommendations for the context user for the specified action and object category. getscheduledrecommendations(communityid) get scheduled custom recommendations. settestgetrecommendationsforuser(communityid, userid, contextaction, contextobjectid, maxresults, result) |
register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. 1434apex reference guide recommendations class settestgetrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. createscheduledrecommendation(communityid, recommendationdefinitionid, rank, enabled, recommendationaudienceid) create a scheduled custom recommendation with the specified parameters. api version 35.0 only important: in version 36.0 and later, use createscheduledrecommendation(communityid, recommendationdefinitionid, rank, enabled, recommendationaudienceid, channel). requires chatter no signature public static connectapi.scheduledrecommendation createscheduledrecommendation(string communityid, string recommendationdefinitionid, integer rank, boolean enabled, string recommendationaudienceid) parameters communityid type: string id for an experience cloud site, internal, or null. recommendationdefinitionid type: string id of the custom recommendation definition. rank type: integer relative rank of the scheduled custom recommendation indicated by ascending whole numbers starting with 1. setting the rank is comparable to an insertion into an ordered list. the scheduled custom recommendation is inserted into the position specified by the rank. the rank of all the scheduled custom recommendations after it is pushed down. see ranking scheduled custom recommendations example. if the specified rank is larger than the size of the list, the scheduled custom recommendation is put at the end of the list. the rank of the scheduled custom recommendation is the size of the list, instead of the one specified. if a rank is not specified, the scheduled custom recommendation is put at the end of the list. enabled type: boolean 1435apex reference guide recommendations class indicates whether scheduling is enabled. if true, the custom recommendation is enabled and appears in experience cloud sites. if false, custom recommendations in feeds in salesforce mobile web aren’t removed, but no new custom recommendations appear. in customer service and partner central sites, disabled custom recommendations no longer appear. recommendationaudienceid type: string id of the custom recommendation definition that this scheduled recommendation schedules. return value type: connectapi.scheduledrecommendation usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. ranking scheduled custom recommendations example if you have these scheduled custom recommendations: scheduled recommendations rank scheduledrecommendationa 1 scheduledrecommendationb 2 scheduledrecommendationc 3 and you include this information in the scheduled custom recommendation input: scheduled recommendation rank scheduledrecommendationd 2 the result is: scheduled recommendation rank scheduledrecommendationa 1 scheduledrecommendationd 2 scheduledrecommendationb 3 scheduledrecommendationc 4 1436apex reference guide recommendations class getrecommendationsforuser(communityid, userid, contextaction, contextobjectid, maxresults) get the chatter recommendations, such as user, group, file, and record recommendations for the context user. get the custom and static recommendations for the context user. api version 33.0–35.0 important: in version 36.0 and later, use getrecommendationsforuser(communityid, userid, contextaction, contextobjectid, channel, maxresults). requires chatter yes signature public static connectapi.recommendationcollection getrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype contextaction, string contextobjectid, integer maxresults) |
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. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, or record id. • if contextaction is view, contextobjectid is a user id, file id, group id, or record id. use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. 1437apex reference guide recommendations class maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. return value type: connectapi.recommendationcollection usage if you want to get recommendations based on a recent action performed, such as following a user, use contextaction and contextobjectid together. for example, if you just followed pam, you specify follow for contextaction and pam’s user id for contextobjectid. this method only recommends users who are followed by people who follow pam. in this example, john follows pam so the method returns a recommendation for you to follow suzanne since john also follows suzanne. 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: settestgetrecommendationsforuser(communityid, userid, contextaction, contextobjectid, maxresults, result) apex developer guide: testing connectapi code getrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, maxresults) get the chatter, custom, and static recommendations for the context user for the specified action. api version 33.0–35.0 1438apex reference guide recommendations class important: in version 36.0 and later, use getrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, channel, maxresults). requires chatter yes signature public static connectapi.recommendationcollection getrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, connectapi.recommendationactiontype contextaction, string contextobjectid, integer maxresults) 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, or record id. • if contextaction is view, contextobjectid is a user id, file id, group id, or record id. use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. 1439apex reference guide recommendations class maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. return value type: connectapi.recommendationcollection usage if you want to get recommendations based on a recent action performed, such as following a user, use contextaction and contextobjectid together. for example, if you just followed pam, you specify follow for contextaction and pam’s user id for contextobject |
id. this method only recommends users who are followed by people who follow pam. in this example, john follows pam so the method returns a recommendation for you to follow suzanne since john also follows suzanne. 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: settestgetrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, maxresults, result) apex developer guide: testing connectapi code getrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, maxresults) get the chatter, custom, and static recommendations for the context user for the specified action and object category. api version 33.0–35.0 1440apex reference guide recommendations class important: in version 36.0 and later, use getrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, channel, maxresults). requires chatter yes signature public static connectapi.recommendationcollection getrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, string objectcategory, connectapi.recommendationactiontype contextaction, string contextobjectid, integer maxresults) 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. objectcategory type: string • if action is follow, objectcategory is users, files, or records. • if action is join, objectcategory is groups. • if action is view, objectcategory is users, files, groups, records, custom, or apps. you can also specify a key prefix, the first three characters of the object id, as the objectcategory. valid values are: • if action is follow, objectcategory is 005 (users), 069 (files), or 001 (accounts), for example. • if action is join, objectcategory is 0f9 (groups). • if action is view, objectcategory is 005 (users), 069 (files), 0f9 (groups), 0rd (custom recommendations), t (static recommendations), or 001 (accounts), for example. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view 1441apex reference guide recommendations class use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, or record id. • if contextaction is view, contextobjectid is a user id, file id, group id, or record id. use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. return value type: connectapi.recommendationcollection usage if you want to get recommendations based on a recent action performed, such as following a user, use contextaction and contextobjectid together. for example, if you just followed pam, you specify follow for contextaction and pam’s user id for contextobjectid. this method only recommends users who are followed by people who follow pam. in this example, john follows pam so the method returns a recommendation for you to follow suzanne since john also follows suzanne. 1442apex reference guide recommendations class 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: settestgetrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, maxresults, result) a |
pex developer guide: testing connectapi code getscheduledrecommendations(communityid) get scheduled custom recommendations. api version 35.0 only important: in version 36.0 and later, use getscheduledrecommendations(communityid, channel). requires chatter no signature public static connectapi.scheduledrecommendationpage getscheduledrecommendations(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.scheduledrecommendationpage usage community managers can access, create, and delete audiences, definitions, and schedules for custom recommendations. (community managers are users with the create and set up experiences or manage experiences permission.) users with the modify all data permission can also access, create, and delete custom recommendation audiences, custom recommendation definitions, and scheduled custom recommendations. settestgetrecommendationsforuser(communityid, userid, contextaction, contextobjectid, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. 1443apex reference guide recommendations class api version 33.0–35.0 requires chatter yes signature public static void settestgetrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype contextaction, string contextobjectid, integer maxresults, connectapi.recommendationcollection result) 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. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, or record id. • if contextaction is view, contextobjectid is a user id, file id, group id, or record id. use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. result type: connectapi.recommendationcollection object containing test data. 1444apex reference guide recommendations class return value type: void see also: getrecommendationsforuser(communityid, userid, contextaction, contextobjectid, maxresults) apex developer guide: testing connectapi code settestgetrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 33.0–35.0 requires chatter yes signature public static void settestgetrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, connectapi.recommendationactiontype contextaction, string contextobjectid, integer maxresults, connectapi.recommendationcollection result) 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: 1445apex reference guide recommendations class • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent |
action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, or record id. • if contextaction is view, contextobjectid is a user id, file id, group id, or record id. use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. result type: connectapi.recommendationcollection object containing test data. return value type: void see also: getrecommendationsforuser(communityid, userid, action, contextaction, contextobjectid, maxresults) apex developer guide: testing connectapi code settestgetrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, maxresults, result) register a connectapi.recommendationcollection object to be returned when getrecommendationsforuser is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 33.0–35.0 requires chatter yes signature public static void settestgetrecommendationsforuser(string communityid, string userid, connectapi.recommendationactiontype action, string objectcategory, 1446apex reference guide recommendations class connectapi.recommendationactiontype contextaction, string contextobjectid, integer maxresults, connectapi.recommendationcollection result) 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. action type: connectapi.recommendationactiontype specifies the action to take on a recommendation. • follow—follow a file, record, topic, or user. • join—join a group. • view—view a file, group, article, record, user, custom, or static recommendation. objectcategory type: string • if action is follow, objectcategory is users, files, or records. • if action is join, objectcategory is groups. • if action is view, objectcategory is users, files, groups, records,custom, or apps. you can also specify a key prefix, the first three characters of the object id, as the objectcategory. valid values are: • if action is follow, objectcategory is 005 (users), 069 (files), or 001 (accounts), for example. • if action is join, objectcategory is 0f9 (groups). • if action is view, objectcategory is 005 (users), 069 (files), 0f9 (groups), 0rd (custom recommendations), t (static recommendations), or 001 (accounts), for example. contextaction type: connectapi.recommendationactiontype action that the context user just performed. supported values are: • follow • view use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. contextobjectid type: string id of the object that the context user just performed an action on. • if contextaction is follow, contextobjectid is a user id, file id, or record id. • if contextaction is view, contextobjectid is a user id, file id, group id, or record id. use contextaction and contextobjectid together to get new recommendations based on the action just performed. if you don’t want recommendations based on a recent action, specify null. 1447apex reference guide records class maxresults type: integer maximum number of recommendation results; default is 10. values must be from 1 to 99. result type: connectapi.recommendationcollection object containing test data. return value type: void see also: getrecommendationsforuser(communityid, userid, action, objectcategory, contextaction, contextobjectid, maxresults) apex developer guide: testing connectapi code records class access information about record motifs, which are small icons used to distinguish record types in the salesforce ui. namespace connectapi records methods the following are methods for records. all methods are static. in this section: getmotif(communityid, idorprefix) get |
a motif that contains the urls for a set of small, medium, and large motif icons for a record. it can also contain a base color for the record. getmotifbatch(communityid, idorprefixlist) get a motif for a list of objects. getmotif(communityid, idorprefix) get a motif that contains the urls for a set of small, medium, and large motif icons for a record. it can also contain a base color for the record. api version 28.0 requires chatter no 1448apex reference guide records class signature public static connectapi.motif getmotif(string communityid, string idorprefix) parameters communityid type: string id for an experience cloud site, internal, or null. idorprefix type: string an id or key prefix. return value type: connectapi.motif usage each salesforce record type has its own set of motif icons. getmotifbatch(communityid, idorprefixlist) get a motif for a list of objects. api version 31.0 requires chatter no signature public static connectapi.batchresult[] getmotifbatch(string communityid, list<string> idorprefixlist) parameters communityid type: string id for an experience cloud site, internal, or null. idorprefixlist type: list<string> a list of object ids or prefixes. 1449apex reference guide repricing class return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.motif object and errors for motifs that didn’t load. example string communityid = null; list<string> prefixids = new list<string> { '001', '01z', '069' }; // get info about the motifs of all records in the list. connectapi.batchresult[] batchresults = connectapi.records.getmotifbatch(communityid, prefixids); for (connectapi.batchresult batchresult : batchresults) { if (batchresult.issuccess()) { // operation was successful. // print the color of each motif. connectapi.motif motif; if(batchresult.getresult() instanceof connectapi.motif) { motif = (connectapi.motif) batchresult.getresult(); } system.debug('success'); system.debug(motif.color); } else { // operation failed. print errors. system.debug('failure'); system.debug(batchresult.geterrormessage()); } } repricing class perform functions related to repricing orders in order management. namespace connectapi repricing methods the following are methods for repricing. all methods are static. in this section: productdetails(webstoreid, skuorproductid, effectiveaccountid, currencycode, locale) get details of a product in a web store. 1450apex reference guide repricing class productdetails(webstoreid, skuorproductid, effectiveaccountid, currencycode, locale) get details of a product in a web store. api version 55.0 requires chatter no signature public static connectapi.productdetailsoutputrepresentation productdetails(string webstoreid, string skuorproductid, string effectiveaccountid, string currencycode, string locale) parameters webstoreid type: string id of the webstore. skuorproductid type: string sku or id of the product. effectiveaccountid type: string effective account id. required for b2b stores. for other stores, pass null. currencycode type: string iso currency code. if you pass null, the default store value is used. locale type: string locale. if you pass null, the default store value is used. excludeattributesetinfo type: string specifies whether the attribute set information for the product is returned. excludemedia type: string specifies whether the media groups and default images of the product are returned. excludequantityrule type: string specifies whether the quantity rule information for the product is returned. 1451apex reference guide returnorder class excludevariationinfo |
type: string specifies whether the variation information for the product is returned. excludeprices type: string specifies whether the prices for the product is returned. return value type: connectapi.productdetailsoutputrepresentation returnorder class process returnorders in order management. namespace connectapi returnorder methods the following are methods for returnorder. all methods are static. in this section: createreturnorder(returnorderinput) create a returnorder and returnorderlineitems for items belonging to an ordersummary. returnitems(returnorderid, returnitemsinput) process returnorderlineitems belonging to a returnorder. processing a returnorderlineitem generates a change order and makes that returnorderlineitem read-only. the change order for a returned item or delivery charge has a positive amount and should be used to create a credit memo. the change order for a return fee has a negative amount and should be used to create an invoice. if a processed returnorderlineitem has any remaining expected quantity, then the api creates a separate returnorderlineitem representing that quantity. createreturnorder(returnorderinput) create a returnorder and returnorderlineitems for items belonging to an ordersummary. api version 50.0 requires chatter no 1452apex reference guide returnorder class signature public static connectapi.returnorderoutputrepresentation createreturnorder(connectapi.returnorderinputrepresentation returnorderinput) parameters returnorderinput type: connectapi.returnorderinputrepresentation data for creating a returnorder and returnorderlineitems. return value type: connectapi.returnorderoutputrepresentation see also: returnitems(returnorderid, returnitemsinput) returnitems(returnorderid, returnitemsinput) process returnorderlineitems belonging to a returnorder. processing a returnorderlineitem generates a change order and makes that returnorderlineitem read-only. the change order for a returned item or delivery charge has a positive amount and should be used to create a credit memo. the change order for a return fee has a negative amount and should be used to create an invoice. if a processed returnorderlineitem has any remaining expected quantity, then the api creates a separate returnorderlineitem representing that quantity. api version 52.0 requires chatter no signature public static connectapi.returnitemsoutputrepresentation returnitems(string returnorderid, connectapi.returnitemsinputrepresentation returnitemsinput) parameters returnorderid type: string id of the returnorder. returnitemsinput type: connectapi.returnitemsinputrepresentation data about products and delivery charges to return, as well as associated return fees. 1453apex reference guide routing class return value type: connectapi.returnitemsoutputrepresentation see also: createmultipleinvoices(invoicesinput) ensurerefundsasync(ordersummaryid, ensurerefundsinput) createreturnorder(returnorderinput) routing class route orders to inventory locations in order management. namespace connectapi routing methods the following are methods for routing. all methods are static. in this section: confirmheldfocapacity(confirmheldfocapacityinput) confirm held fulfillment order capacity at one or more locations. this call decreases a location’s held capacity and increases its assigned fulfillment order count. confirm held capacity when you assign a fulfillment order to a location. findrouteswithfewestsplits(findrouteswithfewestsplitsinputrepresentation) returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits. by default, checks up to 1,000,000 potential routes, returning a maximum of 10,000 results. findrouteswithfewestsplitsusingoci(findrouteswithfewestsplitsusingociinput) for one or more order summaries, find inventory availability using omnichannel inventory and identify the fulfillment routes with fewest splits. by default, checks up to 1,000,000 potential routes, returning a maximum of 10,000 results. this method combines the functionality of the getinventoryavailability() and findrouteswithfewestsplits() methods. getfocapacityvalues(getfocapacityvaluesinput) get information about the current fulfillment order capacity of one or more locations. holdfocapacity(holdfocapacityinput) hold fulfillment order capacity at a location. holding capacity at a location reserves a |
space for a fulfillment order that you’ll assign to it. rankaveragedistance(rankaveragedistanceinputrepresentation) calculates the average distance from sets of inventory locations to an order recipient, and ranks them. use this method to compare the average shipping distances for different sets of locations that can fulfill an order. releaseheldfocapacity(releaseheldfocapacityinput) release held fulfillment order capacity at one or more locations. this call decreases a location’s held capacity without changing its assigned fulfillment order count. release held capacity when you cancel the assignment of a fulfillment order to a location. 1454apex reference guide routing class confirmheldfocapacity(confirmheldfocapacityinput) confirm held fulfillment order capacity at one or more locations. this call decreases a location’s held capacity and increases its assigned fulfillment order count. confirm held capacity when you assign a fulfillment order to a location. api version 55.0 requires chatter no signature public static connectapi.confirmheldfocapacityoutputrepresentation confirmheldfocapacity(connectapi.confirmheldfocapacityinputrepresentation confirmheldfocapacityinput) parameters confirmheldfocapacityinput type: connectapi.confirmheldfocapacityinputrepresentation the input includes, for each fulfillment order, the location where capacity is held for it. return value type: connectapi.confirmheldfocapacityoutputrepresentation findrouteswithfewestsplits(findrouteswithfewestsplitsinputrepresentation) returns combinations of inventory locations that can fulfill an order within a specified limit of shipment splits. by default, checks up to 1,000,000 potential routes, returning a maximum of 10,000 results. api version 51.0 requires chatter no signature public static connectapi.findrouteswithfewestsplitsoutputrepresentation findrouteswithfewestsplits(connectapi.findrouteswithfewestsplitsinputrepresentation findrouteswithfewestsplitsinputrepresentation) 1455apex reference guide routing class parameters findrouteswithfewestsplitsinputrepresentation type: connectapi.findrouteswithfewestsplitsinputrepresentation the input includes the ordered item quantities, data about available inventory, and, optionally, a maximum allowable number of shipment splits. return value type: connectapi.findrouteswithfewestsplitsoutputrepresentation findrouteswithfewestsplitsusingoci(findrouteswithfewestsplitsusingociinput) for one or more order summaries, find inventory availability using omnichannel inventory and identify the fulfillment routes with fewest splits. by default, checks up to 1,000,000 potential routes, returning a maximum of 10,000 results. this method combines the functionality of the getinventoryavailability() and findrouteswithfewestsplits() methods. api version 54.0 requires chatter no signature public static connectapi.findrouteswithfewestsplitsusingocioutputrepresentation findrouteswithfewestsplitsusingoci(connectapi.findrouteswithfewestsplitsusingociinputrepresentation findrouteswithfewestsplitsusingociinput) parameters findrouteswithfewestsplitsusingociinput type: connectapi.findrouteswithfewestsplitsusingociinputrepresentation the input includes, for each order, the ordered item quantities, the assigned location group or locations, and, optionally, a maximum allowable number of shipment splits and a list of locations to exclude from the calculation. return value type: connectapi.findrouteswithfewestsplitsusingocioutputrepresentation see also: getinventoryavailability(inventoryavailabilityinputrepresentation) findrouteswithfewestsplits(findrouteswithfewestsplitsinputrepresentation) getfocapacityvalues(getfocapacityvaluesinput) get information about the current fulfillment order capacity of one or more locations. 1456apex reference guide routing class api version 55.0 requires chatter no signature public static connectapi.getfocapacityvaluesoutputrepresentation getfocapacityvalues(connectapi.getfocapacityvaluesrequestinputrepresent |
ation getfocapacityvaluesinput) parameters getfocapacityvaluesinput type: connectapi.getfocapacityvaluesrequestinputrepresentation locations to get fulfillment order capacity information about. return value type: connectapi.getfocapacityvaluesoutputrepresentation holdfocapacity(holdfocapacityinput) hold fulfillment order capacity at a location. holding capacity at a location reserves a space for a fulfillment order that you’ll assign to it. api version 55.0 requires chatter no signature public static connectapi.holdfocapacityoutputrepresentation holdfocapacity(connectapi.holdfocapacityinputrepresentation holdfocapacityinput) parameters holdfocapacityinput type: connectapi.holdfocapacityinputrepresentation the input includes, for each fulfillment order, the location to hold capacity for it. return value type: connectapi.holdfocapacityoutputrepresentation 1457apex reference guide routing class rankaveragedistance(rankaveragedistanceinputrepresentation) calculates the average distance from sets of inventory locations to an order recipient, and ranks them. use this method to compare the average shipping distances for different sets of locations that can fulfill an order. api version 51.0 requires chatter no signature public static connectapi.rankaveragedistanceoutputrepresentation rankaveragedistance(connectapi.rankaveragedistanceinputrepresentation rankaveragedistanceinputrepresentation) parameters rankaveragedistanceinputrepresentation type: connectapi.rankaveragedistanceinputrepresentation an order recipient’s geographic location and information about sets of inventory locations that can fulfill the order. return value type: connectapi.rankaveragedistanceoutputrepresentation releaseheldfocapacity(releaseheldfocapacityinput) release held fulfillment order capacity at one or more locations. this call decreases a location’s held capacity without changing its assigned fulfillment order count. release held capacity when you cancel the assignment of a fulfillment order to a location. api version 55.0 requires chatter no signature public static connectapi.releaseheldfocapacityoutputrepresentation releaseheldfocapacity(connectapi.releaseheldfocapacityinputrepresentation releaseheldfocapacityinput) 1458apex reference guide salesforceinbox class parameters releaseheldfocapacityinput type: connectapi.releaseheldfocapacityinputrepresentation the input includes, for each fulfillment order, the location that holds the capacity to release. return value type: connectapi.releaseheldfocapacityoutputrepresentation salesforceinbox class access information about automated activity capture, which is available in einstein and salesforce inbox. namespace connectapi salesforceinbox methods the following are methods for salesforceinbox. all methods are static. in this section: shareactivity(activityid, sharinginfo) share emails or events with certain groups of users. shareactivity(activityid, sharinginfo) share emails or events with certain groups of users. api version 39.0 requires chatter no signature public static connectapi.activitysharingresult shareactivity(string activityid, connectapi.activitysharinginput sharinginfo) parameters activityid type: string the id of the activity. 1459apex reference guide sites class sharinginfo type: connectapi.activitysharinginput a connectapi.activitysharinginput object. return value type: connectapi.activitysharingresult usage this method is a feature of both sales cloud einstein and inbox. it lets users connect their email and calendar to salesforce. then, their emails and events are automatically added to related salesforce records. users can specify who their individual emails and events are shared with. sites class search an experience cloud site. namespace connectapi sites methods the following are methods for sites. all methods are static. in this section: searchsite(siteid, queryterm, pagetoken, pagesize, language) search an experience cloud site. searchsite(siteid, queryterm, pagetoken, pagesize, language) search an experience cloud site. api version 54.0 available to guest users 54.0 requires chatter no 1460apex reference guide smartdatadiscovery class signature public static connectapi.sitesearch |
result searchsite(string siteid, string queryterm, string pagetoken, integer pagesize, string language) parameters siteid type: string id for the experience cloud site. queryterm type: string white-space separated words used to search for relevant content. provide a maximum of 1024 characters, composed of up to 32 words and white spaces. logical operators aren’t supported. pagetoken type: string specifies the base64 encoded page token. page tokens are returned as part of the response. if unspecified, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 240. if you pass in null, the default size is 25. language type: string language locale for the context user. if unspecified or if the specified language locale isn’t available, the default value is en_us. return value type: connectapi.sitesearchresult smartdatadiscovery class get predictions on salesforce objects. use the connectapi.smartdatadiscovery.predict method to get predictions on salesforce objects. for more information, see get predictions in apex. socialengagement class manage information about social accounts or fan pages for social networks. namespace connectapi socialengagement methods the following are methods for socialengagement. all methods are static. 1461apex reference guide socialengagement class in this section: deletesocialpost(socialpostid, socialaccountid) delete a social post from its social network. followsocialpersona(socialpersonaid, socialaccountid) follow a social persona in its social network. followsocialpostpersona(socialpostid, socialaccountid) follow a social persona on a social post in its social network. getintents(socialpostid) get available intents for a social post. getmanagedsocialaccount(id) get a managed social account that is in the org and assigned to the user. getmanagedsocialaccounts() gets a list of managed social accounts that are in the org and assigned to the user. getmanagedsocialaccounts(socialnetwork) get a list of managed social accounts that are in the org and assigned to the user. getrelationship(id, socialpersonaid) get the follow relationship between a managed social account and a social persona. hidesocialpost(socialpostid, socialaccountid) hide a social post in its social network. likesocialpost(socialpostid, socialaccountid) like a social post in its social network. massapprove(massapproval) approve or reject the publishing of a large number of social posts. recallapproval(socialpostid) recall an approval request to publish a social post. unfollowsocialpersona(socialpersonaid, socialaccountid) stop following a social persona in its social network. unfollowsocialpostpersona(socialpostid, socialaccountid) stop following a social persona of a social post in its social network. unhidesocialpost(socialpostid, socialaccountid) unhide a social post in its social network. unlikesocialpost(socialpostid, socialaccountid) unlike a social post in its social network. deletesocialpost(socialpostid, socialaccountid) delete a social post from its social network. note: deleting a social post from its social network doesn’t delete the record from salesforce. 1462apex reference guide socialengagement class api version 46.0 requires chatter no signature public static connectapi.deletesocialpostintent deletesocialpost(string socialpostid, string socialaccountid) parameters socialpostid type: string id of the social post to delete. socialaccountid type: string id of the social account that deletes the post. return value type: connectapi.deletesocialpostintent followsocialpersona(socialpersonaid, socialaccountid) follow a social persona in its social network. api version 45.0 requires chatter no signature public static connectapi.followsocialpersonaintent followsocialpersona(string socialpersonaid, string socialaccountid) parameters socialpersonaid type: string id of the social persona to follow. 1463apex reference guide socialengagement class socialaccountid type: string id of the social account that follows the social persona. return value type: connectapi.followsocialpersonaintent |
followsocialpostpersona(socialpostid, socialaccountid) follow a social persona on a social post in its social network. api version 45.0 requires chatter no signature public static connectapi.followsocialpersonaintent followsocialpostpersona(string socialpostid, string socialaccountid) parameters socialpostid type: string id of the social post authored by the social persona to follow. socialaccountid type: string id of the social account that follows the social persona. return value type: connectapi.followsocialpersonaintent getintents(socialpostid) get available intents for a social post. api version 45.0 requires chatter no 1464apex reference guide socialengagement class signature public static connectapi.socialpostintents getintents(string socialpostid) parameters socialpostid type: string id of a social post. return value type: connectapi.socialpostintents getmanagedsocialaccount(id) get a managed social account that is in the org and assigned to the user. api version 44.0 requires chatter no signature public static connectapi.managedsocialaccount getmanagedsocialaccount(string id) parameters id type: string description: internal sfdc id for this managed social account. return value type: connectapi.managedsocialaccount getmanagedsocialaccounts() gets a list of managed social accounts that are in the org and assigned to the user. api version 44.0 requires chatter no 1465apex reference guide socialengagement class signature public static connectapi.managedsocialaccounts getmanagedsocialaccounts() return value type: connectapi.managedsocialaccounts getmanagedsocialaccounts(socialnetwork) get a list of managed social accounts that are in the org and assigned to the user. api version 44.0 requires chatter no signature public static connectapi.managedsocialaccounts getmanagedsocialaccounts(connectapi.socialnetworkprovider socialnetwork) parameters socialnetwork type: connectapi.socialnetworkprovider description: filters results based on the social network. values are: • facebook • googleplus • instagram • instagrambusiness • kakaotalk • kik • line • linkedin • messenger • other • pinterest • qq • rypple • sinaweibo • sms • snapchat 1466apex reference guide socialengagement class • telegram • twitter • vkontakte • wechat • whatsapp • youtube return value type: connectapi.managedsocialaccounts getrelationship(id, socialpersonaid) get the follow relationship between a managed social account and a social persona. api version 46.0 requires chatter no signature public static connectapi.socialaccountrelationship getrelationship(string id, string socialpersonaid) parameters id type: string id of the managed social account. socialpersonaid type: string id of the social persona. return value type: connectapi.socialaccountrelationship hidesocialpost(socialpostid, socialaccountid) hide a social post in its social network. api version 46.0 1467apex reference guide socialengagement class requires chatter no signature public static connectapi.hidesocialpostintent hidesocialpost(string socialpostid, string socialaccountid) parameters socialpostid type: string id of the social post to hide. socialaccountid type: string id of the social account that hides the post. return value type: connectapi.hidesocialpostintent likesocialpost(socialpostid, socialaccountid) like a social post in its social network. api version 46.0 requires chatter no signature public static connectapi.likesocialpostintent likesocialpost(string socialpostid, string socialaccountid) parameters socialpostid type: string id of the social post to like. socialaccountid type: string id of the social account that likes the post. 1468apex reference guide socialengagement class return value type: connectapi.likesocialpostintent massapprove(massapproval) approve or reject the publishing of a |
large number of social posts. api version 46.0 requires chatter no signature public static connectapi.socialpostmassapprovaloutput massapprove(connectapi.socialpostmassapprovalinput massapproval) parameters massapproval type: connectapi.socialpostmassapprovalinput a connectapi.socialpostmassapprovalinput body that includes a list of social post ids and the action to approve or reject publishing them. return value type: connectapi.socialpostmassapprovaloutput recallapproval(socialpostid) recall an approval request to publish a social post. api version 46.0 requires chatter no signature public static void recallapproval(string socialpostid) 1469apex reference guide socialengagement class parameters socialpostid type: string id of the social post. return value type: void unfollowsocialpersona(socialpersonaid, socialaccountid) stop following a social persona in its social network. api version 45.0 requires chatter no signature public static void unfollowsocialpersona(string socialpersonaid, string socialaccountid) parameters socialpersonaid type: string id of the social persona to stop following. socialaccountid type: string id of the social account that stops following the social persona. return value type: void unfollowsocialpostpersona(socialpostid, socialaccountid) stop following a social persona of a social post in its social network. api version 45.0 requires chatter no 1470apex reference guide socialengagement class signature public static void unfollowsocialpostpersona(string socialpostid, string socialaccountid) parameters socialpostid type: string id of the social post authored by the social persona to stop following. socialaccountid type: string id of the social account that stops following the social persona. return value type: void unhidesocialpost(socialpostid, socialaccountid) unhide a social post in its social network. api version 46.0 requires chatter no signature public static void unhidesocialpost(string socialpostid, string socialaccountid) parameters socialpostid type: string id of the social post to unhide. socialaccountid type: string id of the social account that unhides the post. return value type: void unlikesocialpost(socialpostid, socialaccountid) unlike a social post in its social network. 1471apex reference guide surveys class api version 46.0 requires chatter no signature public static void unlikesocialpost(string socialpostid, string socialaccountid) parameters socialpostid type: string id of the social post to unlike. socialaccountid type: string id of the social account that unlikes the post. return value type: void surveys class send survey invitations by email. namespace connectapi surveys methods these methods are for surveys. all methods are static. in this section: sendsurveyinvitationemail(surveyid, surveyemailinput) email survey invitations to up to 300 participants. you can email either leads, contacts, or users in your org. either a link to launch the survey or a question can be embedded in the email invitations. sendsurveyinvitationemail(surveyid, surveyemailinput) email survey invitations to up to 300 participants. you can email either leads, contacts, or users in your org. either a link to launch the survey or a question can be embedded in the email invitations. 1472apex reference guide taxplatform class api version 50.0 requires chatter no signature public static connectapi.surveyinvitationemailoutput sendsurveyinvitationemail(string surveyid, connectapi.surveyinvitationemailinput surveyemailinput) parameters surveyid type: string id of the survey. surveyemailinput type: connectapi.surveyinvitationemailinput a connectapi.surveyinvitationemailinput object. return value type: connectapi.surveyinvitationemailoutput taxplatform class apply or cancel tax. namespace connectapi taxplatform methods the following are methods for taxplatform. all methods are static. in this section: calculatetax(calculatetax |
) apply tax or cancel tax. calculatetax(calculatetax) apply tax or cancel tax. 1473apex reference guide topics class api version 55.0 requires chatter no signature global static connectapi.calculatetaxresponse calculatetax(connectapi.calculatetaxrequest calculatetax) parameters calculatetax type: connectapi.calculatetaxrequest represents a request to calculate tax for one or more line items. return value type: connectapi.calculatetaxresponse topics class access information about topics, such as their descriptions, the number of people talking about them, related topics, and information about groups contributing to the topic. update a topic’s name or description, merge topics, and add and remove topics from records and feed items. namespace connectapi topics methods the following are methods for topics. all methods are static. in this section: assigntopic(communityid, recordid, topicid) assign a topic to a record or feed item. assigntopicbyname(communityid, recordid, topicname) assign a topic to a record or feed item. createtopic(communityid, name, description) create a topic. createtopicdatacategoryrules(communityid, datacategorygroup, datacategory, topicnames) create topic and article assignment rules by data category. 1474apex reference guide topics class deletetopic(communityid, topicid) delete a topic. getgroupsrecentlytalkingabouttopic(communityid, topicid) get information about the five groups that most recently contributed to a topic. getrecentlytalkingabouttopicsforgroup(communityid, groupid) get up to five topics most recently used in a group. getrecentlytalkingabouttopicsforuser(communityid, userid) get up to five topics most recently used by a user. getrelatedtopics(communityid, topicid) get up to five topics most closely related to a topic. gettopic(communityid, topicid) get a topic. gettopicdatacategoryrules(communityid, datacategorygroup, datacategory) get topic and article assignment rules by data category. gettopics(communityid, recordid) get the first page of topics assigned to a record or feed item. gettopics(communityid) get the first page of topics for the org or experience cloud site. gettopics(communityid, sortparam) get the first page of sorted topics for the org or community. gettopics(communityid, pageparam, pagesize) get a page of topics. gettopics(communityid, pageparam, pagesize, sortparam) get a page of sorted topics. gettopics(communityid, q, sortparam) get the sorted topics that match the search criteria. gettopics(communityid, q, pageparam, pagesize) get a page of topics that match the search criteria. gettopics(communityid, q, pageparam, pagesize, sortparam) get a page of sorted topics that match the search criteria. gettopics(communityid, q, exactmatch) get the topic that matches the exact, case-insensitive name. gettopicsorfallbacktorenamedtopics(communityid, q, exactmatch, fallbacktorenamedtopics) get the most recent renamed topic match, if there isn’t an exact match. gettopicsuggestions(communityid, recordid, maxresults) get up to a specified number of suggested topics for a record or feed item. gettopicsuggestions(communityid, recordid) get suggested topics for a record or feed item. gettopicsuggestionsfortext(communityid, text, maxresults) get up to a specified number of suggested topics for a string of text. 1475apex reference guide topics class gettopicsuggestionsfortext(communityid, text) get suggested topics for a string of text. gettrendingtopics(communityid) get trending topics for the org or experience cloud site. gettrendingtopics(communityid, maxresults) get up to a specified number of trending topics for the org or experience cloud site. mergetopics(communityid, topicid, idstomerge) merge up to five secondary topics with a primary topic. reassigntopicdatacategoryrules(communityid, datacategorygroup, datacategory, topicnames) reassign topic and article assignment rules by data category by deleting the existing rules and creating new rules. reassigntopicsbyname(communityid, recordid, topicnames |
) reassign all the topics on a record or feed item, that is, remove all the assigned topics on a record or feed item and add topics. optionally, provide a list of suggested topics to assign to a record or feed item to improve future topic suggestions. unassigntopic(communityid, recordid, topicid) remove a topic from a record or feed item. updatetopic(communityid, topicid, topic) update the description or name of a topic or merge up to five secondary topics with a primary topic. updatetopicsforarticlesindatacategory(communityid, datacategorygroup, datacategory, articletopicassignmentjob) assign topics to articles and unassign topics from articles in a data category. assigntopic(communityid, recordid, topicid) assign a topic to a record or feed item. api version 29.0 requires chatter no signature public static connectapi.topic assigntopic(string communityid, string recordid, string topicid) parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string id for a record or feed item. 1476apex reference guide topics class topicid type: string id for a topic. return value type: connectapi.topic usage only users with the assign topics permission can add existing topics to records or feed items. administrators must enable topics for objects before users can add topics to records of that object type. assigntopicbyname(communityid, recordid, topicname) assign a topic to a record or feed item. api version 29.0 requires chatter no signature public static connectapi.topic assigntopicbyname(string communityid, string recordid, string topicname) parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string the id of the record or feed item to which to assign the topic. topicname type: string the name of a new or existing topic. return value type: connectapi.topic 1477apex reference guide topics class usage only users with the assign topics permission can add existing topics to records or feed items. only users with the create topics permission can add new topics to records or feed items. administrators must enable topics for objects before users can add topics to records of that object type. createtopic(communityid, name, description) create a topic. api version 36.0 requires chatter no signature public static connectapi.topic createtopic(string communityid, string name, string description) parameters communityid type: string id for an experience cloud site, internal, or null. name type: string the name of the topic. description type: string the description of the topic. return value type: connectapi.topic usage only users with the create topics permission can create a topic. createtopicdatacategoryrules(communityid, datacategorygroup, datacategory, topicnames) create topic and article assignment rules by data category. 1478apex reference guide topics class api version 40.0 requires chatter no signature public static connectapi.topicpage createtopicdatacategoryrules(string communityid, string datacategorygroup, string datacategory, connectapi.topicnamesinput topicnames) parameters communityid type: string id for an experience cloud site, internal, or null. datacategorygroup type: string the data category group used by articles. datacategory type: string the data category used by articles. topicnames type: connectapi.topicnamesinput a connectapi.topicnamesinput object with the names of topics to assign to articles in a data category. return value type: connectapi.topicpage deletetopic(communityid, topicid) delete a topic. api version 29.0 requires chatter no signature public static void deletetopic(string communityid, string topicid) 1479apex reference guide topics class parameters communityid type: string, id for an experience cloud site, internal, or null. topicid type: string id for a topic. return value type: void usage only users with the delete topics or modify all data permission can delete topics. topic deletion is asynchronous. if a topic is requested before the deletion completes, the response is successful and the isbeingdeleted property of connecta |
pi.topic is true in version 33.0 and later. if a topic is requested after the deletion completes, the response is connectapi.notfoundexception. getgroupsrecentlytalkingabouttopic(communityid, topicid) get information about the five groups that most recently contributed to a topic. api version 29.0 available to guest users 32.0 requires chatter yes signature public static connectapi.chattergroupsummarypage getgroupsrecentlytalkingabouttopic(string communityid, string topicid) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id for a topic. 1480apex reference guide topics class return value type: connectapi.chattergroupsummarypage 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: settestgetgroupsrecentlytalkingabouttopic(communityid, topicid, result) apex developer guide: testing connectapi code getrecentlytalkingabouttopicsforgroup(communityid, groupid) get up to five topics most recently used in a group. api version 29.0 available to guest users 32.0 requires chatter yes signature public static connectapi.topicpage getrecentlytalkingabouttopicsforgroup(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.topicpage 1481apex reference guide topics 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: settestgetrecentlytalkingabouttopicsforgroup(communityid, groupid, result) apex developer guide: testing connectapi code getrecentlytalkingabouttopicsforuser(communityid, userid) get up to five topics most recently used by a user. api version 29.0 available to guest users 32.0 requires chatter yes signature public static connectapi.topicpage getrecentlytalkingabouttopicsforuser(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.topicpage 1482 |
apex reference guide topics 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: settestgetrecentlytalkingabouttopicsforuser(communityid, userid, result) apex developer guide: testing connectapi code getrelatedtopics(communityid, topicid) get up to five topics most closely related to a topic. two topics that are assigned to the same feed item at least three times are related. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage getrelatedtopics(string communityid, string topicid) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id for a topic. return value type: connectapi.topicpage 1483apex reference guide topics 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: settestgetrelatedtopics(communityid, topicid, result) apex developer guide: testing connectapi code gettopic(communityid, topicid) get a topic. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topic gettopic(string communityid, string topicid) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id for a topic. return value type: connectapi.topic gettopicdatacategoryrules(communityid, datacategorygroup, datacategory) get topic and article assignment rules by data category. api version 40.0 1484apex reference guide topics class requires chatter no signature public static connectapi.topicpage gettopicdatacategoryrules(string communityid, string datacategorygroup, string datacategory) parameters communityid type: string id for an experience cloud site, internal, or null. datacategorygroup type: string the data category group used by articles. datacategory type: string the data category used by articles. return value type: connectapi.topicpage gettopics(communityid, recordid) get the first page of topics assigned to a record or feed item. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettopics(string communityid, string recordid) parameters communityid type: string 1485apex reference guide topics class id for an experience cloud site, internal, or null. recordid type: string id for a record or feed item. return value type: connectapi.topicpage usage administrators must enable topics for objects before users can add topics to records of that object type. gettopics(communityid) get the first page of topics for the org or experience cloud site. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettopics(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.topicpage gettopics(communityid, sortparam) get the first page of sorted topics for the org or community. api version 29.0 1486apex reference guide topics class available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettopics(string communityid, connectapi.topicsort sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. sortparam type: connectapi.topicsort values are: • populardesc—sorts topics by popularity with the most popular first. this value is the default. • alphaasc—sorts topics alphabetically. return value type: connectapi.topicpage gettopics(communityid, pageparam, pagesize) get a page of topics. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage get |
topics(string communityid, integer pageparam, integer pagesize) 1487apex reference guide topics class 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.topicpage gettopics(communityid, pageparam, pagesize, sortparam) get a page of sorted topics. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettopics(string communityid, integer pageparam, integer pagesize, connectapi.topicsort sortparam) 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 1488apex reference guide topics 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. sortparam type: connectapi.topicsort values are: • populardesc—sorts topics by popularity with the most popular first. this value is the default. • alphaasc—sorts topics alphabetically. return value type: connectapi.topicpage gettopics(communityid, q, sortparam) get the sorted topics that match the search criteria. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettopics(string communityid, string q, connectapi.topicsort sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the string must contain at least two characters, not including wildcards. sortparam type: connectapi.topicsort values are: • populardesc—sorts topics by popularity with the most popular first. this value is the default. • alphaasc—sorts topics alphabetically. 1489apex reference guide topics class return value type: connectapi.topicpage gettopics(communityid, q, pageparam, pagesize) get a page of topics that match the search criteria. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettopics(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 string must contain at least two characters, not including 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.topicpage gettopics(communityid, q, pageparam, pagesize, sortparam) get a page of sorted topics that match the search criteria. 1490apex reference guide topics class api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettopics(string communityid, string q, integer pageparam, integer pagesize, connectapi.topicsort sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the string must contain at least two characters, not including 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. sortparam type: connectapi.topicsort values |
are: • populardesc—sorts topics by popularity with the most popular first. this value is the default. • alphaasc—sorts topics alphabetically. return value type: connectapi.topicpage gettopics(communityid, q, exactmatch) get the topic that matches the exact, case-insensitive name. 1491apex reference guide topics class api version 33.0 available to guest users 33.0 requires chatter no signature public static connectapi.topicpage gettopics(string communityid, string q, boolean exactmatch) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the string must contain at least two characters, not including wildcards. exactmatch type: boolean specify true to find a topic by its exact, case-insensitive name. return value type: connectapi.topicpage gettopicsorfallbacktorenamedtopics(communityid, q, exactmatch, fallbacktorenamedtopics) get the most recent renamed topic match, if there isn’t an exact match. api version 35.0 available to guest users 35.0 requires chatter no 1492apex reference guide topics class signature public static connectapi.topicpage gettopicsorfallbacktorenamedtopics(string communityid, string q, boolean exactmatch, boolean fallbacktorenamedtopics) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string specifies the string to search. the string must contain at least two characters, not including wildcards. exactmatch type: boolean specify true to find a topic by its exact, case-insensitive name or to find the most recent renamed topic match if there isn’t an exact match. fallbacktorenamedtopics type: boolean specify true and if there isn’t an exact match, the most recent renamed topic match is returned. if there are multiple renamed topic matches, only the most recent is returned. if there are no renamed topic matches, an empty collection is returned. return value type: connectapi.topicpage gettopicsuggestions(communityid, recordid, maxresults) get up to a specified number of suggested topics for a record or feed item. api version 29.0 requires chatter no signature public static connectapi.topicsuggestionpage gettopicsuggestions(string communityid, string recordid, integer maxresults) parameters communityid type: string id for an experience cloud site, internal, or null. 1493apex reference guide topics class recordid type: string id for a record or feed item. maxresults type: integer maximum number of topic suggestions that get returned. the default is 5. value must be greater than 0 and less than or equal to 25. return value type: connectapi.topicsuggestionpage usage administrators must enable topics for objects before users can see suggested topics for records of that object type. 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: settestgettopicsuggestions(communityid, recordid, maxresults, result) apex developer guide: testing connectapi code gettopicsuggestions(communityid, recordid) get suggested topics for a record or feed item. api version 29.0 requires chatter no signature public static connectapi.topicsuggestionpage gettopicsuggestions(string communityid, string recordid) parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string id for a record or feed item. 1494apex reference guide topics class return value type: connectapi.topicsuggestionpage usage administrators must enable topics for objects before users can see suggested topics for records of that object type. 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: settestgettopicsuggestions(communityid, recordid, result) apex developer guide: testing connectapi code gettopicsuggestionsfortext(communityid, text, maxresults) |
get up to a specified number of suggested topics for a string of text. api version 29.0 requires chatter no signature public static connectapi.topicsuggestionpage gettopicsuggestionsfortext(string communityid, string text, integer maxresults) parameters communityid type: string id for an experience cloud site, internal, or null. text type: string string of text. maxresults type: integer maximum number of topic suggestions that get returned. the default is 5. value must be greater than 0 and less than or equal to 25. return value type: connectapi.topicsuggestionpage 1495apex reference guide topics 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: settestgettopicsuggestionsfortext(communityid, text, maxresults, result) apex developer guide: testing connectapi code gettopicsuggestionsfortext(communityid, text) get suggested topics for a string of text. api version 29.0 requires chatter no signature public static connectapi.topicsuggestionpage gettopicsuggestionsfortext(string communityid, string text) parameters communityid type: string id for an experience cloud site, internal, or null. text type: string string of text. return value type: connectapi.topicsuggestionpage 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: settestgettopicsuggestionsfortext(communityid, text, result) apex developer guide: testing connectapi code 1496apex reference guide topics class gettrendingtopics(communityid) get trending topics for the org or experience cloud site. api version 29.0 available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettrendingtopics(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.topicpage usage the more frequently people add a specific topic to their posts and comments and comment on or like posts with the same topic over a short period, the more likely it is to become a trending topic. for example, if your coworkers are attending the upcoming dreamforce conference and have started discussing it in chatter, you might see a trending topic for dreamforce. a trending topic is not solely based on popularity and usually relates to a one-time or infrequent event that has a spike in activity, such as a conference or a project deadline. 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: settestgettrendingtopics(communityid, result) apex developer guide: testing connectapi code gettrendingtopics(communityid, maxresults) get up to a specified number of trending topics for the org or experience cloud site. api version 29.0 1497apex reference guide topics class available to guest users 32.0 requires chatter no signature public static connectapi.topicpage gettrendingtopics(string communityid, integer maxresults) parameters communityid type: string id for an experience cloud site, internal, or null. maxresults type: integer maximum number of topic suggestions that get returned. the default is 5. value must be greater than 0 and less than or equal to 25. return value type: connectapi.topicpage usage the more frequently people add a specific topic to their posts and comments and comment on or like posts with the same topic over a short period, the more likely it is to become a trending topic. for example, if your coworkers are attending the upcoming dreamforce conference and have started discussing it in chatter, you might see a trending topic for dreamforce. a trending topic is not solely based on popularity and usually relates to a one-time or infrequent event that has a spike in activity, such as a conference or a project deadline. 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: settestgettrendingtopics(communityid, maxresults, result) apex developer guide: testing connectapi code mergetopics(communityid, topicid, idstomerge) merge up to five secondary topics with a primary topic. api version 33.0 1498apex reference guide topics class requires chatter no signature public static connectapi.topic mergetopics(string communityid, string topicid, list<string> idstomerge) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string the id for the primary topic for the merge. if this topic is a managed topic, it retains its topic type, topic images, and children topics. idstomerge type: list<string> a list of up to five comma-separated secondary topic ids to merge with the primary topic. if any of the secondary topics are navigational or featured topics, they lose their topic type, topic images, and children topics. their feed items are reassigned to the primary topic. if you merge a topic with a content topic, the content associations are preserved. if you merge a topic with an inactive endorsee, the endorsement isn’t mapped to the primary topic. return value type: connectapi.topic usage only users with the delete topics or modify all data permission can merge topics. reassigntopicdatacategoryrules(communityid, datacategorygroup, datacategory, topicnames) reassign topic and article assignment rules by data category by deleting the existing rules and creating new rules. api version 40.0 requires chatter no signature public static connectapi.topicpage reassigntopicdatacategoryrules(string communityid, string datacategorygroup, string datacategory, connectapi.topicnamesinput topicnames) 1499apex reference guide topics class parameters communityid type: string id for an experience cloud site, internal, or null. datacategorygroup type: string the data category group used by articles. datacategory type: string the data category used by articles. topicnames type: connectapi.topicnamesinput a connectapi.topicnamesinput object with the names of topics to reassign to articles in a data category. return value type: connectapi.topicpage reassigntopicsbyname(communityid, recordid, topicnames) reassign all the topics on a record or feed item, that is, remove all the assigned topics on a record or feed item and add topics. optionally, provide a list of suggested topics to assign to a record or feed item to improve future topic suggestions. api version 35.0 requires chatter no signature public static connectapi.topicpage reassigntopicsbyname(string communityid, string recordid, connectapi.topicnamesinput topicnames) parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string the id of the record or feed item to which to assign the topic. topicnames type: connectapi.topicnamesinput 1500apex reference guide topics class a list of topics to replace the currently assigned topics. optionally, a list of suggested topics to assign to improve future topic suggestions. return value type: connectapi.topicpage usage only users with the assign topics permission can remove topics from records or feed items and add existing topics to records or feed items. only users with the create topics permission can add new topics to records or feed items. administrators must enable topics for objects before users can add topics to records of that object type. unassigntopic(communityid, recordid, topicid) remove a topic from a record or feed item. api version 29.0 requires chatter no signature public static void unassigntopic(string communityid, string recordid, string topicid) parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string id for a record or feed item. topicid type: string id for a topic. return value type: void usage only users with the assign topics permission can remove topics from feed items or records. administrators must enable topics for objects before users can add topics to records of that object type. 1501apex reference guide topics class updatetopic(communityid, topicid, topic) update the description or name of a topic or merge |
up to five secondary topics with a primary topic. api version 29.0 requires chatter no signature public static connectapi.topic updatetopic(string communityid, string topicid, connectapi.topicinput topic) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id for a topic. topic type: connectapi.topicinput a connectapi.topicinput object containing the name and description of the topic or up to five comma-separated secondary topic ids to merge with the primary topic. return value type: connectapi.topic usage only users with the edit topics or modify all data permission can update topic names and descriptions. only users with the delete topics or modify all data permission can merge topics. updatetopicsforarticlesindatacategory(communityid, datacategorygroup, datacategory, articletopicassignmentjob) assign topics to articles and unassign topics from articles in a data category. api version 40.0 1502apex reference guide topics class requires chatter no signature public static connectapi.topicpage updatetopicsforarticlesindatacategory(string communityid, string datacategorygroup, string datacategory, connectapi.articletopicassignmentjobinput articletopicassignmentjob) parameters communityid type: string id for an experience cloud site, internal, or null. datacategorygroup type: string the data category group used by articles. datacategory type: string the data category used by articles. articletopicassignmentjob type: connectapi.articletopicassignmentjobinput a connectapi.articletopicassignmentjobinput object that indicates the operation to take on which topics. return value type: connectapi.topicpage topics test methods the following are the test methods for topics. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. settestgetgroupsrecentlytalkingabouttopic(communityid, topicid, result) register a connectapi.chattergroupsummarypage object to be returned when the matching connectapi.getgroupsrecentlytalkingabouttopic method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0 signature public static void settestgetgroupsrecentlytalkingabouttopic(string communityid, string topicid, connectapi.chattergroupsummarypage result) 1503apex reference guide topics class parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id for a topic. result type: connectapi.chattergroupsummarypage object containing test data. return value type: void see also: getgroupsrecentlytalkingabouttopic(communityid, topicid) apex developer guide: testing connectapi code settestgetrecentlytalkingabouttopicsforgroup(communityid, groupid, result) register a connectapi.topicpage object to be returned when the matching connectapi.getrecentlytalkingabouttopicsforgroup method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0 signature public static void settestgetrecentlytalkingabouttopicsforgroup(string communityid, string groupid, connectapi.topicpage result) parameters communityid type: string id for an experience cloud site, internal, or null. groupid type: string id for a group. result type: connectapi.topicpage object containing test data. 1504apex reference guide topics class return value type: void see also: getrecentlytalkingabouttopicsforgroup(communityid, groupid) apex developer guide: testing connectapi code settestgetrecentlytalkingabouttopicsforuser(communityid, userid, result) register a connectapi.topicpage object to be returned when the matching connectapi.getrecentlytalkingabouttopicsforuser method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0 signature public static void settestgetrecentlytalkingabouttopicsforuser(string communityid, string userid, connectapi.topicpage result) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id for a user. |
result type: connectapi.topicpage specify the test topics page. return value type: void see also: getrecentlytalkingabouttopicsforuser(communityid, userid) apex developer guide: testing connectapi code settestgetrelatedtopics(communityid, topicid, result) register a connectapi.topicpage object to be returned when the matching connectapi.getrelatedtopics method is called in a test context. use the method with the same parameters or you receive an exception. 1505apex reference guide topics class api version 29.0 signature public static void settestgetrelatedtopics(string communityid, string topicid, connectapi.topicpage result) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id for a topic. result type: connectapi.topicpage object containing test data. return value type: void see also: getrelatedtopics(communityid, topicid) apex developer guide: testing connectapi code settestgettopicsuggestions(communityid, recordid, maxresults, result) register a connectapi.topicsuggestionpage object to be returned when the matching connectapi.gettopicsuggestions method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0 signature public static void settestgettopicsuggestions(string communityid, string recordid, integer maxresults, connectapi.topicsuggestionpage result) parameters communityid type: string 1506apex reference guide topics class id for an experience cloud site, internal, or null. recordid type: string id for a record or feed item. maxresults type: integer maximum number of topic suggestions that get returned. the default is 5. value must be greater than 0 and less than or equal to 25. result type: connectapi.topicsuggestionpage specify the test topic suggestions page. return value type: void see also: gettopicsuggestions(communityid, recordid, maxresults) apex developer guide: testing connectapi code settestgettopicsuggestions(communityid, recordid, result) register a connectapi.topicsuggestionpage object to be returned when the matching connectapi.gettopicsuggestions method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0 signature public static void settestgettopicsuggestions(string communityid, string recordid, connectapi.topicsuggestionpage result) parameters communityid type: string id for an experience cloud site, internal, or null. recordid type: string id for a record or feed item. result type: connectapi.topicsuggestionpage 1507apex reference guide topics class object containing test data. return value type: void see also: gettopicsuggestions(communityid, recordid) apex developer guide: testing connectapi code settestgettopicsuggestionsfortext(communityid, text, maxresults, result) register a connectapi.topicsuggestionpage object to be returned when the matching connectapi.gettopicsuggestionsfortext method is called in a test context.use the method with the same parameters or you receive an exception. api version 29.0 signature public static void settestgettopicsuggestionsfortext(string communityid, string text, integer maxresults, connectapi.topicsuggestionpage result) parameters communityid type: string id for an experience cloud site, internal, or null. text type: string string of text. maxresults type: integer maximum number of topic suggestions that get returned. the default is 5. value must be greater than 0 and less than or equal to 25. result type: connectapi.topicsuggestionpage object containing test data. 1508apex reference guide topics class return value type: void see also: gettopicsuggestionsfortext(communityid, text, maxresults) apex developer guide: testing connectapi code settestgettopicsuggestionsfortext(communityid, text, result) register a connectapi.topicsuggestionpage object to be returned when the matching connectapi.gettopicsuggestionsfortext method is called in a test context.use the method with the same parameters or |
you receive an exception. api version 29.0 signature public static void settestgettopicsuggestionsfortext(string communityid, string text, connectapi.topicsuggestionpage result) parameters communityid type: string id for an experience cloud site, internal, or null. text type: string string of text. result type: connectapi.topicsuggestionpage object containing test data. return value type: void see also: gettopicsuggestionsfortext(communityid, text) apex developer guide: testing connectapi code settestgettrendingtopics(communityid, result) register a connectapi.topicpage object to be returned when the matching connectapi.gettrendingtopics method is called in a test context. use the method with the same parameters or you receive an exception. 1509apex reference guide topics class api version 29.0 signature public static void settestgettrendingtopics(string communityid, connectapi.topicpage result) parameters communityid type: string id for an experience cloud site, internal, or null. result type: connectapi.topicpage object containing test data. return value type: void see also: gettrendingtopics(communityid) apex developer guide: testing connectapi code settestgettrendingtopics(communityid, maxresults, result) register a connectapi.topicpage object to be returned when the matching connectapi.gettrendingtopics method is called in a test context. use the method with the same parameters or you receive an exception. api version 29.0 signature public static void settestgettrendingtopics(string communityid, integer maxresults, connectapi.topicpage result) parameters communityid type: string id for an experience cloud site, internal, or null. maxresults type: integer 1510apex reference guide userprofiles class maximum number of topic suggestions that get returned. the default is 5. value must be greater than 0 and less than or equal to 25. result type: connectapi.topicpage object containing test data. return value type: void see also: gettrendingtopics(communityid, maxresults) apex developer guide: testing connectapi code userprofiles class access user profile data. the user profile data populates the profile page (also called the chatter profile page). this data includes user information (such as address, manager, and phone number), some user capabilities (permissions), and a set of subtab apps, which are custom tabs on the profile page. namespace connectapi userprofiles methods the following are methods for userprofiles. all methods are static. in this section: deletebannerphoto(communityid, userid) delete a user’s banner photo. deletephoto(communityid, userid) delete a user’s photo. getbannerphoto(communityid, userid) get a user’s banner photo. getphoto(communityid, userid) get a user’s photo. getuserprofile(communityid, userid) get the user profile of the context user. setbannerphoto(communityid, userid, fileid, versionnumber) set an uploaded file as a user’s banner photo. setbannerphoto(communityid, userid, fileupload) set a file that hasn’t been uploaded as a user’s banner photo. 1511apex reference guide userprofiles class setbannerphotowithattributes(communityid, userid, bannerphoto) set and crop an uploaded file as a user’s banner photo. setbannerphotowithattributes(communityid, userid, bannerphoto, fileupload) set and crop a file that hasn’t been uploaded as a user’s banner photo. 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 a 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. deletebannerphoto(communityid, userid |
) delete a user’s banner photo. api version 36.0 requires chatter no signature public static void deletebannerphoto(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: void deletephoto(communityid, userid) delete a user’s photo. 1512apex reference guide userprofiles class api version 35.0 requires chatter no 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 getbannerphoto(communityid, userid) get a user’s banner photo. api version 36.0 requires chatter no signature public static connectapi.bannerphoto getbannerphoto(string communityid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. 1513apex reference guide userprofiles class return value type: connectapi.bannerphoto getphoto(communityid, userid) get a user’s photo. api version 35.0 available to guest users 35.0 requires chatter no 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 getuserprofile(communityid, userid) get the user profile of the context user. api version 29.0 requires chatter yes 1514apex reference guide userprofiles class signature public static connectapi.userprofile getuserprofile(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.userprofile setbannerphoto(communityid, userid, fileid, versionnumber) set an uploaded file as a user’s banner photo. api version 36.0 requires chatter no signature public static connectapi.bannerphoto setbannerphoto(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 of the user. fileid type: string id of the uploaded file to use as the user banner. the key prefix must be 069, and the image must be smaller than 8 mb. versionnumber type: integer 1515apex reference guide userprofiles class version number of the file. specify an existing version number or, to get the latest version, specify null. return value type: connectapi.bannerphoto usage photos are processed asynchronously and might not be visible right away. setbannerphoto(communityid, userid, fileupload) set a file that hasn’t been uploaded as a user’s banner photo. api version 36.0 requires chatter no signature public static connectapi.bannerphoto setbannerphoto(string communityid, string userid, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. 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 photos are processed asynchronously and might not be visible right away. 1516apex reference guide userprofiles class setbannerphotowithattributes(communityid, userid, bannerphoto) set and crop an uploaded file as a user’s banner photo. api version 36.0 requires chatter no signature public static connectapi.bannerphoto setbannerphotowithattributes(string community |
id, string userid, connectapi.bannerphotoinput bannerphoto) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. 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 photos are processed asynchronously and might not be visible right away. setbannerphotowithattributes(communityid, userid, bannerphoto, fileupload) set and crop a file that hasn’t been uploaded as a user’s banner photo. api version 36.0 requires chatter no 1517apex reference guide userprofiles class signature public static connectapi.bannerphoto setbannerphotowithattributes(string communityid, string userid, connectapi.bannerphotoinput bannerphoto, connectapi.binaryinput fileupload) parameters communityid type: string id for an experience cloud site, internal, or null. userid type: string id of the user. 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 photos are processed asynchronously and might not be visible right away. setphoto(communityid, userid, fileid, versionnumber) set an uploaded file as a user’s photo. api version 35.0 requires chatter no signature public static connectapi.photo setphoto(string communityid, string userid, string fileid, integer versionnumber) 1518apex reference guide userprofiles class 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. fileid type: string id of an uploaded file. 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 a user’s photo. api version 35.0 requires chatter no 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 1519apex reference guide userprofiles class 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. 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 35.0 requires chatter no 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 1520apex reference guide zones class usage photos are processed asynchronously and might not be visible right away. setphotowithattributes(communityid, userid, photo, fileupload) set and crop a file that hasn’t been uploaded as a user’s photo. api version 35.0 requires chatter no 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. zones class access information about chatter answers zones in your organization. zones organize questions into logical groups, with each zone having its own focus and unique questions. 1521apex reference guide zones class note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. namespace connectapi zones methods the following are methods for zones. all methods are static. in this section: getzone(communityid, zoneid) get a zone. getzones(communityid) get a list of zones. getzones(communityid, pageparam, pagesize) get a page of zones. searchinzone(communityid, zoneid, q, filter) search articles or questions in a zone. searchinzone(communityid, zoneid, q, filter, pageparam, pagesize) search a page of articles or questions in a zone. searchinzone(communityid, zoneid, q, filter, language) search articles or questions in a zone, and specify the language of the results. getzone(communityid, zoneid) get a zone. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 29.0 requires chatter no signature public static connectapi.zone getzone(string communityid, string zoneid) 1522apex reference guide zones class parameters communityid type: string id for an experience cloud site, internal, or null. zoneid type: string the id of a zone. return value type: connectapi.zone getzones(communityid) get a list of zones. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 29.0 requires chatter no signature public static connectapi.zonepage getzones(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.zonepage getzones(communityid, pageparam, pagesize) get a page of zones. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. 1523apex reference guide zones class api version 29.0 requires chatter no signature public static connectapi.zone getzones(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.zonepage searchinzone(communityid, zoneid, q, filter) search articles or questions in a zone. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 29.0 available to guest users 37.0 requires chatter no 1524apex reference guide zones class signature public static connectapi.zonesearchpage searchinzone(string communityid, string zoneid, string q, connectapi.zonesearchresulttype filter) parameters communityid type: string id for an experience cloud site, internal, or null. zoneid type: string id of a zone. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.zonesearchresulttype a zonesearchresulttype enum value. one of the following: • article—search results contain only articles. • question—search results contain only questions. return value type: connectapi.zonesearchpage 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: settestsearchinzone(communityid, zoneid, q, filter, result) apex developer guide: testing connectapi code searchinzone(communityid, zoneid, q, filter, pageparam, pagesize) search a page of articles or questions in a zone. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 29.0 1525apex reference guide zones class available to guest users 37.0 requires chatter no signature public static connectapi.zonesearchpage searchinzone(string communityid, string zoneid, string q, connectapi.zonesearchresulttype filter, string pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. zoneid type: string id of a zone. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.zonesearchresulttype a zonesearchresulttype enum value. one of the following: • article—search results contain only articles. • question—search results contain only questions. 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.zonesearchpage 1526apex reference guide zones 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: settestsearchinzone(communityid, zoneid, q, filter, pageparam, pagesize, result) apex developer guide: testing connectapi code searchinzone(communityid, zoneid, q, filter, language) search articles or questions in a zone, and specify the language of the results. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 36.0 |
available to guest users 37.0 requires chatter no signature public static connectapi.zonesearchpage searchinzone(string communityid, string zoneid, string q, connectapi.zonesearchresulttype filter, string language) parameters communityid type: string id for an experience cloud site, internal, or null. zoneid type: string id of a zone. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.zonesearchresulttype • article—search results contain only articles. 1527apex reference guide zones class • question—search results contain only questions. language type: string the language of the articles or questions. the value must be a salesforce supported locale code. return value type: connectapi.zonesearchpage 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: settestsearchinzone(communityid, zoneid, q, filter, language, result) zones test methods the following are the test methods for zones. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. settestsearchinzone(communityid, zoneid, q, filter, result) register a connectapi.zonesearchpage object to be returned when searchinzone(communityid, zoneid, q, filter) is called in a test context. use the method with the same parameters or you receive an exception. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 29.0 signature public static void settestsearchinzone(string communityid, string zoneid, string q, connectapi.zonesearchresulttype filter, connectapi.zonesearchpage result) parameters communityid type: string use either the id for an experience cloud site, internal, or null. zoneid type: string the id of a zone. 1528apex reference guide zones class q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.zonesearchresulttype a zonesearchresulttype enum value. one of the following: • article—search results contain only articles. • question—search results contain only questions. result type: connectapi.zonesearchpage the object containing test data. return value type: void see also: searchinzone(communityid, zoneid, q, filter) apex developer guide: testing connectapi code settestsearchinzone(communityid, zoneid, q, filter, pageparam, pagesize, result) register a connectapi.zonesearchpage object to be returned when searchinzone(communityid, zoneid, q, filter, pageparam, pagesize) is called in a test context. use the method with the same parameters or you receive an exception. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 29.0 signature public static void settestsearchinzone(string communityid, string zoneid, string q, connectapi.zonesearchresulttype filter, string pageparam, integer pagesize, connectapi.zonesearchpage result) parameters communityid type: string use either the id for an experience cloud site, internal, or null. 1529apex reference guide zones class zoneid type: string the id of a zone. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.zonesearchresulttype a zonesearchresulttype enum |
value. one of the following: • article—search results contain only articles. • question—search results contain only questions. pageparam type: string specifies the page token to be used 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. result type: connectapi.zonesearchpage the object containing test data. return value type: void see also: searchinzone(communityid, zoneid, q, filter, pageparam, pagesize) apex developer guide: testing connectapi code settestsearchinzone(communityid, zoneid, q, filter, language, result) register a connectapi.zonesearchpage object to be returned when searchinzone(communityid, zoneid, q, filter, language) is called in a test context. use the method with the same parameters or you receive an exception. note: with the spring ’18 release, salesforce no longer supports chatter answers. users of chatter answers can post, answer, comment, or view existing chatter answers data, but support and updates are scheduled to end. we recommend transitioning to chatter questions. for more information, see end of support for chatter answers in spring ’18. api version 36.0 1530apex reference guide connectapi input classes signature public static void settestsearchinzone(string communityid, string zoneid, string q, connectapi.zonesearchresulttype filter, string language, connectapi.zonesearchpage result) parameters communityid type: string use either the id for an experience cloud site, internal, or null. zoneid type: string the id of a zone. q type: string specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.zonesearchresulttype • article—search results contain only articles. • question—search results contain only questions. language type: string the language of the articles or questions. the value must be a salesforce supported locale code. in an <apex:page>, the default value is the language of the page. otherwise, the default value is the user's locale. result type: connectapi.zonesearchpage the object containing test data. return value type: void see also: searchinzone(communityid, zoneid, q, filter, language) apex developer guide: testing connectapi code connectapi input classes some connectapi methods take arguments that are instances of connectapi input classes. input classes are concrete unless marked abstract in this documentation. concrete input classes have public constructors that have no parameters. some methods have parameters that are typed with an abstract class. you must pass in an instance of a concrete child class for these parameters. 1531apex reference guide connectapi input classes most input class properties can be set. read-only properties are noted in this documentation. connectapi.actionlinkdefinitioninput the definition of an action link. an action link is a button on a feed element. clicking an action link can take a user to a web page, initiate a file download, or invoke an api call to salesforce or to an external server. an action link includes a url and an http method, and can include a request body and header information, such as an oauth token for authentication. use action links to integrate salesforce and third-party services into the feed so that users can drive productivity and accelerate innovation. usage you can use context variables in the actionurl, headers, and requestbody properties. use context variables to pass information about the user who executed the action link to your server-side code. salesforce substitutes the value when the action link is executed. the available context variables are: context variable description {!actionlinkid} the id of the action link the user executed. {!actionlinkgroupid} the id of the action link group containing the action link the user executed. {!communityid} the id of the site in which the user executed the action link. the value for your internal org is the empty key "000000000000000000". {!communityurl} the url of the site in which the user executed the action link. the value for your internal org is empty string |
"". {!orgid} the id of the org in which the user executed the action link. {!userid} the id of the user that executed the action link. property type description required or available version optional actiontype connectapi. defines the type of action link. values are: required 33.0 actionlinktype • api—the action link calls a can be defined in an synchronous api at the action url. action link template. salesforce sets the status to successfulstatus or failedstatus based on the http status code returned by your server. • apiasync—the action link calls an asynchronous api at the action url. the action remains in a pendingstatus state until a third party makes a request to /connect/action-links/actionlinkid to set the status to 1532 |
apex reference guide connectapi input classes property type description required or available version optional successfulstatus or failedstatus when the asynchronous operation is complete. • download—the action link downloads a file from the action url. • ui—the action link takes the user to a web page at the action url. use ui if you need to load a page before the user performs an action, for example, to have the user provide input or view something before the action happens. note: invoking apiasync action links from an app requires a call to set the status. however, there isn’t currently a way to set the status of an action link using apex. to set the status, use connect rest api. see the action link resource in the connect rest api developer guide for more information. actionurl string the action link url. for example, a ui required 33.0 action link url is a web page. a can be defined in an download action link url is a link to the action link template. file to download. ui and download action link urls are provided to clients. an api or apiasync action link url is a rest resource. api and apiasync action link urls aren’t provided to clients. links to salesforce can be relative. all other links must be absolute and start with https://. tip: to avoid issues due to upgrades or changing functionality in your api, we recommend using a versioned api for actionurl, for example, https://www.example.com/ api/v1/exampleresource. if your api isn’t versioned, you can use the expirationdate property of the connectapi.actionlinkgroup definitioninput class to 1533apex reference guide connectapi input classes property type description required or available version optional avoid issues due to upgrades or changing functionality in your api. excludeduserid string id of a single user to exclude from optional 33.0 performing the action. if you specify an can be defined in an excludeduserid, you can’t specify a action link template userid. using the user visibility and custom user alias fields. groupdefault boolean true if this action is the default action link optional 33.0 in the action link group; false otherwise. can be defined in an there can be only one default action link action link template. per action link group. the default action link gets distinct styling in the salesforce ui. headers list<connectapi. the request headers for the api and optional 33.0 requestheader apiasync action link types. can be defined in an input> see action links overview, authentication, action link template. and security. labelkey string key for the set of labels to show in the user required 33.0 interface. a set includes labels for these can be defined in an states: newstatus, pendingstatus, action link template. successstatus, failedstatus. for example, if you use the approve key, you get these labels: approve, pending, approved, failed. for a complete list of keys and labels, see action links labels. if none of the predefined labels work for your action link, use a custom label. to use a custom label, create an action link template. see create action link templates. method connectapi. one of these http methods: required 33.0 httprequest • httpdelete—returns http 204 on can be defined in an method success. response body or output class action link template. is empty. • httpget—returns http 200 on success. • httphead—returns http 200 on success. response body or output class is empty. 1534apex reference guide connectapi input classes property type description required or available version optional • httppatch—returns http 200 on success or http 204 if the response body or output class is empty. • httppost—returns http 201 on success or http 204 if the response body or output class is empty. exceptions are the batch posting resources and methods, which return http 200 on success. • httpput—return http 200 on success or http 204 if the response body or output class is empty. requestbody string the request body for api action links. optional 33.0 can be defined in an note: escape quotation mark action link template. characters in the request |
body value. requires boolean true to require the user to confirm the required 33.0 confirmation action; false otherwise. can be defined in an action link template. userid string the id of the user who can execute the optional 33.0 action. if not specified or null, any user can be defined in an can execute the action. if you specify a action link template userid, you can’t specify an using the user excludeduserid. visibility and custom user alias fields. see also: connectapi.actionlinkgroupdefinitioninput connectapi.actionlinkgroupdefinitioninput the definition of an action link group. all action links must belong to a group. action links in a group are mutually exclusive and share some properties. define standalone actions in their own action group. action link definition can be sensitive to a third party (for example, oauth bearer token headers). for this reason, only calls made from the apex namespace that created the action link definition can read, modify, or delete the definition. in addition, the user making the call must have created the definition or have view all data permission. 1535apex reference guide connectapi input classes property type description required or available version optional actionlinks list<connectapi. the action links that make up this group. required to 33.0 actionlink instantiate this within an action link group, action links are definitioninput> action link group displayed in the order listed in the without a template. actionlinks property of the connectapi.actionlinkgroup to instantiate from a definitioninput class. within a feed template, don’t item, action link groups are displayed in the specify a value. order specified in the actionlinkgroupids property of the connectapi.associatedactions capabilityinput class. you can create up to three action links in a primary group and up to four in an overflow group. category connectapi. indicates the priority and relative locations required to 33.0 platformaction of action links in an associated feed item. instantiate this groupcategory values are: action link group without a template. • primary—the action link group is displayed in the body of the feed to instantiate from a element. template, don’t specify a value. • overflow—the action link group is displayed in the overflow menu of the feed element. executions connectapi. defines the number of times an action link required to 33.0 allowed actionlink can be executed. values are: instantiate this executionsallowed action link group • once—an action link can be executed without a template. only once across all users. to instantiate from a • onceperuser—an action link can template, don’t be executed only once for each user. specify a value. • unlimited—an action link can be executed an unlimited number of times by each user. if the action link’s actiontype is api or apiasync, you can’t use this value. expirationdate datetime iso 8601 date string, for example, required to 33.0 2011-02-25t18:24:31.000z, that represents instantiate this action link group without a template. 1536apex reference guide connectapi input classes property type description required or available version optional the date and time this action link group is optional to removed from associated feed items and instantiate from a can no longer be executed. the template. expirationdate must be within one year of the creation date. if the action link group definition includes an oauth token, it is a good idea to set the expiration date of the action link group to the same value as the expiration date of the oauth token so that users can’t execute the action link and get an oauth error. to set a date when instantiating from a template, see set the action link group expiration time in design action link templates. templatebindings list<connectapi. a collection of key-value pairs to fill in to instantiate 33.0 actionlinktemplate binding variable values or a custom user without a template, bindinginput> alias from an action link template. to don’t specify a value. instantiate this action link group from an required to action link template that uses binding instantiate this variables, you must provide values for all the action link group variables. see def |
ine binding variables in from a template that design action link templates. uses binding variables. templateid string the id of the action link group template to instantiate 33.0 from which to instantiate this action link without a template, group. don’t specify a value. required to instantiate this action link group from a template. see also: define an action link and post with a feed element define an action link in a template and post with a feed element createactionlinkgroupdefinition(communityid, actionlinkgroup) connectapi.actionlinktemplatebindinginput a key-value pair to fill in a binding variable value from an action link template. 1537apex reference guide connectapi input classes property type description required or available version optional key string the name of the binding variable key required 33.0 specified in the action link template in setup. for example, if the binding variable in the template is {!binding.firstname}, the key is firstname value string the value of the binding variable key. for required 33.0 example, if the key is firstname, this value could be joan. see also: connectapi.actionlinkgroupdefinitioninput connectapi.activitysharinginput defines who a captured email or event is shared with. property type description required or available version optional groupsto list<string> list of ids for the groups that you share the optional 39.0 sharewith activity with. valid only if sharingtype is mygroups. sharingtype connectapi. type of sharing operation. values are: required 39.0 activity • everyone—the activity is shared sharingtype with everyone. • mygroups—the activity is shared only with a selection of the context user’s groups. • onlyme—the activity is private. connectapi.addressrequest address input representation for a payment method or card payment method. name type description required or available version optional city string payment method city. optional 51.0 companyname string payment method company name. optional 51.0 country string payment method country. optional 51.0 1538apex reference guide connectapi input classes name type description required or available version optional postalcode string payment method postal code. optional 51.0 state string payment method state. optional 51.0 street string payment method street. optional 51.0 connectapi.adjustiteminputrepresentation a price adjustment to an orderitemsummary. it only supports discounts, not increases. property type description required or available version optional adjustmenttype string describes how the amount is calculated. it required 49.0 can have one of these values: • amountwithtax—value of amount is the adjustment, including tax. • amountwithouttax—value of amount is the adjustment, not including tax. tax is calculated on the value and added. • percentage—value of amount is a percentage discount. it is divided by 100, and then multiplied by the totalprice and totaltaxamount of the orderitemsummary to determine the adjustment amount. amount double value used to calculate the adjustment required 49.0 amount, as described by the adjustmenttype. it must be a negative value. description string description of the adjustment. optional 49.0 orderitem string id of the orderitemsummary. required 49.0 summaryid reason string reason for the adjustment. the value must required 49.0 match one of the picklist values on the reason field of the orderitemsummarychange object. connectapi.adjustorderitemsummaryinputrepresentation price adjustments to orderitemsummaries that together make up a price adjustment to an order, with options for adjusting items in the process of being fulfilled. 1539apex reference guide connectapi input classes property type description required or available version optional adjustitems list<connectapi. list of price adjustments to required 49.0 adjustiteminput orderitemsummaries. representation> allocateditems string process to use for orderitemsummary optional 55.0 changeordertype quantities that are currently being fulfilled, defined as quantityallocated - quantityfulfilled. values are: • disallowed—when distributing the adjustment, ignore any quantities being fulfilled. if an orderitemsummary’s entire quantity is being fulfilled, return an error. this is the default value. • infulfillment—when distributing the adjustment, include quantities being fulfilled. create a separate change order for the adjustments made |
to those quantities. • prefulfillment—when distributing the adjustment, include quantities being fulfilled. include the adjustments made to those quantities in the change order for pre-fulfillment quantity adjustments. connectapi.alternativeinput alternative representation for an extension on a feed element. property type description required or available version optional text string text representation of the extension. required 40.0 representation thumbnailurl string thumbnail url to the extension. optional 40.0 title string title of the extension. optional 40.0 connectapi.announcementinput an announcement. 1540apex reference guide connectapi input classes property type description required or available optional body connectapi.message text of the announcement. required for 31.0 bodyinput creating an announcement if feeditemid isn’t specified don’t specify for updating an announcement. expirationdate datetime the salesforce ui displays an announcement required for 31.0 until 11:59 p.m. on this date unless another creating an announcement is posted first. the salesforce announcement ui ignores the time value in the optional for expirationdate. however, you can use updating an the time value to create your own display announcement logic in your own ui. feeditemid string id of an advancedtextpost feed item required for 36.0 that is the body of the announcement. creating an announcement if body isn’t specified don’t specify for updating an announcement. isarchived boolean specifies whether the announcement is optional 36.0 archived. parentid string id of the parent entity for the announcement, required for 36.0 that is, a group id when the announcement creating an appears in a group. announcement if feeditemid isn’t specified don’t specify for updating an announcement. 1541apex reference guide connectapi input classes property type description required or available optional sendemails boolean specifies whether the announcement is sent optional for 36.0 as an email to all group members regardless creating an of their email setting for the group. if chatter announcement emails aren’t enabled for the organization, don’t specify for announcement emails aren’t sent. default updating an value is false. announcement see also: postannouncement(communityid, groupid, announcement) connectapi.articletopicassignmentjobinput an article and topic assignment job. property type description required or available version optional operation connectapi. type of operation to perform on articles and required 40.0 articletopicjobtype topics. values are: • assigntopicstoarticle—assign topics to articles in a data category. • unassigntopicsfromarticle—unassign topics from articles in a data category. topicnames connectapi. list of topic names to assign to or unassign required 40.0 topicnamesinput from articles. connectapi.associatedactionscapabilityinput a list of action link groups to associate with a feed element. to associate an action link group with a feed element, the call must be made from the apex namespace that created the action link definition. in addition, the user making the call must have created the definition or have view all data permission. an action link is a button on a feed element. clicking an action link can take a user to a web page, initiate a file download, or invoke an api call to salesforce or to an external server. an action link includes a url and an http method, and can include a request body and header information, such as an oauth token for authentication. use action links to integrate salesforce and third-party services into the feed so that users can drive productivity and accelerate innovation. 1542apex reference guide connectapi input classes property type description required or available version optional actionlink list<string> the action link group ids to associate with required 33.0 groupids the feed element. associate one primary and up to 10 total action link groups to a feed item. action link groups are returned in the order specified in this property. an action link group id is returned from a call to connectapi.actionlinks. createactionlinkgroupdefinition (communityid, actionlinkgroup). see also: connectapi.feedelementcapabilitiesinput connectapi.associaterecordswithrecipientinput records associated |
with the survey invitation. property type description required or available version optional associaterecord list<string> id of the associated records. required 50.0 ids recipientid string participant id with whose invitation the required 50.0 record should be associated. see also: connectapi.surveyinvitationemailinput connectapi.audiencecriteriainput custom recommendation audience criteria type. this class is abstract and has no public constructor. you can make an instance only of a subclass. superclass for: • connectapi.customlistaudiencecriteriainput • connectapi.newuseraudiencecriteriainput 1543apex reference guide connectapi input classes property type description required or available version optional type connectapi. specifies the custom recommendation optional 36.0 recommendation audience criteria type. one of these values: if not specified, audience • customlist—a custom list of users defaults to criteriatype makes up the audience. customlist. • maxdaysincommunity—new members make up the audience. see also: connectapi.recommendationaudienceinput connectapi.audiencecriterioninput personalization audience criterion. property type description required or available version optional criterion list<connectapi. list of mappings of audience criteria fields required when 48.0 audiencecriterion and values. creating an audience valueinput> optional when updating an audience criterionnumber integer number associated with the audience optional 48.0 criterion in a formula. for example, (1 and 2) or 3. if unspecified, criteria are assigned numbers in the order that they’re added. criterionoperator connectapi. operator used in the personalization required when 48.0 audiencecriteria audience criterion. values are: creating an audience operator • contains optional when updating an • equal audience • greaterthan • greaterthanorequal • includes • lessthan • lessthanorequal • notequal • notincludes • startswith 1544apex reference guide connectapi input classes property type description required or available version optional criteriontype connectapi. type of personalization audience criterion. required when 48.0 audiencecriteria values are: creating an audience type • audience—criterion based on optional when audience. updating an audience • default—audience has no criteria. • domain—criterion based on domain. • fieldbased—criterion based on object fields. • geolocation—criterion based on location. • permission—criterion based on standard or custom permissions. • profile—criterion based on profile. see also: connectapi.audienceinput connectapi.audiencecriterionvalueinput audience criterion value. property type description required or available version optional audienceid string id of an audience. required if creating 53.0 or updating an audience with the audience criterion type. city string city of a user. optional if creating 48.0 or updating an audience with the geolocation criterion type country string country of a user. required if creating 48.0 or updating an audience with the geolocation criterion type domainid string domain id of a user. required if creating 48.0 or updating an audience with the 1545apex reference guide connectapi input classes property type description required or available version optional domain criterion type entityfield string field of an object. required if creating 48.0 or updating an audience with the fieldbased criterion type entitytype string type of object. required if creating 48.0 or updating an audience with the fieldbased criterion type fieldvalue string value of a field. required if creating 48.0 or updating an audience with the fieldbased criterion type isenabled boolean specifies whether the permission is enabled required if creating 48.0 (true) or not (false) for a user. or updating an audience with the permission criterion type permission string valid api name of a standard user or custom required if creating 48.0 permission. or updating an audience with the permission criterion type profileid string profile id of a user. required if creating 48.0 or updating an audience with the profile criterion type 1546apex reference guide connectapi input classes property type description required |
or available version optional subdivision string subdivision of a user. required if creating 48.0 or updating an audience with the geolocation criterion type and using the city property see also: connectapi.audiencecriterioninput connectapi.audienceinput a personalization audience. property type description required or available version optional criteria list<connectapi. list of audience criteria to update or add. required when 48.0 audiencecriterion an audience can have up to 100 criteria. creating an audience input> optional when updating an audience customformula string custom formula for the audience criteria. required when 48.0 for example, (1 and 2) or 3. creating an audience with the formulafiltertype set to customlogicmatches optional, otherwise formulafiltertype connectapi. formula filter type for the personalization required when 48.0 formulafiltertype audience. values are: creating an audience • allcriteriamatch—all audience optional when criteria are true (and operation). updating an audience • anycriterionmatches—any audience criterion is true (or operation). • customlogicmatches—audience criteria match the custom formula (for example, (1 and 2) or 3). 1547apex reference guide connectapi input classes property type description required or available version optional name string name of the audience. required when 48.0 creating an audience optional when updating an audience connectapi.auditparamsrequest audit parameters input. this class is abstract. superclass of connectapi.baserequest. property type description required or available version optional email string email of the client that made the request. optional 50.0 ipaddress string ip address of the client that made the optional 50.0 request. macaddress string mac address of the client that made the optional 50.0 request. phone string phone number of the client that made the optional 50.0 request. connectapi.authapipaymentmethodrequest payment method input representation for payment authorizations. subclass of connectapi.baseapipaymentmethodrequest. property type description required or available version optional card connectapi.card card payment method information. required 51.0 paymentmethod paymentmethodrequest connectapi.authorizationreversalrequest authorization reversal input consumed by authorization reversal service. subclass of connectapi.baserequest. 1548apex reference guide connectapi input classes property type description required or available version optional accountid string account for the payment authorization 51.0 reversal. must match the payment authorization's account. amount double amount of adjustment applied to the 51.0 payment authorization. comments string users can add comments to provide 51.0 additional details about a record. maximum of 1,000 characters. effectivedate datetime date that the adjustment takes effect on the 51.0 authorization. connectapi.authorizationrequest payment authorization input consumed by payment authorization service. subclass of connectapi.baserequest. property type description required or available version optional accountid string salesforce account that contains the required 51.0 payment transaction being authorized. amount double authorization amount. required 51.0 comments string optional comments for the payment optional 51.0 authorization. currencyisocode string three-letter iso 4217 currency code required 51.0 associated with the payment group record. effectivedate datetime date that the authorization will be applied required 51.0 to the transaction. paymentgatewayid string payment gateway that processes the required 51.0 authorization. paymentgroup connectapi. payment group for the authorization. the optional 51.0 paymentgroup payload must reference either a request paymentgroup or a paymentgroupid, but not both. paymentmethod connectapi. payment method used in the payment required 51.0 authapipayment gateway for the authorization transaction. methodrequest 1549apex reference guide connectapi input classes connectapi.bannerphotoinput a banner photo. property type description required or available version optional cropheight integer height of the crop rectangle in pixels. optional 36.0 cropwidth integer width of the crop rectangle in pixels. optional 36.0 cropx integer x position of the crop rectangle from the optional 36.0 left edge of the image in pixels. top left is position (0,0). cropy integer y position of the crop rectangle from the optional 36. |
0 top edge of the image in pixels. top left is position (0,0). fileid string 18 character id of an existing file. the key required 36.0 prefix must be 069 and the file must be an image and be smaller than 2 gb. note: images uploaded on the group page and on the user page don’t have file ids and therefore can’t be used. versionnumber integer version number of an existing file. if not optional 36.0 provided, the latest version is used. connectapi.baserequest base parameters for making a request to the payment gateway. this class is abstract. subclass of connectapi.auditparamsrequest. superclass of: • connectapi.authorizationrequest • connectapi.authorizationreversalrequest • connectapi.capturerequest • connectapi.paymentmethodtokenizationrequest • connectapi.postauthrequest • connectapi.refundrequest • connectapi.salerequest 1550apex reference guide connectapi input classes property type description required or available version optional additionaldata map<string, string> an optional map of additional parameters optional 50.0 to be sent to the payment gateway. idempotencykey string idempotency key. optional 50.0 connectapi.baseapipaymentmethodrequest payment method api input representation. this class is abstract. superclass of: • connectapi.authapipaymentmethodrequest • connectapi.postauthapipaymentmethodrequest • connectapi.saleapipaymentmethodrequest . property type description required or available version optional address connectapi. payment method address. required 51.0 addressrequest id string payment method record id. used in required 51.0 payment transactions. saveforfuture boolean shows whether salesforce saves the required 51.0 payment method for future use. connectapi.basepaymentmethodrequest base payment method input representation. this class is abstract. superclass of: • connectapi.alternativepaymentmethod • connectapi.cardpaymentmethodrequest no additional properties. connectapi.batchinput construct a set of inputs to be passed into a method at the same time. use this constructor when there isn’t a binary input: connectapi.batchinput(object input) 1551apex reference guide connectapi input classes use this constructor to pass one binary input: connectapi.batchinput(object input, connectapi.binaryinput binary) use this constructor to pass multiple binary inputs: connectapi.batchinput(object input, list<connectapi.binaryinput> binaries) the constructors takes these parameters: argument type description available version input object an individual input object to be used in the batch 32.0 operation. for example, for postfeedelementbatch(), this should be connectapi.feedelementinput. binary connectapi.binaryinput a binary file to associate with the input object. 32.0 binaries list<connectapi.binaryinput> a list of binary files to associate with the input 32.0 object. see also: post a batch of feed elements post a batch of feed elements with a new (binary) file connectapi.binaryinput create a connectapi.binaryinput object to attach files to feed items and comments and to add repository files. the constructor is: connectapi.binaryinput(blob, contenttype, filename) the constructor takes these arguments: argument type description available version blob blob contents of the file to be used for input 28.0 contenttype string mime type description of the content, such as image/jpg 28.0 filename string file name with the file extension, such as userphoto.jpg 28.0 see also: post a feed element with a new file (binary) attachment post a comment with a new file connectapi.batchinput 1552apex reference guide connectapi input classes connectapi.bookmarkscapabilityinput create or update a bookmark on a feed element. this class is a subclass of connectapi.feedelementcapabilityinput. property type description required or available version optional isbookmarked boolean specifies if the feed element should be no 32.0 bycurrentuser bookmarked for the user (true) or not (false). see also: connectapi.feedelement |
capabilitiesinput connectapi.botversionactivationinput activation status of the bot version. property type description required or available version optional status connectapi. activation status of the bot version. values optional 50.0 botversion are: activationstatus • active • inactive activation status must be specified in the status or postbody parameter. connectapi.canvascapabilityinput create or update a canvas app associated with a feed element. this class is a subclass of connectapi.feedelementcapabilityinput. property type description required or available version optional description string a description of the canvas app. the optional 32.0 maximum size is 255 characters. developername string the api name (developer name) of the required 32.0 connected app. height string the height of the canvas app in pixels. optional 32.0 namespaceprefix string a unique namespace prefix for the canvas optional 32.0 app. parameters string json parameters passed to the canvas app. optional 32.0 1553apex reference guide connectapi input classes property type description required or available version optional thumbnailurl string a thumbnail url to a preview image. the optional 32.0 maximum thumbnail size is 120 pixels by 120 pixels. title string a title for the canvas link. required 32.0 see also: connectapi.feedelementcapabilitiesinput connectapi.capacityrequestinputrepresentation request related to a location’s fulfillment order capacity. property type description required or available version optional actionrequestid string unique string that identifies the request. required 55.0 can be a uuid. use the action request ids in response data to identify which requests succeeded or failed. locationid string id of the location associated with the required 55.0 request. connectapi.capturerequest payment capture input consumed by the payment capture service. subclass of connectapi.baserequest. property type description required or available version optional accountid string id of the account linked to the capture optional 50.0 request. amount double amount captured from the previous required 50.0 authorization. clientcontext string context for payment apis. used for a optional 50.0 payment caller to re-establish context. comments string comments for the payment capture. optional 50.0 effectivedate datetime date when the payment becomes effective. optional 50.0 paymentgroup connectapi. details about the payment group record optional 50.0 paymentgrouprequest associated with the payment request. 1554apex reference guide connectapi input classes connectapi.alternativepaymentmethod a payment method that doesn't have a defined salesforce entity such as cardpaymentmethod or digitalwallet. common examples of alternative payment methods include cashondeliver, klarna, and direct debit. alternativepaymentmethod functions the same as any other type of payment method for processing transactions in the payment gateway. subclass of connectapi.basepaymentmethodrequest property type description required or available version optional accountid string salesforce payments account to which this required 54.0 payment method is linked. comments string details about a record added by a user. optional 54.0 maximum of 1,000 characters. email string email address of the card holder. optional 54.0 gatewaytoken string a unique, alphanumeric id, called a token, required 54.0 that a payment gateway generates when it first processes a payment. the token replaces the actual payment data so that the data is kept secure. this token is stored as encrypted text, and can be used for recurring payments. gatewaytoken string detailed information about the gateway required 54.0 details token. name string name that you assign to the payment optional 54.0 method object. connectapi.cardpaymentmethodrequest card payment method input representation. subclass of connectapi.basepaymentmethodrequest. property type description required or available optional version accountid string salesforce payments account to which this required 51.0 payment method is linked. autopay boolean indicates whether a token for recurring optional 55.0 payments is being requested (true) or not (false). the token lets the payment method be used for recurring payments. cardcategory connectapi. card processing type. valid values are: required 51.0 cardcategory • creditcard • debitcard 1555apex reference guide connectapi input classes property type description required or available optional version cardholder string first name of the card holder. required 51.0 firstname cardholder |
string last name of the card holder. required 51.0 lastname cardholdername string full name of the card holder. required 51.0 cardnumber string card number. required 51.0 cardtype string card network type. valid values are: required 51.0 • americanexpress • dinersclub • jcb • mastercard • maestro • visa comments string optional comments for the card payment optional 51.0 method. cvv string card verification value. required 51.0 email string email address of the card holder. required 51.0 expirymonth integer card expiration month. required 51.0 expiryyear integer card expiration year. required 51.0 nickname string optional nickname for the card. optional 51.0 startmonth integer month the card becomes active. optional 51.0 startyear integer year the card becomes active. optional 51.0 connectapi.cartinput a cart. property type description required or available version optional currencyisocode string currency iso code of the cart. optional 57.0 effective string id of the buyer account or guest buyer optional 49.0 accountid profile for which the request is made. if unspecified, the default value is determined from context. 1556apex reference guide connectapi input classes property type description required or available version optional issecondary boolean specifies whether the cart is secondary optional 53.0 (true) or not (false). if unspecified, defaults to false. name string name of the cart. the name can have up to optional 49.0 250 unicode characters. if unspecified, defaults to the generated name. orderownerid string id of the owner of the order. optional 58.0 type connectapi. type of cart.value is cart. if unspecified, optional 49.0 carttype defaults to cart. connectapi.cartcouponinput cart coupon input. property type description required or available version optional couponcode string the coupon code. required 54.0 connectapi.cartinventoryreservationinputrepresentation (developer preview) input representation to create or update a reservation. note: this feature is available as a developer preview. it isn’t generally available unless or until salesforce announces its general availability in documentation or in press releases or public statements. all commands, parameters, and other features are subject to change or deprecation at any time, with or without notice. property type description required or available version optional durationin integer reservation duration in seconds. required 58.0 seconds connectapi.cartiteminput an item in a cart. 1557apex reference guide connectapi input classes property type description required or available version optional productid string id of the product. required when 49.0 adding an item to a cart not supported when updating a cart item quantity string quantity of the cart item.use a value that required 49.0 can be converted to bigdecimal. type connectapi. type of item in a cart.value is product. required when 49.0 cartitemtype adding an item to a cart not supported when updating a cart item connectapi.cartitempromotioncollectioninputrepresentation promotions for a cart item. property type description required or available version optional items list<connectapi. list of cart items to get the associated required 52.0 cartitempromotion promotions. inputrepresentation> connectapi.cartmessagesvisibilityinput set the visibility for cart messages. property type description required or available version optional visibility boolean specifies whether to set cart messages as required 50.0 visible (true) or not (false). connectapi.carttowishlistinput copy products from a cart to a wishlist. property type description required or available version optional wishlistid string id of the wishlist to copy cart products to. required 50.0 1558apex reference guide connectapi input classes connectapi.cdpcalculatedinsightinput input representation for a calculated insight. property type description required or available version optional apiname string api name of the calculated insight with required for creating 57.0 suffix __cio. a calculated insight optional for updating a calculated insight createdfrom boolean specifies whether the calculated insight was optional 57.0 package created from an installed package (true) or not (false). dataspacename string name of the data space. optional 57.0 definitiontype connectapi. definition type of the calculated insight. required for creating 57.0 |
calculatedinsight values are: a calculated insight definitiontypeenum • calculatedmetric optional for updating a • externalmetric calculated insight • streamingmetric description string calculated insight description. optional 57.0 displayname string calculated insight display name. required for creating 57.0 a calculated insight optional for updating a calculated insight draft boolean specifies whether to save the calculated optional 57.0 insight as draft (true) or not (false). expression string calculated insight ansi sql expression. required for creating 57.0 a calculated insight optional for updating a calculated insight packagedcalculated string api name of the packaged calculated optional 57.0 insightapiname insight. connectapi.cdpidentityresolutionconfiginput input representation for creating an identity resolution ruleset. 1559apex reference guide connectapi input classes property type description required or available version optional configurationtype connectapi. source object for an identity resolution required 57.0 cdpidentityresolution ruleset. values are: configurationtype • account • individual description string description of the identity resolution ruleset. optional 57.0 doesrun boolean specifies whether automatic job run optional 57.0 automatically scheduling is enabled for the ruleset (true) or not (false). if unspecified, defaults to false. label string user friendly name of the identity resolution required 57.0 ruleset. matchrules list<connectapi. list of match rules for the identity resolution optional 57.0 cdpidentityresolution ruleset. matchrule> reconciliationrules list<connectapi. list of reconciliation rules for the identity required 57.0 cdpidentityresolution resolution ruleset. reconciliationrule> rulesetid string extended id of the ruleset used to optional 57.0 differentiate between rulesets created for comparison. the ruleset id must be unique and can't be longer than 4 characters. connectapi.cdpidentityresolutionconfigpatchinput input representation for updating an identity resolution ruleset. property type description required or available version optional description string description of the identity resolution ruleset. optional 57.0 doesrun boolean specifies whether automatic job run optional 57.0 automatically scheduling is enabled for the ruleset (true) or not (false). if unspecified, defaults to false. label string user friendly name of the identity resolution required 57.0 ruleset. matchrules list<connectapi. list of match rules for the identity resolution optional 57.0 cdpidentityresolution ruleset. matchrule> 1560apex reference guide connectapi input classes property type description required or available version optional reconciliationrules list<connectapi. list of reconciliation rules for the identity required 57.0 cdpidentityresolution resolution ruleset. reconciliationrule> connectapi.cdpidentityresolutionmatchcriterion input representation for an identity resolution ruleset's match rule criterion. property type description required or available version optional entityname string api name of the data model object the required 57.0 match rule applies to. fieldname string name of the field the criterion applies to. required 57.0 matchmethodtype connectapi. match method for a match rule criterion. required 57.0 cdpidentityresolution values are: matchmethodtype • exact—exact match. • exactnormalized—exact normalized match. • fuzzy—fuzzy match with medium precision. • fuzzyhigh—fuzzy match with high precision. • fuzzylow—fuzzy match with low precision. partyidentification connectapi. party identifier information. optional 57.0 info cdpidentityresolution matchcriterionparty identificationinfo shouldmatch boolean specifies whether blank fields can be used required 57.0 onblank for matching (true) or not (false). see also: connectapi.cdpidentityresolutionmatchrule connectapi.cdpidentityresolutionmatchcriterionpartyidentificationinfo input representation for information when party identification is used in an identity resolution ruleset's match rule criterion. 1561apex reference guide connectapi input classes property type description required or available version optional partyname string party identification name. required if the 57.0 match rule criterion uses party identification for matching partytype string party identification type. optional 57.0 |
see also: connectapi.cdpidentityresolutionmatchcriterion connectapi.cdpidentityresolutionmatchrule input representation for an identity resolution ruleset’s match rule. property type description required or available version optional criteria list<connectapi. object and field the match rule applies to required 57.0 cdpidentityresolution and the match method applied. matchcriterion> label string user friendly name for the identity required 57.0 resolution match rule. see also: connectapi.cdpidentityresolutionconfiginput connectapi.cdpidentityresolutionconfigpatchinput connectapi.cdpidentityresolutionreconciliationfieldrule input representation for an identity resolution ruleset's reconciliation rule for a field. property type description required or available version optional fieldname string the field that this reconciliation rule applies required 57.0 to. ruletype connectapi. default reconciliation rule applied to fields required 57.0 cdpidentityresolution in the object the reconciliation rule applies reconciliationruletype to. values are: • lastupdated • mostfrequent • sourcesequence 1562apex reference guide connectapi input classes property type description required or available version optional shouldignore boolean specifies whether to ignore an empty value required 57.0 emptyvalue (true) or not (false). sources list<connectapi. if ruletype is sourcesequence, a required if 57.0 cdpidentityresolution prioritized list of data sources. ruletype is reconciliationsource> sourcesequence see also: connectapi.cdpidentityresolutionreconciliationrule connectapi.cdpidentityresolutionreconciliationrule input representation for an identity resolution ruleset's default reconciliation rule for an object. property type description required or available version optional entityname string api name of the data model object the required 57.0 reconciliation rule applies to. fields list<connectapi. field-specific reconciliation rules that optional 57.0 cdpidentityresolution override this default rule for the specified reconciliationfield field. rule> ruletype connectapi. default reconciliation rule applied to fields required 57.0 cdpidentityresolution in the object the reconciliation rule applies reconciliationruletype to. values are: • lastupdated • mostfrequent • sourcesequence shouldignore boolean specifies whether to ignore an empty value required 57.0 emptyvalue (true) or not (false). sources list<connectapi. if ruletype is sourcesequence, a required if 57.0 cdpidentityresolution list of data sources in priority order. ruletype is reconciliationsource> sourcesequence see also: connectapi.cdpidentityresolutionconfiginput connectapi.cdpidentityresolutionconfigpatchinput 1563apex reference guide connectapi input classes connectapi.cdpidentityresolutionreconciliationsource input representation for an identity resolution default reconciliation rule or field-specific rule using the sourcesequence match method. property type description required or available version optional name string if the ruletype for a reconciliation rule required if 57.0 is sourcesequence, api name of a ruletype is source data lake object. sourcesequence see also: connectapi.cdpidentityresolutionreconciliationrule connectapi.cdpidentityresolutionreconciliationfieldrule connectapi.cdpidentityresolutionreconciliationfieldrule connectapi.cdpidentityresolutionrunnowinput input representation for running an identity resolution ruleset job on demand. property type description required or available version optional callingapp string calling application. optional 57.0 callingappinfo string calling application information. optional 57.0 connectapi.cdpqueryinput data query input. property type description required or available version optional sql string ansi-standard sql query. required 52.0 connectapi.cdpsegmentdbtinput segment dbt input. 1564apex reference guide connectapi input classes property type description required or available version optional models list<connectapi. list of models. the segment data build tool required 55.0 cdpsegmentdbt currently supports a single sql model. modelinput> see also: connectapi.cdpsegmentinput connectapi.cdpsegmentdbtmodelinput segment |
dbt model input. property type description required or available version optional name string dbt model name. required 55.0 sql string dbt sql. required 55.0 dbt sql date strings must be in iso 8601 format , for example, 2011-02-25t18:24:31.000z. for details about supported validations, see supported validations for segment data build tool model sql. see also: connectapi.cdpsegmentdbtinput connectapi.cdpsegmentinput segment input. property type description required or available version optional additionalmetadata map<string, string> map of additional metadata. optional for creating 55.0 a segment not supported for updating a segment dataspace string segment data space. optional 57.0 description string segment description. optional 55.0 1565apex reference guide connectapi input classes property type description required or available version optional developername string segment developer name. required for creating 55.0 a segment not supported for updating a segment displayname string segment display name. optional 57.0 includedbt connectapi. segment data build tool. required 55.0 cdpsegment dbtinput publishschedule connectapi. publish refresh schedule. values are: optional 55.0 publishschedule • twelve—refreshes every twelve hours. • twentyfour—refreshes every twenty-four hours. publishschedule string date indicating the end of the publish optional if 55.0 enddate schedule. publishschedule isn’t specified publishschedule string datetime indicating the start of the publish optional if 55.0 startdatetime schedule. publishschedule isn’t specified segmentonapiname string api name of the segmenton entity. optional 57.0 segmenttype connectapi. type of segment. value is: required for creating 55.0 segmenttype a segment • dbt—data build tool not supported for after a segment is created, the segment updating a segment type can’t be changed. connectapi.changeinputrepresentation a list of changes to orderitemsummaries that make up an order change, such as a cancel or return. 1566apex reference guide connectapi input classes property type description required or available version optional changeitems list<connectapi. list of changes to orderitemsummaries. required 48.0 changeiteminput representation> see also: previewcancel(ordersummaryid, changeinput) previewreturn(ordersummaryid, changeinput) submitcancel(ordersummaryid, changeinput) submitreturn(ordersummaryid, changeinput) connectapi.changeiteminputrepresentation change to an orderitemsummary, such as a return or cancel. you specify whether to prorate the associated shipping charge based on the price change. the orderitemsummary can’t be a shipping charge. property type description required or available version optional changeitemfees lst<iconnectapi.changeitemfee list of input data for fees associated with optional 57.0 inputrepresentation> the order item being returned or canceled. orderitem string id of the orderitemsummary. required 48.0 summaryid quantity double quantity to change. use a positive value. required 48.0 for example, a value of 2 means “cancel or return 2 units.” reason string reason for the change. the value must required 48.0 match one of the picklist values on the reason field of the orderitemsummarychange object. shipping boolean specifies whether to prorate the shipping required 48.0 reductionflag charge. see also: connectapi.changeinputrepresentation previewcancel(ordersummaryid, changeinput) previewreturn(ordersummaryid, changeinput) submitcancel(ordersummaryid, changeinput) submitreturn(ordersummaryid, changeinput) 1567apex reference guide connectapi input classes connectapi.changeitemfeeinputrepresentation input representation for change item fee input property type description required or available version optional amount double positive value used to calculate the fee required 57.0 amount, as described by the amounttype. amounttype string describes how the fee amount is calculated. required 57.0 valid values are: • amountwithtax—value of amount is the fee amount, including tax. • amountwithouttax |
—value of amount is the fee amount, not including tax. tax is calculated on the value and added. • percentage—value of amount is a percentage. to determine the fee amount, amount is divided by 100, and then multiplied by the totalprice and totaltaxamount of the associated orderitemsummary, prorated for the quantity being returned. • percentagegross—value of amount is a percentage. to determine the fee amount, amount is divided by 100, and then multiplied by the totallineamountwithtax of the associated orderitemsummary, prorated for the quantity being returned. description string description of the fee. optional 57.0 pricebookentryid string id of the price book entry associated with required unless 57.0 the fee product. price books are optional in the org product2id string id of the product representing the fee. required 57.0 1568apex reference guide connectapi input classes property type description required or available version optional reason string reason for the fee. the value must match required 57.0 an entry in the orderproductsummarychange object’s reason picklist. see also: connectapi.changeinputrepresentation connectapi.changeiteminputrepresentation previewcancel(ordersummaryid, changeinput) previewreturn(ordersummaryid, changeinput) submitcancel(ordersummaryid, changeinput) submitreturn(ordersummaryid, changeinput) connectapi.chattergroupinput property type description available announcement string the 18-character id of an announcement. 31.0 an announcement displays in a designated location in the salesforce ui until 11:59 p.m. on its expiration date, unless it’s deleted or replaced by another announcement. canhave boolean true if this group allows chatter customers, false otherwise. 29.0 chatterguests after this property is set to true, it cannot be set to false. description string the “description” section of the group. 29.0 information connectapi. the “information” section of a group. if the group is private, this 28.0 group section is visible only to members. information input isarchived boolean true if the group is archived, false otherwise. defaults to 29.0 false. isauto boolean true if automatic archiving is turned off for the group, false 29.0 archivedisabled otherwise. defaults to false. name string the name of the group. 29.0 owner string the id of the group owner. this property is available for patch 29.0 requests only. 1569apex reference guide connectapi input classes property type description available visibility connectapi. group visibility type. 29.0 groupvisibilitytype • privateaccess—only members of the group can see posts to this group. • publicaccess—all users within the experience cloud site can see posts to this group. • unlisted—reserved for future use. see also: creategroup(communityid, groupinput) updategroup(communityid, groupid, groupinput) connectapi.chatterstreaminput a chatter feed stream. property type description required or available version optional description string description of the stream, up to 1,000 optional 39.0 characters. name string name of the stream, up to 120 characters. required when 39.0 creating a stream optional when updating a stream subscriptions list<connectapi. list of up to 25 entities whose feeds are optional 39.0 toadd stream included in the stream. subscription adding an entity that is already added input> results in no operation. including the same entity in subscriptionstoadd and subscriptionstoremove results in no operation. subscriptions list<connectapi. list of entities whose feeds are removed optional when 39.0 toremove stream from the stream. updating a stream subscription removing an entity that is already removed not supported when input> results in no operation. including the same creating a stream entity in subscriptionstoadd and subscriptionstoremove results in no operation. 1570apex reference guide connectapi input classes connectapi.commentcapabilitiesinput a container for all capabilities that can be included with a comment. property type description required or available version optional content connectapi. content to attach to the comment. optional 32.0 contentcapability input feedentityshare connectapi. feed entity to share to the comment. optional 42. |
0 feedentityshare capabilityinput record connectapi. existing knowledge article to attach to the optional 42.0 recordcapability comment. input see also: connectapi.commentinput connectapi.commentinput a comment. used to add rich comments, for example, comments that include mentions or file attachments. property type description required or available optional version attachment connectapi.feed specifies an attachment for the comment. valid optional 28.0–31.0 itemattachment values are: input • contentattachmentinput • newfileattachmentinput linkattachmentinput is not permitted for comments. important: as of version 32.0, use the capabilities property. body connectapi. description of message body. the body can required 28.0 messagebodyinput contain up to 10,000 characters and 25 mentions. because the character limit can change, clients should make a describesobjects() call on the feeditem or feedcomment object and look at the length of the body or commentbody field to determine the maximum number of allowed characters. 1571apex reference guide connectapi input classes property type description required or available optional version to edit this property in a comment, use updatecomment(communityid, commentid, comment). editing comments is supported in version 34.0 and later. rich text and inline images are supported in comment bodies in version 35.0 and later. entity links are supported in version 43.0 and later. capabilities connectapi. specifies any capabilities for the comment, such optional 32.0 commentcapabilities as a file attachment. input threadparentid string id of the parent comment for a threaded optional 44.0 comment. see also: post a comment with a mention post a comment with a new file post a comment with an existing file post a rich-text comment with inline image post a rich-text feed comment with a code block edit a comment postcommenttofeedelement(communityid, feedelementid, comment, feedelementfileupload) connectapi.commerceaddressinput commerce address input. property type description required or available version optional addresstype string type of address, for example, shipping optional 54.0 or billing. city string the address city. optional 54.0 commerceaddressfieldinputlist<tsclionnectapi.commerceaddressfieldinput> a list of custom address fields, if any. optional 54.0 companyname string the address company name. optional 57.0 country string the address country. optional 54.0 countrycode string two-character country code. optional 54.0 firstname string the address first name. optional 57.0 1572apex reference guide connectapi input classes property type description required or available version optional isdefault boolean indicates whether a contact’s address is the optional 54.0 preferred method of communication (true) or not (false). the default value is false. lastname string the address last name. optional 57.0 middlename string the address middle name. optional 57.0 name string name of the contact. required 54.0 phonenumber string the address phone number. optional 57.0 postalcode string zip code or postal code for the address. optional 54.0 region string the address state. optional 54.0 regioncode string the address state code. optional 54.0 street string the address street. optional 54.0 connectapi.commerceaddressfieldinput commerce address field input. this is used to reference custom fields for the address. property type description required or available version optional dataname string the name of the custom address field. required 54.0 text string the value of the custom address field. optional 54.0 connectapi.confirmheldfocapacityinputrepresentation request to confirm held fulfillment order capacity at one or more locations. can correspond to one action call. property type description required or available version optional confirmheldfo list<connectapi. list of requests to confirm held fulfillment required 55.0 capacityrequests confirmheldfo order capacity at one or more locations. capacityrequest inputrepresentation> connectapi.confirmheldfocapacityrequestinputrepresentation request to confirm held fulfillment order capacity at one or more locations. 1573apex reference guide connectapi input classes property type description required or available version optional allornothing boolean controls whether a single failed request optional 55.0 cancels all other requests in the list (true) or whether some |
requests can succeed if others fail (false). the default value is false. capacityrequests list<connectapi. list of requests to confirm held fulfillment required 55.0 capacityrequest order capacity. each request is for one inputrepresentation> fulfillment order assigned to one location. connectapi.contentcapabilityinput attach or update a file on a comment. use this class to attach a new file or update a file that has already been uploaded to salesforce. this class is a subclass of connectapi.feedelementcapabilityinput. to attach or remove files from a feed post (instead of a comment) in version 36.0 and later, use connectapi. filescapabilityinput. property type description required or available version optional content string id of the existing content. required for existing 32.0 documentid content description string description of the file to be uploaded. optional 32.0 sharingoption connectapi. sharing option of the file. values are: optional 35.0 filesharing • allowed—resharing of the file is option allowed. • restricted—resharing of the file is restricted. title string title of the file. this value is used as the file required for new 32.0 name for new content. for example, if the content title is my title, and the file is a .txt file, the file name is my title.txt. see also: connectapi.feedelementcapabilitiesinput connectapi.contenthubfieldvalueinput the fields of the item type. 1574apex reference guide connectapi input classes property type description required or available version optional name string name of the item field. required 39.0 when updating the metadata of a repository file, only the name field can be updated. value string value of the item field. required 39.0 see also: connectapi.contenthubiteminput connectapi.contenthubiteminput the item type id and fields of the item type. property type description required or available version optional fields list<connectapi. list of fields for the item. required to create a 39.0 contenthub sharepoint file in a fieldvalue repository because input> the file name is required; otherwise optional itemtypeid string id of the item type. required to create a 39.0 file in a repository connectapi.contractinputrepresentation input to create and update contract. property type description required or available version optional isautodocgenrequired boolean specifies whether automatic document required 56.0 generation is required or not. recordtypename string contract record type name. optional 56.0 sourceobjectid string source record id. required 56.0 templatename string document template name for document optional 56.0 generation. connectapi.couponcoderedemptioninput input representation for coupon code redemption. 1575apex reference guide connectapi input classes property type description required or available version optional couponcodes list<string> input representation for all coupon codes required 58.0 effectiveaccountid string id of the account required 58.0 transactionid string id of the transaction, which must be a valid required 58.0 cart id connectapi.couponcoderedemptioninput input representation for coupon code redemption. property type description required or available version optional couponcodes list<string> input representation for all coupon codes required 58.0 effectiveaccountid string id of the account required 58.0 transactionid string id of the transaction, which must be a valid required 58.0 cart id connectapi.createcreditmemoinputrepresentation a list of change orders used to create a credit memo. property type description required or available version optional changeorderids list<string> list of ids of the change orders. required 48.0 see also: createcreditmemo(ordersummaryid, creditmemoinput) connectapi.createinvoicefromchangeordersinputrepresentation ordersummary and associated change orders to create invoices for. property type description required or available version optional changeorderids list<string> list of ids of change orders to create required 56.0 invoices for. 1576apex reference guide connectapi input classes property type description required or available version optional ordersummaryid string id of the associated order summary. required 56.0 see also: createmultipleinvoices(invoicesinput) connectapi.createmultipleinvoicesfromchangeordersinputrepresentation connectapi.createmultipleinvoices |
fromchangeordersinputrepresentation data about the change orders to create invoices for. property type description required or available version optional invoicesfrom list<connectapi. list of ordersummary ids with the ids of required 56.0 changeorders createinvoicefrom the associated change orders to create changeorders invoices for. each entry in the list generates inputrepresentation> one invoice, which combines the change orders in that entry. see also: createmultipleinvoices(invoicesinput) connectapi.createorderpaymentsummaryinputrepresentation an ordersummary for which to create an orderpaymentsummary, with the payment authorization or payments to include in it. property type description required or available version optional ordersummaryid string id of the ordersummary. required 48.0 payment string id of the payment authorization. either a payment 48.0 authorizationid authorization or at least one payment is required. paymentids list<string> list of ids of the payments. either a payment 48.0 authorization or at least one payment is required. see also: createorderpaymentsummary(orderpaymentsummaryinput) 1577apex reference guide connectapi input classes connectapi.createserviceappointmentinput contains information to create a service appointment. property type description required or available version optional assignedresources <tslcionnectapi.assignedresourcesinput> represents the service resources to be optional 53.0 assigned to a service appointment. note: when creating an appointment, use extendedfields to add values to any of the fields, including custom fields, in assignedresources as long as you have edit access to those fields. lead connectapi.leadinput represents a prospect or lead. required if 53.0 serviceappointment note: required to create a service isn’t provided. appointment for unauthenticated guest users. schedulingpolicyid string the id of the optional 53.0 appointmentschedulingpolicy object. if no scheduling policy is passed in the request body, the default configurations are used. the only scheduling policy configuration that is used in determining time slots is the enforcement of account visiting hours. serviceappointment connectapi.serviceappointmentinput represents the service appointment details required if lead 53.0 to book an appointment. isn’t provided. note: when creating an appointment, use extendedfields to add values to any of the fields, including custom fields, in assignedresources as long as you have edit access to those fields. connectapi.credentialinput credential input. 1578apex reference guide connectapi input classes property type description required or available version optional authentication connectapi. authentication protocol of the external required 56.0 protocol credential credential. values are: authentication • awssv4 protocol • custom • noauth • oauth authentication connectapi. authentication protocol variant of the optional 57.0 protocolvariant credential external credential. values are: authentication • awssv4_sts—aws signature protocolvariant version 4 with security token service. • jwtbearer—oauth 2.0 json web token bearer flow. • rolesanywhere—aws signature version 4 with identity and access management (iam) roles anywhere. if specified, the authentication protocol variant must match the actual protocol variant of the external credential. credentials map<string, map of protocol-specific credentials. required 56.0 connectapi. authentication protocols have credential credential allowlists and encryption rules. valueinput> • awssv4—awsaccesskeyid (not encrypted), awssecretaccesskey (encrypted), awsrolearn (not encrypted) • custom—any credential name is valid (user sets encryption rules) externalcredential string fully qualified developer name of the required 56.0 external credential. principalname string name of the external credential named required if 56.0 principal. principaltype is namedprincipal principaltype connectapi. type of credential principal. values are: required 56.0 credential • awsstsprincipal principaltype • namedprincipal • peruserprincipal 1579apex reference guide connectapi input classes connect |
api.credentialcustomheaderinput credential custom header input. property type description required or available version optional headername string header name. required 58.0 headervalue string header value. required 58.0 id string header id. optional 58.0 sequencenumber integer sequence number. required 58.0 see also: connectapi.externalcredentialinput connectapi.namedcredentialinput connectapi.credentialvalueinput credential value input. authentication protocols have credential allowlists and encryption rules. • awssv4—awsaccesskeyid (not encrypted), awssecretaccesskey (encrypted), awsrolearn (not encrypted) • custom—any credential name is valid (user sets encryption rules) property type description required or available version optional encrypted boolean specifies whether the value of the credential required 56.0 is encrypted (true) or not (false). revision integer revision number of a short-lived credential, optional 58.0 such as oauthtoken. if the provided revision isn’t the latest version, the authentication endpoint refreshes the credential. value string value of the credential. required 56.0 see also: connectapi.credentialinput connectapi.customlistaudiencecriteriainput criteria for the custom list type of custom recommendation audience. subclass of connectapi.audiencecriteriainput. 1580apex reference guide connectapi input classes property type description required or available version optional member connectapi. the operation to carry out on the audience required to update 36.0 operationtype recommendation members. values are: a recommendation audiencemember audience • add—adds specified members to the operationtype audience. don’t use or specify null to create a • remove—removes specified recommendation members from the audience. audience members list<string> a collection of user ids. required to update 36.0 a recommendation when updating an audience, you can audience include up to 100 members. an audience can have up to 100,000 members, and each don’t use or specify experience cloud site can have up to 100 null to create a audiences. recommendation audience connectapi.directmessagecapabilityinput create or update the members of a direct message. property type description required or available version optional memberstoadd list<string> list of user ids for members to include in required when 39.0 the direct message. creating a direct message (post) optional when updating a direct message (patch) memberstoremove list<string> list of user ids for members to remove from optional when 40.0 the direct message. updating a direct message (patch) not supported when creating a direct message (post) 1581apex reference guide connectapi input classes property type description required or available version optional subject string subject of the direct message. optional when 39.0 creating a direct message (post) not supported when updating a direct message (patch) see also: connectapi.feedelementcapabilitiesinput connectapi.distinctvaluerefinementinput attribute-based refinement with distinct values for product search. this class is a subclass of connectapi.refinementinput. property type description required or available version optional values list<string> comma-separated list of attribute values. required 52.0 connectapi.ensurefundsasyncinputrepresentation id of an invoice to ensure funds for and apply them to. property type description required or available version optional invoiceid string id of the invoice. required 48.0 see also: ensurefundsasync(ordersummaryid, ensurefundsinput) connectapi.ensurerefundsasyncinputrepresentation id of a credit memo to ensure refunds for, an amount of excess funds to refund, or both. at least one is required. also includes any invoices for fees that reduce the refund amount, such as return fees. if multiple payment methods are available, you can specify how to distribute the refund. property type description required or available version optional creditmemoid string id of the credit memo that represents a either 48.0 refund amount. creditmemoid 1582 |
apex reference guide connectapi input classes property type description required or available version optional or excessfunds amount is required excessfunds double amount of excess funds to refund. either 49.0 amount excessfunds amount or creditmemoid is required invoicestopay list<connectapi. list of invoices for any fees that reduce the optional 56.0 invoicetopay refund, such as return fees. inputrepresentation> isallowpartial boolean this value controls the behavior when the optional 56.0 amounts included in the sequences list don’t cover the entire refund amount. if this value is false, then the default refund logic is applied to ensure the remaining refund amount. if this value is true, then the unrefunded balance remains on the credit memo. if you don’t specify a sequences list, this value is ignored and the default refund logic is applied. the default value is false. sequences list<connectapi. ordered list of refund amounts and optional 56.0 sequence orderpaymentsummaries to apply them to. orderpaymentsummary the process traverses this list in order and inputrepresentation> stops when it’s refunded the full amount. see also: ensurerefundsasync(ordersummaryid, ensurerefundsinput) connectapi.entitylinksegmentinput an entity link segment. subclass of connectapi.messagesegmentinput property type description required or available version optional entityid string id of the entity to link to. required 43.0 only users with access to the entity see it. it’s hidden for users without access. 1583apex reference guide connectapi input classes connectapi.extendedfieldinput contains information about the extended field. property type description required or available version optional name string the name of the field, including custom optional 53.0 field. value string the value of the field. optional 53.0 connectapi.extensioninput an extension. property type description required or available version optional alternative connectapi. alternative representation of the extension. required 40.0 representation alternativeinput extensionid string id of the extension. required 40.0 payload string payload associated with the extension. required 40.0 payloadversion string payload version that identifies the structure optional 40.0 of the payload associated with the extension. see also: connectapi.extensionscapabilityinput connectapi.extensionscapabilityinput create or update extensions associated with a feed element. this class is a subclass of connectapi.feedelementcapabilityinput. property type description required or available version optional itemstoadd list<connectapi. list of extensions to associate with the feed required for creating 40.0 extensioninput> element. an extension optional for updating an extension 1584apex reference guide connectapi input classes property type description required or available version optional itemstoremove list<string> list of attachment ids to remove from the optional for 41.0 feed element. updating an extension don’t specify for creating an extension see also: connectapi.feedelementcapabilitiesinput connectapi.externalcredentialinput input used to create or update an external credential. important: where possible, we changed noninclusive terms to align with our company value of equality. we maintained certain terms to avoid any effect on customer implementations. property type description required or available version optional authentication connectapi. authentication protocol of the external required 58.0 protocol credential credential. values are: authentication • awssv4 protocol • custom • noauth • oauth authentication connectapi. authentication protocol variant of the optional 58.0 protocolvariant credential external credential. values are: authentication • awssv4_sts—aws signature protocolvariant version 4 with security token service. • jwtbearer—oauth 2.0 json web token bearer flow. • rolesanywhere—aws signature version 4 with identity and access management (iam) roles anywhere. if specified, the authentication protocol variant must match the actual protocol variant of the external credential. customheaders list<connectapi. list of credential custom headers. optional 58.0 credentialcustom headerinput> 1585apex reference guide connectapi |
input classes property type description required or available version optional developername string fully qualified developer name of the required for creating 58.0 external credential. an external credential optional for updating an external credential masterlabel string external credential label. required 58.0 parameters list<connectapi. list of external credential parameters. optional depending 58.0 externalcredential on parameterinput> authenticationprotocol and authenticationvariant principals list<connectapi. list of principals the credential has. optional 58.0 externalcredential principalinput> connectapi.externalcredentialparameterinput external credential parameter input. property type description required or available version optional id string parameter id. optional 58.0 parameter string parameter description. optional 58.0 description parametername string parameter name of the external credential. required 58.0 parametertype connectapi. parameter type of the external credential. required 58.0 externalcredential values are: parametertype • authparameter • authprovider • authproviderurl • authproviderurlqueryparameter • jwtbodyclaim • jwtheaderclaim • signingcertificate 1586apex reference guide connectapi input classes property type description required or available version optional parametervalue string parameter value of the external credential. required 58.0 see also: connectapi.externalcredentialinput connectapi.externalcredentialprincipalinput connectapi.externalcredentialprincipalinput external credential principal input. property type description required or available version optional id string id of the principal external credential optional 58.0 parameter. parameters list<connectapi. list of external credential parameters. optional 58.0 externalcredential parameterinput> principalname string principal name. required 58.0 principaltype connectapi. type of credential principal. values are: required 58.0 credentialprincipal • awsstsprincipal type • namedprincipal • peruserprincipal sequencenumber integer sequence number. required 58.0 see also: connectapi.externalcredentialinput connectapi.namedcredentialinput connectapi.feedelementcapabilitiesinput a container for all capabilities that can be included when creating a feed element. property type description required or available version optional associated connectapi. describes actions added to the feed optional 33.0 actions associatedactions element. capabilityinput 1587apex reference guide connectapi input classes property type description required or available version optional bookmarks connectapi. describes bookmarks added to the feed optional 32.0 bookmarkscapability element. input canvas connectapi. describes a canvas app added to the feed optional 32.0 canvascapability element. input content connectapi. describes content added to the feed optional 32.0–35.0 contentcapability element. input important: this class isn’t available for feed posts in version 36.0 and later. in version 36.0 and later, use connectapi.filescapabilityinput. directmessage connectapi. describes the direct message. optional 39.0 directmessage capabilityinput extensions connectapi. describes the extensions associated with optional 40.0 extensions the feed element. capabilityinput feedentityshare connectapi. describes the feed entity shared with the optional 39.0 feedentityshare feed element. capabilityinput files connectapi. describes files attached to the feed element. optional 36.0 filescapabilityinput link connectapi. describes a link added to the feed element. optional 32.0 linkcapabilityinput poll connectapi. describes a poll added to the feed element. optional 32.0 pollcapabilityinput questionand connectapi. describes a question and answer capability optional 32.0 answers questionandanswers added to the feed element. capabilityinput status connectapi. describes the status of the feed element. optional 44.0 statuscapabilityinput topics connectapi. describes topics assigned to the feed optional 38.0 topicscapability element. input see also: connectapi.feedelementinput 1588apex reference guide connectapi input classes connectapi.feedelementcapabilityinput a feed element capability. in api version 30.0 and earlier, most feed items can have comments, likes |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.