Lock v1 for iOS and macOS
Track New Sign-Ups in Salesforce
You can track new sign-ups in Salesforce with FullContact-Enriched User Profiles, and Send Auth0 Events to MixPanel.
Whenever a new user signs up with a website using a social credential, you want to:
- Record a
signupevent in MixPanel.
- Augment the user profile with additional public information through FullContact.
- Record the sign-up as a New Lead in Salesforce, so a sales professional can follow up.
To implement this with Auth0, you need to create three Rules in your pipeline:
1. Record sign-up event in MixPanel
Create a rule to record the event by calling MixPanel. In the example below, we record the application name in the
application property to help you filter information in MixPanel. However, the full
user properties are available as sources of additional information (e.g., IP addresses, agent).
2. Enrich user profile with FullContact
Create a rule to obtain more information about the user by retrieving public information from FullContact's API using the user's email address as input.
Once the call to FullContact completes, we store this additional information in a property called
3. Create New Lead in Salesforce
Create a rule to record the information as a New Lead in Salesforce, so the sales department can follow up. Please note:
The Salesforce REST API uses an OAuth Access Token. So for this rule, we use the OAuth2
Resource Owner Password Credential Grantto obtain this token, and use the
getTokenfunction, which uses credentials as input, as opposed to an
API-KEYas was used in the rules in the previous steps.
In this example, we expect your Salesforce credentials to be stored in the global
configurationobject. Be sure to add your credentials here before running your rule. Doing this allows you to use your credentials in multiple rules and prevents you from having to store them directly in the code.
For this rule, we record only the username and a fixed company name. However, we could use anything available in the enriched user profile we obtained in step 2 to record more information and provide additional context for the sales representative.
For this rule, we use a property called
user.app_metadata.recordedAsLead, and if everything goes well, set it to true. The next time the user signs in, all of these rules will be skipped.
Check out our repository of Auth0 Rules for more great examples: