How to change a subject line script into an actual subject line in the broadlog | Community
Skip to main content
akashaj7696
Level 3
March 23, 2021
Question

How to change a subject line script into an actual subject line in the broadlog

  • March 23, 2021
  • 4 replies
  • 4243 views

Hi Everyone,

 

I have a high priority situation wherein i need some help from you guys-

 

I have a script which pulls in subject line dynamically and in the delivery subject field (let's say the script is <%=subjectline%>) but when i look into the delivery/emailHeaderParameters/@subject it shows me exact script instead of the actual subject line which went to a recipient.

 

Is there a way to convert it into an actual subject line in the broadlog subject field?

 

@sukrity_wadhwa - Please suggest.

 

Thanks,

Akash

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

4 replies

Darren_Bowers
Level 9
March 24, 2021

Hi @akashaj7696 - You don't mention the context for this or why you need this. Generally speaking, you cant accurately reconstruct the subject line from the template at a later date as you don't know if the data that was used in the targeting for the delivery is still current. If the underlying target data changes, so does the dynamic subject line script.

If you store the data attributes used in the subject in the broadLog at the time of the delivery, you could do this accurately as well.

If the underlying data hasn't changed, then you can just re-run the targeting based on the recipient(s) in the broadLog you wan to get the subjects for, enrich in the data you require and reconstruct the subject line using the new target data in Javascript.

Cheers

Darren

akashaj7696
Level 3
March 24, 2021
Hi Darren, let me explain- So i have one delivery where i have a script in the subject field (if segment='A', subject='B' else subject='C') This script works perfectly for the end user who will receive the email, however, when i try to check in the [delivery/mailParameters/subject] field i see the exact script which i wrote in the subject field of delivery. I want to know a way to capture the actual computed result of script into the subject field instead of the script. Also, is there any schema or place in ACC where we can check for a particular email what is the exact thing a end user has received, broadlog is one such but it's not acting useful in this case, let me know if you have any in mind, Thanks
Jonathon_wodnicki
Community Advisor
Community Advisor
March 25, 2021

Hi,

 

Follow these steps:

  1. Add an @subjectLine attribute to nms:broadLogRcp with schema extension
  2. Add a storage field to recipient target mapping, $string([vars/@subjectLine]) -> @subjectLine
  3. Use delivery variable named to match mapping. You can also use a field in targetData instead of variable, just make sure mapping matches.

NB this can get expensive storage-wise so be mindful of database sizing and lower retention/increase disk space as appropriate.

 

Thanks,

-Jon

Level 2
October 3, 2022

Hi @jonathon_wodnicki ,

Do you have a screen shot of the syntax for the delivery variable and the target mapping config?
I have tried a few different variations and either get nothing or the subject script (before personalization) in the broadlogRcp table.
When I print out the delivery variable in the email HTML content, it returns the subject script (before personalization).

akashaj7696
Level 3
April 4, 2021
Hi Everyone, Can someone think, if we can use control typology rules to achieve this where in a JavaScript code could be written and for each recipient this code will be ran and the value of subject be stored under delivery.mailParameters.subject field? I'm just not that good yet with JS so need help, please people who have good experience with JS and ACC please give it a shot. Thanks... I would really appreciate it.
Darren_Bowers
Level 9
April 6, 2021

Hi @akashaj7696 - a subject that is unique to a recipient can't be stored under the definition for a delivery, because the delivery object doesnt contain all the data per recipient.

If you need to see the subject before you send the delivery you can enrich the subject using a formula onto the temporary schema in the workflow. If you need to see the subject after you send the delivery then you can add it to the broadLog as @jonathon_wodnicki has described below. Cheers Darren