Working with a client, there was a question as to whether or not we could create a campaign with a querystring parameter that wasn’t a GUID. Why the client didn’t like a GUID…I have no..idea… oh yeah, it’s ugly. I was prepared to write some code to basically map the Item name or a slug into the the ID and the trigger the campaign off of that. Just when I had cracked my knuckles, I thought “Hey, let’s just try it with the Item name” and see what it does.

It worked. Apparently there’s some code down in the “TriggerCampaigns” processor that actually resolves that fancy GUID AND the Item Name.

For example in the screenshot below

You typically use the following URL to trigger the campaign: https://localsitecore?sc_camp=8AAA8FA5CE4C434299C47399E9CEBB80

You can ALSO trigger the campaign with this cleaner URL: https://localsitecore?sc_camp=Test-Campaign

The pros to this are that things are SO much more readable in the URL. The downside seems small: If you rename a campaign, the latter won’t work for you until you update.

Is it stupid that I didn’t know that? Maybe. Maybe it’s just some magic. Feel free to comment and let me know how much I should have know this before…

Facebooktwittergoogle_plusredditlinkedinmail