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

Mirror Page Generation - deliveryPartId

Avatar

Level 2

Hi,

 

In ACC, the out-of-the-box personalization block that's used for inserting the mirror page url in a delivery looks like this:

 

 

 

<%@ value object="provider" xpath="@mirrorURL" %>/nl/jsp/m.jsp?c=<%=escapeUrl(cryptString(message.deliveryPartId.toString(16)+'|'+message.id.toString(16)))%>

 

 

 

While the message.id is basically the broadLog id of a given delivery, I cannot understand where the message.deliveryPartId comes from, nor how can I retrieve that from an existing table, outside a delivery object.

 

My goal is to recreate the GetMirrorURL() function that's available as part of the nms.delivery schema, and use this in a javascript activity inside a workflow - I have to retrieve several hundreds of thousands of mirror pages per day.

 

Any suggestions on where can I retrieve that from? My intuition tells me it's the remote broad log id that exists on the midsource.

 

p.s.: I have tried the suggestion of @Jonathon_wodnicki  in this post and it doesn't seem to work.

 

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 8
Hi @ovot, The message.deliverypartid comes from the below path Delivery action part (nms: deliveryPart) --> Message (message) --> Part identifier (@deliveryPartId) Here nms: delivery Part is schema Message is linked to above schema @deliveryPartId is the attribute Hope you got the solution. Regards, Venu

View solution in original post

6 Replies

Avatar

Community Advisor

Hi @ovot ,

 

you can use JS activity inside a workflow for example:

 

var url = nms.delivery.GetMirrorURL(000000001,"00000002")

 

000000001 is the delivery id

00000002  is the broadlogId (not the messageID) - passed as string in quotes

 

If you need to use it within variables:

instance.vars.deliveryId = 000000001

instance.vars.broadlogId = 00000002

instance.vars.broadlogId = instance.vars.broadlogId.toString()

 

var url = nms.delivery.GetMirrorURL(instance.vars.deliveryId,instance.vars.broadlogId)

 

Regards,

Milan

 

Avatar

Level 2

Hi Milan, as I have mentioned in my initial question, I am purposefully trying to avoid using GetMirrorURL(). I am trying to reproduce its functionality, but I cannot seem to find its definition anywhere.

 

Thank you for your answer, but do you know how and where that function is defined? Then I can take its content and reproduce it locally in a JS activity inside a workflow.

 

Ovidiu

Avatar

Correct answer by
Level 8
Hi @ovot, The message.deliverypartid comes from the below path Delivery action part (nms: deliveryPart) --> Message (message) --> Part identifier (@deliveryPartId) Here nms: delivery Part is schema Message is linked to above schema @deliveryPartId is the attribute Hope you got the solution. Regards, Venu

Avatar

Level 2
@Venu_Reddy Alright, that clarifies a bit. The interesting part is that in my nms:deliveryPart table there is no data whatsoever, the table is completely empty. Do you have an idea on why that might be the case?

Avatar

Level 8

@ovot, There might be a chance of not having access to the schema else some other reason that needs to investigate.

Avatar

Community Advisor

Hi,

 

There are at least 3 formats for the mirror url. In a recent build (9032) I see the same fields as in the personalization block you pasted:

<%=escapeUrl(cryptString(message.deliveryPartId.toString(16)+'|'+message.id.toString(16)))%>

 

 Here message.deliveryPartId refers to nms:mirrorPageInfo/@id, on the sending instance.

 

Thanks,

-Jon