> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuroncx.in/llms.txt
> Use this file to discover all available pages before exploring further.

# External Identity Import (Type 24)

> Match rows in a Google Sheet to existing customer or patient records by phone number, or create new ones.

## Overview

External Identity Import matches rows in your sheet to existing customer or patient records, or creates new ones, using the phone number as the join key. It's used for bulk-linking third-party system IDs — for example from Akhil, EkaCare, or Practo — to NeuronCx users, so searching that external ID in the Transaction Console resolves to the right person.

Your sheet doesn't need to carry a name or email. Matching happens purely on the phone number.

> [!NOTE]
>
> A newly created customer can be named from a column in your sheet instead of a generic placeholder name — but only the first time they're created. An existing customer is never renamed by this import.

Other details about the person — like gender, age, or city — can be set at the same time as the identity match, without needing a separate import.

Every run is tracked individually and can be rolled back.

***

## Prerequisites

Before running this import, you need a mapping set up that tells NeuronCx how to recognize a person from your sheet.

* At minimum, the mapping needs:
  * An **identifying value** — the field used to match a person, such as Mobile No. The name and format must match your sheet exactly.
  * A **field to import** — the value you actually want to bring in, such as Registration No. Its name and format must also match your sheet exactly.
* The attribute definitions for anything you plan to bring in must already exist in NeuronCx. This import never creates a new attribute — it only writes values against ones already set up for your institution.

> [!WARNING]
>
> If a mapping points at an attribute that belongs to another institution, the entire run is refused.

***

## Preparing Your Sheet

### Mapped sheet format (raw third-party export)

Instead of reformatting your sheet, you can import a raw export as it comes from the third-party system. This is the more flexible option and avoids manually relabeling columns every time.

![Google Sheet Doc](https://mintcdn.com/neuroncx/uQlD7Bmp9EBJyUP5/images/google_sheet_doc.png?fit=max\&auto=format\&n=uQlD7Bmp9EBJyUP5\&q=85\&s=014e2e75216b1dc6f58125f0643ec7e5)

This is an example of a raw export, untouched and unformatted for NeuronCx. NeuronCx only reads the columns that are actually configured in your mapping — everything else in the sheet is ignored, no matter how many columns the source export contains:

| Sheet Column | Imported by NeuronCx? |
| - | - |
| MobileNo | ✅ Yes — mapped as the identity match |
| Registration No | ✅ Yes — mapped to an attribute |
| PatientName | ✅ Yes — mapped as the username |
| AgeYear | ❌ No — not included in this mapping |
| Address | ❌ No — not included in this mapping |
| EnteredBy | ❌ No — not included in this mapping |

> [!TIP]
>
> You don't need to remove or hide unused columns before importing — a raw export with 20+ columns works fine as long as the ones you need are mapped. Add more columns to the mapping later if you decide you need them.

> [!TIP]
>
> With mapped mode, you can also set additional attributes — like gender, age, or city — directly from the same import, without needing a separate step or a Service Id.

***

## Running the Import

**1. Select the mapping**

Open the import and choose the mapping you set up.

![Mapping](https://mintcdn.com/neuroncx/nVh5JyQ0zhYDef82/images/mapping.png?fit=max\&auto=format\&n=nVh5JyQ0zhYDef82\&q=85\&s=3f2984eed46bae8cfd29af877eab77fb)

**2. Choose what happens when there's no match**

Decide what NeuronCx should do if a phone number doesn't match an existing record. See below for details on each option.

![Choose What Happen](https://mintcdn.com/neuroncx/nVh5JyQ0zhYDef82/images/choose_what_happen.png?fit=max\&auto=format\&n=nVh5JyQ0zhYDef82\&q=85\&s=f8118a8bd1312b8d32af782a0eb7682c)

**3. Import**

Click **Import** to run it.

![Selecting Import Button](https://mintcdn.com/neuroncx/nVh5JyQ0zhYDef82/images/selecting_import_button.png?fit=max\&auto=format\&n=nVh5JyQ0zhYDef82\&q=85\&s=2002fba20d9bd54b61b9de525641656b)

***

## What Happens on No Match

This setting only affects rows where the phone number doesn't already belong to an existing record. A number that already matches an existing person behaves the same way in every mode — the identity is simply attached to them.

| Option | Number already exists | Number is new |
| - | - | - |
| **Skip the row** | Identity attached | Nothing created — the row is skipped |
| **Create the user** | Identity attached | A new record is created, with the identity attached |

> [!NOTE]
>
> "Create the user and a transaction" creates **one transaction per newly created person**, not one per row. If a new number appears in the sheet with two different external IDs, that person gets two identities but only one transaction.

***

## Checking the Result

Once complete, search the person's External ID in the Transaction Console to confirm they came through correctly.

> [!TIP]
>
> Re-running the same sheet is safe. It fills in anything missing and re-applies values — it won't create duplicates.

***

## Rolling Back an Import

**1. Remove the import log tab**

Open the Google Sheet you imported from and delete the second tab, named **NCX\_ImportLedger**.

![Ncx Import Ledger Highlighted](https://mintcdn.com/neuroncx/vM008jYIIBu9Y8-a/images/ncx_import_ledger_highlighted.png?fit=max\&auto=format\&n=vM008jYIIBu9Y8-a\&q=85\&s=81d26fb25cc74bbc2d59eee3fd8ccf49)

**2. Roll back**

Return to the import run and select **Rollback**.

![Rollback Red 1](https://mintcdn.com/neuroncx/vM008jYIIBu9Y8-a/images/rollback_red-1.png?fit=max\&auto=format\&n=vM008jYIIBu9Y8-a\&q=85\&s=a8f4b7e974526d4c14a8d2cd928aea0b)

> [!WARNING]
>
> If you've run the same sheet more than once, roll back the most recent run first. Rolling back an older run while a newer one still references the same records may leave some of them in place.

> [!NOTE]
>
> It's normal for a rollback to leave a few records in place rather than removing everything. This happens when a record has picked up other activity since the import ran — NeuronCx protects that activity rather than deleting it.

***

## Limits to Keep in Mind

> [!WARNING]
>
> Very large sheets that are re-imported many times can eventually hit a size limit on the import log, causing the import to fail partway through — after data has already been written. Avoid re-running the same large sheet repeatedly. Only re-run it when you actually have new or changed rows.

* This import only sets values on the **person**, not on a specific transaction. If you need to set a value tied to a transaction, use External Values Import (Type 25) instead.
* Attribute values that overwrite an existing value can't be rolled back — the previous value isn't kept on record.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.