Anyone had luck using getMirrorURL() from sql expressions?

priyal_b

11-06-2020

Hi,

Does anyone have an idea how the getMirrorURL() expression can be used? located under category "Other".

It requires a value as parameter to be passed with it, trying to figure out what that would be? which could result into giving individual mirror urls for n number of records in workflow.

 

Thanks in advance!

 

ac_classic mirror_url

Accepted Solutions (1)

Accepted Solutions (1)

DavidKangni

MVP

11-06-2020

Hi Priyal,

code below works only if you're on hybrid mode. If you're hosted by Adobe use url-encoding cryptString('-1|<broadlog id in base16>|<delivery id in base16>')

 

If you want to use JS activity inside a workflow, see the 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)

 

To get the mirror page per user, you need to add a loop in your queryDef

Thanks,

David

Answers (2)

Answers (2)

isahore

11-06-2020

Hi @priyal_b,

The method GetMirrorURL() here in the "Others" functions takes a string value as parameter, which is the internal name of the external account configured for your instance. It returns the URL of the mirror page server that you set while setting up the external routing account. If no value is provided here, then the default value set for the instance (in the Deployment Wizard, also available as "NmsServer_MirrorPageUrl" option value) is returned.

 

isahore_0-1591906598272.png

I hope that answers the question.

 

Regards,

Ishan

 

DavidKangni

MVP

11-06-2020

Hi 

 

you can use it inside an enrichment for example:

 

GetMirrorURL(000000001,"00000002")

 

000000001 is the delivery id

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

Thanks,

David