I have scenario wherein I would like to get the (html) preview of a delivery template, find below the snippet I am using to build the preview:
But, the above code fails to generate the html as it was not able to resolve the variables in delivery template. Is there any way to pass the custom variables in the above code?
Have tried passing it through params (<params content="html" filter="@id=280519" myCustomVariable="myCustomValue" />), but it still doesn't resolves. Any help would be much appreciated.
You cannot use such a seed address testing in a standalone delivery.
You will have to create a workflow which provides this targetData element to delivery. No need to run the workflow but the delivery activity needs this targetData element as part of incoming schema.
Then if you send the proof from delivery it will go out.
My seed address have to have additional data containing <targetData Survey_Unique_URL=”http://www.adobe.com” />
As stated earlier on this thread you will have to make the delivery believe that workflow is sending the same targetData to delivery.
As a result, I’ll just add a Query activity before it with a random selection query. Most important part if to provide targetData with alias name matching the field you need inside delivery.
Now the setup we have done, we don’t need to run the workflow. It was done to make delivery believe that targetData will coming in from outside if workflow is executed.
Now open the delivery and send a proof and it goes out successfully
Thanks for the details. It doesn't works for me when I send it manually from the client console.
Here is the seed address target data:
<localContent bodyText="Test Body Text"/>
So, when I execute the send proof with html containing <%= targetData.localContent.bodyText %> and with above seed address, I am getting the following error:
Also, had a look at the proof source and could see the FCPSeed element has got the targetData:
<FCPSeed _cs="Selvandhan Manivasagam" delivery-id="0" folder-id="1178" id="446355" internalName="ntSDM141" isModel="0" label="Selvandhan Manivasagam" proof-id="446354">
<localContent textBody="Test Body Text" />
<custom_nms_broadLog address="" format="0">
<address line1="" line2="" line3="" line4="" line5="" line6="" line7="" />
<custom_nms_recipient account="" agency="" birthDate="" blackList="0" company="" email="email@example.com" emailFormat="0" fax="" firstName="xxx" gender="0" language="" lastName="xxx" middleName="" mobilePhone="" origin="" phone="" salutation="Mr" status="0">
<location address1="" address2="" address3="" address4="" city="" countryCode="" stateCode="" zipCode="" />
<proof _cs="[Proof 1] DELIVERY TEST (FCP_446354_ntDM352)" />
<folder _cs="Seed addresses" />
Please suggest. Thanks!
delivery.variables._var.stringValue = "XXX";
And take care: if you move variables in different order in the Property/variables form, the JS code must be adapted accordingly, because the index number won't change automatically
No I think I was wrong, very sorry.
targetData tab in Seed address is made for "replacing"/simulating the targetData coming from workflow.
So it should be possible to use it directly for your proof delivery.
The error "undefined" would be another reason, but I don't understand it by now.
Probably part of the SOAP code you use, though I am not sure.
Please may you confirm that when you send manually the Proof from the AC client, it works fine, and that it is only from SOAP call that there is an issue?
Yes, it would be better to create a new ticket whenever another subject, and if the original subject is resolved, please put it as Resolved/correct response.
For your latter question, targetData XML elements are automatically added to the context by a workflow.
So if your SOAP code calls directly a delivery template to get the preview result, targetData won't be defined.
It is the same with the Additional Data section of Seed adresses; to be valuable, the delivery must be called from a workflow, not directly.
Thanks J-Serge. That was very useful.
I know this is a different topic, but your answer on this would be great. I have also targetData variables defined in my delivery like 'targetData.localContent.subject' and have defined this in my seed address targetData like the following:
<localContent subject="my email subject" />
But, when I execute the proof delivery using the seed address, I am getting targetData is undefined. Any suggestion? Thanks!
Thanks for the response.
Actually, we are placing an campaign order from within another CMS (WebCenter Sites) [to manage content centrally] using Adobe Campaign OOTB SOAP endpoints which is working fine. But, we would need to display the preview of the email delivery from within the CMS before placing the order.
Please let me know if you need more information, Thanks!