Get Personalization Decisions Invocable Action

Retrieves personalized recommendations from Salesforce Personalization for the specified context and personalization point.

This action is available in API version 63.0 and later.

The Get Personalization Decisions action is available in Salesforce orgs with the Personalization license. For more information on Personalization permissions, see Set Up Salesforce Personalization User Permissions.

URI

/services/data/v63.0/actions/standard/getPersonalizationDecisions

Formats

JSON, XML

HTTP Methods

POST

Authentication

Authorization: Bearer token

Input ParameterTypeRequired?Description
persnlDecisionInputRepresentationApex-definedYesAn Apex input representation record that contains context and personalization point details for retrieving a personalization decision.
persnlDecisionContextInputRepresentationApex-definedYesAn Apex input representation record record that contains details about an individual’s context and the anchor used by Personalization to exclude specific content from recommendations and recommend similar content.
persnlPointInputRepresentationArray of objectsYesA collection of Apex input representation records that contain details about personalization points.
individualIdStringYesThe ID of the individual to retrieve a personalization decision for.
unifiedIndividualIdStringNoAn optional unified ID that associates an individual to a Data Cloud Unified Profile. This ID ensures consistent experimentation cohort assignments for all interactions, even if a user has different individual IDs across channels. Without this ID, a user can end up in different cohorts across channels. Use unifiedIndividualId for experimentation-only use cases.
dataSpaceStringNoThe data space in Data Cloud that establishes the logical partition within which the personalization context exists.
anchorIdStringNoA unique ID to be used by Personalization to reference content that the end user is interacting with. This ID helps Personalization stop this content from being recommended. It also lets you suggest more relevant suggestions based on your targeting rules and the filtering rules you set for recommenders.
anchorTypeStringNoThe API name of the source Data Model Object that contains content that the end user is interacting with.
persnlPointIdStringNoThe ID of a personalization point. This value is optional if you specify the name of a personalization point.
persnlPointNameStringNoThe API name of a personalization point. This value is optional if you specify the ID of a personalization point.
dynamicContextVariablesArray of objectsNoA list of field-value pairs used to pass dynamic filters, such as category, price, and brand to filter recommendations. Each object in the list must have a field (string) and a value (string).
persnlRecommenderDynamicVariableInputRepresentationApex-definedNoAn Apex input representation record that contains a dynamic filter field and value for personalized recommendations.
decisionIdStringNoOptional. The ID of a specific decision to return without rule evaluation. You can specify the decisionId to test whether the Salesforce Personalization Decisioning API returns a particular decision.
invocationTypeStringYesThe type of invocation used for configuring the output response format. Accepted values for use in Flow are FLOW and FLOW_JSON.
Output ParameterDescription
persnlDataA JSON string containing personalized recommendations.
persnlFieldRepresentationThe DMO field representation.
fieldThe API name of the field.
valueThe value associated with the field.
additionalFieldsA list of field and value pairs from the personalization recommendation matching the expected schema of the personalization point.
persnlAttributeRepresentationThe content attributes to be returned as configured on the personalization decision
attributeNameThe name of the attribute.
attributeValueThe value associated with the attribute.
contextAttributesContext attributes returned in the personalized decision response as configured in the Personalization Schema.
persnlDecisionOutputRepresentationAn Apex output representation record that contains details about personalized recommendations, associated data, and diagnostic information.
persnlRepresentationAn Apex output representation record containing personalized recommendations received from Personalization.
persnlRecommendationsOutputRepresentationAn Apex output representation record that contains details about personalized recommendations data, including structured content objects that align with a personalization schema.
persnlDiagnosticsRepresentationAn Apex output representation record that contains diagnostic information related to the personalization request.
persnlPointIdThe ID of the personalization point used in the request.
persnlPointNameThe name of the personalization point used in this request.
persnlRecommendationsAn array of personalized content objects matching the expected schema of the personalization point.
persnlContentIdThe ID of a Personalization Content Record.
diagnosticsDiagnostic information about the request, aiding in analysis and troubleshooting.
diagnosticsCodeA diagnostics code tied to the request’s processing or outcome.
diagnosticsDescriptionA detailed message offering context and insights related to the diagnostics code.
requestIdA unique ID for the request and its corresponding response.