I need to replace this with a marketo form, remove the credit card requirement, and reduce the trial length to 30 days.
We can use API/webhooks to send a key from our database to marketo if we need to include that key in an email to the user...or however that needs to happen.
If we use their ResponseMapping for WebHooks, you could have our license app post the required information to Marketo, and then retrieve it there. We would need to find out how to process this information inside Marketo.
@AshleyS My question is, why does the license email need to go through Marketo? Can't it be directly sent to the user from our license app?
@AshleyS the license app is the server that takes care of generating a license for GitLab EE. It can send emails when a new license is created to the owner of the license. (The license is an encrypted file that needs to be uploaded into GitLab, it is not a code).
I see some problems with your requirements, however:
begin_trial_date: Send a ping to Marketo when a user inputs their license code/activates license code. Not sure the proper terminology there.
The license is valid for a fixed period of time, it does not start the moment it is uploaded, it starts on a given date at the moment of creation.
upgrade_date: Send a ping to Marketo when a trial user upgrades to enterprise.
I'm not sure how feasible this is, specially on environments that don't allow their servers to access the internet. Code for this ping would have to be implemented in GitLab EE itself.
-license_email_opened_date: Send a ping to Marketo when a new user opens the license email.
For this to work, the license has to be sent by Marketo. It might work with the WebHook type I mentioned before.
Note that right now, all subscription management takes place in Recurly, which posts a webhook to the license app, which will then generate a license file based on the information in Recurly and send that out to the user. The license app is only responsible for generating license files, not for managing other aspects of subscriptions.
I'm not quite sure what we're trying to accomplish here, but it seems to me like it would make more sense to hook up Marketo to Recurly rather than the license app.
would it be possible for marketo to post a webhook to the license app triggering the sending of a license file via email?
Yes, as long as we have the time of subscription, start date, end date, name, company and email.
what format is the license file?
It's a .gitlab_license file which contains plaintext-encoded encrypted data, representing the license details, that the GitLab EE app knows how to decrypt.
Is it possible to send that license file to marketo via API or webhook?
If their API/webhooks allow that, sure.
We need to use the marketo form so we can remove the restriction from recurly of requiring an email
Putting everything we talked about in person here in notes:
The license app should send the text license file to Marketo via webhook upon form submit. The email with the license file will be sent from Marketo. Who can work with me to complete this? @sytses@DouweM@JobV
@AshleyS Do you have experience with sending emails from Marketo that include files that have been uploaded to Marketo from elsewhere? The documentation is very confusing, but I think we'd need to use the Create a File API rather than Webhooks, although I'm not quite sure how to connect this to a person/organization in Marketo or how to get at this file from the email.
When the user submits the form (embed code below), he or she will become a lead in Marketo automatically. The license key should then be generated and somehow attached to the Marketo email (link below). The automation is already setup for the user to receive the email from Marketo post-form fill. I've created a transactional email (no design yet) that will bypass unsubscribes with the {{lead.Trial License Key}} embedded into the email. I just need the license key sent into Marketo upon submit. You can do lookup on the submitted form on email to associate the key with the user.
If @DouweM is going to send the key file as an attachment, I'm clueless there on how to do.
@AshleyS You can ace my exam for me on Friday and save me two days of studying ;)
Getting the license key into Marketo is indeed the blocker right now, but from my initial reading of the docs it didn't seem obvious how to do this and I haven't had time yet to investigate further.
@AshleyS I'm working next week, in CEST, on Monday from 1-5pm, Tuesday from 9am-1pm, Wednesday and Thursday from 1-6pm and all of Friday. I will have time to look into the issue myself on Monday.
Sounds good. Let me know how I can help. @rspeicher has been working with Marketo a lot and understand most things if you need clarification on how it handles webhooks, REST API, etc.
@DouweM @AshleyS This probably wouldn't be a webhook thing - REST API usually seems better for this (from devs I've worked with before on pulling data into Marketo).
The correct API name of the field is "trialLicenseKey". You can't make a call for "Trial License Key" because that's just a label for the field.
It does not look like it's possible to add an attachment to a Marketo email using Email Scripting.
GitLab Enterprise Edition does not currently support entering (or copy/pasting) a key manually, it requires it to be an uploaded file.
If we added the option to GitLab to enter a key manually, we'd be most of the way there. If this is really necessary, we should be able to get this into 8.2 at the last moment (it's a very minor change, code wise)
@AshleyS The call later today may end up being very short.
@DouweM thank you for looking into this. let's confirm it all w/ our technical contact at marketo as it is too late to cancel. If the call it short, more time for naps!
@DouweM@rspeicher All I need is for the licenseKey to be sent to Marketo as a string to the Trial License Key field (API name is "trialLicenseKey"). Here's where all the webhook stuff is in Marketo: https://app-ab13.marketo.com/#WH0A1
Once that is being loaded into Marketo, I can automate the email to send the key to the user.
I've made changed in GitLab EE (gitlab-org/gitlab-ee!63), the license app (dev) and the license app chef cookbook (dev).
I've created a LicenseAppWebhookwebhook in Marketo, but for some reason I am unable to set up the Response Mappings. We would want one from license_key to trialLicenseKey. For this reason, I have also not been able to actually test that the webhook ends up at the license app as expected.
@DouweM I edited LicenseAppWebhook to add the response mapping you wanted. Please check. Don't think I did anything special, not sure why you weren't able to.
Also feel free to remove the GetLicenseWebhook hook that the Marketo guy created as a demo if you no longer need it as reference.
All right, the license app is all set up, and the LicenseAppWebhook should work now, provided the tokens used actually exist and are set correctly.
@hanktaylor Can I help with anything else or can you take it from here?
One last thing: For Recurly licenses, we show the Recurly subscription ID in the license app so we can quickly see where this license originated. Is there a unique lead ID or something in Marketo? I didn't see one in the list of tokens.
Also, I fixed the company name token in the webhook. I changed it from {{lead.Inferred Company}} to {{company.company name}} so it will be fine now. For future reference, inferred data is based off IP address; inferred company is the company which has that IP registered i.e. almost always an ISP except at large companies.
@hanktaylor I justed tested the endpoint again by sending a manual request, and everything seems to be in order. Is there a way to get more logs for the request Marketo sent? In the link, I only see "Response Code: 1000", which doesn't sound like an HTTP response code.
The other error we're getting is "server returned code 422" and there are no resources on that code I could find :/ Could that be from the license key app?
@hanktaylor I believe the 422 error is because the company name passed to the license app via the webhook is blank, even though it's filled in on the form.
@hanktaylor I also noticed the "Company Name" field is no longer required on the form, but AFAIK the license app still requires it. Did you add a fallback if the user doesn't fill out that field?