Newer Version Available
Recommendation Definition Photo
Only community managers (users with the “Create and Set Up Communities” or “Manage Communities” permission) and users with the “Modify All Data” permission can access, create, and delete recommendation definitions and scheduled recommendations. These recommendations appear directly in the feed in communities in the Salesforce1 mobile browser app. They also appear, by default, on the right side of the home page in communities using the Summer ’15 or later version of the Napili template.
To use an image from the Files page as a recommendation definition photo (existing content), pass the file ID in the fileId property of the request body or in the fileId request parameter.
To upload a binary file as a recommendation definition photo, you must send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files.
- Resource
-
1/connect/recommendation-definitions/recommendationDefinitionId/photo - Available version
- 33.0
- Requires Chatter
- Yes
- HTTP methods
- GET, HEAD, PUT, DELETE
- Request body for PUT
-
- Root XML tag
- <photo>
- JSON example
-
1{ "cropSize" : "120", 2 "cropX" : "0", 3 "cropY" : "0", 4 "fileId" : "069D00000001IOh" 5} - Properties
-
- Request parameters for PUT
-
Parameter Name Type Description Required or Optional Available Version cropSize Integer The length, in pixels, of any edge of the crop square. Required to crop an uploaded file or an existing file. 29.0 cropX Integer The position X, in pixels, from the left edge of the image to the start of the crop square. Top left is position (0,0). Required to crop an uploaded file or an existing file. 29.0 cropY Integer The position Y, in pixels, from the top edge of the image to the start of the crop square. Top left is position (0,0). Required to crop an uploaded file or an existing file. 29.0 fileId String 18 character ID of an existing file. The key prefix must be 069 and the file size must be less than 2 MB. Required to choose an existing file. 25.0 versionNumber Integer Version number of the existing content. If not provided, the latest version is used. Optional 25.0 - Response body for GET and PUT
- Photo