Edit in GitHubLog an issue

PropositionItem

The PropositionItem class represents the decision proposition item received from the remote, upon a personalization query to the Experience Edge network.

iOS Interface

Public variables

contentCardSchemaData

Decodes and returns item data content as an ContentCardSchemaData object.

Returns nil if decoding fails or if the proposition item schema is not .contentCard.

Copied to your clipboard
var contentCardSchemaData: ContentCardSchemaData?

htmlContent

Returns item data content as a string if the proposition item schema is htmlContent, otherwise returns nil.

Copied to your clipboard
var htmlContent: String?

inappSchemaData

Decodes and returns item data content as an InAppSchemaData object.

Returns nil if decoding fails or if the proposition item schema is not .inApp.

Copied to your clipboard
var inappSchemaData: InAppSchemaData?

itemData

Proposition item data as dictionary.

Copied to your clipboard
public let itemData: [String: Any]

itemId

Unique proposition item identifier.

Copied to your clipboard
public let itemId: String

jsonContentArray

Returns item data content as an array if it can be parsed as an array and if the proposition item schema is jsonContent, otherwise returns nil.

Copied to your clipboard
var jsonContentArray: [Any]?

jsonContentDictionary

Returns item data content as a dictionary if it can be parsed as a dictionary and if the proposition item schema is jsonContent, otherwise returns nil.

Copied to your clipboard
var jsonContentDictionary: [String: Any]?

schema

Proposition item schema string.

Copied to your clipboard
public let schema: String

Public functions

generateInteractionXdm

Returns a dictionary containing XDM data for interaction with the given proposition item, for the provided event type.

Swift

Syntax

Copied to your clipboard
func generateInteractionXdm(_ interaction: String? = nil, withEdgeEventType eventType: MessagingEdgeEventType, forTokens tokens: [String]? = nil) -> [String: Any]?
  • interaction is a custom string value describing the interaction.
  • eventType is an enum specifying event type for the interaction.
  • tokens is an array containing the decision item tokens for recording interaction.

track

Tracks interaction with the given proposition item.

Swift

Syntax

Copied to your clipboard
func track(_ interaction: String? = nil, withEdgeEventType eventType: MessagingEdgeEventType, forTokens tokens: [String]? = nil)
  • interaction is a custom string value describing the interaction.
  • eventType is an enum specifying event type for the interaction.
  • tokens is an array containing the decision item tokens for recording interaction.

Android Interface

Public functions

generateInteractionXdm

Returns a Map containing XDM data for interaction with the given proposition item, for the provided event type.

Java

Syntax

Copied to your clipboard
public Map<String, Object> generateInteractionXdm(@NonNull final MessagingEdgeEventType eventType)
  • eventType is an enum specifying event type for the interaction.

generateInteractionXdm

Returns a Map containing XDM data for interaction with the given proposition item, for the provided event type and decision item tokens.

Java

Syntax

Copied to your clipboard
public Map<String, Object> generateInteractionXdm(final String interaction, @NonNull final MessagingEdgeEventType eventType, final List<String> tokens)
  • interaction is a custom string value describing the interaction.
  • eventType is an enum specifying event type for the interaction.
  • tokens is a list containing the decision item tokens for recording interaction.

getContentCardSchemaData

Decodes and returns this proposition item's content schema as a ContentCardSchemaData, or null if decoding fails.

Java

Syntax

Copied to your clipboard
public ContentCardSchemaData getContentCardSchemaData()

getHtmlContent

Returns item data content as a string if the proposition item schema is HTML_CONTENT, otherwise returns null.

Java

Syntax

Copied to your clipboard
public String getHtmlContent()

getInAppSchemaData

Decodes and returns this proposition item's content schema as a InAppSchemaData, or null if decoding fails.

Java

Syntax

Copied to your clipboard
public InAppSchemaData getInAppSchemaData()

getItemData

Returns this proposition's unique identifier as a string.

Java

Syntax

Copied to your clipboard
public Map<String, Object> getItemData()

getItemId

Returns this proposition item's unique identifier as a string.

Java

Syntax

Copied to your clipboard
public String getItemId()

getJsonContentArrayList

Returns item data content as a list if it can be parsed as a list and if the proposition item schema is JSON_CONTENT, otherwise returns null.

Java

Syntax

Copied to your clipboard
public List<Map<String, Object>> getJsonContentArrayList()

getJsonContentMap

Returns item data content as a Map if it can be parsed as a Map and if the proposition item schema is JSON_CONTENT, otherwise returns null.

Java

Syntax

Copied to your clipboard
public Map<String, Object> getJsonContentMap()

getSchema

Returns this proposition item's content schema as a string.

Java

Syntax

Copied to your clipboard
public SchemaType getSchema()

track

Tracks interaction with the given proposition item.

Java

Syntax

Copied to your clipboard
public void track(@NonNull final MessagingEdgeEventType eventType)
  • eventType is an enum specifying event type for the interaction.

track

Tracks interaction with the given proposition item for the provided decision item tokens.

Java

Syntax

Copied to your clipboard
public void track(final String interaction, @NonNull final MessagingEdgeEventType eventType, final List<String> tokens)
  • interaction is a custom string value describing the interaction.
  • eventType is an enum specifying event type for the interaction.
  • tokens is a list containing the decision item tokens for recording interaction.
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.