# StoreConnect Support

Person Accounts is a Salesforce feature that merges the Account and Contact objects into a single record representing an individual person rather than a business. StoreConnect is compatible with Person Account orgs, but there are specific setup steps and sequencing considerations your Salesforce admin needs to follow.

## Process overview

When a customer registers or places an order, StoreConnect creates records in a fixed sequence:

**Contact created → Business Account created → Contact linked to Account → Flow converts Account to Person Account**

Steps 1–3 happen automatically. The conversion in step 4 only works correctly if your Salesforce org is configured in advance. The four configuration tasks required are:

| Step | Task                            | Purpose                                                                                     |
| ---- | ------------------------------- | ------------------------------------------------------------------------------------------- |
| 1    | Configure the sync user profile | Grants the sync user access to the Person Account record type                               |
| 2    | Create an after-update flow     | Triggers the conversion once the Contact–Account link is established                        |
| 3    | Order other flows correctly     | Prevents errors from flows that reference Person Account fields before the conversion fires |
| 4    | Add duplicate rule exclusions   | Prevents the sync user from being blocked when creating records that match existing ones    |

## How StoreConnect creates records in a Person Account org

StoreConnect does not create Person Account records directly. When a customer registers or places an order, the integration creates records in this fixed sequence:

1. Creates the Contact
2. Creates a standard business Account — a Person Account record type cannot be assigned at this point, as Salesforce requires a linked Contact
3. Links the Contact to the Account

Because the Contact does not exist on the Account at step 2, Salesforce cannot apply a Person Account record type during insert — regardless of any Before Insert flow or profile record type configuration. The conversion to Person Account must happen after step 3, once the Contact relationship is established.

## Setup requirements

### 1. Configure the sync user profile

StoreConnect uses a dedicated Salesforce sync user to create and update records. For Person Accounts to work, this user's profile must have the Person Account record type assigned as an available record type on the Account object.

If your sync user is on Salesforce's standard **Minimum Access - Salesforce Integration** (or similar API-only) profile, the Account object's record type settings will not be editable via the standard Profile UI. The **Enhanced Profile User Interface** setting controls access to this page and is locked on these profile types by default.

For detailed instructions on configuring record types for the sync user, see [Set up a StoreConnect sync user](how-to-create-a-storeconnect-sync-user).

### 2. Create an after-update flow to convert the account to a Person Account

Because StoreConnect creates a business Account first, you need a Salesforce Flow to convert it to a Person Account once the Contact is linked.

Configure the flow as follows:

- **Object:** Account
- **Trigger:** Record-triggered flow — After Update (not Before Insert)
- **Entry condition:** Detect when the Contact has just been linked by the StoreConnect sync user — for example, `PersonContactId` changed from null to a value, and `$User.Id` equals the sync user ID
- **Action:** Update the Account's `RecordTypeId` to your Person Account record type ID

:::note
The after-update flow is required because Salesforce cannot apply the Person Account record type during an API insert — it must be set explicitly once the Contact is linked.
:::

### 3. Order other flows correctly

If your org has additional flows that act on Person Accounts — for example, welcome emails, entitlement assignment, or field updates — they must be configured to fire after the conversion flow completes. Flows that reference Person Account-specific behavior and fire before the record type has been updated will fail with `INVALID_PERSON_ACCOUNT_OPERATION` errors.

Check **Setup** > **Flows** for any record-triggered flows on Account that reference Person Account fields or record types, and adjust their entry conditions or execution order accordingly.

### 4. Handle duplicate rules

If your org has Salesforce Duplicate Rules on Account or Contact set to **Block**, the sync user will encounter `DUPLICATES_DETECTED` sync errors when StoreConnect tries to create a record that matches an existing one.

Add an exclusion condition to each duplicate rule targeting the StoreConnect sync user by their User Alias, so that user bypasses the rule. Do not disable duplicate rules entirely.

In each Duplicate Rule, add a condition: **Current User: Alias = [sync user alias]** and set the action to **Allow**. This allows the sync user to create records freely while keeping duplicate enforcement for all other users.

For more on managing duplicate records, see [Automated lead conversion to avoid duplication](lead-contact-and-account-deduplication).

## How StoreConnect matches existing Person Account records

When a customer registers or checks out on a StoreConnect storefront, the platform attempts to match them to an existing Person Account record by first name and last name combined with either email or phone. If a match is found, StoreConnect links the new login to the existing Person Account record rather than creating a new one.

## Account credits with Person Accounts

Account credits work with Person Accounts without any additional configuration. Behind every Person Account is both an Account and a Contact record. StoreConnect's credit logic resolves through the Contact–Account chain, which correctly points to the Person Account's underlying Account record.

Key points:

- Account credits are per person, not shared across a household
- `Account_Credit__c` records should be created against the Person Account's Account, not a parent Household Account
- Set `Can_Use_Account_Credit__c = true` on the Person Account's Contact side
- Set `Pay_By_Account__c = true` on the Person Account's Account if using Pay By Account

Household-level shared credits are not supported. Sharing credits across household members requires custom logic and carries concurrency risk.

See [Account credit](account-credit) and [Pay on account at checkout](pay-by-account) for general configuration.

## Custom data mapping with Person Accounts

When Person Accounts is enabled, Salesforce auto-creates `__pc` suffix fields on the Account object that mirror Contact fields (for example, `PersonEmail`). These fields stay in sync with the underlying Contact automatically.

For StoreConnect custom data mappings with Person Accounts, map against the Account object using the `__pc` fields — not the Contact object or its `__c` fields. This applies specifically to Read/Write mappings where StoreConnect needs to write data back to Salesforce. For read-only mappings the distinction is less critical, but using `__pc` on Account is still the correct and consistent approach.

:::note
Do not remap native StoreConnect fields — this causes them to sync as null. Custom data mappings should only be used for fields not already handled by StoreConnect natively.
:::

See [Add custom data fields to your store](liquid-custom-data-fields) for mapping instructions.

## Log in as a customer

If your org uses the Log in as a customer feature (which lets Salesforce users use the storefront as a specific customer), confirm the sync user's profile has the Person Account record type available before testing this feature in a Person Account org. See [Set up a StoreConnect sync user](how-to-create-a-storeconnect-sync-user) for profile configuration details.

## Setup checklist

| Step                                                                       | Who              | Notes                                                                                                                                  |
| -------------------------------------------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Add Person Account as an available record type on the sync user's profile  | Salesforce admin | If using a standard API-only profile, clone it first — these profiles do not support editing record types via the standard Profile UI  |
| Create after-update flow to convert Account to Person Account              | Salesforce admin | Must fire after Contact is linked to Account, not on insert                                                                            |
| Ensure other Person Account flows fire after conversion flow               | Salesforce admin | Prevents `INVALID_PERSON_ACCOUNT_OPERATION` errors                                                                                     |
| Add sync user exclusion to duplicate rules                                 | Salesforce admin | Prevents `DUPLICATES_DETECTED` sync errors                                                                                             |
| Validate existing data email alignment                                     | Implementation   | Ensures existing Person Accounts match on customer registration                                                                        |

---

StoreConnect Support — https://support.storeconnect.com