Overview
This article provides a step-by-step guide on how to automate the process of confirming registrations and approving submissions for challenges in AdvocateHub using a Marketo form and API webhook. It details the creation of custom event types and challenges within AdvocateHub, as well as setting up a corresponding program, form, and webhook in Marketo to manage event registrations efficiently.
Information
Requirements: Marketo, Influitive API stage, Influitive API token
Do you have a challenge that asks advocates to fill out a form or sign up for an event using a form? You're likely to manually confirm registration and approve submissions. Using a Marketo API webhook and an AdvocateHub API stage, you can automate this confirmation.
Part I: In AdvocateHub
Step 1: Create a Custom Event Type in your Hub
Please read this article to do so: API: Setting up Custom Event Types. We've called our event type marketo_form, but you should use a naming convention that makes the most sense to your use case.
This Custom Event Type can be used for completing challenges, awarding badges, etc. It should be specific enough to describe the type of action being completed but can be general enough to be used in multiple situations/challenges.
Step 2: Create a challenge with an API stage
i. Create a new challenge from scratch and give it a name, headline, banner image (optional), and challenge description.
Important: Provide a link to the Marketo form in your challenge description. Make it clear to advocates that they must sign up using the same email address as the one they use in your Hub.
You can use a markdown code to insert your link. For example:
## [Sign up now!](http://www.influitive.com/advocamp2017/signup)
ii. Choose the API Stage from the Administrator Actions section.
a. In the Stage Description section, give a brief explanation of what happens next.
b. In the Allowed Event Type field, choose the Custom Event Type that you created above (e.g. Marketo Form)
c. Fill out the API Code. This must be unique and is for exclusive use at this stage of this individual challenge. In the API call, this is referred to as the stage[code]. Here we'll use advocamp_registration as this stage is meant to award points for people who sign up for Advocamp.
iii. Target your challenge and then Save it.
Part II: In Marketo
Step 1: Create a new Program
Create it in the appropriate Campaign Folder. We'll call ours "Advocamp 2017 Registrations"
Step 2: Create a New Local Asset and choose "Form"
As we will identify advocates by email address, ensure that you have included at least this field.
Step 3: Create a new Smart Campaign in the same Program.
a. Click on the Smart List tab
b. Search and choose the trigger, Fills Out Form, and drag it to the left area.
c. Choose the form you created above.
Step 4: Create a Webhook
a. Click on the "Admin" link on the top of the Marketo application
b. Go to Integrations > Webhooks
c. Click on New Webhook
d. Fill out the pop-up in the following way:
Webhook Name: You may choose any relevant name
Description: Enter a relevant description
URL : https://YOURHUB.influitive.com/api/events
Request Type: POST
Template
{
"type": "marketo_form",
"contact": {
"email": {{lead.Email Address}},
"stage": {
"code": "advocamp_registration"
}
}
}
The values:
marketo_form is the event type
advocamp_registration is stage code set up in the challenge
Details :
- "type" is the Custom Event Type (e.g. marketo_form)
- {{lead. Email Address}} - This is the Marketo email address token
- "stage": { "code" } is the unique stage API Code created above
Request Token Encoding: JSON
Response Type: JSON
e. Save your webhook, click on Webhook Actions, and choose Set Custom Header
f. Add 3 headers
Header | Value |
Authorization |
Token YOURHUBTOKEN |
Accept | application/vnd.infl-v3+json |
Content-Type | application/json |
g. Save the Custom Header.
Step 5: Add your Webhook to the Smart Campaign "Flow"
e. Click on the Schedule tab and click the Activate button to activate your campaign.
FAQ
How do I create a custom event type in AdvocateHub for a Marketo form?
To create a custom event type in AdvocateHub, follow the instructions in the article "API: Setting up Custom Event Types," and name the event type to reflect its purpose, such as "marketo_form."
What is the purpose of adding an API Stage to a challenge in AdvocateHub?
Adding an API Stage to a challenge allows you to automate the process of confirming actions such as form submissions. You need to select the custom event type created earlier and define a unique API code for this stage.
How do I set up a webhook in Marketo to work with AdvocateHub?
In Marketo, create a new program with a form and smart campaign, then follow the instructions to create a webhook. This webhook will be used to automate the confirmation of registrations by communicating with the AdvocateHub API.
What information should be included in the Marketo form for AdvocateHub challenges?
The Marketo form should include at least an email address field to identify advocates, and it should be linked in the challenge description to remind advocates to use the same email registered in your Hub.
What should I do after creating the webhook in Marketo?
After creating the webhook in Marketo, you need to add it to the Smart Campaign "Flow" to ensure that it is triggered appropriately when a form is submitted, automating the registration confirmation process.