Expand my Community achievements bar.

SOLVED

How to use apl (appendToList) in AEP Web SDK using "UpdateVairable" options?

Avatar

Level 2

Dear All,

As part of migration process, we are moving from AA legacy to AEP Web SDK. Here, with respective to apl (appendToList) plugin we trying to replicate the same in AEP Web SDK method but couldn't work out. Kindly help!

Use Case

We are using update variable options In AEP Web SDK to merge the value in the beginning before sending a server call (/ee) we bascially conslidate and send it into one server call itself. But here when we are using update variable options in AEP its basically overwritting the default value setup in the XDM | PageView.

Example

  • In Rule 1 "Top Page"  we are setting a UpdateVariable - Prop1 = New Vendor
  • In Rule 2 By default AEP Global Rule - Prop1 = Global | All

Expected results

  1. On Page Load if rule 1 fired along with default rule 2 then the server call replace the default value shows "Prop1 = New Vendor"
  2. On Page Load if rule 1 is NOT fired but the default rule 2 fire then the server call shows "Prop1 = "Global | All".

So here is our understand, if any rules fire before the default rule then the default Prop1 value will be overwrite by the inital rule. Expected outcome would be if both rule are fire then the Prop1 should show "Global | All | New Vendor".

Kindly let me know if you get some solutions on this.
Thanks,
Vijay

 

 

1 Accepted Solution

Avatar

Correct answer by
Adobe Champion

I do understand, but the Update Variable action in Web SDK simply does not append. I still think doing this via a data element is your best bet.

  1. Set a rule that fires your new vendor value and then does a custom code action of setVar with that value. You set this rule to priority order 40.
  2. Then you create a custom code data element that looks to see if the setVar above exists and contains a value, or not. In this data element, you do your concatenation (i.e. the appending the new vendor to the default value)
  3. Lastly in your final page load rule (set at priority order 50), you read from the data element you set in #2 above.

It's also worth noting that the APL plug-in is not yet supported for Web SDK either.

 

Another option that is outside all of this, is to consider sending these two values (default and new value) into context variables and then using the processing rules in the admin console to concatenate them there.

 

View solution in original post

3 Replies

Avatar

Adobe Champion

Have you tried merging the values in a data element that is available by the time the final rule sends the event? The Updated Variable action isn't exactly the same as appending a value to something. I would expect it to override with the last value (the default in your case) seen. That's why I'm wondering that if instead of a default value, you instead reference a data element that would conditionally set the value and then pass that into the schema as a part of the send event.

Avatar

Level 2

Thanks for the information,

Yeah I agreed, but the point is we are going to do a quantitative validation btw number of time rule fired in user browser vs number of time realized in the vendor UI.

In this case, we are not using data element to generate the values rather we are depend on the value with respective to each unique rules.

Hope you understand? Please let me know.

Thanks,
Vijay

Avatar

Correct answer by
Adobe Champion

I do understand, but the Update Variable action in Web SDK simply does not append. I still think doing this via a data element is your best bet.

  1. Set a rule that fires your new vendor value and then does a custom code action of setVar with that value. You set this rule to priority order 40.
  2. Then you create a custom code data element that looks to see if the setVar above exists and contains a value, or not. In this data element, you do your concatenation (i.e. the appending the new vendor to the default value)
  3. Lastly in your final page load rule (set at priority order 50), you read from the data element you set in #2 above.

It's also worth noting that the APL plug-in is not yet supported for Web SDK either.

 

Another option that is outside all of this, is to consider sending these two values (default and new value) into context variables and then using the processing rules in the admin console to concatenate them there.