Hi SanfordWhiteman,
My name is Jeff and I'm assisting my colleague Steve with this task. I'm a web developer but have zero experience with Marketo and using these built in web hooks. Do you know of a resource that I can reference, other than this Marketo Nation forum community, that shows step by step, how to build this webhook and connect it to the Marketo workflow? This is my understanding of the process so far: 1) User fills out the form and submits
2) Marketo replies with an email confirming their submission a) during the creation of the email, we call the webhook and retrieve the pass code via : "response": "QNFTMGPXLKC2"
b) if we have a value, we place the value of the response in a token (a placeholder??) or
if the webhook returns no value (there are no more codes), we may let the customer know that we have exhausted all pass codes (codes)
3) In your sample webhook code (1st one) , you have two lines at the top
var fileOfCodes = "https://pages.example.com/rs/111-222-333/images/sample_codes.txt";
var counter = "/distributed_codes/{{Program.Id}}/v1";
fileOfCodes is a variable holding the text file, we import that file into marketo and adjust the https://pages.example.... with the actual path where we uploaded the text file
counter is a variable holding the count. What does or how does the "/distributed_codes/{{Program.Id}}/v1" keep track of the count? When creating the webhook, where do we put the sample code?
var fileOfCodes = "https://pages.example.com/rs/111-222-333/images/sample_codes.txt";
var counter = "/distributed_codes/{{Program.Id}}/v1";
FBHttp.fetch(fileOfCodes)
.then( resp => resp.text() )
.then( respT => respT.split(/\r?\n/) )
.then ( codes =>
FBCounter.count(counter)
.catch( count => 0 )
.then( count =>
count < codes.length
? FBCounter.autoAdd(counter).then( resp => success(codes[count]))
: failure("All outta codes!")
)
)
.catch(failure)
What I really would like to see is how to create a webhook step by step and how to integrate the new webhook in the workflow process.
Thanks so much for your help.
Jeff
... View more