Mirror Page Generation
Hello All,
We have to generate
mirror page for each broadLog records.
Had tried generating mirror page in JS using GetMirrorURL.
nms.delivery.GetMirrorURL(deliveryId,broadlogId)
We are able to print mirror page for all broadLog records for email channel, but there is a catch in it.
By copying the mirror page URL generated by GetMirrorURL function, mirror page is rendering fine for the deliveries where mirror page is configured in Email delivery.
But it throws error for URLs generated by GetMirrorURL function for deliveries where mirror page URL haven't configured.
So is there any other way to generate mirror page for all broadLog records in a workflow?
Like, replicating https://<instance_url>/nl/jsp/m.jsp?c=<%=escapeUrl(cryptString(message.deliveryPartId.toString(16)+'|'+message.id.toString(16)))%>
(Had referred this community question, but unable to generate the correct mirror page URL)
Workflow used:
Query on broadLogRcp as targeting dimension,
JS
var data = xtk.queryDef.create(
<queryDef schema="temp:query" operation="select" >
<select>
<node expr= "@id" /> //broadLogId
<node expr= "@deliveryId" />
<node expr= "@deliveryPartId" /> //tried fetching deliveryPartId from [delivery/mirrorPageInfo/@id] in query
</select>
</queryDef>
)
var output = data.ExecuteQuery();
for each (var file in output.query)
{
instance.vars.deliveryId = file.@delId.toString(16);
instance.vars.broadlogId = file.@id.toString(16);
instance.vars.partId = file.@deliveryPartId.toString(16);
vars.url = "https://xxxxxxxxxxxx.campaign.adobe.com/nl/jsp/m.jsp?c="+ escapeUrl(cryptString(???????????));
//tried passing multiple probability variable in cryptstring, but has not worked for us,(message.deliveryPartId.toString(16)+'|'+message.id.toString(16)))
logInfo("Mirror Page URL1: " + vars.url);
}