,@isahore ,@AndreaBriceno,@ParthaSarathy
,@ParthaS ,@Craig_Thonis ,@Manoj_Kumar_ ,@Amine_Abedour ,@Marcel_Szimonisz,@DavidKangni
,@Amit_Kumar,@ShashankNigam02,@Ganesh5067, @Jonathon_wodnicki
hi all
i need to create ab test workflow to test 4subject lines in one workflow
also when i am runnjng out of box script given in
aodbe doc
its failing ..any one have ab test Js script code
which support 4segment in a wkf
also please share insights what and how can we modify the oob script to make this work for 4segments
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @DishaSharma,
Can you share details as to what error you are seeing and what code have you written?
The standard js code that evaluates the winner delivery based on the configured criteria should work fine for handling any number of variants.
// query the database to find the winner (here - best click 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/@totalRecipientClickRatio]" 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.
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
BR,
Ishan
BR,
Ishan
Hi @DishaSharma,
Can you share details as to what error you are seeing and what code have you written?
The standard js code that evaluates the winner delivery based on the configured criteria should work fine for handling any number of variants.
// query the database to find the winner (here - best click 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/@totalRecipientClickRatio]" 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.
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
BR,
Ishan
BR,
Ishan
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies