The Loqate Salesforce Commerce Cloud cartridge allows you to quickly and easily add Loqate address verification services to your instance of Salesforce Commerce Cloud, providing type-ahead lookup functionality for address fields, and validation for both email addresses and phone numbers. With some or all of these services enabled, you can reduce the amount of time spent inputting customer details, and improve the accuracy of your database.

Available services

The Loqate cartridge gives you access to these Loqate services in your Salesforce Commerce Cloud instance:
  • Address Capture, which provides a type-ahead solution for address input
  • Email Validation, which ensures the accuracy of customer email addresses
  • Phone Validation, which ensures the accuracy of customer phone numbers
You can use one or more of these services, depending on your business needs.

Prerequisites

Before installing the Loqate cartridge you will need:
  • A live Salesforce Commerce Cloud account
  • A live Loqate account
  • A Loqate API key*
* Note that your API key is designed to be an open access key to your account - there are security controls within your Loqate account to ensure this is not abused. The key used in the app will be your primary mechanism of reporting for usage, so we recommend create a new key rather than reusing one you may already have on a website or other application.

Process

The installation process is made up of the following steps:
  • Download and install the cartridge
  • Add the cartridge to your cartridge path
  • Import required metadata
  • Configure your settings
  • Add the module to your site
  • Map your fields

Download and install the cartridge

First, download the latest version of the Loqate cartridge. Once that’s downloaded:
  • Inside the cartridge zip file you will find two directories - cartridges and system-objects
  • Upload the cartridges directory and its contents (everything within the plugin_loqate folder) to the Cartridges directory of your SFCC instance
Upload to Cartridge directory

Add the cartridge to your cartridge path

The next step is to update your site’s cartridge path to include the new Loqate cartridge.
  • You can do this in the Business Manager under Administration > Sites > Manage Sites > [Your Site] > Settings > Cartridge Path
Add to cartridge path
  • Add plugin_loqate to your cartridge path (Note: the cartridge path is colon separated)

Import required metadata

Next, import the metadata file LoqateMetadata.xml, which is provided in the system-objects directory of the downloaded zip file.
  • You can do this in the Business Manager under Administration > Site Development > Import & Export
  • Upload the xml file via the Import & Export Files section
Import required metadata
  • Then import it via the Meta data section

Configure your settings

With everything imported and installed, the next step is to start configuring the cartridge.
  • Navigate to Merchant Tools > Site Preferences > Custom Preferences > Loqate
  • Here you will be able to provide your Loqate account, and add any custom scripts your want to execute
Add the module to your site Now add the following code to each page on which you want to include Loqate functionality:
<isinclude template="loqate/module" />
 
<isloqate />
This will include the module and add the scripts (including any custom scripts defined in your settings) to the page.
We recommend you add this to the Header section of each page.

Map your fields

You can now start to set up your Loqate services and map them to your existing fields. You can choose whether to use one, two, or all three of the available services (Address Capture, Email Validation, Phone Validation). To do this, follow the process as detailed in our Tag Setup Guide - note that the code you’ve already added into your site in the previous step supersedes the setup code that you’ll be instructed to add in that guide. When you get to the step about copying and pasting a code snippet into you site, you can go straight to launching the in-page setup.