{"title":"Syncing records with StoreConnect IDs","slug":"what-records-sync-to-your-website","url":"https://support.storeconnect.com/articles/what-records-sync-to-your-website","url_markdown":"https://support.storeconnect.com/articles/what-records-sync-to-your-website.md","subtitle":null,"summary":"StoreConnect uses an External ID (SCID) field on standard objects like Account, Contact, and Order to give each record a usable identity on your website. Populate SCIDs by inviting a contact, resetting their password, using the Sync to SC quick action, or bulk Data Loader import.","type":"Help_Documentation","video_url":"","keywords":"SCID, external ID, storeconnect objects, sync contact, sync account","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"To help with data sync between your site and StoreConnect, some standard and custom objects get a StoreConnect ID (SCID) field added to them when you install.\n\nThe SCID is the identifier your website uses to recognize a record and to link it to its related records. Without one, a record has no usable identity on your website, so it cannot be matched at guest checkout, used for customer login, or set as the parent of a related record.\n\nWhere a record gets its SCID depends on where it is created:\n\n-   **Created on your website** — checkout, registration, and POS assign the SCID as the record is created, and it travels with the record when it syncs to Salesforce.\n-   **Created in Salesforce** — the StoreConnect package assigns the SCID when the record is saved, and a later update assigns one to any record that still lacks it. **Contact** is the exception: an update only populates the SCID there when you select **Reset Password**, **Send Confirmation**, or **Send Invitation**.\n\nThis mainly affects records that already existed in Salesforce before you installed StoreConnect, on these standard objects:\n\n-   Account\n-   Contact\n-   Order\n-   Order Item\n-   Campaign Member\n-   Asset\n-   Lead\n\nAll other [objects used by StoreConnect](storeconnect-object-and-field-definitions) are made available to your website without this step.\n\nSetting up your store imports your catalog only, so no pre-existing records on the objects above are brought across at that point. See [initial sync when setting up the sync user](initial-sync).\n\nFor organizations with large volumes of standard object records — such as millions of contacts — where only a subset are relevant to StoreConnect, you can also use [per-record sync opt-in](per-record-sync-opt-in) to control which individual records participate in synchronization.\n\n## Manually add SCID to a contact\n\nWhen new records are created the SCID is populated automatically, and updating an existing record populates it too, except on contacts. For contacts, you can force add the SCID using one of the following methods.\n\n1.  Invite a contact\n2.  Trigger a password reset in the contact record\n3.  Add a sync action shortcut\n4.  In Bulk via Dataloader or any similar tool\n\nNote: When you add a SCID to a contact, it also adds it to the primary account. This ensures that contacts are never synced without their account.\n\n### Method 1: Invite customer\n\n1. Go to the contact's detail page in Salesforce.\n2. Find and select **Send Invitation**. An invitation email is sent to the contact with a link to set their password. The SCID is populated on the contact automatically.\n\nSee [Invite customers to create an account](invite-contacts-to-create-an-account-on-your-website) for full setup details, including how to track invitation status.\n\n### Method 2: Initiate password reset\n\n1. Go to the contact's detail page in Salesforce.\n2. Find and check the **Reset Password** option.\n\nA password reset email is sent to the contact and the SCID is populated on the contact.\n\nSee [Reset a customer password](how-to-reset-a-password) for more details.\n\n### Method 3: Add a quick action to add the SCID\n\nAdd the quick action:\n\n1. Go to Setup \u003e Object Manager \u003e Account (or any other desired object).\n2. On the sidebar, select 'Button, Links, and Actions'.\n3. On the top right hand corner of the panel, select 'New Action'\n4. Select Action Type 'Lightning Component'.\n5. Select Lightning Component `s_c:ApplyScIdActionWrapper`.\n6. Add a label, such as **Sync to SC**.\n7. Add the action to your contact page layout.\n\nUse the quick action:\n\n1. Go to the contact's detail page.\n2. Find and select the quick action **Sync to SC**. It will populate the SCID with a confirmation message.\n\nYou can add this quick action to any other record type if you want.\n\n### Method 4: Bulk update\n\nIf you have a lot of records to update, we recommend using a bulk action method.\n\n1. Use a tool like [UUID Generator](https://www.uuidgenerator.net/version4) to generate multiple SCIDs at the same time. SCID's must be 36 characters.\n2. Add these IDs to a CSV list of contacts.\n3. Import via Dataloader or similar.\n\nSee the example below for using Apex to generate and populate the SCID for your Contacts.\n\n```text\n\n/*\nHow to generate a version 4 GUID (random)\n\n1. Generate 128 random bits\n2. Set the version: Take the 7th byte perform an AND operation with 0x0f followed by an OR operation of 0x40.\n3. Set the variant: Take the 9th byte perform an AND operation with 0x3f followed by an OR operation of 0x80.\n4. Convert the data to hex and add dashes\n*/\n\npublic class GuidUtil {\n    static List hexMap = new List {\n        '0', '1', '2', '3', '4', '5', '6', '7',\n        '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'\n    };\n\n    public static String newGuid() {\n        String randomStringAsHex = EncodingUtil.ConvertTohex(Crypto.GenerateAESKey(128));\n\n        String versionHexBits = randomStringAsHex.SubString(14,16); // 7th bit\n        String variantHexBits = randomStringAsHex.SubString(18,20); // 9th bit\n\n        Integer versionIntBits = convertHexToInt(versionHexBits);\n        Integer variantIntBits = convertHexToInt(variantHexBits);\n\n        Integer versionShiftedIntBits = versionIntBits \u0026 15 | 64;  // (i \u0026 0x0f) | 0x40\n        Integer variantShiftedIntBits = variantIntBits \u0026 63 | 128; // (i \u0026 0x3f) | 0x80\n\n        String versionShiftedHexBits = convertIntToHex(versionShiftedIntBits); // Always begins with 4\n        String variantShiftedHexBits = convertIntToHex(variantShiftedIntBits); // Always begins with one of 8,9,a,b\n\n        String guid = randomStringAsHex.SubString(0,8) + '-' + randomStringAsHex.SubString(8,12) + '-' + versionShiftedHexBits + randomStringAsHex.SubString(14,16) + '-' + variantShiftedHexBits + randomStringAsHex.SubString(18,20) + '-' + randomStringAsHex.substring(20);\n\n        return guid;\n    }\n\n    static Integer convertHexToInt(String hex) {\n        Integer d0 = hexMap.IndexOf(hex.Substring(1,2));\n        Integer d1 = hexMap.IndexOf(hex.Substring(0,1));\n\n        Integer intval = d0 + (d1*16);\n        return intval;\n    }\n\n    static String convertIntToHex(Integer intval) {\n        // https://stackoverflow.com/a/13465128\n        String hs0 = hexMap.Get(intval \u0026 15); // i \u0026 0x0f\n        String hs1 = hexMap.Get(((intval \u003e\u003e 4) \u0026 15)); //(i \u003e\u003e 4) \u0026 0x0f\n        return hs1+hs0;\n    }\n}\n```\n\n```apex\n\n@isTest\npublic class GuidUtil_Test {\n    @isTest\n\tprivate static void test() {\n        Pattern p = Pattern.compile('[\\\\w]{8}-[\\\\w]{4}-4[\\\\w]{3}-[89ab][\\\\w]{3}-[\\\\w]{12}');\n        for(Integer x = 0; x \u003c 100; x++) {\n            Matcher m = p.matcher(GuidUtil.newGuid());\n            System.assert(m.matches() == true);\n        }\n    }\n}\n```"}