Only run script if delivery action is 'Send a proof' | Community
Skip to main content
alexcroker
Level 2
May 18, 2022
Solved

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

  • May 18, 2022
  • 2 replies
  • 1504 views

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

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

Hi @alexcroker 

 

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

 

 

Thanks.

Parvesh.

 

2 replies

Parvesh_Parmar
Community Advisor
Community Advisor
May 18, 2022

Hello @alexcroker 

 

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

 

 

Print the value: 

Thanks.

Parvesh.

 

 

Parvesh Parmar – Adobe Community Advisor https://www.linkedin.com/in/parvesh-parmar/
alexcroker
Level 2
May 18, 2022

Thanks for your reply Parvesh.

Unfortunately that also returns false:

 

 

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

 

Parvesh_Parmar
Community Advisor
Parvesh_ParmarCommunity AdvisorAccepted solution
Community Advisor
May 18, 2022

Hi @alexcroker 

 

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

 

 

Thanks.

Parvesh.

 

Parvesh Parmar – Adobe Community Advisor https://www.linkedin.com/in/parvesh-parmar/
Adobe Employee
May 18, 2022

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

alexcroker
Level 2
May 18, 2022

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!