Control groups in A/B winner delivery node | Community
Skip to main content
bustert17264389
April 28, 2021
Question

Control groups in A/B winner delivery node

  • April 28, 2021
  • 4 replies
  • 2974 views

Hi,

 

I am trying to set up an A/B test using the standard adobe method for campaign classic using the below Javascript,
However, I need to pull through the control group from the workflow which is saved in a list for the delivery node and am unsure how to do this in the below javascript code. Is it also possible to pull through the seed addresses set in the a/b tests as well? 

I followed these instructions and have been able to send the delivery based on the winner but the control groups and seeds are not populating as stated above

https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/a-b-testing/use-case...

// 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

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

// store the new delivery Id in event variables
vars.deliveryId = delivery.id



Cheers,
Buster

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

adithyacs86
Level 5
April 28, 2021

Hi Buster, 

 

I think control groups can be pulled from deliverOperation table - [operation/controlGroup] will be the link to pull from delivery schema. 

 

Thanks,
Adithya

bustert17264389
April 28, 2021

Hey Adithya,

Thanks for your reply!

Any idea how I would pull this through in the above script?

I have been trying based on your comment but with no success so far.

bustert17264389
May 11, 2021

@adithyacs86 

Hey hey,

I have tried the below but can't seem to find the table you referenced or call it in the javascript, what node were you using to bring up the window to show the enabled path?

Sorry I am not very experienced with Javascript

Sukrity_Wadhwa
Community Manager
Community Manager
May 19, 2021

Hi @bustert17264389,

Were you able to resolve this query or do you still need more help here? Do let us know.

Thanks!

Sukrity Wadhwa
bustert17264389
May 19, 2021

Hi @sukrity_wadhwa

Unfortunately Yes I still need help. I haven't been able to find the specific schema mentioned in the last reply and don't know where to go from here to be able to implement this which is a shame as its a use case for our company.


Sukrity_Wadhwa
Community Manager
Community Manager
May 20, 2021
Thanks for the update. I will escalate it further among SMEs to get you some more help.
Sukrity Wadhwa