Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Only run script if delivery action is 'Send a proof'

Avatar

Level 2

Hello

 

In my scenario, I have an initialisation script on my Delivery node which contains a section that will update the TargetData of the SeedMembers I am going to send a proof too. I only want to execute this section of the script if the delivery action is set to 'Send a proof'. I have tested a few options to try to find the right variable but it's not resolving correctly:

 

logInfo("Adv activity.delivery.FCP = " + activity.delivery.FCP); // false
logInfo("Adv activity.scenario.FCP = " + activity.scenario.FCP); // false
logInfo("Adv activity.delivery.proof.FCP = " + activity.delivery.proof.FCP); // undefined

logInfo("Adv delivery.proof.FCP = " + delivery.proof.FCP); // undefined

 

Can anyone help identify which variable will allow me to access this setting? 

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @alexcroker 

 

Try below one. It definitely work. I tested it. 

 

Parvesh_Parmar_0-1652876277790.png

 

Thanks.

Parvesh.

 

View solution in original post

5 Replies

Avatar

Community Advisor

Hello @alexcroker 

 

Try to access this in script tab of delivery. I think you can access this there. 

 

Parvesh_Parmar_0-1652874946769.png

 

Print the value: 

Parvesh_Parmar_1-1652875019636.png

Thanks.

Parvesh.

 

 

Avatar

Level 2

Thanks for your reply Parvesh.

Unfortunately that also returns false:

alexcroker_1-1652875481718.png

 

alexcroker_0-1652875455382.png

 

18/05/2022 13:02:02 delivery SCR delivery.proof.FCP = false

 

Avatar

Correct answer by
Community Advisor

Hi @alexcroker 

 

Try below one. It definitely work. I tested it. 

 

Parvesh_Parmar_0-1652876277790.png

 

Thanks.

Parvesh.

 

Avatar

Employee Advisor

Hi @alexcroker 

 

Initialisation of the activity is certainly to early for a delivery activity, have you look to realise it via a typology rules of type control... You will definitively be able to trigger the rules only for proof emails and you might be able to also manipulate the seed. Would be interested to see the code to inject dynamic targetdata in the seedMember too  

Would configuring target of proofs as substitution not work for you? You would start the workflow, acquiring the target data and you'll send proof using the Delivery activity. Some customer uses that method to send proof with target data...

Thanks

Denis

Avatar

Level 2

Hi Denis, thanks for your reply.

Substitution doesn't work in the scenario as we are testing personalisation via TargetData, and it doesn't guarantee proof of every variant.

@Parvesh_Parmar has cracked it above

Thanks both!