Being Creative with RTP Perceived Organization
I realized the RTP inferred organization was not accessible as a lead attribute or under marketing activity data. It's only available in RTP. It's very usable data and I wanted to bridge that gap and make it available as a field.
This led me to use experiment by
- Using the RTP function to acquire the inferred Org
rtp('userContextReady', function() { var inferOrg = rtp.userContext.org; } - Using the Munchkin API to push the Organization as visitWebPage with the prefix "/LPO/"
- shows up in lead activity like this : www.mydomain.com/LPO/NAME OF THE COMPANY HERE
if(Munchkin){ Munchkin.munchkinFunction('visitWebPage', { 'url': "/LPO/"+ORGANIZATION}); } - I setup a new custom field for "Last Perceived Organization"
- Next I have a Smart Campaign
- The smart list is setup to trigger for visitsWebPage containing "/LPO/"
- The flow then updates the value of a custom field I setup, named "Last Perceived Organization", to the value the trigger token for {{trigger.web page}}.
- I don't know why clickedLink is excluded from these trigger tokens?!?! I would've preferred to use that...
This is working and as mentioned in the above example this results in a value like this:
www.mydomain.com/LPO/NAME OF THE COMPANY HERE
This is where I need help from you. Is anyone aware of a method through smart campaigns/calculated fields/witchcraft to run a replace like function on a field without using the API or Export>Import process?
For my javascript people this is what I'm looking for at a field level:
var x = "www.mydomain.com/LPO/NAME OF THE COMPANY HERE";
var org = x.replace("www.mydomain.com/LPO/","");
// org now equals "NAME OF THE COMPANY HERE"
Appreciate any thoughts/feedback