Support remote updates to Target property token#121
Support remote updates to Target property token#121swarna04 merged 3 commits intoadobe:dev-3.3.0from
Conversation
Should we change this so the event data value has precedence over the configured value? Seems like it's being used as an override, which in my mind means it should have higher priority. WDYT? |
@sbenedicadb I thought about this. And this is how we support it with 2.x to encourage customers to use the Launch card for property token configuration. Changing this behavior now might lead to more confusion. Moreover, we verified that LBG is not using the Target Launch configuration for property token. So they can just update it remotely for any Target request that they want. In case they do not update it for a request, no token will be attached (assume default workspace). |
sbenedicadb
left a comment
There was a problem hiding this comment.
looks good - very minor stuff in comments
AEPTarget/Sources/Event+Target.swift
Outdated
|
|
||
| /// Reads the Target `at_property` from the event data | ||
| var propertyToken: String { | ||
| return data?[TargetConstants.EventDataKeys.AT_PROPERTY] as? String ?? "" |
There was a problem hiding this comment.
nit: a one-liner implementation for an extension variable can omit the return keyword
There was a problem hiding this comment.
Yup, thanks for the reminder!
| // Set parameters: getMboxParameters | ||
| let mboxParameters = getMboxParameters(mboxParameters: targetParameters?.parameters, lifecycleContextData: lifecycleContextData) | ||
| // Set parameters | ||
| let parameters = targetParameters?.parameters?.filter { $0.key != TargetConstants.EventDataKeys.AT_PROPERTY } |
* Support remote updates to Target property token (#121) * Support remote updates to Target property token * Updated xcode to v13.0.0 in circle CI config file. * Incorporated feedback. * Added new raw Target APIs for non-unique batch mboxes support (#122) * Support remote updates to Target property token * Added New APIs for Target non-unique batch mboxes support * Incorporated feedback * Incorporated feedback * Fixed the build issue * More feedback updates. * Clean up * Target release prep + misc fixes (#123) * Added new raw Target APIs for mbox content and notifications (#125) * Support for new raw Target APIs for mbox content and notifications * format updates * Added more functional tests * Rename sendRawNotification to sendRawNotifications * Event name cleanup * build fixes * minor testapp update * Added more functional tests * minor doc cleanup
Description
Support remote property token updates with attach data rule:
The property token "at_property" can be provided in the JSON data to be attached to Target events (prefetch, execute, locations displayed or location clicked). Also, added the logic to remove any property tokens passed in mbox parameters (supported with Target iOS 2.x SDK).
The order or precedence will be as follows:
Property token configured in the extension card > Property token passed in Event Data
Note: Do not configure the property token in Target extension card on Data Collection UI if you wish to update it with attach data rule.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: