> For the complete documentation index, see [llms.txt](https://docs.limio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.limio.com/integrations/populating-salesforce-data/limio-updates-salesforce/account-contact-mapping.md).

# Account and Contact Mapping

## Account Creation (createAccountContact function)

### Personal Account (if createPersonAccount = true)

| Limio Source                       | Salesforce Field  | Notes                                                     |
| ---------------------------------- | ----------------- | --------------------------------------------------------- |
| customerDetails.firstName          | FirstName         |                                                           |
| customerDetails.lastName           | LastName          |                                                           |
| customerDetails.email              | PersonEmail       |                                                           |
| customerDetails.phone              | Phone             |                                                           |
| partnerSalesforceAccountId         | ParentId          | If partner org exists                                     |
| accountOptions.recordTypeName      | RecordType.Name   | If configured                                             |
| billingDetails.address1 + address2 | BillingStreet     | Combined, comma-separated if includeBillingDetails = true |
| billingDetails.city                | BillingCity       | If includeBillingDetails = true                           |
| billingDetails.state               | BillingState      | If includeBillingDetails = true                           |
| billingDetails.country             | BillingCountry    | If includeBillingDetails = true                           |
| billingDetails.postalCode          | BillingPostalCode | If includeBillingDetails = true                           |
| Auto-generated from Account        | PersonContactId   | Retrieved after account creation                          |

### Business Account (if createPersonAccount = false)

| Limio Source                                        | Salesforce Field  | Notes                                                                 |
| --------------------------------------------------- | ----------------- | --------------------------------------------------------------------- |
| customerDetails.companyName or firstName + lastName | Name              | Company name preferred if available, fallback to firstName + lastName |
| partnerSalesforceAccountId                          | ParentId          | If partner org exists                                                 |
| accountOptions.recordTypeName                       | RecordType.Name   | If configured                                                         |
| billingDetails.address1 + address2                  | BillingStreet     | Combined, comma-separated if includeBillingDetails = true             |
| billingDetails.city                                 | BillingCity       | If includeBillingDetails = true                                       |
| billingDetails.state                                | BillingState      | If includeBillingDetails = true                                       |
| billingDetails.country                              | BillingCountry    | If includeBillingDetails = true                                       |
| billingDetails.postalCode                           | BillingPostalCode | If includeBillingDetails = true                                       |

{% hint style="info" %}
**Address format:** Limio sends `billingDetails.state` and `billingDetails.country` as the values collected by the checkout form. If your Salesforce org uses **State & Country/Territory Picklists**, ensure the picklist values match what Limio sends (e.g. ISO codes like `US`, `GB`). Mismatches will cause the account creation to fail silently on the address fields.
{% endhint %}

{% hint style="warning" %}
**Enabling address mapping:** Billing address fields are only mapped when `includeBillingDetails` is set to `true` in the Salesforce plugin configuration. If your accounts are being created without addresses, verify this flag is enabled. Contact <support@limio.com> to check your configuration.
{% endhint %}

## Contact Creation (for Business Accounts)

| Limio Source              | Salesforce Field | Notes                |
| ------------------------- | ---------------- | -------------------- |
| accountId                 | AccountId        | Generated account ID |
| customerDetails.firstName | FirstName        |                      |
| customerDetails.lastName  | LastName         |                      |
| customerDetails.email     | Email            |                      |
| customerDetails.phone     | Phone            |                      |

## Salesforce IDs on Platform Events

Platform events published by Limio (see [Platform Events Definitions](/integrations/populating-salesforce-data/platform-events-flexible/platform-events-definitions.md)) include the customer's Salesforce `AccountId` and `ContactId` where available. Limio resolves these IDs in the following order:

1. **Linked Salesforce identity** — the Salesforce identity stored against the customer in Limio (created at first purchase, or at sync time for hot-synced accounts)
2. **Authentication claims** — Salesforce ID claims on the customer's authentication token, if your identity provider supplies them
3. **Order tracking** — the account and contact IDs carried on the order itself, populated when the order was initiated from Salesforce

From Release 116, this applies to update subscription and cancel subscription events as well as new orders, so downstream Salesforce automation can act on these events directly without a secondary lookup.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.limio.com/integrations/populating-salesforce-data/limio-updates-salesforce/account-contact-mapping.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
