Skip to content

Latest commit

 

History

History
203 lines (124 loc) · 11.1 KB

README.md

File metadata and controls

203 lines (124 loc) · 11.1 KB

Watching Stars


Logo

Namsor Salesforce Addon

Enrich Contacts with Gender information purely based on their names!


Table of Contents

About the project

This Salesforce Addon offers a quick and easy way to integrate your Salesforce Contact data with Namsor, enriching gender information with Namsor's Gender API just using your Contact names.

To learn more about Namsor's capabilities you can click the button below to go to our website, which offers documentation, as well as all the platform's features and capabilities.

Namsor Shield

Basically, this Addon will run every day on your Salesforce Organization, get all the new Contact records, get Namsor's likely gender information and update your Salesforce Contacts with the retrieved information.

The Likely Gender information will be stored on a new Salesforce Picklist field called Namsor_Likely_Gender__c, created by the Package, in the Contact object

Getting Started

In this section, you will learn the steps to fully install and use this addon, as well as set it up in your Salesforce Organization to have your Contacts enriched with Namsor Gender information.

Installation

To install this Salesforce Addon, please click in the following button, which will take you to the installation page.

Salesforce Package Installation

From there, all you need to do is login to your Salesforce Organization, choose Install for All Users and follow the instructions provided by Salesforce to fully install the package.

Salesforce Installation Screen

Setup Namsor API Key

In this step, you will configure your own Namsor API Key to perform the necessary API calls.

‼️ If you haven't done so yet, you can go ahead and create your Namsor account using the button below.

Namsor Shield

To achieve this, you can follow the steps below:

  1. Search for Named Credentials on your Organization's Setup Quick Search and click the sub-menu:

Named Credentials

  1. Click on the Named Credential called Namsor API and click on Edit:

Namsor API

  1. Update the password field. Do not change any other fields!:

Update Password

Setup Scheduled Job

In this step, you will setup your Schedule Job tht will be responsible for executing the Script automatically every day!

To achieve this, you can follow the steps below:

  1. Search for Apex on your Organization's Setup Quick Search and click the sub-menu called Apex Classes:

Search Apex

  1. Locate and click the button called Schedule Apex

Schedule Apex

  1. Click on the search button near the Apex Class field:

Apex Class

  1. Search for NamSor_BatchExecution and click on the Class name:

Select Apex Class

  1. Fill the rest of the fields, as shown in the picture below (this script will run on a daily basis):

Other Fields

Now just click on Save and you are done!

You can also verify your new Scheduled Job by searching for Scheduled Jobs on the Quick Find:

Verification

First Run (all records)

When you first install this package, your records won't have the Namsor Gender info available just yet, you will need to run the script once for all your database before you start.

To do this, the are some simple steps:

  1. Open the Developer Console:

Developer Console

  1. Click on Open Execute Anonymous Window:

Execute Anonymous

  1. Paste the following script and click Execute:
NamSor_BatchExecution batchExecution = new NamSor_BatchExecution(true);
Database.executeBatch(batchExecution, 100);

Run Script

How does this Addon work?

This Addon will run a Schedule Job (created on the installation step above) every day at the specified time.

Steps performed:

  • Get all the Contacts created on the last 2 days;
  • Verify which ones do not have Namsor's Likely Gender information yet;
  • Separate the records in batches of 100 records each;
  • Call the Namsor API for all the retrieved records;
  • Update the Contacts with the retrieved Namsor likely gender information.

Help

Question: The Contacts are not being updated with the Likely Gender information! What should I do?

Answer: First of all, review the Setup Instructions to make sure you didn't miss anything (schedule Apex Job to run every day + setup Namsor API Key). If that still does not work, make sure the field created within this Package (Contact.Namsor_Likely_Gender__c) is visible and editable by the User that scheduled the Apex Job. If you don't know how to do it, you can refer to this Salesforce Help page which will guide you configuring Field-Level security.

Question: My Salesforce Org already has a Contact field used to store Gender information, is there a way to use it instead of the newly created one?

Answer: Yes, there is a way, but it must be edited in some Apex Classes. Ask your IT team to do so, they need to replace the field Namsor_Likely_Gender__c on the Apex Classes Namsor_BatchExecution, Namsor_EnrichContact, Namsor_Test_BatchExecution and Namsor_Test_EnrichContact.

Question: I already have some Contacts with the Namsor Likely Gender information, stored in another field. What should I do?

Answer: Here you have 2 options: you can update the existing Contact records, updating the field Namsor_Likely_Gender__c with the values from your other gender field (and start using only the new field) OR you can make the changes described on the question above.

Any other questions?

Feel free to contact the developer of this project using any of these links below:

Linkedin Shield

Fiverr Shield

⬆ Back to the top