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

Anyone had luck using getMirrorURL() from sql expressions?

Avatar

Level 3

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!

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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



David Kangni

View solution in original post

6 Replies

Avatar

Community Advisor

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



David Kangni

Avatar

Level 3

Thanks but not sure if this works with Postgres -

I get error using this - when I try to pass hardcoded values or directly deliveryid,tostring(bradlogid)

Error-

GS-220000 PostgreSQL error: ERROR: function getmirrorurl(integer, unknown) does not exist LINE 1: ...8832_23_1 (sExpr1591908139,iId) SELECT DISTINCT GetMirrorU... ^ HINT: No function match

Avatar

Community Advisor

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

 

Avatar

Level 3
Thanks, I tried as David suggseted but no luck, I was able to get mirror url for delivery by using nms.delivery.getmirrorrl method from JS results to a variable, However it is resulting in same url for all broadlog records, where each record should have its own different URL.. Thoughts?

Avatar

Community Advisor

Hi @priyal_b,

based on you response, you did not do iteration and have last generated Mirror link same for all customers.

You must to iteration and assign each Mirror URL to appropriate customer.

 

Regards,

Milan

Avatar

Correct answer by
Community Advisor

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



David Kangni