How to customize and shorten a URL using ShortenURL expression function in Visual Dialogue

URLs can be shortened and customized using the ShortenURL expression function, available in Visual Dialogue when creating SMS/Marketing templates.

From the Reference Guide, the details for the ShortenURL expression function are:

string ShortenURL( string OriginalUrl, string ShortUrlPrefix )

Returns a shortened URL for OriginalUrl with an optional ShortUrlPrefix prefix added to the
coded part of the URL, i.e It returns a
different URL every time it is called.

The above expression function can be modified a little, so that we can customize and shorten a URL in the same expression:

«#ShortenURL("OriginalUrl" + ToString(database entry), "ShortUrlPrefix")»

Suppose that we are sending SMS messages to customers that contain a URL like and at the same time we want to append a serial number (fetched from database) which is unique to every customer at the end of the URL. This can be done by using below

«#ShortenURL("" + ToString(SerialNo))»

UPDATED:  April 21, 2017