Hi,
I am trying to use the javascript code included in the documentation to get the winner in base of opens, and it is not working. Is anything wrong with it?
I will leave it here: https://experienceleague.adobe.com/docs/campaign-classic/using/sending-messages/a-b-testing/use-case...
I did a copy-paste, so if I am missing any step, please let me know!
Thank you very much as always
Solved! Go to Solution.
Views
Replies
Total Likes
@bcollado , Instead of using this Delivery activity (Star icon delivery which you had currently used), replace it with Recurring delivery activity and run the workflow. (Make sure you're creating this in a campaign workflow)
Still If you want to use a Star icon Delivery (delivery2 and delivery3 of your workflow), then in its script tab, add the below code
delivery.operation_id = instance.operation_id;
delivery.workflow_id = instance.id;
Amine has mentioned the same. You need to use this script in delivery's script tab.
Alternatively, you can also replace this activity with Recurring Delivery and no need of external script to be added.
Views
Replies
Total Likes
Hello @bcollado,
The reason why it's not working is that you used the delivery activity that call a delivery model. The generated deliveries are not linked to the workflow.
Add the bellow script to the initialization script of your delivery activities.
it should link the created deliveries to the workflow and to the operation.
delivery.operation_id = instance.operation_id;
delivery.workflow_id = instance.id;
Br,
Amine
Views
Replies
Total Likes
Hi,
you mean like this?
I do not understand properly when you say I have to link the created deliveries to the workflow and to the operation... need more details please and thanks!
Views
Replies
Total Likes
Hi @bcollado ,
If you had followed and copied the same script from the documentation, edit the label of JavaScript activity and change it as <%= vars.deliveryId %> (as mentioned in point-3).
Run the workflow again, and if you get any error, share the screenshot of error.
Views
Replies
Total Likes
Hi!
it is not working as you can see in the picture
Views
Replies
Total Likes
@bcollado , Instead of using this Delivery activity (Star icon delivery which you had currently used), replace it with Recurring delivery activity and run the workflow. (Make sure you're creating this in a campaign workflow)
Still If you want to use a Star icon Delivery (delivery2 and delivery3 of your workflow), then in its script tab, add the below code
delivery.operation_id = instance.operation_id;
delivery.workflow_id = instance.id;
Amine has mentioned the same. You need to use this script in delivery's script tab.
Alternatively, you can also replace this activity with Recurring Delivery and no need of external script to be added.
Views
Replies
Total Likes
It is already fixed using the recurring deliveries, thanks a lot!
kind regards
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies