In order to complete the set-up for the Loqate search functionality in salesforce you have to install the app via one of the following links:
Live: [URL to be provided]
Sandbox/test: [URL to be provided]
You will be taken to the following page:
Install the application just for Administrators, and then other profiles can be allowed access to the finder pages without giving access to the Management page. Once that installation is complete simply hit done.
Back in your salesforce organisation if you are using the lightning interface click on the app launcher in the top left hand of the screen and select ‘Loqate Address Verification App’ > ‘Management’
If you already have a Loqate account you can Skip the registration step and simply enter your existing key.
If you don’t have an account with Loqate you can register for an account here.
This will give you a key and credit to trial the app. Without a Loqate account you will not be able to perform any lookups. When you first install the app you will be presented with a free trial sign up window. Enter your details and click Register. This will generate the required key for you and send you an email with your account details.
You can access this from Setup>Home>Remote Site Settings (Type: Remote in Quick Find box)
You can access this from Setup>Home> CSP Trusted Sites ( Type: CSP in Quick Find box)
If you have a custom address field you will need to tell the app which address information to populate it with. This is done by adding a new field mapping on the app Management page.
Select New Field
You can map a new set of address fields, or an address for a custom object, by creating a new set of address fields.
You can get here from Setup > Home >Custom Settings (Type Settings in Quick Find box). Click on Manage link near Postcode Anywhere Settings
Navigate to the Loqate verification app for Salesforce CRM
Follow the wizard and load the country table from a CSV file.
With this new upgrade you can leverage three Lightning Web Components powered by Loqate to enable verification of address, email, and phone. The address verification component can be configured to provide a ‘no-type’ user experience analogous to a date picker to be able to pick an address from a list filtered based on the user’s geolocation coordinates.
These lightning components can be accessed from Lightning App Builder and is easy to configure. You can also leverage the component visibility features to rollout localized versions of the same component for your users across geographies, reducing the need to configure separate record pages for your global users.
Here we show you how to add the components from Salesforce Lightning App Builder
You can see the new LWC Components under the Custom Components in the left had side
To add a component, drag the component onto the Canvas
Component Title: Title to be displayed on the page ‘Verify Billing Address’, ‘Verify Mailing Address’ or simply ‘Verify Your Address here’
Address Type: Billing, Shipping, Mailing
Language: The preferred language for result 2 or 4 language code e.g en, fr, en-gb, en-us
Countries: ISO Char 2 or 3 code of countries to which you which to limit your Search
Response to Address Mapping: The mapping of the Address you created here. Eg AccountBilling
These components are Salesforce Object aware components and can be used on any Salesforce object where the address fields can be mapped in the Loqate setup.
You can also leverage the OOTB Component capabilities like ‘Set Component Visibility’ to control visibility on who accesses the component– even user and role-based filter criteria. More information on that here.
Here’s the list of other components that you can use and sample setup for your guidance:
Loqate Address Capture component
Loqate Email validation component
Loqate Phone Number validation component
There are two basic ways to implement the Loqate application in Salesforce Classic. ‘On Request Validation’ and ‘Auto-Validate in Real time’ Each of these detailed in the management section and each has it’s own set-up method.
To start this method simply click the 'Set up ‘on request’ Validation’ button. This will generate a series of default mapping sets that relate to standard salesforce objects. You then have to a custom button to each page as follows:
Once you have completed these steps, go to a Lead, Account or Contact detail page, click the Address Finder button, and test that address changes are working.
Security Settings
You may find that some of your user profiles are unable to view the Address Finder pages. If this is the case you will need to go to Setup – Develop – Pages – Security for each of the Address Finder pages and move all required profiles from Available Profiles to Enabled Profiles.
When you create a new address form you will need to create a Visual Force page to display the address finder component. You can clone one of the existing pages in order to do this.
This process requires developer permissions, and may need to be done in your sandbox org before being deployed to your live environment.
To start this method click the ‘Set Up Auto Validation’ This will expand the set-up window:
In the set-up window you must complete the following:
There is also a third more advanced set-up method you can make use of in classic if you use custom visual force pages in your organisation.
In order to use this you have to do the following:
<apex:includeScript value="{!URLFOR($Resource.PostcodeAnywhere, 'sensor.js')}" /> <apex:stylesheet value="{!URLFOR($Resource.PostcodeAnywhere, 'platformcaptureplus-2.00.min.css')}" /> <apex:includeScript value="{!URLFOR($Resource.PostcodeAnywhere, 'platformcaptureplus-2.00.min.js')}" />
<apex:inputField id="MailingAddress_pca_street" value="{!Contact.MailingStreet}" required="false" />
Add the following JavaScript to the end of your visual force page:
<script type="text/javascript">
(function() {
try{
sforce.connection.sessionId = '{!$Api.Session_ID}';
var countries = [];
var query = "SELECT Name, pca__Index__c FROM pca__PostcodeAnywhereCountries__c";
var records = sforce.connection.query(query);
var countrieRecords = records.getArray('records');
for(var i=0;i<countrieRecords .length;i++){
countries.push(countrieRecords[i].Name);
}
}
catch(e){
countries = [];
}
var origin = "FR";
//Options Address
var optionsAddress = {
key: "{!$Setup.pca__PostcodeAnywhereSettings__c.pca__Key__c}",
countries: { defaultCode: origin },
search: { countries: countries.join(","), language: "ENG" }
};
var fieldsMailingAddress = [
{ element: "MailingAddress_pca_street", field: "{Line1}" },
{ element: "MailingAddress_pca_city", field: "{City}", mode: pca.fieldMode.POPULATE },
{ element: "MailingAddress_pca_state", field: "{Province}", mode: pca.fieldMode.POPULATE },
{ element: "MailingAddress_pca_postcode", field: "{PostalCode}" },
{ element: "MailingAddress_pca_country", field: "{Country}", mode: pca.fieldMode.COUNTRY }
];
//control for MailingAddress (Addressservice)
var controlMailingAddress = new pca.Address(fieldsMailingAddress, optionsAddress);
})();
</script>
Note that the ‘element’ attributes within the fields MailingAddress must map the IDs set in the previous step. Additional information on the address mapping method here can be found in our Advanced Set-up Guide.
The solution is now fully installed and ready to use within your Salesforce Orginisation. Remember, if you have any problems we're here to help.