Auth0.Android Configuration Options
Track New Leads in Salesforce
You can track new leads in Salesforce with TowerData-Enriched User Profiles.
Whenever a new user signs up with a website using any social credential we want to:
Augment the user profile with additional public information obtained through TowerData.
Record the sign-up as a New Lead on Salesforce, so a sales professional can follow up.
To implement this with Auth0, you just need to create two Rules in your pipeline:
1. Enrich User Profile with TowerData
Create a rule that will obtain more information about the user by retrieving public information from TowerData's API using the user's email address as input.
Once the call to TowerData completes, we store this additional information in a property called
2. Create New Lead in Salesforce
Create a rule that will 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 rule in the previous step.
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 1 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, we set it to
true. The next time the user signs in, this rule will be skipped.
Check out our repository of Auth0 Rules for more great examples: