Is it possible to use IF THEN ELSE statement in Attach Data Action?
And how should it be formed in JSON Payload?
For example, will it be possible to create a Context data key with value x if eventId contains "top" or "middle" otherwise have value y.
Any help, will be much appreciated.
So it seems like instead of "Attach Data" you want to use the "Modify Data" action. Ahead of the ACTION you would want to put a condition on the event. Or use the Mobile Core TrackAction event as your trigger.
thank you for responding.
I want to create a new Context data variable that it's value is dependant on the values of an existing Variable.
eg if "event.id" : "something.blah.top.level" or " data.value.middle.blah" then create a new context data variable "key" : "value"
otherwise "key" : "no_value"
Would that be possible?
How should it be written?
You may try to create separated rules for this case.
One rule for "event.id" : "Something.blah.top.level".
One rule for "date.value.middle.blah".
Another one with two conditions negated (set logic type to Exception)
NOT event.id contains top AND NOT event.id contains middle.