Method

getShortLink — shortens a link by specifying the URL, entity name and entity id

Description

Minimum number of  arguments for this method is three. The first argument is the URL you want to shorten. The second is the entity name followed by the entity id. Those two are needed to track when the entity clicks on the link.

Structure of the method:

getShortLink('URL', 'Entity Name', 'Entity Id')

Parameters

URL — The long URL you want to shorten

Entity Name — The entity name like lead

Entity Id— The entity id like the id of a lead

Examples

In the example below, we generate a short link and then we are sending it by email to a lead so we know the lead data like first_name and id.

//Find all cases for a specific contact. 
Hello {{first_name}},

{% set shortLink = getShortLink('https://your-domain.com?post=455', 'lead', id)%} 

Check our new post

//Output: Generates tracked short link

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy.