Expand my Community achievements bar.

SOLVED

Adobe Campaign A\\B testing

Avatar

Level 1

Hi All,

I have tried to use the A\B Testing workflow JS code from the A/B testing ​ from the Adobe Campaign 6.1 document. It creates the A B populations and selects a winner but it is always A even if B has opens and A does not. I have inserted the <%= vars.deliveryId %> variable in the delivery and tried both the manual and automatic option for validationMode.

delivery.scheduling.validationMode = "manual"

delivery.scheduling.delayed = 0

If anyone has gotten a similar workflow to work I really would apreciate any insights you may have.

I will past screen shots of my workflow and the JS code I used.

Thanks, Karl

1400897_pastedImage_1.png

// query the database to find the winner (best open rate)

  var winner = xtk.queryDef.create(

  <queryDef schema="nms:delivery" operation="get">

  <select>

  <node expr="@id"/>

  <node expr="@label"/>

  <node expr="[@operation-id]"/>

  <node expr="[@workflow-id]"/>

  </select>

  <where>

  <condition expr={"@FCP=0 and [@workflow-id]= " + instance.id}/>

  </where>

  <orderBy>

  <node expr="[indicators/@estimatedRecipientOpenRatio]" sortDesc="true"/>

  </orderBy>

  </queryDef>).ExecuteQuery()

  

  // create a new delivery object and initialize it by doing a copy of

  // the winner delivery

  var delivery = nms.delivery.create()

  delivery.Duplicate("nms:delivery|" + winner.@id)

  // append 'final' to the delivery label

  delivery.label = winner.@label + " final"

  // link the delivery to the operation to make sure it will be displayed in

  // the campaign dashboard. This attribute needs to be set manually here since

  // the Duplicate() method has reset it to its default value => 0

  delivery.operation_id = winner.@["operation-id"]

  delivery.workflow_id = winner.@["workflow-id"]

  // adjust some delivery parameters to make it compatible with the

  // "Prepare and start" option selected in the Delivery tab of this activity

  delivery.scheduling.validationMode = "manual"

  delivery.scheduling.delayed = 0

  // store the new delivery Id in event variables

  vars.deliveryId = delivery.id

// save the delivery in database delivery.save()

1400898_pastedImage_2.png

1 Accepted Solution

Avatar

Correct answer by
Level 1

Not shown in the workflow but I was using recurring deliveries in the AB split test. I was told I must use regular one time deliveries for the test or it will not work?

Karl

View solution in original post

3 Replies

Avatar

Correct answer by
Level 1

Not shown in the workflow but I was using recurring deliveries in the AB split test. I was told I must use regular one time deliveries for the test or it will not work?

Karl

Avatar

Employee

Hi Karl,

With Recurring deliveries the beahvior is every child delivery get associated with campaign but not the workflow.

You can develop a custom JS in code to connect each recurring deliveries child entity to the workflow dynamically when using the existing JS code that selects winner.

OR you can modify your winner selection JS code to find deliveries associated to current campaign and part of current send. A complex way but still achievable.

OR you have the solution to use one time delivery and duplicate the workflow every time you wish to perform a new test.

Regards,
Vipul

Avatar

Level 3

I am having couple issues

1. the same issue, where while using this script its always giving winner as delivery A, was there there any changes proposed here to fix that?

2. Using the custom way split-->wait-->script.

Event though it picks winner as A it creates multiple deliveries under campaign until workflow is stopped manually.

here is screenshot of setup:

ab test1.JPG