# Salesforce Integration

Integrate address validation into your Salesforce CRM address forms with our Browser Extension.

![Salesforce Browser Extension Demo-screenshot](https://img.ideal-postcodes.co.uk/salesforce-demo.gif)

## Features

* Adds UK Address Finder to form address fields
* Adds UK Address Finder to Custom Objects

## Screenshots

![Address Autocompletion on the Salesforce CRM-screenshot](https://img.ideal-postcodes.co.uk/salesforce-screenshot-1.png)

## Installation

This integration uses the Ideal Postcodes Extension which can be downloaded from the Chrome or Firefox Extensions marketplaces.

See our [Browser Extension guide](/docs/integrations/browser-extension.md) for more information.

## Custom Objects

The Browser Extension also allows you to bind Address Finder to your Custom Object forms. To do this you will need to map an address field to a Custom Object Field Name using our JSON configuration editor.

For instance, the config below maps two Custom Objects.

custom-objects.jsonjson

```json
[
	{
		"line_1": "Address_Line_One__c",
		"post_town": "Town_or_City__c",
		"postcode": "Postcode__c"
	},
	{
		"line_1": "Customer_Line_1__c",
		"line_2": "Customer_Line_2__c",
		"post_town": "Customer_Post_Town__c",
		"postcode": "Customer_Postcode__c",
		"county": "Customer_County__c",
		"uprn": "Customer_UPRN__c"
	}
]
```

The first Custom Object receives address validation for `Address Line One`, `Town or City` and `Postcode` fields. The Address Finder will bind to Address Line One and populate addresses for these fields.

Similarly, the second Custom Object receives address validation for `Customer Line 1`, `Customer Line 2`, `Customer Post Town`, `Customer Postcode`, `Customer County` and `Customer UPRN`.

The complete list of address fields (e.g. `line_1`, `post_town`, `postcode`) is available in our [data documentation](/docs/data/paf.md).

The name of the field is available in your Salesforce Custom Object Manager. It is listed under `Field Name` and is typically suffixed `__c`.

![The Custom Object Field is identified by Field Name-screenshot](https://img.ideal-postcodes.co.uk/salesforce-fields.png)

## Supported Forms

### Supported URL Paths

All paths are supported but limited by address selectors

### Address Field Selectors (Supported Fields)

Base

field-selectors.jsonjson

```json
{
	"line_1": "textarea[placeholder=\"Street\"]",
	"post_town": "input[placeholder=\"City\"]",
	"postcode": "input[placeholder=\"Zip/Postal Code\"]",
	"county": "input[placeholder=\"State/Province\"]",
	"country": "input[placeholder=\"Country\"]"
}
```

Billing

field-selectors.jsonjson

```json
{
	"line_1": "textarea[placeholder=\"Billing Street\"]",
	"post_town": "input[placeholder=\"Billing City\"]",
	"postcode": "input[placeholder=\"Billing Zip/Postal Code\"]",
	"county": "input[placeholder=\"Billing State/Province\"]",
	"country": "input[placeholder=\"Billing Country\"]"
}
```

Shipping

field-selectors.jsonjson

```json
{
	"line_1": "textarea[placeholder=\"Shipping Street\"]",
	"post_town": "input[placeholder=\"Shipping City\"]",
	"postcode": "input[placeholder=\"Shipping Zip/Postal Code\"]",
	"county": "input[placeholder=\"Shipping State/Province\"]",
	"country": "input[placeholder=\"Shipping Country\"]"
}
```

Lightning address fields (Salesforce Lightning builder tool forms)

field-selectors.jsonjson

```json
{
	"line_1": "textarea[name=\"street\"]",
	"post_town": "input[name=\"city\"]",
	"postcode": "input[name=\"postalCode\"]",
	"county": "input[name=\"province\"]",
	"country": "input[name=\"country\"]"
}
```

info

Still need help? Contact our support team via live chat on our website or email <support@ideal-postcodes.co.uk>.
