Vertex AI Setup
Vertex AI requires a Service Account authentication method involving certificates and JWT (JSON Web Token) configuration. Follow these steps precisely.
1. Google Cloud Configuration
https://console.cloud.google.com/
Create Project & Service Account:
- Go to Google Cloud Console and create a New Project (e.g., “Peeklogic Vertex”).
- Navigate to APIs & Services → Library. Search for “Vertex AI API” and click Enable.
- Navigate to IAM & Admin → Service Accounts.
- Click + Create Service Account.
- Name: e.g., “salesforce-integration”.
- Role: In the “Grant this service account access to project” step, select Vertex AI User.
Click Done.
Important: From the Service Account list, copy the Email address (e.g.,
vertex@project-id.iam.gserviceaccount.com) and the Unique ID. You will need these for Salesforce.
Generate Key:
Click the Actions (three dots) menu on your Service Account → Manage keys.
- Click Add key → Create new key.
- Select P12 (NOT JSON) and click Create.
The file will download. Note the password (usually
notasecret).Copy the Key ID: In the key list, copy the Key ID string associated with the new key.
2. Convert Certificate (JKS)
Salesforce requires the Java Keystore (JKS) format.
Open your Command Line / Terminal.
Note: Run the following command (requires Java installed):
keytool -importkeystore -srckeystore ./YOUR_FILE.p12 -destkeystore GoogleVertexJWT.jks -srcstorepass notasecret -srcalias privatekey -srcstoretype pkcs12 -deststoretype jks -destalias GoogleVertexJWT -deststorepass notasecret
Replace YOUR_FILE.p12 with the downloaded filename.
3. Salesforce Certificate Setup
Enable Identity Provider:
In Salesforce Setup, go to Identity → Identity Provider.
Click Enable Identity Provider.
Select a Self-Signed Certificate (create one if none exists) to activate the feature.
Import Vertex Certificate:
Go to Security → Certificate and Key Management.
Click Import from Keystore.
Choose File: Select the
google-vertex.jksfile you generated.Password: Enter
notasecret.Click Save.
4. Named Credential Configuration
External Credential:
Go to Named Credentials → External Credentials.
Edit Google Vertex AI External Credential.
Issuer (iss): Paste the Service Account Email from Google Cloud.
Subject (sub): Paste the Service Account Email again.
- JWT Signing:
- Signing Certificate: Select the
googlevertexjwtcertificate you imported.