text
stringlengths 24
5.1k
|
---|
order summary. fields type: list<string> list of up to 15 order delivery group summary or order delivery method fields to display in the ui in each item row. sortparam type: connectapi.orderdeliverygroupsummarysort sort order for order delivery group summaries. values are: • idasc—sorts by id in ascending alphanumeric order (a–z, 0–9). • iddesc—sorts by id in descending alphanumeric order (z–a, 9–0). if null, idasc is the default sort order. return value type: connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(webstoreid, effectiveaccountid, ordersummaryid, fields, pagesize, sortparam) get a sorted list of order delivery group summaries with specific fields. api version 51.0 requires chatter no 986apex reference guide commercebuyerexperience class signature public static connectapi.orderdeliverygroupsummarycollection getorderdeliverygroupsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, list<string> fields, integer pagesize, connectapi.orderdeliverygroupsummarysort sortparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. fields type: list<string> list of up to 15 order delivery group summary or order delivery method fields to display in the ui in each item row. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.orderdeliverygroupsummarysort sort order for order delivery group summaries. values are: • idasc—sorts by id in ascending alphanumeric order (a–z, 0–9). • iddesc—sorts by id in descending alphanumeric order (z–a, 9–0). if null, idasc is the default sort order. return value type: connectapi.orderdeliverygroupsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid) get order item summaries. api version 51.0 requires chatter no 987apex reference guide commercebuyerexperience class signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, pagesize) get order item summaries. api version 51.0 requires chatter no signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, integer pagesize) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. 988apex reference guide commercebuyerexperience class ordersummaryid type: string id of the order summary. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid) get order item summaries for a delivery group summary. api version 51.0 requires chatter no signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which |
the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. 989apex reference guide commercebuyerexperience class return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, pagesize) get order item summaries for a delivery group summary. api version 51.0 requires chatter no signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, integer pagesize) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.orderitemsummarycollection 990apex reference guide commercebuyerexperience class getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, pageparam) get a page of order item summaries for a delivery group summary. api version 51.0 requires chatter no signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, string pageparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields) get order item summaries for a delivery group summary with specific fields. 991apex reference guide commercebuyerexperience class api version 51.0 requires chatter no signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, list<string> fields) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. fields type: list<string> list of up to 15 order item summary or product fields to display in the ui in each item row. return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pagesize) get order item summaries for a delivery group summary with specific fields. api version 51.0 requires chatter no 992apex reference guide commercebuyerexperience class signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, list<string> fields, integer pagesize) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of |
the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. fields type: list<string> list of up to 15 order item summary or product fields to display in the ui in each item row. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pageparam) get a page of order item summaries for a delivery group summary with specific fields. api version 51.0 requires chatter no 993apex reference guide commercebuyerexperience class signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, list<string> fields, string pageparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. fields type: list<string> list of up to 15 order item summary or product fields to display in the ui in each item row. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, sortparam) get a sorted list of order item summaries for a delivery group summary with specific fields. api version 51.0 requires chatter no 994apex reference guide commercebuyerexperience class signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, list<string> fields, connectapi.orderitemsummarysort sortparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. fields type: list<string> list of up to 15 order item summary or product fields to display in the ui in each item row. sortparam type: connectapi.orderitemsummarysort sort order for order item summaries. values are: • idasc—sorts by id in ascending alphanumeric order (a–z, 0–9). • iddesc—sorts by id in descending alphanumeric order (z–a, 9–0). if null, idasc is the default sort order. return value type: connectapi.orderitemsummarycollection getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pagesize, sortparam) get a sorted page of order item summaries for a delivery group summary with specific fields. api version 51.0 995apex reference guide commercebuyerexperience class requires chatter no signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, list<string> fields, integer pagesize, connectapi.orderitemsummarysort sortparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. fields type: list<string> list of up to 15 order item summary or product fields |
to display in the ui in each item row. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.orderitemsummarysort sort order for order item summaries. values are: • idasc—sorts by id in ascending alphanumeric order (a–z, 0–9). • iddesc—sorts by id in descending alphanumeric order (z–a, 9–0). if null, idasc is the default sort order. return value type: connectapi.orderitemsummarycollection 996apex reference guide commercebuyerexperience class getorderitemsummaries(webstoreid, effectiveaccountid, ordersummaryid, orderdeliverygroupsummaryid, fields, pageparam, pagesize, sortparam, includeadjustmentdetails) get a sorted page of order item summaries for a delivery group summary with specific fields and include adjustment details. api version 56.0 requires chatter no signature public static connectapi.orderitemsummarycollection getorderitemsummaries(string webstoreid, string effectiveaccountid, string ordersummaryid, string orderdeliverygroupsummaryid, list<string> fields, string pageparam, integer pagesize, connectapi.orderitemsummarysort sortparam, boolean includeadjustmentdetails) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. ordersummaryid type: string id of the order summary. orderdeliverygroupsummaryid type: string id of the order delivery group summary. fields type: list<string> list of up to 15 order item summary or product fields to display in the ui in each item row. 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. 997apex reference guide commercebuyerexperience class sortparam type: connectapi.orderitemsummarysort sort order for order item summaries. values are: • idasc—sorts by id in ascending alphanumeric order (a–z, 0–9). • iddesc—sorts by id in descending alphanumeric order (z–a, 9–0). if null, idasc is the default sort order. includeadjustmentdetails type: boolean specifies whether to return adjustment details (true) or not (false). return value type: connectapi.orderitemsummarycollection getorderitemsummaryadjustments(webstoreid, ordersummaryid, orderitemsummaryadjustmentcollectioninput) get adjustments for order items. api version 53.0 requires chatter no signature public static connectapi.orderitemsummaryadjustmentcollection getorderitemsummaryadjustments(string webstoreid, string ordersummaryid, connectapi.orderitemsummaryadjustmentcollectioninput orderitemsummaryadjustmentcollectioninput) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. orderitemsummaryadjustmentcollectioninput type: connectapi.orderitemsummaryadjustmentcollectioninput collection of order item summaries to get adjustments for. 998apex reference guide commercebuyerexperience class return value type: connectapi.orderitemsummaryadjustmentcollection getorderitemsummaryadjustments(webstoreid, ordersummaryid, orderitemsummaryadjustmentcollectioninput, effectiveaccountid) get adjustments for order items. api version 53.0 requires chatter no signature public static connectapi.orderitemsummaryadjustmentcollection getorderitemsummaryadjustments(string webstoreid, string ordersummaryid, connectapi.orderitemsummaryadjustmentcollectioninput orderitemsummaryadjustmentcollectioninput, string effectiveaccountid) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. orderitemsummaryadjustmentcollectioninput type: connectapi.orderitemsummaryadjustmentcollectioninput collection of order item |
summaries to get adjustments for. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.orderitemsummaryadjustmentcollection getordershipmentitems(webstoreid, shipmentid) get order shipment items. 999apex reference guide commercebuyerexperience class api version 52.0 requires chatter no signature public static connectapi.ordershipmentitemcollection getordershipmentitems(string webstoreid, string shipmentid) parameters webstoreid type: string id of the webstore. shipmentid type: string id of the shipment. return value type: connectapi.ordershipmentitemcollection getordershipmentitems(webstoreid, shipmentid, effectiveaccountid) get order shipment items. api version 52.0 requires chatter no signature public static connectapi.ordershipmentitemcollection getordershipmentitems(string webstoreid, string shipmentid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. 1000apex reference guide commercebuyerexperience class shipmentid type: string id of the shipment. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.ordershipmentitemcollection getordershipmentitems(webstoreid, shipmentid, effectiveaccountid, fields) get order shipment items with specific fields. api version 52.0 requires chatter no signature public static connectapi.ordershipmentitemcollection getordershipmentitems(string webstoreid, string shipmentid, string effectiveaccountid, list<string> fields) parameters webstoreid type: string id of the webstore. shipmentid type: string id of the shipment. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 15 additional shipment items, order item summary, and product fields to display in the ui in each item row. return value type: connectapi.ordershipmentitemcollection 1001apex reference guide commercebuyerexperience class getordershipmentitems(webstoreid, shipmentid, effectiveaccountid, fields, pagetoken, pagesize) get a page of order shipment items with specific fields. api version 52.0 requires chatter no signature public static connectapi.ordershipmentitemcollection getordershipmentitems(string webstoreid, string shipmentid, string effectiveaccountid, list<string> fields, string pagetoken, integer pagesize) parameters webstoreid type: string id of the webstore. shipmentid type: string id of the shipment. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 15 additional shipment items, order item summary, and product fields to display in the ui in each item row. 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 100. if you pass in null, the default size is 25. return value type: connectapi.ordershipmentitemcollection 1002apex reference guide commercebuyerexperience class getordershipmentitems(webstoreid, shipmentid, effectiveaccountid, fields, pagetoken, pagesize, sortorder) get a sorted page of order shipment items. api version 52.0 requires chatter no signature public static connectapi.ordershipmentitemcollection getordershipmentitems(string webstoreid, string shipmentid, string effectiveaccountid, list<string> fields, string pagetoken, integer pagesize, connectapi.ordershipmentitemsort sortorder) parameters webstoreid type: string id of the webstore. shipmentid type: string id of the shipment. effectiveaccountid type: string id of the account for which the request is made. if null, defaults |
to the account id for the context user. fields type: list<string> list of up to 15 additional shipment items, order item summary, and product fields to display in the ui in each item row. 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 100. if you pass in null, the default size is 25. sortorder type: connectapi.ordershipmentitemsort sort order for order shipment items. values are: • idasc—sorts by id in ascending alphanumeric order (a–z, 0–9). • iddesc—sorts by id in descending alphanumeric order (z–a, 9–0). if unspecified, defaults to idasc. 1003apex reference guide commercebuyerexperience class return value type: connectapi.ordershipmentitemcollection getordershipments(webstoreid, ordersummaryid) get order shipments. api version 52.0 requires chatter no signature public static connectapi.ordershipmentcollection getordershipments(string webstoreid, string ordersummaryid) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. return value type: connectapi.ordershipmentcollection getordershipments(webstoreid, ordersummaryid, effectiveaccountid) get order shipments. api version 52.0 requires chatter no signature public static connectapi.ordershipmentcollection getordershipments(string webstoreid, string ordersummaryid, string effectiveaccountid) 1004apex reference guide commercebuyerexperience class parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.ordershipmentcollection getordershipments(webstoreid, ordersummaryid, effectiveaccountid, fields) get order shipments with specific fields. api version 52.0 requires chatter no signature public static connectapi.ordershipmentcollection getordershipments(string webstoreid, string ordersummaryid, string effectiveaccountid, list<string> fields) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 15 additional shipment and order delivery method fields to display in the ui in each item row. 1005apex reference guide commercebuyerexperience class return value type: connectapi.ordershipmentcollection getordershipments(webstoreid, ordersummaryid, effectiveaccountid, fields, pagesize, pagetoken) get a page of order shipments with specific fields. api version 52.0 requires chatter no signature public static connectapi.ordershipmentcollection getordershipments(string webstoreid, string ordersummaryid, string effectiveaccountid, list<string> fields, integer pagesize, string pagetoken) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 15 additional shipment and order delivery method fields to display in the ui in each item row. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 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. return value type: connectapi.ordershipmentcollection 1006apex reference guide commercebuyerexperience class getordershipments(webstoreid, ordersummaryid, effectiveaccountid, fields, page |
size, pagetoken, sortorder) get a sorted page of order shipments with specific fields. api version 52.0 requires chatter no signature public static connectapi.ordershipmentcollection getordershipments(string webstoreid, string ordersummaryid, string effectiveaccountid, list<string> fields, integer pagesize, string pagetoken, connectapi.ordershipmentsort sortorder) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 15 additional shipment and order delivery method fields to display in the ui in each item row. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 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. sortorder type: connectapi.ordershipmentsort sort order for order shipments. values are: • expecteddeliverydateasc—sorts by the oldest expected delivery date. • expecteddeliverydatedesc—sorts by the most recent expected delivery date. • shipmentnumberasc—sorts by shipment number in ascending order (0–9). 1007apex reference guide commercebuyerexperience class • shipmentnumberdesc—sorts by shipment number in descending order (9–0). if unspecified, defaults to shipmentnumberasc. if you’re sorting by expected delivery date, make sure the expected delivery date is populated on your shipment records. a null value isn’t supported and results in an error. return value type: connectapi.ordershipmentcollection getordersummaries(webstoreid) get order summaries. api version 51.0 requires chatter no signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid) parameters webstoreid type: string id of the webstore. return value type: connectapi.ordersummarycollectionrepresentation getordersummaries(webstoreid, effectiveaccountid) get order summaries. api version 51.0 requires chatter no 1008apex reference guide commercebuyerexperience class signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.ordersummarycollectionrepresentation getordersummaries(webstoreid, effectiveaccountid, fields) get order summaries with specific fields. api version 51.0 requires chatter no signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid, string effectiveaccountid, list<string> fields) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row. these order summary fields are returned regardless of fields specified. 1009apex reference guide commercebuyerexperience class • createddate • ordersummaryid • ordernumber • ordereddate • ownerid • status • totalamount return value type: connectapi.ordersummarycollectionrepresentation getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken) get a page of order summaries with specific fields. api version 51.0 requires chatter no signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid, string effectiveaccountid, list<string> fields, integer pagesize, string pagetoken) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request |
is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row. these order summary fields are returned regardless of fields specified. • createddate • ordersummaryid • ordernumber 1010apex reference guide commercebuyerexperience class • ordereddate • ownerid • status • totalamount 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. 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. return value type: connectapi.ordersummarycollectionrepresentation getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder) get a sorted page of order summaries with specific fields. api version 51.0 requires chatter no signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid, string effectiveaccountid, list<string> fields, integer pagesize, string pagetoken, connectapi.ordersummarysortorder sortorder) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row. these order summary fields are returned regardless of fields specified. 1011apex reference guide commercebuyerexperience class • createddate • ordersummaryid • ordernumber • ordereddate • ownerid • status • totalamount 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. 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. sortorder type: connectapi.ordersummarysortorder sort order for order summaries. values are: • createddateasc—sorts by the oldest created date. • createddatedesc—sorts by the most recent created date. • ordereddateasc—sorts by the oldest ordered date. • ordereddatedesc—sorts by the most recent ordered date. if unspecified, defaults to ordereddatedesc. if you’re sorting by ordered date, make sure the ordered date is populated on your order summary records. a null value isn’t supported and results in an error. return value type: connectapi.ordersummarycollectionrepresentation getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder, earliestdate, latestdate) get a sorted page of order summaries with specific fields within a specific date range. api version 51.0 requires chatter no 1012apex reference guide commercebuyerexperience class signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid, string effectiveaccountid, list<string> fields, integer pagesize, string pagetoken, connectapi.ordersummarysortorder sortorder, string earliestdate, string latestdate) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row. these order summary fields are returned regardless of fields specified. • createddate • ordersummaryid • ordernumber • ordereddate • ownerid • status • totalamount 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. 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. sortorder type: connectapi.ordersummarysortorder sort order for order summaries. values are: • createddateasc—sorts by the oldest |
created date. • createddatedesc—sorts by the most recent created date. • ordereddateasc—sorts by the oldest ordered date. • ordereddatedesc—sorts by the most recent ordered date. if unspecified, defaults to ordereddatedesc. if you’re sorting by ordered date, make sure the ordered date is populated on your order summary records. a null value isn’t supported and results in an error. 1013apex reference guide commercebuyerexperience class earliestdate type: string oldest created or ordered date, depending on the sortorder value, for order summaries to return. results include any orders on and after this date. expected format is an iso 8601 date string, for example, 2020-02-25t18:24:31.000z. latestdate type: string most recent created or ordered date, depending on the sortorder value, for order summaries to return. results include any orders before this date. expected format is an iso 8601 date string, for example, 2020-02-25t18:24:31.000z. return value type: connectapi.ordersummarycollectionrepresentation getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder, earliestdate, latestdate, ownerscoped) get a sorted page of order summaries with specific fields within a specific date range and scoped to orders owned by the context user. api version 51.0 requires chatter no signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid, string effectiveaccountid, list<string> fields, integer pagesize, string pagetoken, connectapi.ordersummarysortorder sortorder, string earliestdate, string latestdate, boolean ownerscoped) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row. these order summary fields are returned regardless of fields specified. • createddate 1014apex reference guide commercebuyerexperience class • ordersummaryid • ordernumber • ordereddate • ownerid • status • totalamount 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. 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. sortorder type: connectapi.ordersummarysortorder sort order for order summaries. values are: • createddateasc—sorts by the oldest created date. • createddatedesc—sorts by the most recent created date. • ordereddateasc—sorts by the oldest ordered date. • ordereddatedesc—sorts by the most recent ordered date. if unspecified, defaults to ordereddatedesc. if you’re sorting by ordered date, make sure the ordered date is populated on your order summary records. a null value isn’t supported and results in an error. earliestdate type: string oldest created or ordered date, depending on the sortorder value, for order summaries to return. results include any orders on and after this date. expected format is an iso 8601 date string, for example, 2020-02-25t18:24:31.000z. latestdate type: string most recent created or ordered date, depending on the sortorder value, for order summaries to return. results include any orders before this date. expected format is an iso 8601 date string, for example, 2020-02-25t18:24:31.000z. ownerscoped type: boolean specifies whether the results are scoped to orders owned by the context user (true) or to orders owned by and shared with the context user (false). if unspecified, defaults to true. return value type: connectapi.ordersummarycollectionrepresentation 1015apex reference guide commercebuyerexperience class getordersummaries(webstoreid, effectiveaccountid, fields, pagesize, pagetoken, sortorder, earliestdate, latestdate, ownerscoped, includeadjustmentdetails) get a sorted page of order summaries with specific fields within a |
specific date range and scoped to orders owned by the context user. api version 51.0 requires chatter no signature public static connectapi.ordersummarycollectionrepresentation getordersummaries(string webstoreid, string effectiveaccountid, list<string> fields, integer pagesize, string pagetoken, connectapi.ordersummarysortorder sortorder, string earliestdate, string latestdate, boolean ownerscoped, boolean includeadjustmentdetails) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row. these order summary fields are returned regardless of fields specified. • createddate • ordersummaryid • ordernumber • ordereddate • ownerid • status • totalamount 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. 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. 1016apex reference guide commercebuyerexperience class sortorder type: connectapi.ordersummarysortorder sort order for order summaries. values are: • createddateasc—sorts by the oldest created date. • createddatedesc—sorts by the most recent created date. • ordereddateasc—sorts by the oldest ordered date. • ordereddatedesc—sorts by the most recent ordered date. if unspecified, defaults to ordereddatedesc. if you’re sorting by ordered date, make sure the ordered date is populated on your order summary records. a null value isn’t supported and results in an error. earliestdate type: string oldest created or ordered date, depending on the sortorder value, for order summaries to return. results include any orders on and after this date. expected format is an iso 8601 date string, for example, 2020-02-25t18:24:31.000z. latestdate type: string most recent created or ordered date, depending on the sortorder value, for order summaries to return. results include any orders before this date. expected format is an iso 8601 date string, for example, 2020-02-25t18:24:31.000z. ownerscoped type: boolean specifies whether the results are scoped to orders owned by the context user (true) or to orders owned by and shared with the context user (false). if unspecified, defaults to true. includeadjustmentdetails type: boolean specifies whether to fetch price adjustment details based on their type (true). if unspecified, defaults to false. return value type: connectapi.ordersummarycollectionrepresentation getordersummary(webstoreid, ordersummaryid, effectiveaccountid) get an order summary. api version 55.0 requires chatter no 1017apex reference guide commercebuyerexperience class signature public static connectapi.ordersummaryrepresentation getordersummary(string webstoreid, string ordersummaryid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.ordersummaryrepresentation getordersummary(webstoreid, ordersummaryid, effectiveaccountid, fields) get an order summary with fields. api version 55.0 requires chatter no signature public static connectapi.ordersummaryrepresentation getordersummary(string webstoreid, string ordersummaryid, string effectiveaccountid, list<string> fields) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string 1018apex reference guide commercebuyerexperience class id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row |
. these order summary fields are returned regardless of fields specified. • createddate • ordersummaryid • ordernumber • ordereddate • ownerid • status • totalamount return value type: connectapi.ordersummaryrepresentation getordersummary(webstoreid, ordersummaryid, effectiveaccountid, fields, includeadjustmentdetails) get an order summary with fields and include adjustment details. api version 55.0 requires chatter no signature public static connectapi.ordersummaryrepresentation getordersummary(string webstoreid, string ordersummaryid, string effectiveaccountid, list<string> fields, boolean includeadjustmentdetails) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string 1019apex reference guide commercebuyerexperience class id of the account for which the request is made. if null, defaults to the account id for the context user. fields type: list<string> list of up to 35 additional order summary fields to display in the ui in each item row. these order summary fields are returned regardless of fields specified. • createddate • ordersummaryid • ordernumber • ordereddate • ownerid • status • totalamount includeadjustmentdetails type: boolean specifies whether to return adjustment details (true) or not (false).if unspecified, the default value is false. return value type: connectapi.ordersummaryrepresentation getordersummaryadjustments(webstoreid, ordersummaryid) get adjustments for an order summary. api version 53.0 requires chatter no signature public static connectapi.ordersummaryadjustmentcollection getordersummaryadjustments(string webstoreid, string ordersummaryid) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. 1020apex reference guide commercebuyerexperience class return value type: connectapi.ordersummaryadjustmentcollection getordersummaryadjustments(webstoreid, ordersummaryid, effectiveaccountid) get adjustments for an order summary. api version 53.0 requires chatter no signature public static connectapi.ordersummaryadjustmentcollection getordersummaryadjustments(string webstoreid, string ordersummaryid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. ordersummaryid type: string id of the order summary. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.ordersummaryadjustmentcollection updatecommerceaccountaddress(webstoreid, accountid, addressid, addressinput) update a commerce account address for a webstore. api version 54.0 requires chatter no 1021apex reference guide commercecart class signature public static connectapi.commerceaddressoutput updatecommerceaccountaddress(string webstoreid, string accountid, string addressid, connectapi.commerceaddressinput addressinput) parameters webstoreid type: string id of the webstore. accountid type: string id of the account. addressid type: string id of the address. addressinput type: connectapi.commerceaddressinput information about the address fields you want to update. return value type: connectapi.commerceaddressoutput commercecart class get, create, update, and delete carts. get cart items, add items to carts, update and delete cart items. namespace connectapi commercecart methods these methods are for commercecart. all methods are static. in this section: additemtocart(webstoreid, effectiveaccountid, activecartorid, cartiteminput, currencyisocode) add an item to a cart of a specific currency. additemstocart(webstoreid, effectiveaccountid, activecartorid, cartitems) add a batch of up to 100 items to a cart. additemstocart(webstoreid, effectiveaccountid, activecartorid, cartitems, currencyisocode) add a batch of up to 100 items to a cart of a specific currency. 1022apex reference guide commercecart class additemtocart(webstoreid, effectiveaccountid, activecartorid, cartiteminput) add an item to |
a cart. applycartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponinput) apply a coupon to a cart. applycartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponinput, currencyisocode) apply a coupon to a cart. copycarttowishlist(webstoreid, effectiveaccountid, activecartorid, carttowishlistinput) copy the products from a cart to a wishlist. createcart(webstoreid, cart) create a cart. deletecart(webstoreid, effectiveaccountid, activecartorid) delete a cart. deletecartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponid) delete a coupon from a cart. deletecartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponid, currencyisocode) delete a coupon from a cart. deletecartitem(webstoreid, effectiveaccountid, activecartorid, cartitemid) delete an item from a cart. deleteinventoryreservation(webstoreid, activecartorid, effectiveaccountid) (developer preview) delete an inventory reservation. getcartcoupons(webstoreid, effectiveaccountid, activecartorid) get coupons for a cart. getcartcoupons(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get coupons for a cart. getcartitempromotion(webstoreid, effectiveaccountid, activecartorid, cartitempromotioncollectioninput) get promotions for a cart item. getcartitempromotion(webstoreid, effectiveaccountid, activecartorid, cartitempromotioncollectioninput, currencyisocode) get a promotion for a cart item. getcartitems(webstoreid, effectiveaccountid, activecartorid) get items in a cart. getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam) get a page of items in a cart. getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam, sortparam) get a sorted page of items in a cart. getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam, pagesize) get a specified size page of items in a cart. getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam, pagesize, sortparam) get a specified size, sorted page of items in a cart. getcartitems(webstoreid, effectiveaccountid, activecartorid, productfields, pageparam, pagesize, sortparam) get a specified size, sorted page of items filtered by product fields in a cart. 1023apex reference guide commercecart class getcartitems(webstoreid, effectiveaccountid, activecartorid, productfields, pageparam, pagesize, sortparam, currencyisocode) get a specified size, sorted page of items filtered by product fields in a cart. getcartpromotions(webstoreid, effectiveaccountid, activecartorid) get promotions for a cart. getcartpromotions(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get promotions for a cart in a specific currency. getcartsummary(webstoreid, effectiveaccountid, activecartorid) get a cart. getcartsummary(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get a cart in a specific currency. getorcreateactivecartsummary(webstoreid, effectiveaccountid, activecartorid) get a cart or create an active cart if one doesn’t exist. getorcreateactivecartsummary(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get a cart in a specific currency, or create an active cart if one doesn’t exist. makecartprimary(webstoreid, activecartorid, effectiveaccountid) make a secondary cart a primary cart. setcartmessagesvisibility(webstoreid, activecartorid, effectiveaccountid, messagevisibility) set the visibility for cart messages. updatecartitem(webstoreid, effectiveaccountid, activecartorid, cartitemid, cartitem) update an item in a cart. updatecartitem(webstoreid, effectiveaccountid, activecartorid, cartitemid, cartitem, currencyi |
socode) update an item in a cart of a specific currency. upsertinventoryreservation(webstoreid, activecartorid, effectiveaccountid, cartinventoryreservationinput) (developer preview) create or update an inventory reservation. additemtocart(webstoreid, effectiveaccountid, activecartorid, cartiteminput, currencyisocode) add an item to a cart of a specific currency. api version 57.0 available to guest users 57.0 requires chatter no 1024apex reference guide commercecart class signature public static connectapi.cartitem additemtocart(string webstoreid, string effectiveaccountid, string activecartorid, connectapi.cartiteminput cartiteminput, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. cartiteminput type: connectapi.cartiteminput a connectapi.cartiteminput object representing an item to add to the cart. currencyisocode type: string the currency iso code of the cart. return value type: connectapi.cartitem usage buyers with read access to carts can add, update, and delete items in carts. this method respects buyer view product entitlements and only users entitled to view product data can access it. additemstocart(webstoreid, effectiveaccountid, activecartorid, cartitems) add a batch of up to 100 items to a cart. api version 49.0 available to guest users 54.0 1025apex reference guide commercecart class requires chatter no signature public static connectapi.batchresult[] additemstocart(string webstoreid, string effectiveaccountid, string activecartorid, list<connectapi.batchinput> cartitems) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. cartitems type: list<connectapi.batchinput> the list can contain up to 100 connectapi.batchinput objects. in the connectapi.batchinput constructor, the input object must be connectapi.cartiteminput. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.cartitem object. the returned objects correspond to each of the input objects and are returned in the same order as the input objects. the method call fails only if an error occurs that affects the entire operation (such as a parsing failure). if an individual object causes an error, the error is embedded within the connectapi.batchresult list. usage buyers with read access to carts can add, update, and delete items in carts. this method respects buyer view product entitlements and only users entitled to view product data can access it. additemstocart(webstoreid, effectiveaccountid, activecartorid, cartitems, currencyisocode) add a batch of up to 100 items to a cart of a specific currency. api version 57.0 1026apex reference guide commercecart class available to guest users 57.0 requires chatter no signature public static connectapi.batchresult[] additemstocart(string webstoreid, string effectiveaccountid, string activecartorid, list<connectapi.batchinput> cartitems, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates |
a cart with a status that isn’t closed or pendingdelete. cartitems type: list<connectapi.batchinput> the list can contain up to 100 connectapi.batchinput objects. in the connectapi.batchinput constructor, the input object must be connectapi.cartiteminput. currencyisocode type: string the currency iso code of the cart. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.cartitem object. the returned objects correspond to each of the input objects and are returned in the same order as the input objects. the method call fails only if an error occurs that affects the entire operation (such as a parsing failure). if an individual object causes an error, the error is embedded within the connectapi.batchresult list. usage buyers with read access to carts can add, update, and delete items in carts. this method respects buyer view product entitlements and only users entitled to view product data can access it. 1027apex reference guide commercecart class additemtocart(webstoreid, effectiveaccountid, activecartorid, cartiteminput) add an item to a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartitem additemtocart(string webstoreid, string effectiveaccountid, string activecartorid, connectapi.cartiteminput cartiteminput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. cartiteminput type: connectapi.cartiteminput a connectapi.cartiteminput object representing an item to add to the cart. return value type: connectapi.cartitem usage buyers with read access to carts can add, update, and delete items in carts. this method respects buyer view product entitlements and only users entitled to view product data can access it. 1028apex reference guide commercecart class applycartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponinput) apply a coupon to a cart. api version 54.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartcouponcollection applycartcoupon(string webstoreid, string effectiveaccountid, string activecartorid, connectapi.cartcouponinput cartcouponinput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. cartcouponinput type: connectapi.cartcouponinput coupon code for the coupon. return value type: connectapi.cartcouponcollection applycartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponinput, currencyisocode) apply a coupon to a cart. 1029apex reference guide commercecart class api version 57.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartcouponcollection applycartcoupon(string webstoreid, string effectiveaccountid, string activecartorid, connectapi.cartcouponinput cartcouponinput, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’ |
t closed or pendingdelete. cartcouponinput type: connectapi.cartcouponinput coupon code for the coupon. currencyisocode type: string currency iso code of the cart. return value type: connectapi.cartcouponcollection copycarttowishlist(webstoreid, effectiveaccountid, activecartorid, carttowishlistinput) copy the products from a cart to a wishlist. api version 50.0 1030apex reference guide commercecart class available to guest users 54.0 requires chatter no signature public static connectapi.carttowishlistresult copycarttowishlist(string webstoreid, string effectiveaccountid, string activecartorid, connectapi.carttowishlistinput carttowishlistinput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. carttowishlistinput type: connectapi.carttowishlistinput a connectapi.carttowishlistinput object indicating the wishlist to copy products to. return value type: connectapi.carttowishlistresult createcart(webstoreid, cart) create a cart. api version 49.0 available to guest users 54.0 requires chatter no 1031apex reference guide commercecart class signature public static connectapi.cartsummary createcart(string webstoreid, connectapi.cartinput cart) parameters webstoreid type: string id of the webstore. cart type: connectapi.cartinput a connectapi.cartinput object representing a cart. return value type: connectapi.cartsummary usage buyers with read access to carts can create and delete carts. deletecart(webstoreid, effectiveaccountid, activecartorid) delete a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static void deletecart(string webstoreid, string effectiveaccountid, string activecartorid) parameters webstoreid type: string id of the webstore. 1032 |
apex reference guide commercecart class effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. return value type: void usage buyers with read access to carts can create and delete carts. deletecartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponid) delete a coupon from a cart. api version 54.0 available to guest users 57.0 requires chatter no signature public static void deletecartcoupon(string webstoreid, string effectiveaccountid, string activecartorid, string cartcouponid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string 1033apex reference guide commercecart class id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. cartcouponid type: string id of the cart coupon. return value type: void deletecartcoupon(webstoreid, effectiveaccountid, activecartorid, cartcouponid, currencyisocode) delete a coupon from a cart. api version 57.0 available to guest users 57.0 requires chatter no signature public static void deletecartcoupon(string webstoreid, string effectiveaccountid, string activecartorid, string cartcouponid, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. cartcouponid type: string id of the cart coupon. 1034apex reference guide commercecart class currencyisocode type: string currency iso code of the cart. return value type: void deletecartitem(webstoreid, effectiveaccountid, activecartorid, cartitemid) delete an item from a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static void deletecartitem(string webstoreid, string effectiveaccountid, string activecartorid, string cartitemid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. cartitemid type: string id of the cart item. 1035apex reference guide commercecart class return value type: void usage buyers with read access to carts can add, update, and delete items in carts. deleteinventoryreservation(webstoreid, activecartorid, effectiveaccountid) (developer preview) delete an inventory 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. api version 58.0 available to guest users 58.0 requires chatter no signature public static void deleteinventoryreservation(string webstoreid, string activecartorid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. activecartorid type: string id of the cart, active, or |
current. the current value indicates a cart with a status that isn’t closed or pendingdelete. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. return value type: void 1036apex reference guide commercecart class getcartcoupons(webstoreid, effectiveaccountid, activecartorid) get coupons for a cart. api version 54.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartcouponcollection getcartcoupons(string webstoreid, string effectiveaccountid, string activecartorid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. return value type: connectapi.cartcouponcollection getcartcoupons(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get coupons for a cart. api version 57.0 1037apex reference guide commercecart class available to guest users 57.0 requires chatter no signature public static connectapi.cartcouponcollection getcartcoupons(string webstoreid, string effectiveaccountid, string activecartorid, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. return value type: connectapi.cartcouponcollection getcartitempromotion(webstoreid, effectiveaccountid, activecartorid, cartitempromotioncollectioninput) get promotions for a cart item. api version 52.0 available to guest users 57.0 requires chatter no 1038apex reference guide commercecart class signature public static connectapi.cartitempromotioncollectionoutputrepresentation getcartitempromotion(string webstoreid, string effectiveaccountid, string activecartorid, connectapi.cartitempromotioncollectioninputrepresentation cartitempromotioncollectioninput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. cartitempromotioncollectioninput type: connectapi.cartitempromotioncollectioninputrepresentation promotions for a cart item. return value type: connectapi.cartitempromotioncollectionoutputrepresentation getcartitempromotion(webstoreid, effectiveaccountid, activecartorid, cartitempromotioncollectioninput, currencyisocode) get a promotion for a cart item. api version 57.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartitempromotioncollectionoutputrepresentation getcartitempromotion(string webstoreid, string effectiveaccountid, string activecartorid, 1039apex reference guide commercecart class connectapi.cartitempromotioncollectioninputrepresentation cartitempromotioncollectioninput, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. cartitempromotioncollectioninput type: connectapi.cartitempromotioncollectioninput |
representation promotions for a cart item. currencyisocode type: string currency iso code of the cart. return value type: connectapi.cartitempromotioncollectionoutputrepresentation getcartitems(webstoreid, effectiveaccountid, activecartorid) get items in a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartitemcollection getcartitems(string webstoreid, string effectiveaccountid, string activecartorid) 1040apex reference guide commercecart class parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. return value type: connectapi.cartitemcollection getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam) get a page of items in a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartitemcollection getcartitems(string webstoreid, string effectiveaccountid, string activecartorid, string pageparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string 1041apex reference guide commercecart class id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. return value type: connectapi.cartitemcollection getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam, sortparam) get a sorted page of items in a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartitemcollection getcartitems(string webstoreid, string effectiveaccountid, string activecartorid, string pageparam, connectapi.cartitemsortorder sortparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. 1042apex reference guide commercecart class pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. sortparam type: connectapi.cartitemsortorder sort order for items in a cart. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. • nameasc—sorts by name in ascending alphabetical order (a–z). • namedesc—sorts by name in descending alphabetical order (z–a). • salespriceasc—sorts from lowest to highest negotiated price. • salespricedesc—sorts from highest to lowest negotiated price. if null, the default is createddatedesc. return value type: connectapi.cartitemcollection getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam, pagesize) get a specified size page of items in a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cart |
itemcollection getcartitems(string webstoreid, string effectiveaccountid, string activecartorid, string pageparam, integer pagesize) parameters webstoreid type: string id of the webstore. 1043apex reference guide commercecart class effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. 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.cartitemcollection getcartitems(webstoreid, effectiveaccountid, activecartorid, pageparam, pagesize, sortparam) get a specified size, sorted page of items in a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartitemcollection getcartitems(string webstoreid, string effectiveaccountid, string activecartorid, string pageparam, integer pagesize, connectapi.cartitemsortorder sortparam) parameters webstoreid type: string id of the webstore. 1044apex reference guide commercecart class effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. 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. sortparam type: connectapi.cartitemsortorder sort order for items in a cart. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. • nameasc—sorts by name in ascending alphabetical order (a–z). • namedesc—sorts by name in descending alphabetical order (z–a). • salespriceasc—sorts from lowest to highest negotiated price. • salespricedesc—sorts from highest to lowest negotiated price. if null, the default is createddatedesc. return value type: connectapi.cartitemcollection getcartitems(webstoreid, effectiveaccountid, activecartorid, productfields, pageparam, pagesize, sortparam) get a specified size, sorted page of items filtered by product fields in a cart. api version 49.0 available to guest users 54.0 1045apex reference guide commercecart class requires chatter no signature public static connectapi.cartitemcollection getcartitems(string webstoreid, string effectiveaccountid, string activecartorid, string productfields, string pageparam, integer pagesize, connectapi.cartitemsortorder sortparam) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. productfields type: string comma-separated list of up to five product fields. results include fields that you have access to. some product fields (such as productname and sku) are returned even when not included in the productfields |
parameter. 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. sortparam type: connectapi.cartitemsortorder sort order for items in a cart. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. • nameasc—sorts by name in ascending alphabetical order (a–z). • namedesc—sorts by name in descending alphabetical order (z–a). • salespriceasc—sorts from lowest to highest negotiated price. • salespricedesc—sorts from highest to lowest negotiated price. if null, the default is createddatedesc. 1046apex reference guide commercecart class return value type: connectapi.cartitemcollection getcartitems(webstoreid, effectiveaccountid, activecartorid, productfields, pageparam, pagesize, sortparam, currencyisocode) get a specified size, sorted page of items filtered by product fields in a cart. api version 57.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartitemcollection getcartitems(string webstoreid, string effectiveaccountid, string activecartorid, string productfields, string pageparam, integer pagesize, connectapi.cartitemsortorder sortparam, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. productfields type: string comma-separated list of up to five product fields. results include fields that you have access to. some product fields (such as productname and sku) are returned even when not included in the productfields parameter. 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. 1047apex reference guide commercecart class pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. currencyisocode type: string currency iso code of the cart. return value type: connectapi.cartitemcollection getcartpromotions(webstoreid, effectiveaccountid, activecartorid) get promotions for a cart. api version 53.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartpromotioncollection getcartpromotions(string webstoreid, string effectiveaccountid, string activecartorid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. return value type: connectapi.cartpromotioncollection 1048apex reference guide commercecart class getcartpromotions(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get promotions for a cart in a specific currency. api version 57.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartpromotioncollection getcartpromotions(string webstoreid, string effectiveaccountid, string activecartorid, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest |
buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. currencyisocode type: string currency iso code of the cart. return value type: connectapi.cartpromotioncollection getcartsummary(webstoreid, effectiveaccountid, activecartorid) get a cart. api version 49.0 1049apex reference guide commercecart class available to guest users 54.0 requires chatter no signature public static connectapi.cartsummary getcartsummary(string webstoreid, string effectiveaccountid, string activecartorid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. if you specify active and there isn’t an active cart, you get an error. return value type: connectapi.cartsummary getcartsummary(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get a cart in a specific currency. api version 57.0 available to guest users 57.0 requires chatter no 1050apex reference guide commercecart class signature public static connectapi.cartsummary getcartsummary(string webstoreid, string effectiveaccountid, string activecartorid, string currencyisocode) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. if you specify active and there isn’t an active cart, you get an error. currencyisocode type: string currency iso code of the cart. return value type: connectapi.cartsummary getorcreateactivecartsummary(webstoreid, effectiveaccountid, activecartorid) get a cart or create an active cart if one doesn’t exist. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartsummary getorcreateactivecartsummary(string webstoreid, string effectiveaccountid, string activecartorid) 1051apex reference guide commercecart class parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. if you specify active and there isn’t an active cart, one is created. return value type: connectapi.cartsummary usage buyers with read access to carts can create and delete carts. getorcreateactivecartsummary(webstoreid, effectiveaccountid, activecartorid, currencyisocode) get a cart in a specific currency, or create an active cart if one doesn’t exist. api version 57.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartsummary getorcreateactivecartsummary(string webstoreid, string effectiveaccountid, string activecartorid, string currencyisocode) parameters webstoreid type: string id of the webstore. 1052apex reference guide commercecart class effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. |
the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. if you specify active and there isn’t an active cart, one is created. currencyisocode type: string currency iso code of the cart. return value type: connectapi.cartsummary usage buyers with read access to carts can create and delete carts. makecartprimary(webstoreid, activecartorid, effectiveaccountid) make a secondary cart a primary cart. api version 53.0 available to guest users 56.0 requires chatter yes signature public static connectapi.commerceactionresult makecartprimary(string webstoreid, string activecartorid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. activecartorid type: string 1053apex reference guide commercecart class id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. return value type: connectapi.commerceactionresult setcartmessagesvisibility(webstoreid, activecartorid, effectiveaccountid, messagevisibility) set the visibility for cart messages. api version 50.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartmessagesvisibilityresult setcartmessagesvisibility(string webstoreid, string activecartorid, string effectiveaccountid, connectapi.cartmessagesvisibilityinput messagevisibility) parameters webstoreid type: string id of the webstore. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. messagevisibility type: connectapi.cartmessagesvisibilityinput 1054apex reference guide commercecart class a connectapi.cartmessagesvisibilityinput object specifying the visibility setting. return value type: connectapi.cartmessagesvisibilityresult updatecartitem(webstoreid, effectiveaccountid, activecartorid, cartitemid, cartitem) update an item in a cart. api version 49.0 available to guest users 54.0 requires chatter no signature public static connectapi.cartitem updatecartitem(string webstoreid, string effectiveaccountid, string activecartorid, string cartitemid, connectapi.cartiteminput cartitem) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. cartitemid type: string id of the cart item. cartitem type: connectapi.cartiteminput a connectapi.cartiteminput object representing a cart item to update. 1055apex reference guide commercecart class return value type: connectapi.cartitem usage buyers with read access to carts can add, update, and delete items in carts. this method respects buyer view product entitlements and only users entitled to view product data can access it. updatecartitem(webstoreid, effectiveaccountid, activecartorid, cartitemid, cartitem, currencyisocode) update an item in a cart of a specific currency. api version 57.0 available to guest users 57.0 requires chatter no signature public static connectapi.cartitem updatecartitem(string webstoreid, string effectiveaccountid, string activecartorid, string cartitemid, connectapi.cartiteminput cartitem, string currencyisocode) parameters webstore |
id type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. activecartorid type: string id of the cart, active, or current. the current value is available in version 50.0 and later and indicates a cart with a status that isn’t closed or pendingdelete. cartitemid type: string id of the cart item. 1056apex reference guide commercecart class cartitem type: connectapi.cartiteminput a connectapi.cartiteminput object representing a cart item to update. currencyisocode type: string the currency iso code of the cart. return value type: connectapi.cartitem usage buyers with read access to carts can add, update, and delete items in carts. this method respects buyer view product entitlements and only users entitled to view product data can access it. upsertinventoryreservation(webstoreid, activecartorid, effectiveaccountid, cartinventoryreservationinput) (developer preview) create or update an inventory 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. api version 58.0 available to guest users 58.0 requires chatter no signature public static connectapi.cartinventoryreservationoutputrepresentation upsertinventoryreservation(string webstoreid, string activecartorid, string effectiveaccountid, connectapi.cartinventoryreservationinputrepresentation cartinventoryreservationinput) parameters webstoreid type: string id of the webstore. 1057apex reference guide commercecatalog class activecartorid type: string id of the cart, active, or current. the current value indicates a cart with a status that isn’t closed or pendingdelete. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. cartinventoryreservationinput type: connectapi.cartinventoryreservationinputrepresentation a connectapi.cartinventoryreservationinputrepresentation input class indicating the reservation duration. return value type: connectapi.cartinventoryreservationoutputrepresentation commercecatalog class get products, product categories, and product category paths. namespace connectapi commercecatalog methods these methods are for commercecatalog. all methods are static. in this section: getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory) get a product. getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo) get a product with variation and attribute information. getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo, excludequantityrule) get a product with quantity rule information. getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo, excludequantityrule, excludeproductsellingmodels) get detailed information for a product, optionally including information about its product selling models. getproduct(webstoreid, productid, effectiveaccountid, fields, mediagroups, excludefields, excludemedia, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo, excludequantityrule, excludeproductsellingmodels) get detailed information for a product without its entitlement information. getproductcategory(webstoreid, productcategoryid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia) get a product category. 1058apex reference guide commercecatalog class getproductcategorychildren(webstoreid, effectiveaccountid, parentproductcategoryid, fields, excludefields, mediagroups, excludemedia |
) get product categories. getproductcategorypath(webstoreid, productcategoryid) get the product category path from the root category to the current category. getproductchildcollection(webstoreid, productid, effectiveaccountid, fields, mediagroups, excludefields, excludemedia, excludeattributesetinfo, excludequantityrule, pagetoken, pagesize) get a collection of child products related to a parent product. getproducts(webstoreid, effectiveaccountid, ids, skus, fields, excludemedia, excludeprices) get fields, prices, and default images for a list of products. getproducts(webstoreid, effectiveaccountid, ids, skus, fields, excludemedia) get fields and default images for a list of products. getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory) get a product. api version 49.0 available to guest users 51.0 requires chatter no signature public static connectapi.productdetail getproduct(string webstoreid, string productid, string effectiveaccountid, list<string> fields, boolean excludefields, list<string> mediagroups, boolean excludemedia, boolean excludeentitlementdetails, boolean excludeprimaryproductcategory) parameters webstoreid type: string id of the webstore. productid type: string id of the product. 1059apex reference guide commercecatalog class effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. mediagroups type: list<string> comma-separated list of developer names of media group records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia parameter takes precedence. excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. excludeentitlementdetails type: boolean specifies whether the entitlement details of the product are returned (false) or not (true). if unspecified, defaults to false. excludeprimaryproductcategory type: boolean specifies whether the primary category path of the product is returned (false) or not (true). if unspecified, defaults to false. return value type: connectapi.productdetail usage this method respects buyer view product entitlements and only users entitled to view product data can access it. getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo) get a product with variation and attribute information. 1060apex reference guide commercecatalog class api version 50.0 available to guest users 51.0 requires chatter no signature public static connectapi.productdetail getproduct(string webstoreid, string productid, string effectiveaccountid, list<string> fields, boolean excludefields, list<string> mediagroups, boolean excludemedia, boolean excludeentitlementdetails, boolean excludeprimaryproductcategory, boolean excludevariationinfo, boolean excludeattributesetinfo) parameters webstoreid type: string id of the webstore. productid type: string id of the product. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url |
size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. mediagroups type: list<string> comma-separated list of developer names of media group records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia parameter takes precedence. 1061apex reference guide commercecatalog class excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. excludeentitlementdetails type: boolean specifies whether the entitlement details of the product are returned (false) or not (true). if unspecified, defaults to false. excludeprimaryproductcategory type: boolean specifies whether the primary category path of the product is returned (false) or not (true). if unspecified, defaults to false. excludevariationinfo type: boolean specifies whether the variation information for the product is returned (false) or not (true). if unspecified, defaults to false. excludeattributesetinfo type: boolean specifies whether the attribute set information for the product is returned (false) or not (true). if unspecified, defaults to false. return value type: connectapi.productdetail usage this method respects buyer view product entitlements and only users entitled to view product data can access it. getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo, excludequantityrule) get a product with quantity rule information. api version 52.0 available to guest users 52.0 requires chatter no 1062apex reference guide commercecatalog class signature public static connectapi.productdetail getproduct(string webstoreid, string productid, string effectiveaccountid, list<string> fields, boolean excludefields, list<string> mediagroups, boolean excludemedia, boolean excludeentitlementdetails, boolean excludeprimaryproductcategory, boolean excludevariationinfo, boolean excludeattributesetinfo, boolean excludequantityrule) parameters webstoreid type: string id of the webstore. productid type: string id of the product. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. mediagroups type: list<string> comma-separated list of developer names of media group records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia parameter takes precedence. excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. excludeentitlementdetails type: boolean specifies whether the entitlement details of the product are returned (false) or not (true). if unspecified, defaults to false. excludeprimaryproductcategory type: boolean specifies whether the primary category path of the product is returned (false) or not (true). if unspecified, defaults to false. 1063apex reference guide commercecatalog class excludevariationinfo type: boolean specifies whether the variation information for the product is returned (false) or not (true). if unspecified, defaults to false. excludeattributesetinfo type: boolean specifies whether the attribute set information for the product is returned (false) or not (true). if unspecified, defaults to false. excludequantityrule type: boolean specifies whether the quantity rule information for the product is returned (false) or not (true). if unspecified, defaults to false. return value type |
: connectapi.productdetail usage this method respects buyer view product entitlements and only users entitled to view product data can access it. getproduct(webstoreid, productid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia, excludeentitlementdetails, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo, excludequantityrule, excludeproductsellingmodels) get detailed information for a product, optionally including information about its product selling models. api version 56.0 available to guest users 56.0 requires chatter no signature public static connectapi.productdetail getproduct(string webstoreid, string productid, string effectiveaccountid, list<string> fields, boolean excludefields, list<string> mediagroups, boolean excludemedia, boolean excludeentitlementdetails, boolean excludeprimaryproductcategory, boolean excludevariationinfo, boolean excludeattributesetinfo, boolean excludequantityrule, boolean excludeproductsellingmodels) 1064apex reference guide commercecatalog class parameters webstoreid type: string id of the webstore. productid type: string id of the product. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. mediagroups type: list<string> comma-separated list of developer names of media group records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia parameter takes precedence. excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. excludeentitlementdetails type: boolean specifies whether the entitlement details of the product are returned (false) or not (true). if unspecified, defaults to false. excludeprimaryproductcategory type: boolean specifies whether the primary category path of the product is returned (false) or not (true). if unspecified, defaults to false. excludevariationinfo type: boolean specifies whether the variation information for the product is returned (false) or not (true). if unspecified, defaults to false. excludeattributesetinfo type: boolean specifies whether the attribute set information for the product is returned (false) or not (true). if unspecified, defaults to false. 1065apex reference guide commercecatalog class excludequantityrule type: boolean specifies whether the quantity rule information for the product is returned (false) or not (true). if unspecified, defaults to false. excludeproductsellingmodels type: boolean specifies whether product selling models are returned or not. the behavior of this parameter depends on whether you turn on the commercesubscription permission. if the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. if the permission is on, and if you set the parameter to true, product selling models are not returned. if the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value. return value type: connectapi.productdetail usage this method respects buyer view product entitlements and only users entitled to view product data can access it. getproduct(webstoreid, productid, effectiveaccountid, fields, mediagroups, excludefields, excludemedia, excludeprimaryproductcategory, excludevariationinfo, excludeattributesetinfo, excludequantityrule, excludeproductsellingmodels) get detailed information for a product without its entitlement information. api version 57.0 available to guest users 57.0 requires chatter no signature public static connectapi.productdetail getproduct(string webstoreid, string productid, string effectiveaccountid, list<string> fields, list<string> mediagroups, boolean ex |
cludefields, boolean excludemedia, boolean excludeprimaryproductcategory, boolean excludevariationinfo, boolean excludeattributesetinfo, boolean excludequantityrule, boolean excludeproductsellingmodels) 1066apex reference guide commercecatalog class parameters webstoreid type: string id of the webstore. productid type: string id of the product. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. mediagroups type: list<string> comma-separated list of developer names of media group records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. excludeprimaryproductcategory type: boolean specifies whether the primary category path of the product is returned (false) or not (true). if unspecified, defaults to false. excludevariationinfo type: boolean specifies whether the variation information for the product is returned (false) or not (true). if unspecified, defaults to false. excludeattributesetinfo type: boolean specifies whether the attribute set information for the product is returned (false) or not (true). if unspecified, defaults to false. excludequantityrule type: boolean specifies whether the quantity rule information for the product is returned (false) or not (true). if unspecified, defaults to false. 1067apex reference guide commercecatalog class excludeproductsellingmodels type: boolean specifies whether product selling models are returned or not. the behavior of this parameter depends on whether you turn on the commercesubscription permission. if the permission is on, and if you set the parameter to false (or if you omit the parameter), product selling models are returned. if the permission is on, and if you set the parameter to true, product selling models are not returned. if the permission is off, product selling models are not returned, regardless of whether you omit the parameter or provide a value. return value type: connectapi.productdetail usage this method respects buyer view product entitlements and only users entitled to view product data can access it. getproductcategory(webstoreid, productcategoryid, effectiveaccountid, fields, excludefields, mediagroups, excludemedia) get a product category. api version 49.0 available to guest users 51.0 requires chatter no signature public static connectapi.productcategorydetail getproductcategory(string webstoreid, string productcategoryid, string effectiveaccountid, list<string> fields, boolean excludefields, list<string> mediagroups, boolean excludemedia) parameters webstoreid type: string id of the webstore. productcategoryid type: string id of the product category. 1068apex reference guide commercecatalog class effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. mediagroups type: list<string> comma-separated list of developer names of media group records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia |
parameter takes precedence. excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. return value type: connectapi.productcategorydetail getproductcategorychildren(webstoreid, effectiveaccountid, parentproductcategoryid, fields, excludefields, mediagroups, excludemedia) get product categories. api version 52.0 available to guest users 52.0 requires chatter no 1069apex reference guide commercecatalog class signature public static connectapi.productcategorydetailcollection getproductcategorychildren(string webstoreid, string effectiveaccountid, string parentproductcategoryid, list<string> fields, boolean excludefields, list<string> mediagroups, boolean excludemedia) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. parentproductcategoryid type: string id of the product category for which you want to get all the children product categories. if null, returns all the top-level product categories for the store. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. mediagroups type: list<string> comma-separated list of developer names of media group records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia parameter takes precedence. excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. return value type: connectapi.productcategorydetailcollection getproductcategorypath(webstoreid, productcategoryid) get the product category path from the root category to the current category. 1070apex reference guide commercecatalog class api version 49.0 available to guest users 51.0 requires chatter no signature public static connectapi.productcategorypath getproductcategorypath(string webstoreid, string productcategoryid) parameters webstoreid type: string id of the webstore. productcategoryid type: string id of the product category. return value type: connectapi.productcategorypath usage this method respects buyer view product entitlements and only users entitled to view product data can access it. getproductchildcollection(webstoreid, productid, effectiveaccountid, fields, mediagroups, excludefields, excludemedia, excludeattributesetinfo, excludequantityrule, pagetoken, pagesize) get a collection of child products related to a parent product. api version 57.0 available to guest users 57.0 1071apex reference guide commercecatalog class requires chatter no signature public static connectapi.productchildcollection getproductchildcollection(string webstoreid, string productid, string effectiveaccountid, list<string> fields, list<string> mediagroups, boolean excludefields, boolean excludemedia, boolean excludeattributesetinfo, boolean excludequantityrule, string pagetoken, integer pagesize) parameters webstoreid type: string id of the webstore. productid type: string id of the product. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if unspecified, the default value is determined from context. fields type: list<string> comma-separated list of field names. if this list is empty or unspecified, all fields are returned. there is no limit to the number of fields you can specify. the number of fields and number of characters in the field name may affect the url size limit. if excludefields and fields are specified, the excludefields parameter takes precedence. mediagroups type: list<string> comma-separated list of developer names of media group |
records. if this list is empty or unspecified, all media groups are returned. if excludemedia and mediagroups are specified, the excludemedia parameter takes precedence. excludefields type: boolean specifies whether the fields are returned (false) or not (true). if unspecified, defaults to false. excludemedia type: boolean specifies whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. excludeattributesetinfo type: boolean specifies whether the attribute set information for the product is returned (false) or not (true). if unspecified, defaults to false. 1072apex reference guide commercecatalog class excludequantityrule type: boolean specifies whether the quantity rule information for the product is returned (false) or not (true). if unspecified, defaults to false. 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 100. if you don’t specify a value, the default size is 20. return value type: connectapi.productchildcollection getproducts(webstoreid, effectiveaccountid, ids, skus, fields, excludemedia, excludeprices) get fields, prices, and default images for a list of products. api version 54.0 available to guest users 54.0 requires chatter no signature public static connectapi.productoverviewcollection getproducts(string webstoreid, string effectiveaccountid, list<string> ids, list<string> skus, list<string> fields, boolean excludemedia, boolean excludeprices) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if unspecified, the default value is determined from context. 1073apex reference guide commercecatalog class ids type: list<string> list of product ids. specify either a list of up to 20 product ids or skus, but not both. skus type: list<string> list of skus. specify either a list of up to 20 skus or product ids, but not both. fields type: list<string> comma-separated list of field names to return for each product. if the list is empty or not specified, all fields are returned. you can specify any number of fields. excludemedia type: boolean specifies whether default images are returned for the products (false) or not (true). the default is false. excludeprices type: boolean specifies whether prices are returned for the products (false) or not (true). the default is false. note: in version 58.0 and later, prices aren’t returned for products regardless of this parameter. to get pricing information for products in version 58.0 and later, use the commercestorepricing class. return value type: connectapi.productoverviewcollection getproducts(webstoreid, effectiveaccountid, ids, skus, fields, excludemedia) get fields and default images for a list of products. api version 58.0 available to guest users 58.0 requires chatter no signature public static connectapi.productoverviewcollection getproducts(string webstoreid, string effectiveaccountid, list<string> ids, list<string> skus, list<string> fields, boolean excludemedia) 1074apex reference guide commercepromotions class parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. ids type: list<string> list of product ids. specify either a list of up to 20 product ids or skus, but not both. skus type: list<string> list of skus. specify either a list of up to 20 skus or product ids, but not both. fields type: list<string> comma-separated list of field names to return for each product. if the list is empty or not specified, all fields are returned. you can specify any number of fields. excludemedia type: boolean specifies whether default images are returnedspecifies |
whether the media groups and default images of the product are returned (false) or not (true). if unspecified, defaults to false. return value type: connectapi.productoverviewcollection commercepromotions class evaluate promotions for commerce orders. get coupon code redemption usage. namespace connectapi commercepromotions methods the following are methods for commercepromotions. all methods are static. in this section: decreaseredemption(couponcoderedemption) get coupon code redemption usage to revert a previously redeemed coupon code. 1075apex reference guide commercepromotions class evaluate(salestransaction) determine which promotions the customer is eligible for based on the store and buyer group, and compute the applicable price adjustments based on the coupons and the items in the cart. this api evaluates only the first 50 active manual promotions and first 50 active automatic promotions, based on priority. if you want to enable promotions based on shipping, contact salesforce customer support. increaseredemption(couponcoderedemption) get coupon code redemption addition (increase) usage. decreaseredemption(couponcoderedemption) get coupon code redemption usage to revert a previously redeemed coupon code. api version 58.0 available to guest users 58.0 requires chatter no signature public static connectapi.couponcoderedemptioncollection decreaseredemption(connectapi.couponcoderedemptioninput couponcoderedemption) parameters couponcoderedemption type: connectapi.couponcoderedemptioninput on page 1576 tracks each coupon code redemption. return value type: connectapi.couponcoderedemptioncollection on page 1760 evaluate(salestransaction) determine which promotions the customer is eligible for based on the store and buyer group, and compute the applicable price adjustments based on the coupons and the items in the cart. this api evaluates only the first 50 active manual promotions and first 50 active automatic promotions, based on priority. if you want to enable promotions based on shipping, contact salesforce customer support. api version 57.0 1076apex reference guide commercepromotions class available to guest users 57.0 requires chatter no signature global static connectapi.promotionevaluation evaluate(connectapi.promotionevaluateinput salestransaction) parameters salestransaction type: connectapi.promotionevaluateinput find promotions that the customer is eligible for and compute their discounts. return value type: connectapi.promotionevaluation increaseredemption(couponcoderedemption) get coupon code redemption addition (increase) usage. api version 58.0 available to guest users 58.0 requires chatter no signature public static connectapi.couponcoderedemptioncollection increaseredemption(connectapi.couponcoderedemptioninput couponcoderedemption) parameters couponcoderedemption type: connectapi.couponcoderedemptioninput on page 1576 tracks each coupon code redemption. 1077apex reference guide commercesearch class return value type: connectapi.couponcoderedemptioncollection on page 1760 commercesearch class get sort rules for the live search index. get product search suggestions. search products. namespace connectapi commercesearch methods these methods are for commercesearch. all methods are static. in this section: getsortrules(webstoreid) get sort rules for the live index. getsuggestions(webstoreid, effectiveaccountid, searchterm, maxresults) get suggestions for product searches. getsuggestions(webstoreid, effectiveaccountid, searchterm, maxresults, includesuggestedproducts, maxsuggestedproducts) get suggestions for product searches. searchproducts(webstoreid, effectiveaccountid, productsearchinput) search products. searchproducts(webstoreid, searchterm, categoryid, sortruleid, grouping, fields, refinements, pageparam, pagesize, effectiveaccountid, includequantityrule) search products by search term or category in a webstore. getsortrules(webstoreid) get sort rules for the live index. api version 52.0 available to guest users 52.0 requires chatter no 1078apex reference guide commercesearch class signature public static connectapi.sortrulescollection getsortrules(string webstoreid) parameters webstoreid type: string id |
of the webstore. return value type: connectapi.sortrulescollection getsuggestions(webstoreid, effectiveaccountid, searchterm, maxresults) get suggestions for product searches. api version 52.0 available to guest users 52.0 requires chatter no signature public static connectapi.productsearchsuggestionsresults getsuggestions(string webstoreid, string effectiveaccountid, string searchterm, integer maxresults) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. searchterm type: string search term with up to 10 characters. if specified, the service returns autocomplete suggestions from the user’s recent searches. if unspecified, the service returns suggestions from the user’s recent searches. maxresults type: integer 1079apex reference guide commercesearch class maximum number of suggestions. values are from 1 through 10. if unspecified, defaults to 10. return value type: connectapi.productsearchsuggestionsresults getsuggestions(webstoreid, effectiveaccountid, searchterm, maxresults, includesuggestedproducts, maxsuggestedproducts) get suggestions for product searches. api version 58.0 available to guest users 58.0 requires chatter no signature public static connectapi.productsearchsuggestionsresults getsuggestions(string webstoreid, string effectiveaccountid, string searchterm, integer maxresults, boolean includesuggestedproducts, integer maxsuggestedproducts) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. searchterm type: string search term with up to 10 characters. if specified, the service returns autocomplete suggestions from the user’s recent searches. if unspecified, the service returns suggestions from the user’s recent searches. maxresults type: integer maximum number of suggestions. values are from 1 through 10. if unspecified, defaults to 10. includesuggestedproducts type: boolean 1080apex reference guide commercesearch class specifies whether a search term returns product suggestions (true) or not (false). if unspecified, defaults to false. if true, the service returns the suggested product ids. maxsuggestedproducts type: string maximum number of product suggestions. values are from 1 through 10. if unspecified, defaults to 4. return value type: connectapi.productsearchsuggestionsresults searchproducts(webstoreid, effectiveaccountid, productsearchinput) search products. api version 52.0 available to guest users 52.0 requires chatter no signature public static connectapi.productsearchresults searchproducts(string webstoreid, string effectiveaccountid, connectapi.productsearchinput productsearchinput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. productsearchinput type: connectapi.productsearchinput a connectapi.productsearchinput body with either a category id or search terms. return value type: connectapi.productsearchresults 1081apex reference guide commercesearch class usage searching products respects buyer view product entitlements and only users entitled to view product data can access this resource. searchproducts(webstoreid, searchterm, categoryid, sortruleid, grouping, fields, refinements, pageparam, pagesize, effectiveaccountid, includequantityrule) search products by search term or category in a webstore. api version 58.0 available to guest users 58.0 requires chatter no signature public static connectapi.commerceproductsearchresults searchproducts(string webstoreid, string searchterm, string categoryid, string sortruleid, string grouping, list<string> fields, string refinements, integer pageparam, integer pagesize, string effectiveaccountid, boolean includequantityrule) parameters webstoreid type: string id of the webstore. searchterm type: string list of up to 32 space-separated search terms. categoryid type: string category id returns results for products in this category or its subcategories. |
sortruleid type: string id of the sort rule that specifies the order of products in the search results. if unspecified, the default sort type is relevancy. grouping type: string specifies whether to group products in search results and how to group them. 1082 |
apex reference guide commercesearchsettings class fields type: list<string> product fields to return in search results. search results include fields you have access to. refinements type: string list up to nine refinements (facets) for search results. buyers or shoppers can select up to 20 values for each refinement. the refinements parameter is encoded as a base64 string from the json representation of connectapi.distinctvaluerefinementinput . 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 200. if unspecified, defaults to 20. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if unspecified, the default value is determined from context. includequantityrule type: boolean specifies whether to include purchase quantity rule information for products in search results (true) or not (false). if unspecified, defaults to false. return value type: connectapi.productsearchresults usage searching products respects buyer view product entitlements and only users entitled to view product data can access this resource. commercesearchsettings class get indexes. get index logs. create an index of a product catalog. namespace connectapi commercesearchsettings methods these methods are for commercesearchsettings. all methods are static. 1083apex reference guide commercesearchsettings class in this section: createcommercesearchindex(webstoreid, indexbuildtype) create an index of a product catalog. getcommercesearchindex(webstoreid, indexid) get a commerce search index. getcommercesearchindexes(webstoreid) get commerce search indexes. getcommercesearchindexlogs(webstoreid) get commerce search index logs. createcommercesearchindex(webstoreid, indexbuildtype) create an index of a product catalog. api version 57.0 requires chatter yes signature public static connectapi.commercesearchindex postcommercesearchindex(string webstoreid) parameters webstoreid type: string id of the webstore. indexbuildtype type: connectapi.commercesearchindexbuildtype build type of the index. values are: • full • incremental return value type: connectapi.commercesearchindex usage this method creates a live index that replaces the current live index. any indexes that are in progress are removed when you manually create an index with this method. 1084apex reference guide commercesearchsettings class getcommercesearchindex(webstoreid, indexid) get a commerce search index. api version 52.0 requires chatter yes signature public static connectapi.commercesearchindex getsinglecommercesearchindex(string webstoreid, string indexid) parameters webstoreid type: string id of the webstore. indexid type: string id of the index. return value type: connectapi.commercesearchindex getcommercesearchindexes(webstoreid) get commerce search indexes. api version 52.0 requires chatter yes signature public static connectapi.commercesearchindexcollection getcommercesearchindexes(string webstoreid) 1085apex reference guide commercestorepricing class parameters webstoreid type: string id of the webstore. return value type: connectapi.commercesearchindexcollection getcommercesearchindexlogs(webstoreid) get commerce search index logs. api version 57.0 requires chatter no signature public static connectapi.commercesearchindexlogcollection getcommercesearchindexlogs(string webstoreid) parameters webstoreid type: string id of the webstore. return value type: connectapi.commercesearchindexlogcollection commercestorepricing class get product prices. namespace connectapi commercestorepricing methods these methods are for commercestorepricing. all methods are static. 1086apex reference guide commercestorepricing class in this section: getproductprice(webstoreid, productid, effectiveaccountid) get the list and buyer price for a product. getproductprice(webstoreid, productid, effectiveaccountid, productsellingmodelids) get a product’s list and buyer price for specified product selling models. getproductprices(web |
storeid, effectiveaccountid, pricinginput) get the prices for multiple products. getproductprices(webstoreid, effectiveaccountid, productids) get the prices for multiple products. getproductprice(webstoreid, productid, effectiveaccountid) get the list and buyer price for a product. api version 49.0 available to guest users 51.0 requires chatter no signature public static connectapi.productprice getproductprice(string webstoreid, string productid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. productid type: string id of the product. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. return value type: connectapi.productprice 1087apex reference guide commercestorepricing class usage this method respects buyer entitlements and only users entitled to view product and price data can access it. if a store is segmented into markets, this api looks at the language parameter appended to the url to determine the shopper’s locale and returns the appropriate values. getproductprice(webstoreid, productid, effectiveaccountid, productsellingmodelids) get a product’s list and buyer price for specified product selling models. api version 56.0 available to guest users 56.0 requires chatter no signature public static connectapi.productprice getproductprice(string webstoreid, string productid, string effectiveaccountid, list<string> productsellingmodelids) parameters webstoreid type: string id of the webstore. productid type: string id of the product. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. productsellingmodelids type: list<string> list of product selling model ids for the product. return value type: connectapi.productprice 1088apex reference guide commercestorepricing class getproductprices(webstoreid, effectiveaccountid, pricinginput) get the prices for multiple products. api version 49.0 available to guest users 51.0 requires chatter no signature public static connectapi.pricingresult getproductprices(string webstoreid, string effectiveaccountid, connectapi.pricinginput pricinginput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. pricinginput type: connectapi.pricinginput a connectapi.pricinginput body with the list of line items to price. return value type: connectapi.pricingresult usage this method respects buyer entitlements and only users entitled to view product and price data can access it. if a store is segmented into markets, this api looks at the language parameter appended to the url to determine the shopper’s locale and returns the appropriate values. getproductprices(webstoreid, effectiveaccountid, productids) get the prices for multiple products. 1089apex reference guide commercewishlist class api version 54.0 available to guest users 54.0 requires chatter no signature public static connectapi.pricingresult getproductprices(string webstoreid, string effectiveaccountid, list<string> productids) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the buyer account or guest buyer profile for which the request is made. if null, the default value is determined from context. productids type: list<string> list of product ids for which you want to get prices. return value type: connectapi.pricingresult usage this method respects buyer entitlements and only users entitled to view product and price data can access it. if a store is segmented into markets, this api looks at the language parameter appended to the url to determine the shopper’s locale and returns the appropriate values. commercewishlist class get, create, update, and delete wishlists. add wishlists to carts. get wishlist items, add items to wishlists, and delete wishlist items. namespace connectapi |
1090apex reference guide commercewishlist class commercewishlist methods these methods are for commercewishlist. all methods are static. in this section: additemtowishlist(webstoreid, wishlistid, wishlistiteminput) add an item to a wishlist for the context user. additemtowishlist(webstoreid, effectiveaccountid, wishlistid, wishlistiteminput) add an item to a wishlist. addwishlisttocart(webstoreid, wishlistid) add a wishlist to the active cart for the context user. addwishlisttocart(webstoreid, wishlistid, effectiveaccountid) add a wishlist to the active cart. addwishlisttocartwithcartid(webstoreid, wishlistid, cartid) add a wishlist to a cart. addwishlisttocartwithcartid(webstoreid, wishlistid, cartid, effectiveaccountid) add a wishlist to a cart. createwishlist(webstoreid, wishlistinput) create a wishlist for the context user. createwishlist(webstoreid, effectiveaccountid, wishlistinput) create a wishlist. deletewishlist(webstoreid, wishlistid) delete a wishlist for the context user. deletewishlist(webstoreid, effectiveaccountid, wishlistid) delete a wishlist. getwishlist(webstoreid, effectiveaccountid, wishlistid, productfields, sortitemsby) get a wishlist with product fields sorted by items. getwishlist(webstoreid, effectiveaccountid, wishlistid, productfields, pagesize, sortitemsby) get a wishlist with product fields sorted by items with a specified number of items per page. getwishlistitems(webstoreid, effectiveaccountid, wishlistid, productfields, pageparam, sortitemsby) get a page of sorted wishlist items with product fields. getwishlistitems(webstoreid, effectiveaccountid, wishlistid, productfields, pageparam, pagesize, sortitemsby) get a page of specified size of sorted wishlist items with product fields. getwishlistsummaries(webstoreid, effectiveaccountid, includedisplayedlist) get wishlist summaries. getwishlistsummaries(webstoreid, effectiveaccountid, includedisplayedlist, productfields, sortitemsby) get wishlist summaries with product fields sorted by items. getwishlistsummaries(webstoreid, effectiveaccountid, includedisplayedlist, productfields, pagesize, sortitemsby) get wishlist summaries with product fields sorted by items with a specified number of items per page. removewishlistitem(webstoreid, effectiveaccountid, wishlistid, wishlistitemid) remove an item from a wishlist. 1091apex reference guide commercewishlist class updatewishlist(webstoreid, wishlistid, wishlistupdateinput) update the name of a wishlist for the context user. updatewishlist(webstoreid, effectiveaccountid, wishlistid, wishlistupdateinput) update the name of a wishlist. additemtowishlist(webstoreid, wishlistid, wishlistiteminput) add an item to a wishlist for the context user. api version 49.0 requires chatter no signature public static connectapi.wishlistitem additemtowishlist(string webstoreid, string wishlistid, connectapi.wishlistiteminput wishlistiteminput) parameters webstoreid type: string id of the webstore. wishlistid type: string id of the wishlist. wishlistiteminput type: connectapi.wishlistiteminput a connectapi.wishlistiteminput body with the item to add to the wishlist. return value type: connectapi.wishlistitem usage this method respects buyer view product entitlements and only users entitled to view product data can access it. additemtowishlist(webstoreid, effectiveaccountid, wishlistid, wishlistiteminput) add an item to a wishlist. 1092apex reference guide commercewishlist class api version 49.0 requires chatter no signature public static connectapi.wishlistitem additemto |
wishlist(string webstoreid, string effectiveaccountid, string wishlistid, connectapi.wishlistiteminput wishlistiteminput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. wishlistid type: string id of the wishlist. wishlistiteminput type: connectapi.wishlistiteminput a connectapi.wishlistiteminput body with the item to add to the wishlist. return value type: connectapi.wishlistitem usage this method respects buyer view product entitlements and only users entitled to view product data can access it. addwishlisttocart(webstoreid, wishlistid) add a wishlist to the active cart for the context user. api version 49.0 requires chatter no 1093apex reference guide commercewishlist class signature public static connectapi.wishlisttocartresult addwishlisttocart(string webstoreid, string wishlistid) parameters webstoreid type: string id of the webstore. wishlistid type: string id of the wishlist. return value type: connectapi.wishlisttocartresult usage this method respects buyer view product entitlements and only users entitled to view product data can access it. addwishlisttocart(webstoreid, wishlistid, effectiveaccountid) add a wishlist to the active cart. api version 49.0 requires chatter no signature public static connectapi.wishlisttocartresult addwishlisttocart(string webstoreid, string wishlistid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. wishlistid type: string id of the wishlist. effectiveaccountid type: string 1094apex reference guide commercewishlist class id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.wishlisttocartresult usage this method respects buyer view product entitlements and only users entitled to view product data can access it. addwishlisttocartwithcartid(webstoreid, wishlistid, cartid) add a wishlist to a cart. api version 49.0 requires chatter no signature public static connectapi.wishlisttocartresult addwishlisttocartwithcartid(string webstoreid, string wishlistid, string cartid) parameters webstoreid type: string id of the webstore. wishlistid type: string id of the wishlist. cartid type: string id of the cart. if null, wishlist items are added to the active cart. return value type: connectapi.wishlisttocartresult usage this method respects buyer view product entitlements and only users entitled to view product data can access it. 1095apex reference guide commercewishlist class addwishlisttocartwithcartid(webstoreid, wishlistid, cartid, effectiveaccountid) add a wishlist to a cart. api version 49.0 requires chatter no signature public static connectapi.wishlisttocartresult addwishlisttocartwithcartid(string webstoreid, string wishlistid, string cartid, string effectiveaccountid) parameters webstoreid type: string id of the webstore. wishlistid type: string id of the wishlist. cartid type: string id of the cart. if null, wishlist items are added to the active cart. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. return value type: connectapi.wishlisttocartresult usage this method respects buyer view product entitlements and only users entitled to view product data can access it. createwishlist(webstoreid, wishlistinput) create a wishlist for the context user. api version 49.0 1096apex reference guide commercewishlist class requires chatter no signature public static connectapi.wishlist createwishlist |
(string webstoreid, connectapi.wishlistinput wishlistinput) parameters webstoreid type: string id of the webstore. wishlistinput type: connectapi.wishlistinput a connectapi.wishlistinput body that includes the wishlist name and items. return value type: connectapi.wishlist createwishlist(webstoreid, effectiveaccountid, wishlistinput) create a wishlist. api version 49.0 requires chatter no signature public static connectapi.wishlist createwishlist(string webstoreid, string effectiveaccountid, connectapi.wishlistinput wishlistinput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. wishlistinput type: connectapi.wishlistinput 1097apex reference guide commercewishlist class a connectapi.wishlistinput body that includes the wishlist name and items. return value type: connectapi.wishlist deletewishlist(webstoreid, wishlistid) delete a wishlist for the context user. api version 49.0 requires chatter no signature public static void deletewishlist(string webstoreid, string wishlistid) parameters webstoreid type: string id of the webstore. wishlistid type: string id of the wishlist. return value type: void deletewishlist(webstoreid, effectiveaccountid, wishlistid) delete a wishlist. api version 51.0 requires chatter no 1098apex reference guide commercewishlist class signature public static void deletewishlist(string webstoreid, string effectiveaccountid, string wishlistid) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. wishlistid type: string id of the wishlist. return value type: void getwishlist(webstoreid, effectiveaccountid, wishlistid, productfields, sortitemsby) get a wishlist with product fields sorted by items. api version 51.0 requires chatter no signature public static connectapi.wishlist getwishlist(string webstoreid, string effectiveaccountid, string wishlistid, string productfields, connectapi.wishlistitemsortorder sortitemsby) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. 1099apex reference guide commercewishlist class wishlistid type: string id of the wishlist. productfields type: string comma-separated list of custom product fields. fields aren’t case-sensitive. for example, productcode and productcode return the same results. sortitemsby type: connectapi.wishlistitemsortorder sort order for wishlist items. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. the default sort order is createddatedesc. return value type: connectapi.wishlist getwishlist(webstoreid, effectiveaccountid, wishlistid, productfields, pagesize, sortitemsby) get a wishlist with product fields sorted by items with a specified number of items per page. api version 51.0 requires chatter no signature public static connectapi.wishlist getwishlist(string webstoreid, string effectiveaccountid, string wishlistid, string productfields, integer pagesize, connectapi.wishlistitemsortorder sortitemsby) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. 1100apex reference guide commercewishlist class wishlistid type: string id of |
the wishlist. productfields type: string comma-separated list of custom product fields. fields aren’t case-sensitive. for example, productcode and productcode return the same results. 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. sortitemsby type: connectapi.wishlistitemsortorder sort order for wishlist items. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. the default sort order is createddatedesc. return value type: connectapi.wishlist getwishlistitems(webstoreid, effectiveaccountid, wishlistid, productfields, pageparam, sortitemsby) get a page of sorted wishlist items with product fields. api version 51.0 requires chatter no signature public static connectapi.wishlistitemcollection getwishlistitems(string webstoreid, string effectiveaccountid, string wishlistid, string productfields, string pageparam, connectapi.wishlistitemsortorder sortitemsby) parameters webstoreid type: string id of the webstore. 1101apex reference guide commercewishlist class effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. wishlistid type: string id of the wishlist. productfields type: string comma-separated list of custom product fields. fields aren’t case-sensitive. for example, productcode and productcode return the same results. 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. sortitemsby type: connectapi.wishlistitemsortorder sort order for wishlist items. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. the default sort order is createddatedesc. return value type: connectapi.wishlistitemcollection getwishlistitems(webstoreid, effectiveaccountid, wishlistid, productfields, pageparam, pagesize, sortitemsby) get a page of specified size of sorted wishlist items with product fields. api version 51.0 requires chatter no signature public static connectapi.wishlistitemcollection getwishlistitems(string webstoreid, string effectiveaccountid, string wishlistid, string productfields, string pageparam, integer pagesize, connectapi.wishlistitemsortorder sortitemsby) 1102apex reference guide commercewishlist class parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. wishlistid type: string id of the wishlist. productfields type: string comma-separated list of custom product fields. fields aren’t case-sensitive. for example, productcode and productcode return the same results. 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 200. if you pass in null, the default size is 25. sortitemsby type: connectapi.wishlistitemsortorder sort order for wishlist items. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. the default sort order is createddatedesc. return value type: connectapi.wishlistitemcollection getwishlistsummaries(webstoreid, effectiveaccountid, includedisplayedlist) get wishlist summaries. api version 49.0 requires chatter no 1103apex reference guide commercewishlist class signature public static connecta |
pi.wishlistssummary getwishlistsummaries(string webstoreid, string effectiveaccountid, boolean includedisplayedlist) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. includedisplayedlist type: boolean specifies whether to include the displayed list (true) or not (false). if null, defaults to false. return value type: connectapi.wishlistssummary getwishlistsummaries(webstoreid, effectiveaccountid, includedisplayedlist, productfields, sortitemsby) get wishlist summaries with product fields sorted by items. api version 51.0 requires chatter no signature public static connectapi.wishlistssummary getwishlistsummaries(string webstoreid, string effectiveaccountid, boolean includedisplayedlist, string productfields, connectapi.wishlistitemsortorder sortitemsby) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. 1104apex reference guide commercewishlist class includedisplayedlist type: boolean specifies whether to include the displayed list (true) or not (false). productfields type: string comma-separated list of custom product fields. fields aren’t case-sensitive. for example, productcode and productcode return the same results. if includedisplayedlist is false, productfields is ignored. sortitemsby type: connectapi.wishlistitemsortorder sort order for wishlist items. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. the default sort order is createddatedesc. if includedisplayedlist is false, sortitemsby is ignored. return value type: connectapi.wishlistssummary getwishlistsummaries(webstoreid, effectiveaccountid, includedisplayedlist, productfields, pagesize, sortitemsby) get wishlist summaries with product fields sorted by items with a specified number of items per page. api version 51.0 requires chatter no signature public static connectapi.wishlistssummary getwishlistsummaries(string webstoreid, string effectiveaccountid, boolean includedisplayedlist, integer pagesize, string productfields, pagesize, connectapi.wishlistitemsortorder sortitemsby) parameters webstoreid type: string id of the webstore. 1105apex reference guide commercewishlist class effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. includedisplayedlist type: boolean specifies whether to include the displayed list (true) or not (false). productfields type: string comma-separated list of custom product fields. fields aren’t case-sensitive. for example, productcode and productcode return the same results. if includedisplayedlist is false, productfields is ignored. 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. sortitemsby type: connectapi.wishlistitemsortorder sort order for wishlist items. values are: • createddateasc—sorts by oldest creation date. • createddatedesc—sorts by most recent creation date. the default sort order is createddatedesc. if includedisplayedlist is false, sortitemsby is ignored. return value type: connectapi.wishlistssummary removewishlistitem(webstoreid, effectiveaccountid, wishlistid, wishlistitemid) remove an item from a wishlist. api version 49.0 requires chatter no signature public static void removewishlistitem(string webstoreid, string effectiveaccountid, string wishlistid, string wishlistitemid) 1106apex reference guide commercewishlist class parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request |
is made. if null, defaults to the account id for the context user. wishlistid type: string id of the wishlist. wishlistitemid type: string id of the wishlist item to remove. return value type: void updatewishlist(webstoreid, wishlistid, wishlistupdateinput) update the name of a wishlist for the context user. api version 50.0 requires chatter no signature public static connectapi.wishlistsummary updatewishlist(string webstoreid, string wishlistid, connectapi.wishlistupdateinput wishlistupdateinput) parameters webstoreid type: string id of the webstore. wishlistid type: string id of the wishlist. wishlistupdateinput type: connectapi.wishlistupdateinput a connectapi.wishlistupdateinput body with the wishlist name to update. 1107apex reference guide communities class return value type: connectapi.wishlistsummary updatewishlist(webstoreid, effectiveaccountid, wishlistid, wishlistupdateinput) update the name of a wishlist. api version 50.0 requires chatter no signature public static connectapi.wishlistsummary updatewishlist(string webstoreid, string effectiveaccountid, string wishlistid, connectapi.wishlistupdateinput wishlistupdateinput) parameters webstoreid type: string id of the webstore. effectiveaccountid type: string id of the account for which the request is made. if null, defaults to the account id for the context user. wishlistid type: string id of the wishlist. wishlistupdateinput type: connectapi.wishlistupdateinput a connectapi.wishlistupdateinput body with the wishlist name to update. return value type: connectapi.wishlistsummary communities class get information about experience cloud sites in your org. 1108apex reference guide communities class namespace connectapi communities methods the following are methods for communities. all methods are static. in this section: getcommunities() get a list of experience cloud sites that the context user has access to. getcommunities(communitystatus) get a list of experience cloud sites with the specified status that the context user has access to. getcommunity(communityid) get information about an experience cloud site. getcommunities() get a list of experience cloud sites that the context user has access to. api version 28.0 requires chatter no signature public static connectapi.communitypage getcommunities() return value type: connectapi.communitypage getcommunities(communitystatus) get a list of experience cloud sites with the specified status that the context user has access to. api version 28.0 requires chatter no 1109apex reference guide communities class signature public static connectapi.communitypage getcommunities(connectapi.communitystatus communitystatus) parameters communitystatus type: connectapi.communitystatus communitystatus—status of the experience cloud site. values are: • live • inactive • underconstruction return value type: connectapi.communitypage getcommunity(communityid) get information about an experience cloud site. api version 28.0 available to guest users 35.0 requires chatter no signature public static connectapi.community getcommunity(string communityid) parameters communityid type: string id of an experience cloud site. you can’t specify null or internal. return value type: connectapi.community 1110apex reference guide communitymoderation class communitymoderation class get information about flagged feed items and comments in an experience cloud site. add and remove flags from comments and feed items. namespace connectapi communitymoderation methods the following are methods for communitymoderation. all methods are static. in this section: addflagtocomment(communityid, commentid) add a moderation flag to a comment. addflagtocomment(communityid, commentid, visibility) add a moderation flag of the specified visibility to a comment. addflagtocomment(communityid, commentid, type) add a moderation flag of the specified type to a comment. addflagtocomment(communityid, commentid |
, note) add a moderation flag with a note to a comment. addflagtocomment(communityid, commentid, type, note) add a moderation flag of the specified type with a note to a comment. addflagtocomment(communityid, commentid, type, visibility) add a moderation flag of the specified type and visibility to a comment. addflagtocomment(communityid, commentid, visibility, note) add a moderation flag of the specified visibility with a note to a comment. addflagtocomment(communityid, commentid, type, visibility, note) add a moderation flag of the specified type and visibility with a note to a comment. addflagtofeedelement(communityid, feedelementid) add a moderation flag to a feed element. addflagtofeedelement(communityid, feedelementid, visibility) add a moderation flag of the specified visibility to a feed element. addflagtofeedelement(communityid, feedelementid, type) add a moderation flag of the specified type to a feed element. addflagtofeedelement(communityid, feedelementid, note) add a moderation flag with a note to a feed element. addflagtofeedelement(communityid, feedelementid, type, note) add a moderation flag of the specified type with a note to a feed element. addflagtofeedelement(communityid, feedelementid, type, visibility) add a moderation flag of the specified type and visibility to a feed element. 1111apex reference guide communitymoderation class addflagtofeedelement(communityid, feedelementid, visibility, note) add a moderation flag of the specified visibility with a note to a feed element. addflagtofeedelement(communityid, feedelementid, type, visibility, note) add a moderation flag of the specified type and visibility with a note to a feed element. getflagsoncomment(communityid, commentid) get the moderation flags on a comment. getflagsoncomment(communityid, commentid, visibility) get the moderation flags with specified visibility on a comment. getflagsoncomment(communityid, commentid, pagesize, pageparam) get a page of moderation flags on a comment. getflagsoncomment(communityid, commentid, visibility, pagesize, pageparam) get a page of moderation flags with specified visibility on a comment. getflagsonfeedelement(communityid, feedelementid) get the moderation flags on a feed element. getflagsonfeedelement(communityid, feedelementid, visibility) get the moderation flags with specified visibility on a feed element. getflagsonfeedelement(communityid, feedelementid, pageparam, pagesize) get a page of moderation flags on a feed element. getflagsonfeedelement(communityid, feedelementid, visibility, pagesize, pageparam) get a page of moderation flags with specified visibility on a feed element. removeflagfromcomment(communityid, commentid, userid) remove a moderation flag from a comment. removeflagfromfeedelement(communityid, feedelementid, userid) remove a moderation flag from a feed element. addflagtocomment(communityid, commentid) add a moderation flag to a comment. api version 29.0 requires chatter yes signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid) 1112apex reference guide communitymoderation class parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. return value type: connectapi.moderationflags usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagtocomment(communityid, commentid, visibility) add a moderation flag of the specified visibility to a comment. api version 30.0 requires chatter yes signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid, connectapi.communityflagvisibility visibility) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. 1113apex reference guide communitymoderation class • selfandmoder |
ators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. return value type: connectapi.moderationflags usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagtocomment(communityid, commentid, type) add a moderation flag of the specified type to a comment. api version 38.0 requires chatter yes signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid, connectapi.communityflagtype type) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. if a type isn’t specified, it defaults to flagasinappropriate. return value type: connectapi.moderationflags 1114apex reference guide communitymoderation class usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagtocomment(communityid, commentid, note) add a moderation flag with a note to a comment. api version 38.0 requires chatter yes signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid, string note) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationflags usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagtocomment(communityid, commentid, type, note) add a moderation flag of the specified type with a note to a comment. api version 38.0 1115apex reference guide communitymoderation class requires chatter yes signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid, connectapi.communityflagtype type, string note) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. if a type isn’t specified, it defaults to flagasinappropriate. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationflags usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagtocomment(communityid, commentid, type, visibility) add a moderation flag of the specified type and visibility to a comment. api version 38.0 requires chatter yes 1116apex reference guide communitymoderation class signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid, connectapi.communityflagtype type, connectapi.communityflagvisibility visibility) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. if a type isn’t specified, it defaults to flagasinappropriate. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. return value type: connectapi.moderationflags usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagto |
comment(communityid, commentid, visibility, note) add a moderation flag of the specified visibility with a note to a comment. api version 38.0 requires chatter yes 1117apex reference guide communitymoderation class signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid, connectapi.communityflagvisibility visibility, string note) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationflags usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagtocomment(communityid, commentid, type, visibility, note) add a moderation flag of the specified type and visibility with a note to a comment. api version 38.0 requires chatter yes signature public static connectapi.moderationflags addflagtocomment(string communityid, string commentid, connectapi.communityflagtype type, connectapi.communityflagvisibility visibility, string note) 1118apex reference guide communitymoderation class parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. if a type isn’t specified, it defaults to flagasinappropriate. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationflags usage to add a flag to a comment, allow members to flag content must be selected for an experience cloud site. addflagtofeedelement(communityid, feedelementid) add a moderation flag to a feed element. api version 31.0 requires chatter yes 1119apex reference guide communitymoderation class signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. return value type: connectapi.moderationcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. addflagtofeedelement(communityid, feedelementid, visibility) add a moderation flag of the specified visibility to a feed element. api version 31.0 requires chatter yes signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid, connectapi.communityflagvisibility visibility) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. 1120apex reference guide communitymoderation class visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. one of these values: • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. return value type: |
connectapi.moderationcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. addflagtofeedelement(communityid, feedelementid, type) add a moderation flag of the specified type to a feed element. api version 38.0 requires chatter yes signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid, connectapi.communityflagtype type) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. 1121apex reference guide communitymoderation class if a type isn’t specified, it defaults to flagasinappropriate. return value type: connectapi.moderationcapability usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. addflagtofeedelement(communityid, feedelementid, note) add a moderation flag with a note to a feed element. api version 38.0 requires chatter yes signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid, string note) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationcapability usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. 1122apex reference guide communitymoderation class addflagtofeedelement(communityid, feedelementid, type, note) add a moderation flag of the specified type with a note to a feed element. api version 38.0 requires chatter yes signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid, connectapi.communityflagtype type, string note) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. if a type isn’t specified, it defaults to flagasinappropriate. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationcapability usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. addflagtofeedelement(communityid, feedelementid, type, visibility) add a moderation flag of the specified type and visibility to a feed element. 1123apex reference guide communitymoderation class api version 38.0 requires chatter yes signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid, connectapi.communityflagtype type, connectapi.communityflagvisibility visibility) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. if a type isn’t specified, it defaults to flagasinappropriate. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. one of these values: • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. return value type: |
connectapi.moderationcapability usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. addflagtofeedelement(communityid, feedelementid, visibility, note) add a moderation flag of the specified visibility with a note to a feed element. 1124apex reference guide communitymoderation class api version 38.0 requires chatter yes signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid, connectapi.communityflagvisibility visibility, string note) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. one of these values: • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationcapability usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. addflagtofeedelement(communityid, feedelementid, type, visibility, note) add a moderation flag of the specified type and visibility with a note to a feed element. api version 38.0 1125apex reference guide communitymoderation class requires chatter yes signature public static connectapi.moderationcapability addflagtofeedelement(string communityid, string feedelementid, connectapi.communityflagtype type, connectapi.communityflagvisibility visibility, string note) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. type type: connectapi.communityflagtype type of moderation flag. • flagasinappropriate—flag for inappropriate content. • flagasspam—flag for spam. if a type isn’t specified, it defaults to flagasinappropriate. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. one of these values: • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. note type: string a note of up to 4,000 characters about the flag. return value type: connectapi.moderationcapability usage to add a flag to a feed element, allow members to flag content must be selected for an experience cloud site. getflagsoncomment(communityid, commentid) get the moderation flags on a comment. 1126apex reference guide communitymoderation class api version 29.0 requires chatter yes signature public static connectapi.moderationflags getflagsoncomment(string communityid, string commentid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. return value type: connectapi.moderationflags usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsoncomment(communityid, commentid, visibility) get the moderation flags with specified visibility on a comment. api version 30.0 requires chatter yes signature public static connectapi.moderationflags getflagsoncomment(string communityid, string commentid, connectapi.communityflagvisibility visibility) 1127apex reference guide communitymoderation class parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation |
permissions on the flagged element or item. return value type: connectapi.moderationflags usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsoncomment(communityid, commentid, pagesize, pageparam) get a page of moderation flags on a comment. api version 40.0 requires chatter yes signature public static connectapi.moderationflags getflagsoncomment(string communityid, string commentid, integer pagesize, string pageparam) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string 1128apex reference guide communitymoderation class id for a comment. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. the default size is 0. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. return value type: connectapi.moderationflags usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsoncomment(communityid, commentid, visibility, pagesize, pageparam) get a page of moderation flags with specified visibility on a comment. api version 40.0 requires chatter yes signature public static connectapi.moderationflags getflagsoncomment(string communityid, string commentid, connectapi.communityflagvisibility visibility, integer pagesize, string pageparam) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. 1129apex reference guide communitymoderation class • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. the default size is 0. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. return value type: connectapi.moderationflags usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsonfeedelement(communityid, feedelementid) get the moderation flags on a feed element. api version 31.0 requires chatter yes signature public static connectapi.moderationcapability getflagsonfeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. return value type: connectapi.moderationcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. 1130apex reference guide communitymoderation class usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsonfeedelement(communityid, feedelementid, visibility) get the moderation flags with specified visibility on a feed element. api version 31.0 requires chatter yes signature public static connectapi.moderationcapability getflagsonfeedelement(string communityid, string feedelementid, connectapi.communityflagvisibility visibility) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. one of these values: • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. return value type: connectapi.moderation |
capability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsonfeedelement(communityid, feedelementid, pageparam, pagesize) get a page of moderation flags on a feed element. 1131apex reference guide communitymoderation class api version 40.0 requires chatter yes signature public static connectapi.moderationcapability getflagsonfeedelement(string communityid, string feedelementid, string pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. the default size is 0. return value type: connectapi.moderationcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsonfeedelement(communityid, feedelementid, visibility, pagesize, pageparam) get a page of moderation flags with specified visibility on a feed element. api version 40.0 1132 |
apex reference guide communitymoderation class requires chatter yes signature public static connectapi.moderationcapability getflagsonfeedelement(string communityid, string feedelementid, connectapi.communityflagvisibility visibility, integer pagesize, string pageparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. the default size is 0. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. return value type: connectapi.moderationcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. usage to get moderation flags, the context user must have the moderate experiences feeds permission. removeflagfromcomment(communityid, commentid, userid) remove a moderation flag from a comment. 1133apex reference guide communitymoderation class api version 29.0 requires chatter yes signature public static connectapi.moderationflags removeflagfromcomment(string communityid, string commentid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. userid type: string id of the context user for whom the flag is removed. specify null to remove the flag for all users. return value type: void usage to remove a moderation flag, the context user must have added the flag or must have the moderate experiences feeds permission. removeflagfromfeedelement(communityid, feedelementid, userid) remove a moderation flag from a feed element. api version 31.0 requires chatter yes signature public static void removeflagfromfeedelement(string communityid, string feedelementid, string userid) 1134apex reference guide communitymoderation class parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. userid type: string id of the context user for whom the flag is removed. specify null to remove the flag for all users. return value type: connectapi.moderationcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. usage to remove a moderation flag, the context user must have added the flag or must have the moderate experiences feeds permission. retired communitymoderation methods the following methods for communitymoderation are retired. in this section: addflagtofeeditem(communityid, feeditemid) add a moderation flag to a feed item. addflagtofeeditem(communityid, feeditemid, visibility) add a moderation flag with specified visibility to a feed item. getflagsonfeeditem(communityid, feeditemid) get the moderation flags on a feed item. getflagsonfeeditem(communityid, feeditemid, visibility) get the moderation flags with specified visibility on a feed item. removeflagsonfeeditem(communityid, feeditemid, userid) remove a moderation flag from a feed item. addflagtofeeditem(communityid, feeditemid) add a moderation flag to a feed item. api version 29.0–31.0 1135apex reference guide communitymoderation class important: in version 32.0 and later, use addflagtofeedelement(communityid, feedelementid). requires chatter yes signature public static connectapi.moderationflags addflagtofeeditem(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for |
a feed item. return value type: connectapi.moderationflags usage to add a flag to a feed item, allow members to flag content must be selected for an experience cloud site. addflagtofeeditem(communityid, feeditemid, visibility) add a moderation flag with specified visibility to a feed item. api version 30.0–31.0 important: in version 32.0 and later, use addflagtofeedelement(communityid, feedelementid, visibility). requires chatter yes signature public static connectapi.moderationflags addflagtofeeditem(string communityid, string feeditemid, connectapi.communityflagvisibility visibility) 1136apex reference guide communitymoderation class parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. return value type: connectapi.moderationflags usage to add a flag to a feed item, allow members to flag content must be selected for an experience cloud site. getflagsonfeeditem(communityid, feeditemid) get the moderation flags on a feed item. api version 29.0–31.0 important: in version 32.0 and later, use getflagsonfeedelement(communityid, feedelementid). requires chatter yes signature public static connectapi.moderationflags getflagsonfeeditem(string communityid, string feeditemid) parameters communityid type: string id for an experience cloud site, internal, or null. 1137apex reference guide communitymoderation class feeditemid type: string id for a feed item. return value type: connectapi.moderationflags usage to get moderation flags, the context user must have the moderate experiences feeds permission. getflagsonfeeditem(communityid, feeditemid, visibility) get the moderation flags with specified visibility on a feed item. api version 30.0–31.0 important: in version 32.0 and later, use getflagsonfeedelement(communityid, feedelementid, visibility). requires chatter yes signature public static connectapi.moderationflags getflagsonfeeditem(string communityid, string feeditemid, connectapi.communityflagvisibility visibility) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. visibility type: connectapi.communityflagvisibility visibility behavior of a flag for various user types. values are: • moderatorsonly—the flag is visible only to users with moderation permissions on the flagged element or item. • selfandmoderators—the flag is visible to the creator of the flag and to users with moderation permissions on the flagged element or item. 1138apex reference guide communitymoderation class return value type: connectapi.moderationflags usage to get moderation flags, the context user must have the moderate experiences feeds permission. removeflagsonfeeditem(communityid, feeditemid, userid) remove a moderation flag from a feed item. api version 29.0–31.0 important: in version 32.0 and later, use removeflagfromfeedelement(communityid, feedelementid, userid). requires chatter yes signature public static connectapi.moderationflags removeflagsonfeeditem(string communityid, string feeditemid, string userid) parameters communityid type: string id for an experience cloud site, internal, or null. feeditemid type: string id for a feed item. userid type: string id of the context user for whom the flag is removed. specify null to remove the flag for all users. return value type: void usage to remove a moderation flag, the context user must have added the flag or must have the moderate experiences feeds permission. 1139apex reference guide contenthub class contenthub class access files connect repositories and their files and |
folders. namespace connectapi contenthub methods the following are methods for contenthub. all methods are static. use contenthub methods to work with files connect repositories. in this section: addrepositoryitem(repositoryid, repositoryfolderid, file) add a repository item. addrepositoryitem(communityid, repositoryid, repositoryfolderid, file) add a repository item in an experience cloud site. addrepositoryitem(repositoryid, repositoryfolderid, file, filedata) add a repository item, including the binary file. addrepositoryitem(communityid, repositoryid, repositoryfolderid, file, filedata) add a repository item, including the binary file, in an experience cloud site. getalloweditemtypes(repositoryid, repositoryfolderid) get the item types that the context user is allowed to create in the repository folder. getalloweditemtypes(repositoryid, repositoryfolderid, filter) get the item types, filtered by type, that the context user is allowed to create in the repository folder. getalloweditemtypes(communityid, repositoryid, repositoryfolderid) get the item types that the context user is allowed to create in the repository folder in an experience cloud site. getalloweditemtypes(communityid, repositoryid, repositoryfolderid, filter) get the item types, filtered by type, that the context user is allowed to create in the repository folder in an experience cloud site. getfilepreview(repositoryid, repositoryfileid, formattype) get a repository file preview. getfilepreview(repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) get a page or page range of a repository file preview. getfilepreview(communityid, repositoryid, repositoryfileid, formattype) get a repository file preview in an experience cloud site. getfilepreview(communityid, repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) get a page or page range of a repository file preview in an experience cloud site. getitemtype(repositoryid, repositoryitemtypeid) get information about an item type associated with a repository. getitemtype(communityid, repositoryid, repositoryitemtypeid) get information about an item type associated with a repository in an experience cloud site. 1140apex reference guide contenthub class getpreviews(repositoryid, repositoryfileid) get information about a repository file’s supported previews. getpreviews(communityid, repositoryid, repositoryfileid) get information about a repository file’s supported previews in an experience cloud site. getrepositories() get a list of repositories. getrepositories(communityid) get a list of repositories in an experience cloud site. getrepositories(pageparam, pagesize) get a page of repositories. getrepositories(communityid, pageparam, pagesize) get a page of repositories in an experience cloud site. getrepository(repositoryid) get a repository. getrepository(communityid, repositoryid) get a repository in an experience cloud site. getrepositoryfile(repositoryid, repositoryfileid) get a repository file. getrepositoryfile(repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) get a repository file with or without permissions information. getrepositoryfile(communityid, repositoryid, repositoryfileid) get a repository file in an experience cloud site. getrepositoryfile(communityid, repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) get a repository file with or without permissions information in an experience cloud site. getrepositoryfolder(repositoryid, repositoryfolderid) get a repository folder. getrepositoryfolder(communityid, repositoryid, repositoryfolderid) get a repository folder in an experience cloud site. getrepositoryfolderitems(repositoryid, repositoryfolderid) get repository folder items. getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid) get repository folder items in an experience cloud site. getrepositoryfolderitems(repositoryid, repositoryfolderid, pageparam, pagesize) get a page of repository folder items. getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, pageparam, pagesize) get a page of repository folder items in an experience cloud site. updaterepositoryfile(repositoryid, repositoryfileid, file) update the name of a repository file. updaterepositoryfile(re |
positoryid, repositoryfileid, file, filedata) update the content of a repository file. 1141apex reference guide contenthub class updaterepositoryfile(communityid, repositoryid, repositoryfileid, file) update the name of a repository file in an experience cloud site. updaterepositoryfile(communityid, repositoryid, repositoryfileid, file, filedata) update the content of a repository file in an experience cloud site. addrepositoryitem(repositoryid, repositoryfolderid, file) add a repository item. api version 39.0 requires chatter no signature public static connectapi.repositoryfolderitem addrepositoryitem(string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. return value type: connectapi.repositoryfolderitem 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. 1142apex reference guide contenthub class example this example creates a file without binary content (metadata only) in a google drive repository folder. after the file is created, we show the file’s id, name, description, external url, and download url. final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefolderid = 'folder:0b0ltys1kmm3ssvj2bjiztgfqsws'; final connectapi.contenthubiteminput newitem = new connectapi.contenthubiteminput(); newitem.itemtypeid = 'document'; //see getallowedtypes for any file item types available for creation/update newitem.fields = new list<connectapi.contenthubfieldvalueinput>(); //metadata: name field final connectapi.contenthubfieldvalueinput fieldvalueinput = new connectapi.contenthubfieldvalueinput(); fieldvalueinput.name = 'name'; fieldvalueinput.value = 'new folder item name.txt'; newitem.fields.add(fieldvalueinput); //metadata: description field final connectapi.contenthubfieldvalueinput fieldvalueinputdesc = new connectapi.contenthubfieldvalueinput(); fieldvalueinputdesc.name = 'description'; fieldvalueinputdesc.value = 'it does describe it'; newitem.fields.add(fieldvalueinputdesc); final connectapi.repositoryfolderitem newfolderitem = connectapi.contenthub.addrepositoryitem(gdriverepositoryid, gdrivefolderid, newitem); final connectapi.repositoryfilesummary newfile = newfolderitem.file; system.debug(string.format('new file - id: \'\'{0}\'\', name: \'\'{1}\'\', description: \'\'{2}\'\' \n external url: \'\'{3}\'\', download url: \'\'{4}\'\'', new string[]{ newfile.id, newfile.name, newfile.description, newfile.externaldocumenturl, newfile.downloadurl})); see also: settestaddrepositoryitem(repositoryid, repositoryfolderid, file, result) apex developer guide: testing connectapi code addrepositoryitem(communityid, repositoryid, repositoryfolderid, file) add a repository item in an experience cloud site. api version 39.0 requires chatter no 1143apex reference guide contenthub class signature public static connectapi.repositoryfolderitem addrepositoryitem(string communityid, string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. return value type: connectapi.repositoryfolderitem 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: settestaddrepositoryitem(communityid, repositoryid, repositoryfolderid, file, result) apex developer guide: testing connectapi code addrepositoryitem(repositoryid, repositoryfolderid, file, filedata) add a repository item, including the binary file. api version 39.0 requires chatter no 1144apex reference guide contenthub class signature public static connectapi.repositoryfolderitem addrepositoryitem(string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file, connectapi.binaryinput filedata) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. filedata type: connectapi.binaryinput the binary file. return value type: connectapi.repositoryfolderitem 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. example this example creates a file with binary content and metadata in a google drive repository folder. after the file is created, we show the file’s id, name, description, external url, and download url. final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefolderid = 'folder:0b0ltys1kmm3ssvj2bjiztgfqsws'; final connectapi.contenthubiteminput newitem = new connectapi.contenthubiteminput(); newitem.itemtypeid = 'document'; //see getallowedtypes for any file item types available for creation/update newitem.fields = new list<connectapi.contenthubfieldvalueinput>(); //metadata: name field final string newfilename = 'new folder item name.txt'; final connectapi.contenthubfieldvalueinput fieldvalueinput = new connectapi.contenthubfieldvalueinput(); fieldvalueinput.name = 'name'; fieldvalueinput.value = newfilename; newitem.fields.add(fieldvalueinput); 1145apex reference guide contenthub class //metadata: description field final connectapi.contenthubfieldvalueinput fieldvalueinputdesc = new connectapi.contenthubfieldvalueinput(); fieldvalueinputdesc.name = 'description'; fieldvalueinputdesc.value = 'it does describe it'; newitem.fields.add(fieldvalueinputdesc); //binary content final blob newfileblob = blob.valueof('awesome content for brand new file'); final string newfilemimetype = 'text/plain'; final connectapi.binaryinput filebinaryinput = new connectapi.binaryinput(newfileblob, newfilemimetype, newfilename); final connectapi.repositoryfolderitem newfolderitem = connectapi.contenthub.addrepositoryitem(gdriverepositoryid, gdrivefolderid, newitem, filebinaryinput); final connectapi.repositoryfilesummary newfile = newfolderitem.file; system.debug(string.format('new file - id: \'\'{0}\'\', name: \'\'{1}\'\', description: \'\'{2}\'\' \n external url: \'\'{3}\'\', download url: \'\'{4}\'\'', new string[]{ newfile.id, newfile.name, newfile.description, newfile.externaldocumenturl, newfile.downloadurl})); see also: settestaddrepositoryitem(repositoryid, repositoryfolderid, file, filedata, result) apex developer guide: testing connectapi code addrepositoryitem(communityid, repositoryid, repositoryfolderid, file, filedata) add a repository item, including the binary file, in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.repositoryfolderitem addrepositoryitem(string communityid, string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file, connectapi |
.binaryinput filedata) parameters communityid type: string 1146apex reference guide contenthub class id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. filedata type: connectapi.binaryinput the binary file. return value type: connectapi.repositoryfolderitem 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: settestaddrepositoryitem(communityid, repositoryid, repositoryfolderid, file, filedata, result) apex developer guide: testing connectapi code getalloweditemtypes(repositoryid, repositoryfolderid) get the item types that the context user is allowed to create in the repository folder. api version 39.0 requires chatter no signature public static connectapi.contenthuballoweditemtypecollection getalloweditemtypes(string repositoryid, string repositoryfolderid) 1147apex reference guide contenthub class parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. return value type: connectapi.contenthuballoweditemtypecollection 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: settestgetalloweditemtypes(repositoryid, repositoryfolderid, result) apex developer guide: testing connectapi code getalloweditemtypes(repositoryid, repositoryfolderid, filter) get the item types, filtered by type, that the context user is allowed to create in the repository folder. api version 39.0 requires chatter no signature public static connectapi.contenthuballoweditemtypecollection getalloweditemtypes(string repositoryid, string repositoryfolderid, connectapi.connectcontenthubitemtype filter) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. 1148apex reference guide contenthub class filter type: connectapi.contenthubitemtype item types. values are: • any—includes files and folders. • filesonly—includes files only. • foldersonly—includes folders only. return value type: connectapi.contenthuballoweditemtypecollection 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. example this example calls getalloweditemtypes(repositoryid, repositoryfolderid, connectapi.contenthubitemtype.filesonly) to get the first connectapi.contenthubitemtypesummary.id of a file. the context user can create allowed files in a repository folder in the external system. final connectapi.contenthuballoweditemtypecollection alloweditemtypescoll = connectapi.contenthub.getalloweditemtypes(repositoryid, repositoryfolderid, connectapi.contenthubitemtype.filesonly); final list<connectapi.contenthubitemtypesummary> alloweditemtypes = alloweditemtypescoll.alloweditemtypes; string allowedfileitemtypeid = null; if(alloweditemtypes.size() > 0){ connectapi.contenthubitemtypesummary alloweditemtypesummary = alloweditemtypes.get(0); allowedfileitemtypeid = alloweditemtypesummary.id; } see also: settestgetalloweditemtypes(repositoryid, repositoryfolderid, filter, result) apex developer guide: testing connectapi code getalloweditemtypes(communityid, repositoryid, repositoryfolderid) get the item types that the context user is allowed to create in the repository folder in an experience cloud site. api version 39.0 requires chatter no 1149apex reference guide contenthub class signature public static connectapi.contenthuballoweditemtypecollection getalloweditem |
types(string communityid, string repositoryid, string repositoryfolderid) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. return value type: connectapi.contenthuballoweditemtypecollection 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: settestgetalloweditemtypes(communityid, repositoryid, repositoryfolderid, result) apex developer guide: testing connectapi code getalloweditemtypes(communityid, repositoryid, repositoryfolderid, filter) get the item types, filtered by type, that the context user is allowed to create in the repository folder in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.contenthuballoweditemtypecollection getalloweditemtypes(string communityid, string repositoryid, string repositoryfolderid, connectapi.connectcontenthubitemtype filter) 1150apex reference guide contenthub class parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. filter type: connectapi.contenthubitemtype item types. values are: • any—includes files and folders. • filesonly—includes files only. • foldersonly—includes folders only. return value type: connectapi.contenthuballoweditemtypecollection 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: settestgetalloweditemtypes(communityid, repositoryid, repositoryfolderid, filter, result) apex developer guide: testing connectapi code getfilepreview(repositoryid, repositoryfileid, formattype) get a repository file preview. api version 39.0 requires chatter no signature public static connectapi.filepreview getfilepreview(string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype) 1151apex reference guide contenthub class parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. return value type: connectapi.filepreview 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. example this example calls getfilepreview(repositoryid, repositoryfileid, connectapi.filepreviewformat.thumbnail) to get the thumbnail format preview along with its respective url and number of thumbnail renditions. for each thumbnail format, we show every rendition url available. final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefileid = 'document:1-zca1baeoqbo2_ynfihcck6qjtpmoke-khfc4tyg3rk';final connectapi.filepreview filepreview = connectapi.contenthub.getfilepreview(gdriverepositoryid, gdrivefileid, connecta |
pi.filepreviewformat.thumbnail);system.debug(string.format('preview - url: \'\'{0}\'\', format: \'\'{1}\'\', nbr of renditions for this format: {2}', new string[]{ filepreview.url, filepreview.format.name(),string.valueof(filepreview.previewurls.size())}));for(connectapi.filepreviewurl filepreviewurl : filepreview.previewurls){ 1152apex reference guide contenthub class system.debug('-----> rendition url: ' + filepreviewurl.previewurl); } see also: settestgetfilepreview(repositoryid, repositoryfileid, formattype, result) apex developer guide: testing connectapi code getfilepreview(repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) get a page or page range of a repository file preview. api version 39.0 requires chatter no signature public static connectapi.filepreview getfilepreview(string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype, integer startpagenumber, integer endpagenumber) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. 1153apex reference guide contenthub class if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. startpagenumber type: integer the starting page number in the range of file preview urls. endpagenumber type: integer the ending page number in the range of file preview urls. return value type: connectapi.filepreview 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: settestgetfilepreview(repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber, result) apex developer guide: testing connectapi code getfilepreview(communityid, repositoryid, repositoryfileid, formattype) get a repository file preview in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.filepreview getfilepreview(string communityid, string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. 1154apex reference guide contenthub class repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. return value type: connectapi.filepreview 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: settestgetfilepreview(communityid, repositoryid, repositoryfileid, formattype, result) apex developer guide: testing connectapi code getfilepreview(communityid, repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) get a page or page range of a repository file preview in an experience cloud site. api version 39.0 requires chatter no 1155apex reference guide contenthub class signature public static connectapi.filepreview getfilepreview(string communityid, string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype, integer startpagenumber, integer endpagenumber) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. startpagenumber type: integer the starting page number in the range of file preview urls. endpagenumber type: integer the ending page number in the range of file preview urls. return value type: connectapi.filepreview 1156apex reference guide contenthub 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: settestgetfilepreview(communityid, repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber, result) apex developer guide: testing connectapi code getitemtype(repositoryid, repositoryitemtypeid) get information about an item type associated with a repository. api version 39.0 requires chatter no signature public static connectapi.contenthubitemtypedetail getitemtype(string repositoryid, string repositoryitemtypeid) parameters repositoryid type: string the id of the repository. repositoryitemtypeid type: string the id of the repository item type. return value type: connectapi.contenthubitemtypedetail 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: settestgetitemtype(repositoryid, repositoryitemtypeid, result) apex developer guide: testing connectapi code 1157apex reference guide contenthub class getitemtype(communityid, repositoryid, repositoryitemtypeid) get information about an item type associated with a repository in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.contenthubitemtypedetail getitemtype(string communityid, string repositoryid, string repositoryitemtypeid) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryitemtypeid type: string the id of the repository item type. return value type: connectapi.contenthubitemtypedetail 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: settestgetitemtype |
(communityid, repositoryid, repositoryitemtypeid, result) apex developer guide: testing connectapi code getpreviews(repositoryid, repositoryfileid) get information about a repository file’s supported previews. 1158apex reference guide contenthub class api version 39.0 requires chatter no signature public static connectapi.filepreviewcollection getpreviews(string repositoryid, string repositoryfileid) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. return value type: connectapi.filepreviewcollection 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. example this example gets all supported preview formats and their respective urls and number of renditions. for each supported preview format, we show every rendition url available. final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefileid = 'document:1-zca1baeoqbo2_ynfihcck6qjtpmoke-khfc4tyg3rk'; final connectapi.filepreviewcollection previewscollection = connectapi.contenthub.getpreviews(gdriverepositoryid, gdrivefileid); for(connectapi.filepreview filepreview : previewscollection.previews){ system.debug(string.format('preview - url: \'\'{0}\'\', format: \'\'{1}\'\', nbr of renditions for this format: {2}', new string[]{ filepreview.url, filepreview.format.name(),string.valueof(filepreview.previewurls.size())})); for(connectapi.filepreviewurl filepreviewurl : filepreview.previewurls){ system.debug('-----> rendition url: ' + filepreviewurl.previewurl); 1159apex reference guide contenthub class } } see also: settestgetpreviews(repositoryid, repositoryfileid, result) apex developer guide: testing connectapi code getpreviews(communityid, repositoryid, repositoryfileid) get information about a repository file’s supported previews in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.filepreviewcollection getpreviews(string communityid, string repositoryid, string repositoryfileid) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. return value type: connectapi.filepreviewcollection 1160apex reference guide contenthub 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: settestgetpreviews(communityid, repositoryid, repositoryfileid, result) apex developer guide: testing connectapi code getrepositories() get a list of repositories. api version 39.0 requires chatter no signature public static connectapi.contenthubrepositorycollection getrepositories() return value type: connectapi.contenthubrepositorycollection 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. example this example gets all repositories and gets the first sharepoint online repository found. final string sharepointonlineprovidertype ='contenthubsharepointoffice365'; final connectapi.contenthubrepositorycollection repositorycollection = connectapi.contenthub.getrepositories(); connectapi.contenthubrepository sharepointonlinerepository = null; for(connectapi.contenthubrepository repository : repositorycollection.repositories){ if(sharepointonlineprovidertype.equalsignorecase(repository.providertype.type)){ sharepointonlinerepository = repository; break; 1161apex reference guide contenthub class } } see also: settestgetrepositories(result) apex developer guide: |
testing connectapi code getrepositories(communityid) get a list of repositories in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.contenthubrepositorycollection getrepositories(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.contenthubrepositorycollection 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: settestgetrepositories(communityid, result) apex developer guide: testing connectapi code getrepositories(pageparam, pagesize) get a page of repositories. 1162apex reference guide contenthub class api version 39.0 requires chatter no signature public static connectapi.contenthubrepositorycollection getrepositories(integer pageparam, integer pagesize) parameters 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 page size is 25. return value type: connectapi.contenthubrepositorycollection 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: settestgetrepositories(pageparam, pagesize, result) apex developer guide: testing connectapi code getrepositories(communityid, pageparam, pagesize) get a page of repositories in an experience cloud site. api version 39.0 requires chatter no 1163apex reference guide contenthub class signature public static connectapi.contenthubrepositorycollection getrepositories(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 page size is 25. return value type: connectapi.contenthubrepositorycollection 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: settestgetrepositories(communityid, pageparam, pagesize, result) apex developer guide: testing connectapi code getrepository(repositoryid) get a repository. api version 369.0 requires chatter no signature public static connectapi.contenthubrepository getrepository(string repositoryid) 1164apex reference guide contenthub class parameters repositoryid type: string the id of the repository. return value type: connectapi.contenthubrepository 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. example final string repositoryid = '0xcxx0000000123gaa'; final connectapi.contenthubrepository repository = connectapi.contenthub.getrepository(repositoryid); see also: settestgetrepository(repositoryid, result) apex developer guide: testing connectapi code getrepository(communityid, repositoryid) get a repository in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.contenthubrepository getrepository(string communityid, string repositoryid) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string 1165apex reference guide contenthub class the id of the repository. return value type: connectapi.contenthubrepository 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: settestgetrepository(communityid, repositoryid, result) apex developer guide: testing connectapi code getrepositoryfile(repositoryid, repositoryfileid) get a repository file. api version 39.0 requires chatter no signature public static connectapi.repositoryfiledetail getrepositoryfile(string repositoryid, string repositoryfileid) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. return value type: connectapi.repositoryfiledetail 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. 1166apex reference guide contenthub class example final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefileid = 'file:0b0ltys1kmm3stmxknjvjbwzja00'; final connectapi.repositoryfiledetail file = connectapi.contenthub.getrepositoryfile(gdriverepositoryid, gdrivefileid); system.debug(string.format('file - name: \'\'{0}\'\', size: {1}, external url: \'\'{2}\'\', download url: \'\'{3}\'\'', new string[]{ file.name, string.valueof(file.contentsize), file.externaldocumenturl, file.downloadurl})); see also: settestgetrepositoryfile(repositoryid, repositoryfileid, result) apex developer guide: testing connectapi code getrepositoryfile(repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) get a repository file with or without permissions information. api version 39.0 requires chatter no signature public static connectapi.repositoryfiledetail getrepositoryfile(string repositoryid, string repositoryfileid, boolean includeexternalfilepermissionsinfo) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. includeexternalfilepermissionsinfo type: boolean specifies whether to include permission information, such as whether the file is shared and what are the available permission types. managing external file permissions is supported for google drive, sharepoint online, and onedrive for business. 1167apex reference guide contenthub class return value type: connectapi.repositoryfiledetail 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. example final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefileid = 'file:0b0ltys1kmm3stmxknjvjbwzja00'; final connectapi.repositoryfiledetail file = connectapi.contenthub.getrepositoryfile(gdriverepositoryid, gdrivefileid, true); system.debug(string.format('file - name: \'\'{0}\'\', size: {1}, external url: \'\'{2}\'\', download url: \'\'{3}\'\'', new string[]{ file.name, string.valueof(file.contentsize), file.externaldocumenturl, file.downloadurl})); final connectapi.externalfilepermissioninformation externalfileperminfo = file.externalfilepermissioninformation; //permission types final list<connectapi.contenthubpermissiontype> permissiontypes = externalfileperminfo.externalfilepermissiontypes; for(connectapi.contenthubpermissiontype permissiontype : permissiontypes){ system.debug(string.format('permission type - id: \'\'{0}\'\', label: \'\'{1}\'\'', new string[]{ permissiontype.id, permissiontype.label})); } //permission groups final list<connectapi.repositorygroupsummary> groups = externalfileperminfo.repositorypublicgroups; for(connectapi.repositorygroupsummary ggroup : groups |
){ system.debug(string.format('group - id: \'\'{0}\'\', name: \'\'{1}\'\', type: \'\'{2}\'\'', new string[]{ ggroup.id, ggroup.name, ggroup.type.name()})); } see also: settestgetrepositoryfile(repositoryid, repositoryfileid, includeexternalfilepermissionsinfo, result) apex developer guide: testing connectapi code getrepositoryfile(communityid, repositoryid, repositoryfileid) get a repository file in an experience cloud site. api version 39.0 1168apex reference guide contenthub class requires chatter no signature public static connectapi.repositoryfiledetail getrepositoryfile(string communityid, string repositoryid, string repositoryfileid) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. return value type: connectapi.repositoryfiledetail 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: settestgetrepositoryfile(communityid, repositoryid, repositoryfileid, result) apex developer guide: testing connectapi code getrepositoryfile(communityid, repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) get a repository file with or without permissions information in an experience cloud site. api version 39.0 requires chatter no 1169apex reference guide contenthub class signature public static connectapi.repositoryfiledetail getrepositoryfile(string communityid, string repositoryid, string repositoryfileid, boolean includeexternalfilepermissionsinfo) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. includeexternalfilepermissionsinfo type: boolean specifies whether to include permission information, such as whether the file is shared and what are the available permission types. managing external file permissions is supported for google drive, sharepoint online, and onedrive for business. return value type: connectapi.repositoryfiledetail 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: settestgetrepositoryfile(communityid, repositoryid, repositoryfileid, includeexternalfilepermissionsinfo, result) apex developer guide: testing connectapi code getrepositoryfolder(repositoryid, repositoryfolderid) get a repository folder. api version 39.0 requires chatter no 1170apex reference guide contenthub class signature public static connectapi.repositoryfolderdetail getrepositoryfolder(string repositoryid, string repositoryfolderid) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. return value type: connectapi.repositoryfolderdetail 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. example final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefolderid = 'folder:0b0ltys1kmm3ssvj2bjiztgfqsws'; final connectapi.repositoryfolderdetail folder = connectapi.contenthub.getrepositoryfolder(gdriverepositoryid, gdrivefolderid); system.debug(string.format('folder - name: \'\'{0}\'\', description: \'\'{1}\'\', external url: \'\'{2}\'\', folder items url: \'\'{3}\'\'', new string[]{ folder.name, folder.description, folder.externalfolderurl, folder.folderitemsurl})); see also: settestgetrepositoryfolder(repositoryid, repositoryfolderid, result |
) apex developer guide: testing connectapi code getrepositoryfolder(communityid, repositoryid, repositoryfolderid) get a repository folder in an experience cloud site. api version 39.0 requires chatter no 1171apex reference guide contenthub class signature public static connectapi.repositoryfolderdetail getrepositoryfolder(string communityid, string repositoryid, string repositoryfolderid) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. return value type: connectapi.repositoryfolderdetail 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: settestgetrepositoryfolder(communityid, repositoryid, repositoryfolderid, result) apex developer guide: testing connectapi code getrepositoryfolderitems(repositoryid, repositoryfolderid) get repository folder items. api version 39.0 requires chatter no signature public static connectapi.repositoryfolderitemscollection getrepositoryfolderitems(string repositoryid, string repositoryfolderid) 1172apex reference guide contenthub class parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. return value type: connectapi.repositoryfolderitemscollection 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. example this example gets the collection of items in a repository folder. for files, we show the file’s name, size, external url, and download url. for folders, we show the folder’s name, description, and external url. final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefolderid = 'folder:0b0ltys1kmm3ssvj2bjiztgfqsws'; final connectapi.repositoryfolderitemscollection folderitemscoll = connectapi.contenthub.getrepositoryfolderitems(gdriverepositoryid,gdrivefolderid); final list<connectapi.repositoryfolderitem> folderitems = folderitemscoll.items; system.debug('number of items in repository folder: ' + folderitems.size()); for(connectapi.repositoryfolderitem item : folderitems){ connectapi.repositoryfilesummary filesummary = item.file; if(filesummary != null){ system.debug(string.format('file item - name: \'\'{0}\'\', size: {1}, external url: \'\'{2}\'\', download url: \'\'{3}\'\'', new string[]{ filesummary.name, string.valueof(filesummary.contentsize), filesummary.externaldocumenturl, filesummary.downloadurl})); }else{ connectapi.repositoryfoldersummary foldersummary = item.folder; system.debug(string.format('folder item - name: \'\'{0}\'\', description: \'\'{1}\'\'', new string[]{ foldersummary.name, foldersummary.description})); } } see also: settestgetrepositoryfolderitems(repositoryid, repositoryfolderid, result) apex developer guide: testing connectapi code getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid) get repository folder items in an experience cloud site. 1173apex reference guide contenthub class api version 39.0 requires chatter no signature public static connectapi.repositoryfolderitemscollection getrepositoryfolderitems(string communityid, string repositoryid, string repositoryfolderid) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. return value type: connectapi.repositoryfolderitemscollection 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: settestgetrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, result) apex developer guide: testing connectapi code getrepositoryfolderitems(repositoryid, repositoryfolderid, pageparam, pagesize) get a page of repository folder items. api version 39.0 1174apex reference guide contenthub class requires chatter no signature public static connectapi.repositoryfolderitemscollection getrepositoryfolderitems(string repositoryid, string repositoryfolderid, integer pageparam, integer pagesize) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. 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 page size is 25. return value type: connectapi.repositoryfolderitemscollection 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: settestgetrepositoryfolderitems(repositoryid, repositoryfolderid, pageparam, pagesize, result) apex developer guide: testing connectapi code getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, pageparam, pagesize) get a page of repository folder items in an experience cloud site. api version 39.0 1175apex reference guide contenthub class requires chatter no signature public static connectapi.repositoryfolderitemscollection getrepositoryfolderitems(string communityid, string repositoryid, string repositoryfolderid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. 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 page size is 25. return value type: connectapi.repositoryfolderitemscollection 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: settestgetrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, pageparam, pagesize, result) apex developer guide: testing connectapi code updaterepositoryfile(repositoryid, repositoryfileid, file) update the name of a repository file. 1176apex reference guide contenthub class api version 39.0 requires chatter no signature public static connectapi.repositoryfiledetail updaterepositoryfile(string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. when updating the metadata of a repository file, only the name field can be updated. return value type: connectapi.repositoryfiledetail 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. example this example updates the name of a file in a google drive repository. after the file is updated, we show the file’s id, name, description, external url, download url. final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefolderid = 'folder:0b0ltys1kmm3ssvj2bjiztgfqsws', gdrivefileid = 'document:1q9oatv |
pcyybk-jwzp_phr75ulqghwfp15zhkamkrrcq'; final connectapi.contenthubiteminput updateditem = new connectapi.contenthubiteminput(); updateditem.itemtypeid = 'document'; //see getallowedtypes for any file item types available for creation/update updateditem.fields = new list<connectapi.contenthubfieldvalueinput>(); //metadata: name field 1177apex reference guide contenthub class final connectapi.contenthubfieldvalueinput fieldvalueinputname = new connectapi.contenthubfieldvalueinput(); fieldvalueinputname.name = 'name'; fieldvalueinputname.value = 'updated file name.txt'; updateditem.fields.add(fieldvalueinputname); final connectapi.repositoryfiledetail updatedfile = connectapi.contenthub.updaterepositoryfile(gdriverepositoryid, gdrivefileid, updateditem); system.debug(string.format('updated file - id: \'\'{0}\'\', name: \'\'{1}\'\', description: \'\'{2}\'\',\n external url: \'\'{3}\'\', download url: \'\'{4}\'\'', new string[]{ updatedfile.id, updatedfile.name, updatedfile.description, updatedfile.externaldocumenturl, updatedfile.downloadurl})); see also: settestupdaterepositoryfile(communityid, repositoryid, repositoryfileid, file, filedata, result) apex developer guide: testing connectapi code updaterepositoryfile(repositoryid, repositoryfileid, file, filedata) update the content of a repository file. api version 39.0 requires chatter no signature public static connectapi.repositoryfiledetail updaterepositoryfile(string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file, connectapi.binaryinput filedata) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. when updating the metadata of a repository file, only the name field can be updated. 1178apex reference guide contenthub class filedata type: connectapi.binaryinput the binary file. return value type: connectapi.repositoryfiledetail 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. example this example updates the content and name of a file in a google drive repository. after the file is updated, we show the file’s id, name, description, external url, and download url. final string gdriverepositoryid = '0xcxx00000000odgay', gdrivefolderid = 'folder:0b0ltys1kmm3ssvj2bjiztgfqsws', gdrivefileid = 'document:1q9oatvpcyybk-jwzp_phr75ulqghwfp15zhkamkrrcq'; final connectapi.contenthubiteminput updateditem = new connectapi.contenthubiteminput(); updateditem.itemtypeid = 'document'; //see getallowedtypes for any file item types available for creation/update updateditem.fields = new list<connectapi.contenthubfieldvalueinput>(); //metadata: name field final connectapi.contenthubfieldvalueinput fieldvalueinputname = new connectapi.contenthubfieldvalueinput(); fieldvalueinputname.name = 'name'; fieldvalueinputname.value = 'updated file name.txt'; updateditem.fields.add(fieldvalueinputname); //binary content final blob updatedfileblob = blob.valueof('even more awesome content for updated file'); final string updatedfilemimetype = 'text/plain'; final connectapi.binaryinput filebinaryinput = new connectapi.binaryinput(updatedfileblob, updatedfilemimetype, updatedfilename); final connectapi.repositoryfiledetail updatedfile = connectapi.contenthub.updaterepositoryfile(gdriverep |
ositoryid, gdrivefileid, updateditem); system.debug(string.format('updated file - id: \'\'{0}\'\', name: \'\'{1}\'\', description: \'\'{2}\'\',\n external url: \'\'{3}\'\', download url: \'\'{4}\'\'', new string[]{ updatedfile.id, updatedfile.name, updatedfile.description, updatedfile.externaldocumenturl, updatedfile.downloadurl})); see also: settestupdaterepositoryfile(repositoryid, repositoryfileid, file, result) apex developer guide: testing connectapi code 1179apex reference guide contenthub class updaterepositoryfile(communityid, repositoryid, repositoryfileid, file) update the name of a repository file in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.repositoryfiledetail updaterepositoryfile(string communityid, string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. when updating the metadata of a repository file, only the name field can be updated. return value type: connectapi.repositoryfiledetail 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: settestupdaterepositoryfile(repositoryid, repositoryfileid, file, filedata, result) apex developer guide: testing connectapi code 1180apex reference guide contenthub class updaterepositoryfile(communityid, repositoryid, repositoryfileid, file, filedata) update the content of a repository file in an experience cloud site. api version 39.0 requires chatter no signature public static connectapi.repositoryfiledetail updaterepositoryfile(string communityid, string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file, connectapi.binaryinput filedata) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. when updating the metadata of a repository file, only the name field can be updated. filedata type: connectapi.binaryinput the binary file. return value type: connectapi.repositoryfiledetail 1181apex reference guide contenthub 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: settestupdaterepositoryfile(communityid, repositoryid, repositoryfileid, file, result) apex developer guide: testing connectapi code contenthub test methods the following are the test methods for contenthub. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. settestaddrepositoryitem(repositoryid, repositoryfolderid, file, result) register a connectapi.repositoryfolderitem object to be returned when the matching addrepositoryitem(repositoryid, repositoryfolderid, file) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestaddrepositoryitem(string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file, connectapi.repositoryfolderitem result) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. result type: connectapi |
.repositoryfolderitem object containing test data. 1182 |
apex reference guide contenthub class return value type: void see also: addrepositoryitem(repositoryid, repositoryfolderid, file) apex developer guide: testing connectapi code settestaddrepositoryitem(communityid, repositoryid, repositoryfolderid, file, result) register a connectapi.repositoryfolderitem object to be returned when the matching addrepositoryitem(communityid, repositoryid, repositoryfolderid, file) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestaddrepositoryitem(string communityid, string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file, connectapi.repositoryfolderitem result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. result type: connectapi.repositoryfolderitem object containing test data. 1183apex reference guide contenthub class return value type: void see also: addrepositoryitem(communityid, repositoryid, repositoryfolderid, file) apex developer guide: testing connectapi code settestaddrepositoryitem(repositoryid, repositoryfolderid, file, filedata, result) register a connectapi.repositoryfolderitem object to be returned when the matching addrepositoryitem(repositoryid, repositoryfolderid, file, filedata) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestaddrepositoryitem(string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file, connectapi.binaryinput filedata, connectapi.repositoryfolderitem result) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. filedata type: connectapi.binaryinput the binary file. result type: connectapi.repositoryfolderitem object containing test data. 1184apex reference guide contenthub class return value type: void see also: addrepositoryitem(repositoryid, repositoryfolderid, file, filedata) apex developer guide: testing connectapi code settestaddrepositoryitem(communityid, repositoryid, repositoryfolderid, file, filedata, result) register a connectapi.repositoryfolderitem object to be returned when the matching addrepositoryitem(communityid, repositoryid, repositoryfolderid, file, filedata) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestaddrepositoryitem(string communityid, string repositoryid, string repositoryfolderid, connectapi.contenthubiteminput file, connectapi.binaryinput filedata, connectapi.repositoryfolderitem result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. file type: connectapi.contenthubiteminput the item type id and fields of the item type. filedata type: connectapi.binaryinput the binary file. result type: connectapi.repositoryfolderitem object containing test data. 1185apex reference guide contenthub class return value type: void see also: addrepositoryitem(communityid, repositoryid, repositoryfolderid, file, filedata) apex developer guide: testing connectapi code settestgetalloweditemtypes(repositoryid, repositoryfolderid, result) register a connectapi.contenthuballoweditemtypecollection object to be returned when the matching getalloweditemtypes(repositoryid, repositoryfolderid) method is called in a test context. use the method |
with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetalloweditemtypes(string repositoryid, string repositoryfolderid, connectapi.contenthuballoweditemtypecollection result) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. result type: connectapi.contenthuballoweditemtypecollection object containing test data. return value type: void see also: getalloweditemtypes(repositoryid, repositoryfolderid) apex developer guide: testing connectapi code 1186apex reference guide contenthub class settestgetalloweditemtypes(repositoryid, repositoryfolderid, filter, result) register a connectapi.contenthuballoweditemtypecollection object to be returned when the matching getalloweditemtypes(repositoryid, repositoryfolderid, filter) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetalloweditemtypes(string repositoryid, string repositoryfolderid, connectapi.contenthubitemtype filter, connectapi.contenthuballoweditemtypecollection result) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. filter type: connectapi.contenthubitemtype item types. values are: • any—includes files and folders. • filesonly—includes files only. • foldersonly—includes folders only. result type: connectapi.contenthuballoweditemtypecollection object containing test data. return value type: void see also: getalloweditemtypes(repositoryid, repositoryfolderid, filter) apex developer guide: testing connectapi code 1187apex reference guide contenthub class settestgetalloweditemtypes(communityid, repositoryid, repositoryfolderid, result) register a connectapi.contenthuballoweditemtypecollection object to be returned when the matching getalloweditemtypes(communityid, repositoryid, repositoryfolderid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetalloweditemtypes(string communityid, string repositoryid, string repositoryfolderid, connectapi.contenthuballoweditemtypecollection result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. result type: connectapi.contenthuballoweditemtypecollection object containing test data. return value type: void see also: getalloweditemtypes(communityid, repositoryid, repositoryfolderid) apex developer guide: testing connectapi code settestgetalloweditemtypes(communityid, repositoryid, repositoryfolderid, filter, result) register a connectapi.contenthuballoweditemtypecollection object to be returned when the matching getalloweditemtypes(communityid, repositoryid, repositoryfolderid, filter) method is called in a test context. use the method with the same parameters or you receive an exception. 1188apex reference guide contenthub class api version 40.0 signature public static void settestgetalloweditemtypes(string communityid, string repositoryid, string repositoryfolderid, connectapi.contenthubitemtype filter, connectapi.contenthuballoweditemtypecollection result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. filter type: connectapi.contenthubitemtype item types. values are: • any—includes files and folders. • filesonly—includes files only. • foldersonly—includes folders only. result type: connectapi.contenthuballoweditemtypecollection object containing test data. return value type: void see also: getalloweditemtypes(communityid, repositoryid, repositoryfolderid, filter) apex |
developer guide: testing connectapi code settestgetfilepreview(repositoryid, repositoryfileid, formattype, result) register a connectapi.filepreview object to be returned when the matching getfilepreview(repositoryid, repositoryfileid, formattype) method is called in a test context. use the method with the same parameters or you receive an exception. 1189apex reference guide contenthub class api version 40.0 signature public static void settestgetfilepreview(string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype, connectapi.filepreview result) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. result type: connectapi.filepreview object containing test data. return value type: void see also: getfilepreview(repositoryid, repositoryfileid, formattype) apex developer guide: testing connectapi code 1190apex reference guide contenthub class settestgetfilepreview(repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber, result) register a connectapi.filepreview object to be returned when the matching getfilepreview(repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetfilepreview(string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype, integer startpagenumber, integer endpagenumber, connectapi.filepreview result) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. startpagenumber type: integer the starting page number in the range of file preview urls. endpagenumber type: integer the ending page number in the range of file preview urls. 1191apex reference guide contenthub class result type: connectapi.filepreview object containing test data. return value type: void see also: getfilepreview(repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) apex developer guide: testing connectapi code settestgetfilepreview(communityid, repositoryid, repositoryfileid, formattype, result) register a connectapi.filepreview object to be returned when the matching getfilepreview(communityid, repositoryid, repositoryfileid, formattype) method is called in a test context. use the method with the same parameters or you receive |
an exception. api version 40.0 signature public static void settestgetfilepreview(string communityid, string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype, connectapi.filepreview result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. 1192apex reference guide contenthub class • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. result type: connectapi.filepreview object containing test data. return value type: void see also: getfilepreview(communityid, repositoryid, repositoryfileid, formattype) apex developer guide: testing connectapi code settestgetfilepreview(communityid, repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber, result) register a connectapi.filepreview object to be returned when the matching getfilepreview(communityid, repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetfilepreview(string communityid, string repositoryid, string repositoryfileid, connectapi.filepreviewformat formattype, integer startpagenumber, integer endpagenumber, connectapi.filepreview result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. 1193apex reference guide contenthub class repositoryfileid type: string the id of the repository file. formattype type: connectapi.filepreviewformat specifies the format of the file preview. values are: • jpg—preview format is jpg. • pdf—preview format is pdf. • svg—preview format is compressed svg. • thumbnail—preview format is 240 x 180 png. • thumbnailbig—preview format is 720 x 480 png. • thumbnailtiny—preview format is 120 x 90 png. pdf previews are available for files of type doc, docx, ppt, pptx, text, xls, and xlsx.svg files are generated on demand. if you’re concerned that feature-rich svg previews don’t work in your org, choose alternative file previews. to use jpg file previews, enter general in the quick find box in setup. select general settings, and then select display alternative file previews. startpagenumber type: integer the starting page number in the range of file preview urls. endpagenumber type: integer the ending page number in the range of file preview urls. result type: connectapi.filepreview object containing test data. return value type: void see also: getfilepreview(communityid, repositoryid, repositoryfileid, formattype, startpagenumber, endpagenumber) apex developer guide: testing connectapi code settestgetitemtype(repositoryid, repositoryitemtypeid, result) register a connectapi.contenthubitemtypedetail object to be returned when the matching getitemtype(repositoryid, repositoryitemtypeid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 1194apex reference guide contenthub class signature public static void settestgetitemtype(string repositoryid, string repositoryitemtypeid, |
connectapi.contenthubitemtypedetail result) parameters repositoryid type: string the id of the repository. repositoryitemtypeid type: string the id of the repository item type. result type: connectapi.contenthubitemtypedetail object containing test data. return value type: void see also: getitemtype(repositoryid, repositoryitemtypeid) apex developer guide: testing connectapi code settestgetitemtype(communityid, repositoryid, repositoryitemtypeid, result) register a connectapi.contenthubitemtypedetail object to be returned when the matching getitemtype(communityid, repositoryid, repositoryitemtypeid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetitemtype(string communityid, string repositoryid, string repositoryitemtypeid, connectapi.contenthubitemtypedetail result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string 1195apex reference guide contenthub class the id of the repository. repositoryitemtypeid type: string the id of the repository item type. result type: connectapi.contenthubitemtypedetail object containing test data. return value type: void see also: getitemtype(communityid, repositoryid, repositoryitemtypeid) apex developer guide: testing connectapi code settestgetpreviews(repositoryid, repositoryfileid, result) register a connectapi.filepreviewcollection object to be returned when the matching getpreviews(repositoryid, repositoryfileid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetpreviews(string repositoryid, string repositoryfileid, connectapi.filepreviewcollection result) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. result type: connectapi.filepreviewcollection object containing test data. 1196apex reference guide contenthub class return value type: void see also: getpreviews(repositoryid, repositoryfileid) apex developer guide: testing connectapi code settestgetpreviews(communityid, repositoryid, repositoryfileid, result) register a connectapi.filepreviewcollection object to be returned when the matching getpreviews(communityid, repositoryid, repositoryfileid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetpreviews(string communityid, string repositoryid, string repositoryfileid, connectapi.filepreviewcollection result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. result type: connectapi.filepreviewcollection object containing test data. return value type: void see also: getpreviews(communityid, repositoryid, repositoryfileid) apex developer guide: testing connectapi code 1197apex reference guide contenthub class settestgetrepositories(result) register a connectapi.contenthubrepositorycollection object to be returned when the matching getrepositories() method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositories(connectapi.contenthubrepositorycollection result) parameters result type: connectapi.contenthubrepositorycollection object containing test data. return value type: void see also: getrepositories() apex developer guide: testing connectapi code settestgetrepositories(communityid, result) register a getrepositories(communityid) object to be returned when the matching connectapi.contenthubrepositorycollection method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void |
settestgetrepositories(string communityid, connectapi.contenthubrepositorycollection result) parameters communityid type: string id for an experience cloud site, internal, or null. 1198apex reference guide contenthub class result type: connectapi.contenthubrepositorycollection object containing test data. return value type: void see also: getrepositories(communityid) apex developer guide: testing connectapi code settestgetrepositories(pageparam, pagesize, result) register a connectapi.contenthubrepositorycollection object to be returned when the matching getrepositories(pageparam, pagesize) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositories(integer pageparam, integer pagesize, connectapi.contenthubrepositorycollection result) parameters 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 page size is 25. result type: connectapi.contenthubrepositorycollection object containing test data. return value type: void see also: getrepositories(pageparam, pagesize) apex developer guide: testing connectapi code 1199apex reference guide contenthub class settestgetrepositories(communityid, pageparam, pagesize, result) register a connectapi.contenthubrepositorycollection object to be returned when the matching getrepositories(communityid, pageparam, pagesize) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositories(string communityid, integer pageparam, integer pagesize, connectapi.contenthubrepositorycollection result) 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 page size is 25. result type: connectapi.contenthubrepositorycollection object containing test data. return value type: void see also: getrepositories(communityid, pageparam, pagesize) apex developer guide: testing connectapi code settestgetrepository(repositoryid, result) register a connectapi.contenthubrepository object to be returned when the matching getrepository(repositoryid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 1200apex reference guide contenthub class signature public static void settestgetrepository(string repositoryid, connectapi.contenthubrepository result) parameters repositoryid type: string the id of the repository. result type: connectapi.contenthubrepository object containing test data. return value type: void see also: getrepository(repositoryid) apex developer guide: testing connectapi code settestgetrepository(communityid, repositoryid, result) register a connectapi.contenthubrepository object to be returned when the matching getrepository(communityid, repositoryid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepository(string communityid, string repositoryid, connectapi.contenthubrepository result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. result type: connectapi.contenthubrepository 1201apex reference guide contenthub class object containing test data. return value type: void see also: getrepository(communityid, repositoryid) apex developer guide: testing connectapi code settestgetrepositoryfile(repositoryid, repositoryfileid, result) register a connectapi. |
repositoryfiledetail object to be returned when the matching getrepositoryfile(repositoryid, repositoryfileid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositoryfile(string repositoryid, string repositoryfileid, connectapi.repositoryfiledetail result) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. result type: connectapi.repositoryfiledetail object containing test data. return value type: void see also: getrepositoryfile(repositoryid, repositoryfileid) apex developer guide: testing connectapi code 1202apex reference guide contenthub class settestgetrepositoryfile(repositoryid, repositoryfileid, includeexternalfilepermissionsinfo, result) register a connectapi.repositoryfiledetail object to be returned when the matching getrepositoryfile(repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositoryfile(string repositoryid, string repositoryfileid, boolean includeexternalfilepermissionsinfo, connectapi.repositoryfiledetail result) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. includeexternalfilepermissionsinfo type: boolean specifies whether to include permission information, such as whether the file is shared and what are the available permission types. managing external file permissions is supported for google drive, sharepoint online, and onedrive for business. result type: connectapi.repositoryfiledetail object containing test data. return value type: void see also: getrepositoryfile(repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) apex developer guide: testing connectapi code settestgetrepositoryfile(communityid, repositoryid, repositoryfileid, result) register a connectapi.repositoryfiledetail object to be returned when the matching getrepositoryfile(communityid, repositoryid, repositoryfileid) method is called in a test context. use the method with the same parameters or you receive an exception. 1203apex reference guide contenthub class api version 40.0 signature public static void settestgetrepositoryfile(string communityid, string repositoryid, string repositoryfileid, connectapi.repositoryfiledetail result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. result type: connectapi.repositoryfiledetail object containing test data. return value type: void see also: getrepositoryfile(communityid, repositoryid, repositoryfileid) apex developer guide: testing connectapi code settestgetrepositoryfile(communityid, repositoryid, repositoryfileid, includeexternalfilepermissionsinfo, result) register a connectapi.repositoryfiledetail object to be returned when the matching getrepositoryfile(communityid, repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 1204apex reference guide contenthub class signature public static void settestgetrepositoryfile(string communityid, string repositoryid, string repositoryfileid, boolean includeexternalfilepermissionsinfo, connectapi.repositoryfiledetail result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. includeexternalfilepermissionsinfo type: boolean specifies whether to include permission information, such as whether the file is shared and what are the available permission types. managing external file permissions is supported for google drive, sharepoint online, and onedrive for business. result type: connectapi.repositoryfiledetail |
object containing test data. return value type: void see also: getrepositoryfile(communityid, repositoryid, repositoryfileid, includeexternalfilepermissionsinfo) apex developer guide: testing connectapi code settestgetrepositoryfolder(repositoryid, repositoryfolderid, result) register a connectapi.repositoryfolderdetail object to be returned when the matching getrepositoryfolder(repositoryid, repositoryfolderid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 1205apex reference guide contenthub class signature public static void settestgetrepositoryfolder(string repositoryid, string repositoryfolderid, connectapi.repositoryfolderdetail result) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. result type: connectapi.repositoryfolderdetail object containing test data. return value type: void see also: getrepositoryfolder(repositoryid, repositoryfolderid) apex developer guide: testing connectapi code settestgetrepositoryfolder(communityid, repositoryid, repositoryfolderid, result) register a connectapi.repositoryfolderdetail object to be returned when the matching getrepositoryfolder(communityid, repositoryid, repositoryfolderid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositoryfolder(string communityid, string repositoryid, string repositoryfolderid, connectapi.repositoryfolderdetail result) parameters communityid type: string id for an experience cloud site, internal, or null. 1206apex reference guide contenthub class repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. result type: connectapi.repositoryfolderdetail object containing test data. return value type: void see also: getrepositoryfolder(communityid, repositoryid, repositoryfolderid) apex developer guide: testing connectapi code settestgetrepositoryfolderitems(repositoryid, repositoryfolderid, result) register a connectapi.repositoryfolderitemscollection object to be returned when the matching getrepositoryfolderitems(repositoryid, repositoryfolderid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositoryfolderitems(string repositoryid, string repositoryfolderid, connectapi.repositoryfolderitemscollection result) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. result type: connectapi.repositoryfolderitemscollection object containing test data. 1207apex reference guide contenthub class return value type: void see also: getrepositoryfolderitems(repositoryid, repositoryfolderid) apex developer guide: testing connectapi code settestgetrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, result) register a connectapi.repositoryfolderitemscollection object to be returned when the matching getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositoryfolderitems(string communityid, string repositoryid, string repositoryfolderid, connectapi.repositoryfolderitemscollection result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. result type: connectapi.repositoryfolderitemscollection object containing test data. 1208apex reference guide contenthub class return value type: void see also: getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid) apex developer guide: testing connectapi code settestgetrepositoryfolderitems(repositoryid, repositoryfolderid, pageparam, |
pagesize, result) register a connectapi.repositoryfolderitemscollection object to be returned when the matching getrepositoryfolderitems(repositoryid, repositoryfolderid, pageparam, pagesize) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositoryfolderitems(string repositoryid, string repositoryfolderid, integer pageparam, integer pagesize, connectapi.repositoryfolderitemscollection result) parameters repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. 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 page size is 25. result type: connectapi.repositoryfolderitemscollection object containing test data. 1209apex reference guide contenthub class return value type: void see also: getrepositoryfolderitems(repositoryid, repositoryfolderid, pageparam, pagesize) apex developer guide: testing connectapi code settestgetrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, pageparam, pagesize, result) register a connectapi.repositoryfolderitemscollection object to be returned when the matching getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, pageparam, pagesize) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestgetrepositoryfolderitems(string communityid, string repositoryid, string repositoryfolderid, integer pageparam, integer pagesize, connectapi.repositoryfolderitemscollection result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfolderid type: string the id of the repository folder. 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 page size is 25. result type: connectapi.repositoryfolderitemscollection object containing test data. 1210apex reference guide contenthub class return value type: void see also: getrepositoryfolderitems(communityid, repositoryid, repositoryfolderid, pageparam, pagesize) apex developer guide: testing connectapi code settestupdaterepositoryfile(communityid, repositoryid, repositoryfileid, file, filedata, result) register a connectapi.repositoryfiledetail object to be returned when the matching updaterepositoryfile(communityid, repositoryid, repositoryfileid, file, filedata) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestupdaterepositoryfile(string communityid, string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file, connectapi.binaryinput filedata, connectapi.repositoryfiledetail result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. filedata type: connectapi.binaryinput the binary file. result type: connectapi.repositoryfiledetail object containing test data. 1211apex reference guide contenthub class return value type: void see also: updaterepositoryfile(repositoryid, repositoryfileid, file) apex developer guide: testing connectapi code settestupdaterepositoryfile(repositoryid, repositoryfileid, file, result) register a connectapi.repositoryfiledetail object to be returned when the matching updaterepository |
file(repositoryid, repositoryfileid, file) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestupdaterepositoryfile(string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file, connectapi.repositoryfiledetail result) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. result type: connectapi.repositoryfiledetail object containing test data. return value type: void see also: updaterepositoryfile(repositoryid, repositoryfileid, file, filedata) apex developer guide: testing connectapi code 1212apex reference guide contenthub class settestupdaterepositoryfile(repositoryid, repositoryfileid, file, filedata, result) register a connectapi.repositoryfiledetail object to be returned when the matching updaterepositoryfile(repositoryid, repositoryfileid, file, filedata) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestupdaterepositoryfile(string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file, connectapi.binaryinput filedata, connectapi.repositoryfiledetail result) parameters repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. filedata type: connectapi.binaryinput the binary file. result type: connectapi.repositoryfiledetail object containing test data. return value type: void see also: updaterepositoryfile(communityid, repositoryid, repositoryfileid, file) apex developer guide: testing connectapi code 1213apex reference guide conversationapplicationdefinition class settestupdaterepositoryfile(communityid, repositoryid, repositoryfileid, file, result) register a connectapi.repositoryfiledetail object to be returned when the matching updaterepositoryfile(communityid, repositoryid, repositoryfileid, file) method is called in a test context. use the method with the same parameters or you receive an exception. api version 40.0 signature public static void settestupdaterepositoryfile(string communityid, string repositoryid, string repositoryfileid, connectapi.contenthubiteminput file, connectapi.repositoryfiledetail result) parameters communityid type: string id for an experience cloud site, internal, or null. repositoryid type: string the id of the repository. repositoryfileid type: string the id of the repository file. file type: connectapi.contenthubiteminput the item type id and fields of the item type. result type: connectapi.repositoryfiledetail object containing test data. return value type: void see also: updaterepositoryfile(communityid, repositoryid, repositoryfileid, file, filedata) apex developer guide: testing connectapi code conversationapplicationdefinition class access information about a conversation application definition. 1214apex reference guide datacloud class namespace connectapi conversationapplicationdefinition methods the following are methods for conversationapplicationdefinition. all methods are static. in this section: getconversationapplicationdefinition(integrationname) get information about an integration’s conversation application definition and the associated bot. getconversationapplicationdefinition(integrationname) get information about an integration’s conversation application definition and the associated bot. api version 54.0 requires chatter no signature public static connectapi.conversationapplicationdefinitiondetailrespresentation getconversationapplicationdefinition(string integrationname) parameters integrationname type: string name of the conversation application. return value type: connectapi.conversationapplicationdefinitiondetailrespresentation usage to access this method, enable the bot feature, and the user |
must be an admin or have the manage bots or manage bots training data user permissions. datacloud class purchase data.com contact or company records, and retrieve purchase information. 1215apex reference guide datacloud class namespace connectapi note: when your data.com prospector or data.com clean contract expires, data.com features, objects, and fields will be removed from your org. to support customers’ needs around compliance and to remain a leader in trust and privacy, salesforce removed all contact data from the data.com service on february 1, 2021. for more information, see data.com prospector and clean retirement. in this section: datacloud methods the following are methods for datacloud. all methods are static. datacloud methods the following are methods for datacloud. all methods are static. in this section: getcompaniesfromorder(orderid, pagesize, page) get a list of purchased company records for an order. getcompany(companyid) get a company record. getcontact(contactid) get a contact. getcontactsfromorder(orderid, page, pagesize) get a list of purchased contacts for an order. getorder(orderid) get an order. getusage(userid) get purchase usage information for a user. postorder(orderinput) purchase records that are listed in an input file. getcompaniesfromorder(orderid, pagesize, page) get a list of purchased company records for an order. api version 32.0 requires chatter no 1216apex reference guide datacloud class signature public static connectapi.datacloudcompanies getcompaniesfromorder(string orderid, string pagesize, string page) parameters orderid type: string id of an order. page type: integer number of the page that you want returned. pagesize type: integer number of companies to show on a page. the default pagesize is 25. return value type: connectapi.datacloudcompanies getcompany(companyid) get a company record. api version 32.0 requires chatter no signature public static connectapi.datacloudcompany getcompany(string companyid) parameters companyid type: string id of a company in the data.com database. return value type: connectapi.datacloudcompany 1217apex reference guide datacloud class getcontact(contactid) get a contact. api version 32.0 requires chatter no signature public static connectapi.datacloudcontact getcontact(string contactid) parameters contactid type: string id of a contact in the data.com database. return value type: connectapi.datacloudcontact getcontactsfromorder(orderid, page, pagesize) get a list of purchased contacts for an order. api version 32.0 requires chatter no signature public static connectapi.datacloudcontacts getcontactsfromorder(string orderid, string page, string pagesize) parameters orderid type: string id of an order. page type: integer 1218apex reference guide datacloud class number of the page that you want returned. pagesize type: integer number of contacts to show on a page. the default pagesize is 25. return value type: connectapi.datacloudcontacts getorder(orderid) get an order. api version 32.0 requires chatter no signature public static connectapi.datacloudorder getorder(string orderid) parameters orderid type: string id of an order. return value type: connectapi.datacloudorder getusage(userid) get purchase usage information for a user. api version 32.0 requires chatter no signature public static connectapi.datacloudpurchaseusage getusage(string userid) 1219apex reference guide emailmergefieldservice class parameters userid type: string id of a user. return value type: connectapi.datacloudpurchaseusage postorder(orderinput) purchase records that are listed in an input file. api version 32.0 requires chatter no signature public static connectapi.datacloudorder postorder(connectapi.datacloudorderinput order |
input) parameters orderinput type: connectapi.datacloudorderinput a list that contains ids for the contacts or companies that you want to see. return value type: connectapi.datacloudorder example connectapi.datacloudorderinput inputorder=new connectapi.datacloudorderinput(); list<string> ids=new list<string>(); ids.add('1234'); inputorder.companyids=ids; connectapi.datacloudorder datacloudorderrep = connectapi.datacloud.postorder(inputorder); emailmergefieldservice class extract a list of merge fields for an object. a merge field is a field you can put in an email template, mail merge template, custom link, or formula to incorporate values from a record. 1220apex reference guide employeeprofiles class namespace connectapi emailmergefieldservice methods the following are methods for emailmergefieldservice. all methods are static. in this section: getmergefields(objectapinames) extract the merge fields for a specific object. getmergefields(objectapinames) extract the merge fields for a specific object. api version 39.0 requires chatter no signature public static connectapi.emailmergefieldinfo getmergefields(list<string> objectapinames) parameters objectapinames type: list<string> the api names for the objects being referenced. return value type: connectapi.emailmergefieldinfo employeeprofiles class get, set and crop, and delete employee banner photos and photos. namespace connectapi 1221apex reference guide employeeprofiles class employeeprofiles methods these methods are for employeeprofiles. all methods are static. in this section: deletebannerphoto(employeeid) delete an employee’s banner photo. deletephoto(employeeid) delete an employee’s photo. getbannerphoto(employeeid) get an employee’s banner photo. getphoto(employeeid) get an employee’s photo. setbannerphoto(employeeid, fileid, versionnumber) set an uploaded file as an employee’s banner photo. setbannerphoto(employeeid, fileupload) set a file that hasn’t been uploaded as an employee’s banner photo. setbannerphotowithattributes(employeeid, bannerphoto) set and crop an uploaded file as an employee’s banner photo. setbannerphotowithattributes(employeeid, bannerphoto, fileupload) set and crop a file that hasn’t been uploaded as an employee’s banner photo. setphoto(employeeid, fileid, versionnumber) set an uploaded file as an employee’s photo. setphoto(employeeid, fileupload) set a file that hasn’t been uploaded as an employee’s photo. setphotowithattributes(employeeid, photo) set and crop an uploaded file as an employee’s photo. setphotowithattributes(employeeid, photo, fileupload) set and crop a file that hasn’t been uploaded as an employee’s photo. deletebannerphoto(employeeid) delete an employee’s banner photo. api version 51.0 requires chatter no 1222apex reference guide employeeprofiles class signature public static void deletebannerphoto(string employeeid) parameters employeeid type: string id of the employee. return value type: void deletephoto(employeeid) delete an employee’s photo. api version 51.0 requires chatter no signature public static void deletephoto(string employeeid) parameters employeeid type: string id of the employee. return value type: void getbannerphoto(employeeid) get an employee’s banner photo. api version 51.0 requires chatter no 1223apex reference guide employeeprofiles class signature public static connectapi.bannerphoto getbannerphoto(string employeeid) parameters employeeid type: string id of the employee. return value type: connectapi.bannerphoto getphoto(employeeid) get an employee’s photo. api version 51.0 |
available to guest users 51.0 requires chatter no signature public static connectapi.photo getphoto(string employeeid) parameters employeeid type: string id of the employee. return value type: connectapi.photo setbannerphoto(employeeid, fileid, versionnumber) set an uploaded file as an employee’s banner photo. api version 51.0 1224apex reference guide employeeprofiles class requires chatter no signature public static connectapi.bannerphoto setbannerphoto(string employeeid, string fileid, integer versionnumber) parameters employeeid type: string id of the employee. fileid type: string id of the uploaded file to use as the employee banner photo. the file must be an image and be smaller than 2 gb. versionnumber type: integer version number of the file. specify an existing version number or, to get the latest version, specify null. return value type: connectapi.bannerphoto setbannerphoto(employeeid, fileupload) set a file that hasn’t been uploaded as an employee’s banner photo. api version 51.0 requires chatter no signature public static connectapi.bannerphoto setbannerphoto(string employeeid, connectapi.binaryinput fileupload) parameters employeeid type: string id of the employee. fileupload type: connectapi.binaryinput 1225apex reference guide employeeprofiles class 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. setbannerphotowithattributes(employeeid, bannerphoto) set and crop an uploaded file as an employee’s banner photo. api version 51.0 requires chatter no signature public static connectapi.bannerphoto setbannerphotowithattributes(string employeeid, connectapi.bannerphotoinput bannerphoto) parameters employeeid type: string id of the employee. 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(employeeid, bannerphoto, fileupload) set and crop a file that hasn’t been uploaded as an employee’s banner photo. 1226apex reference guide employeeprofiles class api version 51.0 requires chatter no signature public static connectapi.bannerphoto setbannerphotowithattributes(string employeeid, connectapi.bannerphotoinput bannerphoto, connectapi.binaryinput fileupload) parameters employeeid type: string id of the employee. 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(employeeid, fileid, versionnumber) set an uploaded file as an employee’s photo. api version 51.0 requires chatter no signature public static connectapi.photo setphoto(string employeeid, string fileid, integer versionnumber) 1227apex reference guide employeeprofiles class parameters employeeid type: string id of the employee. fileid type: string id of the uploaded file to use as the employee photo. the file must be an image and be smaller than 2 gb. versionnumber type: integer version number of the file. specify an existing version number or, to get the latest version, specify null. return value type: connectapi.photo usage photos are processed asynchronously and might not be visible right away. setphoto(employeeid, fileupload) set a file that hasn’t been uploaded as an employee’s photo. api version 51.0 requires chatter no sign |
ature public static connectapi.photo setphoto(string employeeid, connectapi.binaryinput fileupload) parameters employeeid type: string id of the employee. fileupload type: connectapi.binaryinput file to use as the photo. the content type must be usable as an image. 1228apex reference guide employeeprofiles class return value type: connectapi.photo usage photos are processed asynchronously and might not be visible right away. setphotowithattributes(employeeid, photo) set and crop an uploaded file as an employee’s photo. api version 51.0 requires chatter no signature public static connectapi.photo setphotowithattributes(string employeeid, connectapi.photoinput photo) parameters employeeid type: string id of the employee. photo type: connectapi.photoinput a connectapi.photoinput object specifying the file id, version number, and cropping parameters. return value type: connectapi.photo usage photos are processed asynchronously and might not be visible right away. setphotowithattributes(employeeid, photo, fileupload) set and crop a file that hasn’t been uploaded as an employee’s photo. api version 51.0 1229apex reference guide externalemailservices class requires chatter no signature public static connectapi.photo setphotowithattributes(string employeeid, connectapi.photoinput photo, connectapi.binaryinput fileupload) parameters employeeid type: string id of the employee. 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. externalemailservices class access information about integration with external email services, such as sending email within salesforce through an external email account. namespace connectapi external email services methods the following are methods for externalemailservice. all methods are static. in this section: getuseroauthinfo(landingpage) get information about whether an external email service has been authorized to send email on behalf of a user. 1230apex reference guide externalmanagedaccount class getuseroauthinfo(landingpage) get information about whether an external email service has been authorized to send email on behalf of a user. api version 37.0 requires chatter no signature public static getuseroauthinfo(string landingpage) parameters landingpage type: string the landing page that the user starts on when they are finished with the oauth authorization process. return value type: connectapi.useroauthinfo see also: apex developer guide: testing connectapi code externalmanagedaccount class get externally managed accounts. namespace connectapi externalmanagedaccount methods these methods are for externalmanagedaccount. all methods are static. in this section: getcommunitiesexternalmanagedaccounts(communityid) get externally managed accounts available to the context user across all experience cloud sites. getcommunitiesexternalmanagedaccounts(communityid, includemyaccount) get externally managed accounts available to the context user, including the context user’s account, across all experience cloud sites. 1231apex reference guide externalmanagedaccount class getexternalmanagedaccounts(webstoreid) get externally managed accounts for a store. getexternalmanagedaccounts(webstoreid, includemyaccount) get externally managed accounts, including the context user’s account, for a store. getcommunitiesexternalmanagedaccounts(communityid) get externally managed accounts available to the context user across all experience cloud sites. api version 50.0 requires chatter no signature public static connectapi.externalmanagedaccountcollectionoutput getcommunitiesexternalmanagedaccounts(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. note: regardless of the id specified, this method returns externally managed accounts available to the context user across all experience cloud sites. return value type: connectapi.externalmanagedaccountcollectionoutput getcommunitiesexternalmanagedaccounts(communityid, includemyaccount |
) get externally managed accounts available to the context user, including the context user’s account, across all experience cloud sites. api version 53.0 requires chatter no 1232 |
apex reference guide externalmanagedaccount class signature public static connectapi.externalmanagedaccountcollectionoutput getcommunitiesexternalmanagedaccounts(string communityid, boolean includemyaccount) parameters communityid type: string id for an experience cloud site, internal, or null. note: regardless of the id specified, this method returns externally managed accounts available to the context user across all experience cloud sites. includemyaccount type: boolean specifies whether to return the context user’s account (true) or not (false). the default value is false. return value type: connectapi.externalmanagedaccountcollectionoutput getexternalmanagedaccounts(webstoreid) get externally managed accounts for a store. api version 49.0 requires chatter no signature public static connectapi.externalmanagedaccountcollectionoutput getexternalmanagedaccounts(string webstoreid) parameters webstoreid type: string id of the webstore. return value type: connectapi.externalmanagedaccountcollectionoutput 1233apex reference guide fieldservice class getexternalmanagedaccounts(webstoreid, includemyaccount) get externally managed accounts, including the context user’s account, for a store. api version 53.0 requires chatter no signature public static connectapi.externalmanagedaccountcollectionoutput getexternalmanagedaccounts(string webstoreid, boolean includemyaccount) parameters webstoreid type: string id of the webstore. includemyaccount type: boolean specifies whether to return the context user’s account (true) or not (false). the default value is false. return value type: connectapi.externalmanagedaccountcollectionoutput fieldservice class preview and create shifts from a pattern or filter fields on recordset filter criteria. namespace connectapi fieldservice methods these methods are for fieldservice. all methods are static. in this section: createshiftsfrompattern(shiftsfrompatterninput, shiftpatternid) create up to 2,000 shifts from a pattern. evaluaterecordsetfiltercriteria(recordsetfiltercriteriainput) filter records on recordset filter criteria. 1234apex reference guide fieldservice class previewshiftsfrompattern(shiftsfrompatterninput, shiftpatternid) preview up to 2,000 shifts from a pattern. createshiftsfrompattern(shiftsfrompatterninput, shiftpatternid) create up to 2,000 shifts from a pattern. api version 51.0 requires chatter yes signature public static connectapi.shiftsfrompattern createshiftsfrompattern(connectapi.shiftsfrompatterninput shiftsfrompatterninput, string shiftpatternid) parameters shiftsfrompatterninput type: connectapi.shiftsfrompatterninput a connectapi.shiftsfrompatterninput object providing the pattern. shiftpatternid type: string id of the shift pattern. return value type: connectapi.shiftsfrompattern evaluaterecordsetfiltercriteria(recordsetfiltercriteriainput) filter records on recordset filter criteria. api version 53.0 requires chatter no 1235apex reference guide fieldservice class signature public static connectapi.recordsetfiltercriteriaoutput evaluaterecordsetfiltercriteria(connectapi.recordsetfiltercriteriainput recordsetfiltercriteriainput) parameters recordsetfiltercriteriainput type: connectapi.recordsetfiltercriteriainput an connectapi.recordsetfiltercriteriainput object providing a set of recordset filter criteria and records. return value type: connectapi.recordsetfiltercriteriaoutput usage field service must be enabled. previewshiftsfrompattern(shiftsfrompatterninput, shiftpatternid) preview up to 2,000 shifts from a pattern. api version 51.0 requires chatter yes signature public static connectapi.shiftsfrompattern previewshiftsfrompattern(connectapi.shiftsfrompatterninput shiftsfrompatterninput, string shiftpatternid) parameters shiftsfrompatterninput type: connectapi.shiftsfrompatterninput a connectapi.shiftsfrompatterninput object providing the pattern. shiftpatternid type: string id of the shift pattern. return value type: connectapi.shiftsfrompattern 1236apex reference guide fulfillmentorder class fulfillmentorder class f |
ulfill orders in order management. namespace connectapi fulfillmentorder methods the following are methods for fulfillmentorder. all methods are static. in this section: cancelfulfillmentorderlineitems(fulfillmentorderid, cancelfulfillmentorderlineitemsinput) cancel fulfillmentorderlineitems from a fulfillmentorder. this action doesn’t cancel the associated orderitemsummaries, so reallocate the canceled quantities to a new fulfillmentorder. createfulfillmentorders(fulfillmentorderinput) create one or more fulfillmentorders and fulfillmentorderlineitems for an orderdeliverygroupsummary, which defines a delivery method and recipient for an ordersummary. you specify the orderitemsummaries to allocate, which can be fulfilled from different locations. specifying multiple fulfillment groups creates one fulfillmentorder for each location. for each orderitemsummary, a fulfillmentorderlineitem is created and assigned to the corresponding fulfillmentorder. createinvoice(fulfillmentorderid, invoiceinput) create an invoice for a fulfillmentorder that doesn’t have one. createmultiplefulfillmentorder(multiplefulfillmentorderinput) create fulfillmentorders for multiple orderdeliverygroups in a single request. createmultipleinvoices(invoicesinput) create invoices for multiple fulfillmentorders. cancelfulfillmentorderlineitems(fulfillmentorderid, cancelfulfillmentorderlineitemsinput) cancel fulfillmentorderlineitems from a fulfillmentorder. this action doesn’t cancel the associated orderitemsummaries, so reallocate the canceled quantities to a new fulfillmentorder. api version 48.0 requires chatter no signature public static connectapi.fulfillmentordercancellineitemsoutputrepresentation cancelfulfillmentorderlineitems(string fulfillmentorderid, 1237apex reference guide fulfillmentorder class connectapi.fulfillmentorderlineitemstocancelinputrepresentation cancelfulfillmentorderlineitemsinput) parameters fulfillmentorderid type: string id of the fulfilllmentorder. cancelfulfillmentorderlineitemsinput type: connectapi.fulfillmentorderlineitemstocancelinputrepresentation list of fulfillmentorderlineitems to cancel. return value type: connectapi.fulfillmentordercancellineitemsoutputrepresentation example string fulfillmentorderid = '0a3xx0000000085aaa'; list<connectapi.fulfillmentorderlineiteminputrepresentation> itemtocancellist = new list<connectapi.fulfillmentorderlineiteminputrepresentation>(); for(fulfillmentorderlineitem fulfillmentorderlineitem : fulfillmentorder.fulfillmentorderlineitems){ connectapi.fulfillmentorderlineiteminputrepresentation itemtocancel = new connectapi.fulfillmentorderlineiteminputrepresentation(); itemtocancel.fulfillmentorderlineitemid = fulfillmentorderlineitem.id; itemtocancel.quantity = 1; itemtocancellist.add(itemtocancel); } connectapi.fulfillmentorderlineitemstocancelinputrepresentation input = new connectapi.fulfillmentorderlineitemstocancelinputrepresentation(); input.fulfillmentorderlineitemstocancel = itemtocancellist; connectapi.fulfillmentordercancellineitemsoutputrepresentation result = connectapi.fulfillmentorder.cancelfulfillmentorderlineitems(fulfillmentorderid, input); createfulfillmentorders(fulfillmentorderinput) create one or more fulfillmentorders and fulfillmentorderlineitems for an orderdeliverygroupsummary, which defines a delivery method and recipient for an ordersummary. you specify the orderitemsummaries to allocate, which can be fulfilled from different locations. specifying multiple fulfillment groups creates one fulfillmentorder for each location. for each orderitemsummary, a fulfillmentorderlineitem is created and assigned to the corresponding fulfillmentorder. api version 48.0 1238apex reference guide fulfillmentorder class requires chatter no signature public |
static connectapi.fulfillmentorderoutputrepresentation createfulfillmentorders(connectapi.fulfillmentorderinputrepresentation fulfillmentorderinput) parameters fulfillmentorderinput type: connectapi.fulfillmentorderinputrepresentation orderitemsummaries to allocate, with location and delivery information. return value type: connectapi.fulfillmentorderoutputrepresentation example string ordersummaryid = '1osxx0000004ccg'; string fulfillmenttype = 'warehouse'; string warehousefromlocationid = [select id from location where locationtype='warehouse' limit 1].id; connectapi.fulfillmentorderinputrepresentation fulfillmentorderinput = new connectapi.fulfillmentorderinputrepresentation(); fulfillmentorderinput.ordersummaryid = ordersummaryid; list<orderdeliverygroupsummary> orderdeliverygroupsummarylist = [select id from orderdeliverygroupsummary where ordersummaryid =: ordersummaryid]; for (orderdeliverygroupsummary orderdeliverygroupsummary: orderdeliverygroupsummarylist){ fulfillmentorderinput.orderdeliverygroupsummaryid = orderdeliverygroupsummary.id; list<connectapi.fulfillmentgroupinputrepresentation> fulfillmentgroups = new list<connectapi.fulfillmentgroupinputrepresentation>(); connectapi.fulfillmentgroupinputrepresentation fulfillmentgroup = new connectapi.fulfillmentgroupinputrepresentation(); fulfillmentgroup.fulfilledfromlocationid = warehousefromlocationid; fulfillmentgroup.fulfillmenttype = fulfillmenttype; list<connectapi.orderitemsummaryinputrepresentation> orderitemsummaries = new list<connectapi.orderitemsummaryinputrepresentation>(); list<orderitemsummary> orderitemsummarylist = [select id, quantity from orderitemsummary where ordersummaryid =: ordersummaryid and orderdeliverygroupsummaryid =: orderdeliverygroupsummary.id]; for(orderitemsummary orderitemsummary : orderitemsummarylist){ 1239apex reference guide fulfillmentorder class connectapi.orderitemsummaryinputrepresentation oisinputrepresentation = new connectapi.orderitemsummaryinputrepresentation(); oisinputrepresentation.orderitemsummaryid = orderitemsummary.id; oisinputrepresentation.quantity = orderitemsummary.quantity; orderitemsummaries.add(oisinputrepresentation); } fulfillmentgroup.orderitemsummaries = orderitemsummaries; fulfillmentgroups.add(fulfillmentgroup); fulfillmentorderinput.fulfillmentgroups = fulfillmentgroups; } connectapi.fulfillmentorderoutputrepresentation result = connectapi.fulfillmentorder.createfulfillmentorders(fulfillmentorderinput); createinvoice(fulfillmentorderid, invoiceinput) create an invoice for a fulfillmentorder that doesn’t have one. api version 48.0 requires chatter no signature public static connectapi.fulfillmentorderinvoiceoutputrepresentation createinvoice(string fulfillmentorderid, connectapi.fulfillmentorderinvoiceinputrepresentation invoiceinput) parameters fulfillmentorderid type: string id of the fulfillmentorder. invoiceinput type: connectapi.fulfillmentorderinvoiceinputrepresentation required input with no data. return value type: connectapi.fulfillmentorderinvoiceoutputrepresentation example string fulfillmentorderid = '0a3xx0000000085aaa'; 1240apex reference guide fulfillmentorder class connectapi.fulfillmentorderinvoiceinputrepresentation input = new connectapi.fulfillmentorderinvoiceinputrepresentation(); connectapi.fulfillmentorderinvoiceoutputrepresentation result = connectapi.fulfillmentorder.createinvoice(fulfillmentorderid, input); createmultiplefulfillmentorder(multiplefulfillmentorderinput) create fulfillmentorders for multiple orderdeliverygroups in a single request. api version 50.0 requires chatter no signature public static connectapi.multiplefulfillmentorderoutputrepresentation createmultiplefulfillmentorder(connectapi.multiplefulfillmentorderinputrepresentation multiplefulfillmentorderinput) parameters multiplefulfillmentorder |
input type: connectapi.multiplefulfillmentorderinputrepresentation wraps a list of inputs for creating fulfillment orders. return value type: connectapi.multiplefulfillmentorderoutputrepresentation createmultipleinvoices(invoicesinput) create invoices for multiple fulfillmentorders. api version 52.0 requires chatter no signature public static connectapi.multiplefulfillmentorderinvoicesoutputrepresentation createmultipleinvoices(connectapi.multiplefulfillmentorderinvoicesinputrepresentation invoicesinput) 1241apex reference guide knowledge class parameters invoicesinput type: connectapi.multiplefulfillmentorderinvoicesinputrepresentation the fulfillmentorders to create invoices for. return value type: connectapi.multiplefulfillmentorderinvoicesoutputrepresentation knowledge class get information about trending articles in experience cloud sites. namespace connectapi knowledge methods the following are methods for knowledge. all methods are static. in this section: gettopviewedarticlesfortopic(communityid, topicid, maxresults) get the top viewed articles for a topic. gettrendingarticles(communityid, maxresults) get trending articles for an experience cloud site. gettrendingarticlesfortopic(communityid, topicid, maxresults) get the trending articles for a topic in an experience cloud site. gettopviewedarticlesfortopic(communityid, topicid, maxresults) get the top viewed articles for a topic. api version 41.0 available to guest users 41.0 requires chatter no 1242apex reference guide knowledge class signature public static connectapi.knowledgearticleversioncollection gettopviewedarticlesfortopic(string communityid, string topicid, integer maxresults) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id of the topic. maxresults type: integer the maximum number of articles returned for each topic id. values can be from 1 to 25. the default value is 5. return value type: connectapi.knowledgearticleversioncollection gettrendingarticles(communityid, maxresults) get trending articles for an experience cloud site. api version 36.0 available to guest users 36.0 requires chatter no signature public static connectapi.knowledgearticleversioncollection gettrendingarticles(string communityid, integer maxresults) parameters communityid type: string id for an experience cloud site, internal, or null. maxresults type: integer 1243apex reference guide knowledge class the maximum number of articles returned. values can be from 0 to 25. default is 5. return value type: connectapi.knowledgearticleversioncollection 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: settestgettrendingarticles(communityid, maxresults, result) apex developer guide: testing connectapi code gettrendingarticlesfortopic(communityid, topicid, maxresults) get the trending articles for a topic in an experience cloud site. api version 36.0 available to guest users 36.0 requires chatter no signature public static connectapi.knowledgearticleversioncollection gettrendingarticlesfortopic(string communityid, string topicid, integer maxresults) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id of the topic. maxresults type: integer the maximum number of articles returned. values can be from 0 to 25. default is 5. 1244apex reference guide knowledge class return value type: connectapi.knowledgearticleversioncollection 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: settestgettrendingarticlesfortopic(communityid, topicid, maxresults, result) apex developer guide: testing connectapi code knowledge test methods the following are the test methods for knowledge. all methods are static. for information about using these methods |
to test your connectapi code, see testing connectapi code. settestgettrendingarticles(communityid, maxresults, result) register a connectapi.knowledgeversionarticlecollection object to be returned when the matching connectapi.gettrendingarticles method is called in a test context. use the method with the same parameters or you receive an exception. api version 36.0 signature public static void settestgettrendingarticles(string communityid, integer maxresults, connectapi.knowledgearticleversioncollection result) parameters communityid type: string id for an experience cloud site, internal, or null. maxresults type: integer the maximum number of articles returned. values can be from 0 to 25. default is 5. result type: connectapi.knowledgearticleversioncollection object containing test data. 1245apex reference guide knowledge class return value type: void see also: gettrendingarticles(communityid, maxresults) apex developer guide: testing connectapi code settestgettrendingarticlesfortopic(communityid, topicid, maxresults, result) register a connectapi.knowledgeversionarticlecollection object to be returned when the matching connectapi.gettrendingarticlesfortopic method is called in a test context. use the method with the same parameters or you receive an exception. api version 36.0 signature public static void settestgettrendingarticlesfortopic(string communityid, string topicid, integer maxresults, connectapi.knowledgearticleversioncollection result) parameters communityid type: string id for an experience cloud site, internal, or null. topicid type: string id of the topic. maxresults type: integer the maximum number of articles returned. values can be from 0 to 25. default is 5. result type: connectapi.knowledgearticleversioncollection object containing test data. return value type: void see also: gettrendingarticlesfortopic(communityid, topicid, maxresults) apex developer guide: testing connectapi code 1246apex reference guide lightningscheduler class lightningscheduler class create and update service appointments. namespace connectapi lightningscheduler methods the following are methods for lightningscheduler. all methods are static. in this section: createserviceappointment(createserviceappointmentinput) create a service appointment. updateserviceappointment(updateserviceappointmentinput) update a service appointment. createserviceappointment(createserviceappointmentinput) create a service appointment. api version 53.0 requires chatter no signature public static connectapi.serviceappointmentoutput createserviceappointment(connectapi.createserviceappointmentinput createserviceappointmentinput) parameters createserviceappointmentinput type: connectapi.createserviceappointmentinput input parameters to create a service appointment. return value type: connectapi.serviceappointmentoutput 1247apex reference guide lightningscheduler class usage considerations for using engagement channel types with the service-appointments resource: • enable schedule appointments using engagement channels in salesforce scheduler settings in your salesforce org. • when you create or modify appointments, shifts must be defined in the scheduling policy. for more information on setting up shifts in the scheduling policy, see define shift rules in scheduling policy. note: engagement channel types are not supported with operating hours rules in the scheduling policy. • when you use engagement channel type and shifts to create a service appointment, salesforce scheduler considers the default value for the appointment type (if not specified). however, salesforce scheduler only considers the engagement channel type and appointment type is ignored. example for an account (existing user): connectapi.extendedfieldinput extendedfieldemail = new connectapi.extendedfieldinput(); extendedfieldemail.name = 'email'; extendedfieldemail.value = '[email protected]'; connectapi.extendedfieldinput extendedfieldphone = new connectapi.extendedfieldinput(); extendedfieldphone.name = 'phone'; extendedfieldphone.value = '1234567890'; list<connectapi.extendedfieldinput> extendedfieldlist = new list<connectapi.extendedfieldinput>(); extendedfieldlist.add(extendedfieldemail); extendedfieldlist |
.add(extendedfieldphone); connectapi.serviceappointmentinput serviceappinput = new connectapi.serviceappointmentinput(); serviceappinput.extendedfields = extendedfieldlist; serviceappinput.engagementchanneltypeid = '0efrm00000000bv2ai'; serviceappinput.serviceterritoryid = '0hhxx0000004c92cae'; serviceappinput.worktypeid = '08qxx0000004c92aae'; serviceappinput.parentrecordid = '001xx000003gyr1aao'; serviceappinput.schedstarttime = datetime.valueof('2021-05-28 12:15:00'); serviceappinput.schedendtime = datetime.valueof('2021-05-28 12:45:00'); connectapi.assignedresourcesinput asresourceinput = new connectapi.assignedresourcesinput(); asresourceinput.serviceresourceid = '0hnxx0000004caicam'; asresourceinput.isrequiredresource = true; asresourceinput.isprimaryresource = true; list<connectapi.assignedresourcesinput> asresourceinputlist = new list<connectapi.assignedresourcesinput>(); asresourceinputlist.add(asresourceinput); connectapi.createserviceappointmentinput createinput = new connectapi.createserviceappointmentinput(); createinput.serviceappointment = serviceappinput; createinput.assignedresources = asresourceinputlist; 1248apex reference guide lightningscheduler class try{ connectapi.serviceappointmentoutput appointmentresult = connectapi.lightningscheduler.createserviceappointment(createinput); string serviceappointmentid = appointmentresult.result.serviceappointmentid; list<string> assignedresourceids = appointmentresult.result.assignedresourceids; }catch(connectapi.connectapiexception ex){ //handle exception } for a lead (authenticated guest user): connectapi.leadinput leadinput = new connectapi.leadinput(); leadinput.firstname = 'rachel'; leadinput.lastname = 'adams'; leadinput.phone = '012-345-6789'; leadinput.email = '[email protected]'; leadinput.company = 'salesforce'; connectapi.extendedfieldinput extendedfieldemail = new connectapi.extendedfieldinput(); extendedfieldemail.name = 'email'; extendedfieldemail.value = '[email protected]'; connectapi.extendedfieldinput extendedfieldphone = new connectapi.extendedfieldinput(); extendedfieldphone.name = 'phone'; extendedfieldphone.value = '1234567890'; list<connectapi.extendedfieldinput> extendedfieldlist = new list<connectapi.extendedfieldinput>(); extendedfieldlist.add(extendedfieldemail); extendedfieldlist.add(extendedfieldphone); connectapi.serviceappointmentinput serviceappinput = new connectapi.serviceappointmentinput(); serviceappinput.extendedfields = extendedfieldlist; serviceappinput.engagementchanneltypeid = '0efrm00000000bv2ai'; serviceappinput.serviceterritoryid = '0hhxx0000004c92cae'; serviceappinput.worktypeid = '08qxx0000004c92aae'; serviceappinput.schedstarttime = datetime.valueof('2021-05-28 12:15:00'); serviceappinput.schedendtime = datetime.valueof('2021-05-28 12:45:00'); connectapi.assignedresourcesinput asresourceinput = new connectapi.assignedresourcesinput(); asresourceinput.serviceresourceid = '0hnxx0000004caicam'; asresourceinput.isrequiredresource = true; asresourceinput.isprimaryresource = true; list<connectapi.assignedresourcesinput> asresourceinputlist = new list<connectapi.assignedresourcesinput>(); asresourceinputlist.add(asresourceinput); connectapi.createserviceappointmentinput createinput = new connectapi.createserviceappointmentinput(); createinput.serviceappointment = serviceappinput; createinput.assignedresources = asresourceinputlist; 1249apex |
reference guide lightningscheduler class createinput.lead = leadinput; try{ connectapi.serviceappointmentoutput appointmentresult = connectapi.lightningscheduler.createserviceappointment(createinput); string serviceappointmentid = appointmentresult.result.serviceappointmentid; list<string> assignedresourceids = appointmentresult.result.assignedresourceids; }catch(connectapi.connectapiexception ex){ //handle exception } see also: service appointments updateserviceappointment(updateserviceappointmentinput) update a service appointment. api version 53.0 requires chatter no signature public static connectapi.serviceappointmentoutput updateserviceappointment(connectapi.updateserviceappointmentinput updateserviceappointmentinput) parameters updateserviceappointmentinput type: connectapi.updateserviceappointmentinput input parameters to update a service appointment. return value type: connectapi.serviceappointmentoutput usage considerations for using engagement channel types with the service-appointments resource: • enable schedule appointments using engagement channels in salesforce scheduler settings in your salesforce org. • when you create or modify appointments, shifts must be defined in the scheduling policy. for more information on setting up shifts in the scheduling policy, see define shift rules in scheduling policy. 1250apex reference guide lightningscheduler class note: engagement channel types are not supported with operating hours rules in the scheduling policy. • when you use engagement channel type and shifts to modify an appointment, salesforce scheduler considers the default value for the appointment type (if not specified). however, salesforce scheduler only considers the engagement channel type and appointment type is ignored. example connectapi.extendedfieldinput extendedfieldemail = new connectapi.extendedfieldinput(); extendedfieldemail.name = 'email'; extendedfieldemail.value = '[email protected]'; connectapi.extendedfieldinput extendedfieldphone = new connectapi.extendedfieldinput(); extendedfieldphone.name = 'phone'; extendedfieldphone.value = '0123456789'; connectapi.extendedfieldinput extendedfieldstatus = new connectapi.extendedfieldinput(); extendedfieldstatus.name = 'status'; extendedfieldstatus.value = 'none'; list<connectapi.extendedfieldinput> extendedfieldlist = new list<connectapi.extendedfieldinput>(); extendedfieldlist.add(extendedfieldemail); extendedfieldlist.add(extendedfieldphone); extendedfieldlist.add(extendedfieldstatus); connectapi.serviceappointmentinput serviceappinput = new connectapi.serviceappointmentinput(); serviceappinput.extendedfields = extendedfieldlist; serviceappinput.serviceterritoryid = '0hhxx0000004c92cae'; serviceappinput.worktypeid = '08qxx0000004c92aae'; serviceappinput.schedstarttime = datetime.valueof('2021-05-28 12:15:00'); serviceappinput.schedendtime = datetime.valueof('2021-05-28 12:45:00'); connectapi.assignedresourcesinput asresourceinput = new connectapi.assignedresourcesinput(); asresourceinput.serviceresourceid = '0hnxx0000004caicam'; asresourceinput.isrequiredresource = true; asresourceinput.isprimaryresource = true; //multi-resource connectapi.assignedresourcesinput asresourceinputreq = new connectapi.assignedresourcesinput(); asresourceinputreq.serviceresourceid = '0hnxx0000004cagcam'; asresourceinputreq.isrequiredresource = true; asresourceinputreq.isprimaryresource = false; list<connectapi.assignedresourcesinput> asresourceinputlist = new list<connectapi.assignedresourcesinput>(); asresourceinputlist.add(asresourceinput); asresourceinputlist.add(asresourceinputreq); connectapi.updateserviceappointmentinput updateinput = new 1251apex reference guide managedcontent class connectapi.updateserviceappointmentinput(); updateinput.serviceappointment = serviceappinput; updateinput.assignedresources = asresourceinputlist; updateinput. |
serviceappointmentid = '08pxx0000004cyqaam'; try{ connectapi.serviceappointmentoutput appointmentresult = connectapi.lightningscheduler.updateserviceappointment(updateinput); string serviceappointmentid = appointmentresult.result.serviceappointmentid; list<string> assignedresourceids = appointmentresult.result.assignedresourceids; }catch(connectapi.connectapiexception ex){ //handle exception } see also: service appointments managedcontent class get managed content versions. get a managed content space. namespace connectapi managedcontent methods the following are methods for managedcontent. all methods are static. in this section: getallcontent(channelid, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate) get all managed content versions for a channel. getallcontent(channelid, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate, showabsoluteurl) get all managed content versions for a channel with absolute urls. getalldeliverychannels(pageparam, pagesize) get managed content delivery channels for the context user. getallmanagedcontent(communityid, pageparam, pagesize, language, managedcontenttype) get all managed content versions for an experience cloud site. getallmanagedcontent(communityid, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get all managed content versions for an experience cloud site with absolute urls. getcontentbycontentkeys(channelid, contentkeys, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate, showabsoluteurl) get managed content versions for a channel using a list of content keys. 1252apex reference guide managedcontent class getcontentbyids(channelid, managedcontentids, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate) get managed content versions for a channel using a list of managed content ids. getcontentbyids(channelid, managedcontentids, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate, showabsoluteurl) get managed content versions for a channel with absolute urls using a list of managed content ids. getmanagedcontentbycontentkeys(communityid, contentkeys, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions for an experience cloud site using a list of content keys. getmanagedcontentbyids(communityid, managedcontentids, pageparam, pagesize, language, managedcontenttype) get managed content versions for an experience cloud site using a list of managed content ids. getmanagedcontentbyids(communityid, managedcontentids, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions for an experience cloud site with absolute urls using a list of managed content ids. getmanagedcontentbytopics(communityid, topics, pageparam, pagesize, language, managedcontenttype) get managed content versions using a list of content topic names. getmanagedcontentbytopics(communityid, topics, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions with absolute urls using a list of content topic names. getmanagedcontentbytopicsandcontentkeys(communityid, contentkeys, topics, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions using a list of content keys and content topic names. getmanagedcontentbytopicsandids(communityid, managedcontentids, topics, pageparam, pagesize, language, managedcontenttype) get managed content versions using a list of managed content ids and content topic names. getmanagedcontentbytopicsandids(communityid, managedcontentids, topics, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions with absolute urls using a list of managed content ids and content topic names. getmanagedcontentspace(contentspaceid) get a managed content space. getallcontent(channelid, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate) get all managed content versions for a channel. api version 48.0 available to guest users 48.0 1253apex reference guide managedcontent class requires ch |
atter no signature public static connectapi.managedcontentversioncollection getallcontent(string channelid, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean includemetadata, string startdate, string enddate) parameters channelid type: string id of the channel. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. includemetadata type: boolean specifies whether to include metadata in the response (true) or not (false). the default value is false. startdate type: string publish start date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. enddate type: string publish end date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. return value type: connectapi.managedcontentversioncollection 1254apex reference guide managedcontent class getallcontent(channelid, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate, showabsoluteurl) get all managed content versions for a channel with absolute urls. api version 50.0 available to guest users 50.0 requires chatter no signature public static connectapi.managedcontentversioncollection getallcontent(string channelid, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean includemetadata, string startdate, string enddate, boolean showabsoluteurl) parameters channelid type: string id of the channel. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. includemetadata type: boolean specifies whether to include metadata in the response (true) or not (false). the default value is false. 1255apex reference guide managedcontent class startdate type: string publish start date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. enddate type: string publish end date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. 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.managedcontentversioncollection getalldeliverychannels(pageparam, pagesize) get managed content delivery channels for the context user. api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.managedcontentchannelcollection getalldeliverychannels(integer pageparam, integer pagesize) parameters 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. return value type: connectapi.managedcontentchannelcollection 1256apex reference guide managedcontent class getallmanagedcontent(communityid, pageparam, pagesize, language, managedcontenttype) get all managed content versions for an experience cloud site. api version 47.0 available to guest users 47.0 requires chatter no signature public static connectapi.managedcontentversioncollection getallmanagedcontent(string communityid, integer pageparam, integer pagesize, string language, string managedcontenttype) parameters communityid type: string id of the experience cloud site. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. return value type: connectapi.managedcontentversioncollection 1257apex reference guide managedcontent class getallmanagedcontent(communityid, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get all managed content versions for an experience cloud site with absolute urls. api version 50.0 available to guest users 50.0 requires chatter no signature public static connectapi.managedcontentversioncollection getallmanagedcontent(string communityid, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean showabsoluteurl) parameters communityid type: string id of the experience cloud site. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. showabsoluteurl type: boolean specifies whether to show absolute urls in the output class (true) or not (false). the default value is false. 1258apex reference guide managedcontent class return value type: connectapi.managedcontentversioncollection getcontentbycontentkeys(channelid, contentkeys, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate, showabsoluteurl) get managed content versions for a channel using a list of content keys. api version 51.0 available to guest users 51.0 requires chatter no signature public static connectapi.managedcontentversioncollection getcontentbycontentkeys(string channelid, list<string> contentkeys, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean includemetadata, string startdate, string enddate, boolean showabsoluteurl) parameters channelid type: string id of the channel. contentkeys type: list<string> list of up to 50 content keys for the managed content. a content key is a universally unique identifier (uuid) such as mca4ccv5qs2bab5h7yrcrptcwgzq. 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. for performance |
reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. language type: string 1259apex reference guide managedcontent class language locale for the managed content, for example, en_us. if the requested translation isn’t available, the language defaults to the context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. includemetadata type: boolean specifies whether to include metadata in the response (true) or not (false). the default value is false. startdate type: string publish start date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. enddate type: string publish end date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. 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.managedcontentversioncollection getcontentbyids(channelid, managedcontentids, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate) get managed content versions for a channel using a list of managed content ids. api version 48.0 available to guest users 48.0 requires chatter no signature public static connectapi.managedcontentversioncollection getcontentbyids(string channelid, list<string> managedcontentids, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean includemetadata, string startdate, string enddate) 1260apex reference guide managedcontent class parameters channelid type: string id of the channel. managedcontentids type: list<string> comma-separated list of managed content ids. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. includemetadata type: boolean specifies whether to include metadata in the response (true) or not (false). the default value is false. startdate type: string publish start date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. enddate type: string publish end date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. return value type: connectapi.managedcontentversioncollection getcontentbyids(channelid, managedcontentids, pageparam, pagesize, language, managedcontenttype, includemetadata, startdate, enddate, showabsoluteurl) get managed content versions for a channel with absolute urls using a list of managed content ids. 1261apex reference guide managedcontent class api version 50.0 available to guest users 50.0 requires chatter no signature public static connectapi.managedcontentversioncollection getcontentbyids(string channelid, list<string> managedcontentids, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean includemetadata, string startdate, string enddate, boolean showabsoluteurl) parameters channelid type: string id of the channel. managedcontentids type: list<string> comma-separated list of managed content ids. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. includemetadata type: boolean specifies whether to include metadata in the response (true) or not (false). the default value is false. 1262apex reference guide managedcontent class startdate type: string publish start date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. enddate type: string publish end date in iso 8601 format, for example, 2011-02-25t18:24:31.000z. 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.managedcontentversioncollection getmanagedcontentbycontentkeys(communityid, contentkeys, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions for an experience cloud site using a list of content keys. api version 51.0 available to guest users 51.0 requires chatter no signature public static connectapi.managedcontentversioncollection getmanagedcontentbycontentkeys(string communityid, list<string> contentkeys, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean showabsoluteurl) parameters communityid type: string id of the experience cloud site. contentkeys type: list<string> list of up to 50 content keys for the managed content. a content key is a universally unique identifier (uuid) such as mca4ccv5qs2bab5h7yrcrptcwgzq. 1263apex reference guide managedcontent class pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 250. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. 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.managedcontentversioncollection getmanagedcontentbyids(communityid, managedcontentids, pageparam, pagesize, language, managedcontenttype) get managed content versions for an experience cloud site using a list of managed content ids. api version 47.0 available to guest users 47.0 requires chatter no signature public static connectapi.managedcontentversioncollection getmanagedcontentbyids(string communityid, list<string> managedcontentids, integer pageparam, integer pagesize, string language, string managedcontenttype) 1264apex reference guide managedcontent class parameters communityid type: string id of the experience cloud site. managedcontentids type: list<string> comma-separated list of managed content ids. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size |
is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. return value type: connectapi.managedcontentversioncollection getmanagedcontentbyids(communityid, managedcontentids, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions for an experience cloud site with absolute urls using a list of managed content ids. api version 50.0 available to guest users 50.0 requires chatter no 1265apex reference guide managedcontent class signature public static connectapi.managedcontentversioncollection getmanagedcontentbyids(string communityid, list<string> managedcontentids, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean showabsoluteurl) parameters communityid type: string id of the experience cloud site. managedcontentids type: list<string> comma-separated list of managed content ids. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. 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.managedcontentversioncollection getmanagedcontentbytopics(communityid, topics, pageparam, pagesize, language, managedcontenttype) get managed content versions using a list of content topic names. api version 47.0 1266apex reference guide managedcontent class available to guest users 47.0 requires chatter no signature public static connectapi.managedcontentversioncollection getmanagedcontentbytopics(string communityid, list<string> topics, integer pageparam, integer pagesize, string language, string managedcontenttype) parameters communityid type: string id of the experience cloud site. topics type: list<string> comma-separated list of up to 15 content topic names. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. return value type: connectapi.managedcontentversioncollection getmanagedcontentbytopics(communityid, topics, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions with absolute urls using a list of content topic names. 1267apex reference guide managedcontent class api version 50.0 available to guest users 50.0 requires chatter no signature public static connectapi.managedcontentversioncollection getmanagedcontentbytopics(string communityid, list<string> topics, integer pageparam, integer page |
size, string language, string managedcontenttype, boolean showabsoluteurl) parameters communityid type: string id of the experience cloud site. topics type: list<string> comma-separated list of up to 15 content topic names. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. showabsoluteurl type: boolean specifies whether to show absolute urls in the output class (true) or not (false). the default value is false. 1268apex reference guide managedcontent class return value type: connectapi.managedcontentversioncollection getmanagedcontentbytopicsandcontentkeys(communityid, contentkeys, topics, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions using a list of content keys and content topic names. api version 51.0 available to guest users 51.0 requires chatter no signature public static connectapi.managedcontentversioncollection getmanagedcontentbytopicsandcontentkeys(string communityid, list<string> contentkeys, list<string> topics, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean showabsoluteurl) parameters communityid type: string id of the experience cloud site. contentkeys type: list<string> list of up to 50 content keys for the managed content. a content key is a universally unique identifier (uuid) such as mca4ccv5qs2bab5h7yrcrptcwgzq. topics type: list<string> comma-separated list of up to 15 content topic names. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 1269apex reference guide managedcontent class 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. 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.managedcontentversioncollection getmanagedcontentbytopicsandids(communityid, managedcontentids, topics, pageparam, pagesize, language, managedcontenttype) get managed content versions using a list of managed content ids and content topic names. api version 47.0 available to guest users 47.0 requires chatter no signature public static connectapi.managedcontentversioncollection getmanagedcontentbytopicsandids(string communityid, list<string> managedcontentids, list<string> topics, integer pageparam, integer pagesize, string language, string managedcontenttype) parameters communityid type: string id of the experience cloud site. managedcontentids type: list<string> 1270apex reference guide managedcontent class comma-separated list of managed content ids. topics type: list<string> comma-separated list of up to 15 content topic names. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. return value type: connectapi.managedcontentversioncollection getmanagedcontentbytopicsandids(communityid, managedcontentids, topics, pageparam, pagesize, language, managedcontenttype, showabsoluteurl) get managed content versions with absolute urls using a list of managed content ids and content topic names. api version 50.0 available to guest users 50.0 requires chatter no signature public static connectapi.managedcontentversioncollection getmanagedcontentbytopicsandids(string communityid, list<string> managedcontentids, 1271apex reference guide managedcontent class list<string> topics, integer pageparam, integer pagesize, string language, string managedcontenttype, boolean showabsoluteurl) parameters communityid type: string id of the experience cloud site. managedcontentids type: list<string> comma-separated list of managed content ids. topics type: list<string> comma-separated list of up to 15 content topic names. 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. for performance reasons, we recommend 25 or fewer items per page. if you pass in null, the default size is 25. 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 context user’s language. if the context user’s language isn’t available, the language defaults to the content type’s original language. managedcontenttype type: string developer name of the content type, such as cms_document or cms_image. 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.managedcontentversioncollection getmanagedcontentspace(contentspaceid) get a managed content space. api version 55.0 1272apex reference guide managedcontentdelivery class requires chatter no signature public static connectapi.managedcontentspace getmanagedcontentspace(string contentspaceid) parameters contentspaceid type: string id of the managed content space. return value type: connectapi.managedcontentspace managedcontentdelivery class get collection items. get collection metadata. get a managed content channel. get managed content. namespace connectapi managedcontentdelivery methods the following are methods for managedcontentdelivery. all methods are static. in this section: getcollectionitemsforchannel(channelid, collectionkeyorid, language) get collection items for a channel. getcollectionitemsforsite(siteid, collectionkeyorid, language) get collection items for an experience cloud site. getmanagedcontentchannel(channelid) get a managed content channel. getmanagedcontentforchannel(channelid, contentkeyorid, showabsoluteurl) get a piece of published content for a channel. getmanagedcontentforchannel(channelid, contentkeyorid, language, showabsoluteurl) get a piece of published content in a specified language for a channel. getmanagedcontentforchannel(channelid, contentkeyorid, language, showabsoluteurl, referencedepth, expandreferences, referencesaslist) get a piece of published content in a specified language with references for a channel. 1273apex reference guide managedcontentdelivery class getmanagedcontentforsite(siteid, contentkeyor |
id, showabsoluteurl) get a piece of published content for an experience cloud site. getmanagedcontentforsite(siteid, contentkeyorid, language, showabsoluteurl) get a piece of published content in a specified language for an experience cloud site. getmanagedcontentforsite(siteid, contentkeyorid, language, showabsoluteurl, referencedepth, expandreferences, referencesaslist) get a piece of published content in a specified language with references for an experience cloud site. getmanagedcontentsforchannel(channelid, managedcontentids, contentkeys, contenttypefqn, language, publishstartdate, publishenddate, includecontentbody, referencedepth, expandreferences, referencesaslist, pageparam, pagesize) get a collection of published contents for a channel. getmanagedcontentsforchannel(channelid, managedcontentids, contentkeys, contenttypefqn, language, publishstartdate, publishenddate, includecontentbody, referencedepth, expandreferences, referencesaslist, pageparam, pagesize, showabsoluteurl) get a collection of published contents for a channel. 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. 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. getcollectionitemsforchannel(channelid, collectionkeyorid, language) get collection items for a channel. api version 56.0 available to guest users 56.0 requires chatter no signature public static connectapi.managedcontentcollectionitems getcollectionitemsforchannel(string channelid, string collectionkeyorid, string language) parameters channelid type: string id of the channel. collectionkeyorid type: string 1274apex reference guide managedcontentdelivery class collection key or id of the collection. a collection key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. 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 channel or site’s default language. if the channel or site’s default language isn’t available, the language defaults to the primary language of the content space. return value type: connectapi.managedcontentcollectionitems getcollectionitemsforsite(siteid, collectionkeyorid, language) get collection items for an experience cloud site. api version 56.0 available to guest users 56.0 requires chatter no signature public static connectapi.managedcontentcollectionitems getcollectionitemsforsite(string siteid, string collectionkeyorid, string language) parameters siteid type: string id for the experience cloud site. collectionkeyorid type: string collection key or id of the collection. a collection key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. 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 channel or site’s default language. if the channel or site’s default language isn’t available, the language defaults to the primary language of the content space. 1275apex reference guide managedcontentdelivery class return value type: connectapi.managedcontentcollectionitems getmanagedcontentchannel(channelid) get a managed content channel. api version 54.0 available to guest users 54.0 requires chatter no signature public static connectapi.managedcontentchanneldetail getmanagedcontentchannel(string channelid) parameters channelid type: string id of the channel. return value type: connectapi.managedcontentchanneldetail getmanagedcontentforchannel(channelid, contentkeyorid, showabsoluteurl) get a piece of published content for |
a channel. api version 54.0 available to guest users 54.0 requires chatter no 1276apex reference guide managedcontentdelivery class signature public static connectapi.managedcontentdeliverydocument getmanagedcontentforchannel(string channelid, string contentkeyorid, boolean showabsoluteurl) parameters channelid type: string id of the channel. contentkeyorid type: string content key or id of the content. a content key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. showabsoluteurl type: boolean for public channels only, specifies whether to return the absolute unauthenticatedurl in the output class. the default value is false. return value type: connectapi.managedcontentdeliverydocument usage this method returns content only if it's published in the default language of the channel. if you request content that isn’t published in the default language of the channel, you get a connectapi.notfoundexception. to get content for a channel in another language use getmanagedcontentforchannel(channelid, contentkeyorid, language, showabsoluteurl) or getmanagedcontentforchannel(channelid, contentkeyorid, language, showabsoluteurl, referencedepth, expandreferences, referencesaslist) on page 1278. getmanagedcontentforchannel(channelid, contentkeyorid, language, showabsoluteurl) get a piece of published content in a specified language for a channel. api version 54.0 available to guest users 54.0 requires chatter no 1277apex reference guide managedcontentdelivery class signature public static connectapi.managedcontentdeliverydocument getmanagedcontentforchannel(string channelid, string contentkeyorid, string language, boolean showabsoluteurl) parameters channelid type: string id of the channel. contentkeyorid type: string content key or id of the content. a content key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. language type: string language locale for the managed content, for example, en_us. the requested language must be added to the channel, otherwise, you get a connectapi.notfoundexception. if the requested translation isn’t available, the language defaults to the channel or site’s default language. if the channel or site’s default language isn’t available, the language defaults to the primary language of the content space. showabsoluteurl type: boolean for public channels only, specifies whether to return the absolute unauthenticatedurl in the output class. the default value is false. return value type: connectapi.managedcontentdeliverydocument getmanagedcontentforchannel(channelid, contentkeyorid, language, showabsoluteurl, referencedepth, expandreferences, referencesaslist) get a piece of published content in a specified language with references for a channel. api version 54.0 available to guest users 54.0 requires chatter no 1278apex reference guide managedcontentdelivery class signature public static connectapi.managedcontentdeliverydocument getmanagedcontentforchannel(string channelid, string contentkeyorid, string language, boolean showabsoluteurl, integer referencedepth, boolean expandreferences, boolean referencesaslist) parameters channelid type: string id of the channel. contentkeyorid type: string content key or id of the content. a content key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. language type: string language locale for the managed content, for example, en_us. the requested language must be added to the channel, otherwise, you get a connectapi.notfoundexception. if the requested translation isn’t available, the language defaults to the channel or site’s default language. if the channel or site’s default language isn’t available, the language defaults to the primary language of the content space. showabsoluteurl type: boolean for public channels only, specifies whether to return the absolute unauthenticatedurl in the output class. 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.managedcontentdeliverydocument 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.managedcontentdeliverydocument 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. return value type: connectapi.managedcontentdeliverydocument getmanagedcontentforsite(siteid, contentkeyorid, showabsoluteurl) get a piece of published content for an experience cloud site. 1279apex reference guide managedcontentdelivery class api version 54.0 available to guest users 54.0 requires chatter no signature public static connectapi.managedcontentdeliverydocument getmanagedcontentforsite(string siteid, string contentkeyorid, boolean showabsoluteurl) parameters siteid type: string id for the experience cloud site. contentkeyorid type: string content key or id of the content. a content key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. showabsoluteurl type: boolean for public channels only, specifies whether to return the absolute unauthenticatedurl in the output class. the default value is false. return value type: connectapi.managedcontentdeliverydocument getmanagedcontentforsite(siteid, contentkeyorid, language, showabsoluteurl) get a piece of published content in a specified language for an experience cloud site. api version 54.0 available to guest users 54.0 requires chatter no 1280apex reference guide managedcontentdelivery class signature public static connectapi.managedcontentdeliverydocument getmanagedcontentforsite(string siteid, string contentkeyorid, string language, boolean showabsoluteurl) parameters siteid type: string id for the experience cloud site. contentkeyorid type: string content key or id of the content. a content key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. 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 channel or site’s default language. if the channel or site’s default language isn’t available, the language defaults to the primary language of the content space. showabsoluteurl type: boolean for public channels only, specifies whether to return the absolute unauthenticatedurl in the output class. the default value is false. return value type: connectapi.managedcontentdeliverydocument getmanagedcontentforsite(siteid, contentkeyorid, language, showabsoluteurl, referencedepth, expandreferences, referencesaslist) get a piece of published content in a specified language with references for an experience cloud site. api version 54.0 available to guest users 54.0 requires chatter no 1281apex reference guide managedcontentdelivery class signature public static connectapi.managedcontentdeliverydocument getmanagedcontentforsite(string siteid, string contentkeyorid, string language, boolean showabsoluteurl, integer referencedepth, boolean expandreferences, boolean referencesaslist) parameters siteid type: string id for the experience cloud site. contentkeyorid type: string content key or id of the content. a content key is a unique identifier such as mca4ccv5qs2bab5h7yrcrptcwgzq. 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 channel or site’s default language. if the channel or site’s default language isn’t available, the language defaults to the primary language of the content space. showabsoluteurl type: boolean for public channels only, specifies whether to return the absolute unauthenticatedurl in the output class. 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.managedcontentdeliverydocument 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.managedcontentdeliverydocument 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. return value type: connectapi.managedcontentdeliverydocument getmanagedcontentsforchannel(channelid, managedcontentids, contentkeys, contenttypefqn, language, publishstartdate, publishenddate, 1282 |
apex reference guide managedcontentdelivery class includecontentbody, referencedepth, expandreferences, referencesaslist, pageparam, pagesize) get a collection of published contents for a channel. api version 55.0—57.0 in version 58.0 and later, use getmanagedcontentsforchannel(channelid, 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 getmanagedcontentsforchannel(string channelid, 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 channelid type: string id of the channel. 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 1283apex reference guide managedcontentdelivery class 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. 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 getmanagedcontentsforchannel(channelid, managedcontentids, contentkeys, contenttypefqn, language, publishstartdate, publishenddate, 1284apex reference guide managedcontentdelivery class includecontentbody, referencedepth, expandreferences, referencesaslist, pageparam, pagesize, showabsoluteurl) get a collection of published contents for a channel. api version 58.0 available to guest users 58.0 requires chatter no signature public static connectapi.managedcontentdeliverydocumentcollection getmanagedcontentsforchannel(string channelid, 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 channelid type: string id of the channel. managedcontentids type: list<string> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.