▶️ Log in as a customer
On this page
Step 1: Enable Identity Provider in Salesforce
-
Click the cog wheel → go to Setup.
-
In Quick Find, search for Identity Provider.
-
Click Enable Identity Provider.
-
Click Edit.
-
Click Create a new certificate.
-
Give it a label (include the date of creation to keep track of the 1-year certificate expiry).
-
Set Key Size to 2048, then Save.
Step 2: Extract the Certificate Fingerprint
-
Download the certificate file.
-
Use a tool like KeyStore Explorer (download from their site).
-
Open the tool → click Examine a Certificate.
-
Load the downloaded certificate.
-
Copy the Fingerprint shown at the bottom.
Step 3: Create Store Variables in StoreConnect
-
Go to your Store Record in StoreConnect.
-
Navigate to Store Variables → click New.
-
Create the first variable:
-
Key:
IDP_certificate_fingerprint -
Value: paste the fingerprint
-
Label:
Login as Contact Fingerprint -
Assign it to the store
-
Click Save and New
-
-
Create the second variable:
-
Key:
IDP_SSO_target -
Value: your Salesforce Org URL +
/idp/endpoint/HttpRedirect -
Label:
Login as Contact Target -
Assign to the store
-
Click Save
-
Step 4: Create External Connected App
-
In Salesforce Setup, search App Manager.
-
Open External Client App Manager → click New External Client App.
-
Fill in:
-
Name (e.g.,
StoreConnect Login as Contact) -
Contact email
-
Logo/Image URLs
-
Info URL & Description
-
-
Scroll to Web App:
-
Enable SAML
-
Select the certificate created earlier
-
Set Name ID Format to Email Address
-
Use the store domain (including https://) in:
-
Entity ID: append
/auth/saml/metadata -
Issuer: append
/auth/saml/metadata -
ACS URL: append
/auth/saml/auth
-
-
-
Click Create
Step 5: Assign Access to the App
-
Click Edit on the app.
-
Under Start Page, set to your Store URL.
-
Assign the appropriate Profiles or Permission Sets (e.g., System Administrator).
-
Click Save.
Step 6: Add a Login Field on the Contact Object
-
Go to Object Manager → search and select Contact.
-
Go to Fields & Relationships → click New.
-
Choose Formula → click Next.
-
Name it something like
Login to Store. -
Set the data type to Text → click Next.
-
In the formula field, enter the Hyperlink code using your store domain.
javascript HYPERLINK( "https://{your-stores-domain.com}/auth/saml/sign_in?sfid=" + CASESAFEID(Id), "Click here to log in as " + FirstName + " " + LastName ) -
Click Check Syntax → then Next.
-
Set Profile Visibility → then Save.
Final Step: Test the Login Feature
-
Go to a Contact Record.
-
You should now see a field like “Log into store as this contact”.
-
Click it to be logged into your store as that customer.