How to Perform Lead Enrichment in Java
Leverage API technology to gather valuable lead data from your website or applications.
Join the DZone community and get the full member experience.
Join For FreeWith competition ramping up across most industries, it can be difficult to find potential clients and consistently meet sales goals. As a result of this crowded playing field, many sales representatives end up spending more time on investigating sales leads and attempting to make connections than they do securing sales.
One way you can help your struggling sales team is to integrate lead enrichment tools into your website or applications. These tools can utilize basic user inputs such as name and email address to populate data including lead type, company name, VAT number, domain name, and more. Since these individuals have already expressed an interest in your goods or services, they have definitively identified themselves as a potential lead. Armed with the information acquired via the lead enrichment tool, sales employees will be able to learn more about their potential clients prior to initial interactions, which will in turn increase their prospects of success.
The following API will perform this lead enrichment action for you, allowing your sales team to improve their productivity by lessening their research efforts.
To start using this API, you first need to install the SDK library, which can be done either through Maven or Gradle. I will be using Maven for this example, so the first step is to add a Jitpack reference to the repository in pom.xml:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Then, add a reference to the dependency:
x
<dependencies>
<dependency>
<groupId>com.github.Cloudmersive</groupId>
<artifactId>Cloudmersive.APIClient.Java</artifactId>
<version>v3.90</version>
</dependency>
</dependencies>
Now that the installation is complete, we are ready to add the imports to the controller, configure the API key, and call the function:
xxxxxxxxxx
// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.LeadEnrichmentApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");
LeadEnrichmentApi apiInstance = new LeadEnrichmentApi();
LeadEnrichmentRequest request = new LeadEnrichmentRequest(); // LeadEnrichmentRequest | Input lead with known fields set, and unknown fields left blank (null)
try {
LeadEnrichmentResponse result = apiInstance.leadEnrichmentEnrichLead(request);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LeadEnrichmentApi#leadEnrichmentEnrichLead");
e.printStackTrace();
}
In order to ensure the operation runs through without a hitch, the following parameters must be included:
- API Key – to retrieve your personal API key, visit the Cloudmersive website to register for a free account that will give you access to 800 monthly calls.
- Lead Input – input your lead with the known fields set and the unknown fields left blank:
xxxxxxxxxx
{
"ContactBusinessEmail": "string",
"ContactFirstName": "string",
"ContactLastName": "string",
"CompanyName": "string",
"CompanyDomainName": "string",
"CompanyHouseNumber": "string",
"CompanyStreet": "string",
"CompanyCity": "string",
"CompanyStateOrProvince": "string",
"CompanyPostalCode": "string",
"CompanyCountry": "string",
"CompanyCountryCode": "string",
"CompanyTelephone": "string",
"CompanyVATNumber": "string"
}
Once the operation is complete, the response will return the lead input with the unknown fields populated and ready for use. By utilizing this lead enrichment API, you can simplify the sales process for your team while also pursuing more reliable leads.
Opinions expressed by DZone contributors are their own.
Comments