Product Qualified Lead (PQL) development guide

The Product Qualified Lead (PQL) funnel connects our users with our team members. Read more about PQL product principles.

A hand-raise PQL is a user who requests to speak to sales from within the product.

Set up your development environment

  1. Set up GDK with a connection to your local CustomersDot instance.
  2. Set up CustomersDot to talk to a staging instance of Platypus.

  3. Set up CustomersDot using the normal install instructions.
  4. Set the CUSTOMER_PORTAL_URL environment variable to your local (or ngrok) URL of your CustomersDot instance.
  5. Place export CUSTOMER_PORTAL_URL='https://XXX.ngrok.io/' in your shell rc script (~/.zshrc or ~/.bash_profile or ~/.bashrc) and restart GDK.
  6. Enter the credentials on CustomersDot development to Platypus in your /config/secrets.yml and restart. Credentials for the Platypus Staging are in the 1Password Growth vault. The URL for staging is https://staging.ci.nexus.gitlabenvironment.cloud.
  platypus_url: "<%= ENV['PLATYPUS_URL'] %>"
  platypus_client_id: "<%= ENV['PLATYPUS_CLIENT_ID'] %>"
  platypus_client_secret: "<%= ENV['PLATYPUS_CLIENT_SECRET'] %>"

Set up lead monitoring

  1. Set up access for Platypus Staging https://staging.ci.nexus.gitlabenvironment.cloud using the Platypus Staging credentials in the 1Password Growth vault.
  2. Set up access for the Marketo sandbox, similar to this example request.

Manually test leads

  1. Register a new user with a unique email on your local GitLab instance.
  2. Send the PQL lead by submitting your new form or creating a new trial or a new hand raise lead.
  3. Use easily identifiable values that can be easily seen in Platypus staging.
  4. Observe the entry in the staging instance of Platypus and paste in the merge request comment and mention.

Troubleshooting

  • Check the application and Sidekiq logs on gitlab.com and CustomersDot to monitor leads.
  • Check the leads table in CustomersDot.
  • Set up staging credentials for Platypus, and track the leads on the Platypus Dashboard: https://staging.ci.nexus.gitlabenvironment.cloud/admin/queues/queue/new-lead-queue.
  • Ask for access to the Marketo Sandbox and validate the leads there, to this example request.

Embed a hand-raise lead form

HandRaiseLeadButton is a reusable component that adds a button and a hand-raise modal to any screen.

You can import a hand-raise lead button the following way.

import HandRaiseLeadButton from 'ee/hand_raise_leads/hand_raise_lead/components/hand_raise_lead_button.vue';

export default {
  components: {
    HandRaiseLeadButton,
...
</script>

<template>

<hand-raise-lead-button />

The hand-raise lead form accepts the following parameters via provide or inject.

    provide: {
      small,
      user: {
        namespaceId,
        userName,
        firstName,
        lastName,
        companyName,
        glmContent,
      },
      ctaTracking: {
        action,
        label,
        property,
        value,
        experiment,
      },
    },

The ctaTracking parameters follow the data-track attributes for implementing Snowplow tracking. The provided tracking attributes are attached to the button inside the HandRaiseLeadButton component, which triggers the hand-raise lead modal when selected.

Monitor the lead location

When embedding a new hand raise form, use a unique glmContent or glm_content field that is different to any existing values.

We currently use the following glm_content values:

glm_content value Notes
discover-group-security This value is used in the group security feature discovery page.
discover-group-security-pqltest This value is used in the group security feature discovery page experiment with 3 CTAs.
discover-project-security This value is used in the project security feature discovery page.
discover-project-security-pqltest This value is used in the project security feature discovery page experiment with 3 CTAs.
group-billing This value is used in the group billing page.
trial-status-show-group This value is used in the top left nav when a namespace has an active trial.

Test the component

In a jest test, you may test the presence of the component.

expect(wrapper.findComponent(HandRaiseLeadButton).exists()).toBe(true);

PQL lead flow

The flow of a PQL lead is as follows:

  1. A user triggers a HandRaiseLeadButton component on gitlab.com.
  2. The HandRaiseLeadButton submits any information to the following API endpoint: /-/trials/create_hand_raise_lead.
  3. That endpoint reposts the form to the CustomersDot trials/create_hand_raise_lead endpoint.
  4. CustomersDot records the form data to the leads table and posts the form to Platypus.
  5. Platypus posts the form to Workato (which is under the responsibility of the Business Operations team).
  6. Workato sends the form to Marketo.
  7. Marketo does scoring and sends the form to Salesforce.
  8. Our Sales team uses Salesforce to connect to the leads.

Trial lead flow

Trial lead flow on GitLab.com

Trial Frontend FormsTrialsController#create_leadCreateLeadServiceApplyTrialServiceSubscriptionPortalClient#generate_trial(sync_to_gl=false)SubscriptionPortalClient#generate_trial(sync_to_gl=true)CustomersDot|TrialsController#create(sync_to_gl=false)CustomersDot|TrialsController#create(sync_to_gl=true)GitLab.com frontend sends [lead] to backend[lead][lead] Apply the trial[lead] Creates customer account on CustomersDot[lead] Asks CustomersDot to apply the trial on namespaceGitLab.com sends [lead] to CustomersDotGitLab.com asks CustomersDot to apply the trialTrial Frontend FormsTrialsController#create_leadCreateLeadServiceApplyTrialServiceSubscriptionPortalClient#generate_trial(sync_to_gl=false)SubscriptionPortalClient#generate_trial(sync_to_gl=true)CustomersDot|TrialsController#create(sync_to_gl=false)CustomersDot|TrialsController#create(sync_to_gl=true)

Trial lead flow on CustomersDot (sync_to_gl)

CustomersDot|TrialsController#createHostedPlans|CreateTrialService#executeBaseTrialService#create_accountHostedPlans|CreateTrialService#create_platypus_leadPlatypusLogLeadServicePlatypus|CreateLeadWorkerPlatypus|CreateLeadServicePlatypusApp#postPlatypusSave [lead] to leads table for monitoring purposesCreates a customer record in customers tableCreates a platypus leadAsync worker to submit [lead] to Platypus[lead][lead][lead] is sent to PlatypusCustomersDot|TrialsController#createHostedPlans|CreateTrialService#executeBaseTrialService#create_accountHostedPlans|CreateTrialService#create_platypus_leadPlatypusLogLeadServicePlatypus|CreateLeadWorkerPlatypus|CreateLeadServicePlatypusApp#postPlatypus

Applying the trial to a namespace on CustomersDot

HostedPlans|CreateTrialServiceload_namespace#Gitlab api/namespacescreate_order#create_trial_history#Load namespace detailsCreates an order in orders tableCreates a record in trial_histories tableHostedPlans|CreateTrialServiceload_namespace#Gitlab api/namespacescreate_order#create_trial_history#

Hand raise lead flow

Hand raise flow on GitLab.com

HandRaiseForm Vue ComponentTrialsController#create_hand_raise_leadCreateHandRaiseLeadServiceSubscriptionPortalClientCustomersDot|TrialsController#create_hand_raise_leadGitLab.com frontend sends [lead] to backend[lead][lead]GitLab.com sends [lead] to CustomersDotHandRaiseForm Vue ComponentTrialsController#create_hand_raise_leadCreateHandRaiseLeadServiceSubscriptionPortalClientCustomersDot|TrialsController#create_hand_raise_lead

Hand raise flow on CustomersDot

CustomersDot|TrialsController#create_hand_raise_leadPlatypusLogLeadServicePlatypus|CreateLeadWorkerPlatypus|CreateLeadServicePlatypusApp#postPlatypusSave [lead] to leads table for monitoring purposesAsync worker to submit [lead] to Platypus[lead][lead][lead] is sent to PlatypusCustomersDot|TrialsController#create_hand_raise_leadPlatypusLogLeadServicePlatypus|CreateLeadWorkerPlatypus|CreateLeadServicePlatypusApp#postPlatypus

PQL flow after Platypus for all lead types

PlatypusWorkatoMarketoSalesforce(SFDC)[lead][lead][lead]PlatypusWorkatoMarketoSalesforce(SFDC)