Event Registration Cap using tokens

KaitlynNelson1
Level 3

Event Registration Cap using tokens

Hoping to get an explanation on how to set up an event registration cap in Marketo using a program token. I have read some threads about using a webhook, but I know there should be an easier way to set it up in Marketo. Any help with the flows etc would be appreciated 🙂 

Tags (2)
20 REPLIES 20
SanfordWhiteman
Level 10 - Community Moderator

Re: Event Registration Cap using tokens

Marketo’s Sky UI (RIP) used to have a Registration Cap feature. Not sure if too many people used it. Now, the direction to go in is a webhook-bsed solution as you mentioned.

 

Naturally, this can use a program-level {{my.token}} to store the cap instead of hard-coding it, but it can’t be done with Marketo alone.

KaitlynNelson1
Level 3

Re: Event Registration Cap using tokens

@SanfordWhiteman So I've read more and discussed with others, turns out that FlowBoost is the better way to go. I know you probably have referenced this before, but do you have documentation on how to set it up? We have the webhook set up, I guess the flows are campaigns are what I am looking help with. Is there an example the best way to set this up?

 

We want to cap the reg to 25 then take them to the sorry/waitlist page. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Event Registration Cap using tokens

Yep, in the FlowBoost User Guide, it’s under “Limit the Number of Registrants for an Event (ADVANCED)”.

 

(Wow, does that doc need to be revised for clarity. This is the yea — oops, it’s August already?)

KaitlynNelson1
Level 3

Re: Event Registration Cap using tokens

So I tried adding this script into my LP (This was documented from a previous colleague suggestion to add this sample to JS Footers of LP's if needed) : 

 

 

<script>// <![CDATA[

function processRegCount(current){
  var cnt = current.count;
  var remain = {{my.Max Count}} - cnt;
  remain = remain.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
  console.log('Current Key Count: ' + cnt);
  if (cnt < {{my.Max Count}}) {
    document.getElementById('remaining').innerHTML = remain + " spots remaining!";
  } else {
    // do this if limit is reached
    document.location.href = '{{my.Sorry Page}}';
  }      
}
// ]]></script>
<script src="https://api.teknkl.com/fbcounter_v1/counter/event/program/{{program.id}}?public-api-key=pub:3oozcavs7fqwvk92bd974zse&cb=processRegCount"></script>

 

 

Then setting up the tokens and a smart campaign that included Fills out form trigger. The flow is attached (might have to zoom). I'm getting an error in my activity log when I look into the Call webhook entry. That also is attached. I had set my max number to 1 for registrations so that I could test 2 form fills and one would recieved our "sorry page" which is what anyone should get if they try to register after the max number. 

 

I'm a bit confused on how I should set this up. I also need to have a campaign that updates status, list, and email actions for anyone who was put on a waitlist (which is anyone who tried to register past our max number of 25). 

 

Screen Shot 2022-08-18 at 4.49.12 PM.png

Screen Shot 2022-08-18 at 4.49.12 PM.pngScreen Shot 2022-08-18 at 4.50.15 PM.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Event Registration Cap using tokens

Hi, the URL you’re using on the client side (reading the counter) is slightly off, it should be:

<script src="https://api.teknkl.com/fbcounter_v1/counter/count/event/program/{{program.id}}?public-api-key=pub:3oozcavs7fqwvk92bd974zse&cb=processRegCount"></script>

 (you’re missing the /count/ in the path)

 

On the server side (call webhook) what error is there in the Activity Log?

 

And please show the full Activity Log Detail of the Call Webhook (I think there’s more at the bottom that’s not in your screenshot, like the FlowBoost server response).

KaitlynNelson1
Level 3

Re: Event Registration Cap using tokens

Thank you for the correction! I have attached the new screenshot of the call webhook activity log info. I never got a message saying a failure outside of the catch( failure ); in the payload part. Screen Shot 2022-08-19 at 9.09.07 AM.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Event Registration Cap using tokens

OK, that’s a successful call (“failure” is just catching a possible failure, doesn’t mean there was a failure).

 

The count is 1 on the public side.

KaitlynNelson1
Level 3

Re: Event Registration Cap using tokens

Okay got it. 

 

I tested with two emails and there are two members of the program. Both got the confirmation page instead of one getting the confirmation and the other getting the waitlist page. Is there a way to set up the flows incorrectly? Shouldn't it just use the trigger of the fills out form and then the flow say call webhook and then program status change etc?

SanfordWhiteman
Level 10 - Community Moderator

Re: Event Registration Cap using tokens

The Marketo flows aren’t directly involved on the browser side.

 

On the browser side, you’re just checking the current count and taking a conditional action based on the count.

 

What’s the LP URL?