Salesforce_API_Integration_Summary
Salesforce_API_Integration_Summary
The goal of this integration is to sync customer profile data from Zeotap to Salesforce, ensuring that
the Contact records in Salesforce are always accurate and up-to-date. This enables better customer
3. Salesforce Action:
- If the Contact already exists (matched by email or ID), update the record.
Authentication Method
POST https://login.salesforce.com/services/oauth2/token
grant_type=password
client_id=<client_id>
client_secret=<client_secret>
username=<salesforce_username>
password=<password+security_token>
Key Endpoints
/query/?q=SELECT+Id,+Email+FROM+Contact+WHERE+Email='test@example.com'
1. Create Contact
Request:
POST /services/data/v60.0/sobjects/Contact/
Content-Type: application/json
"FirstName": "Jane",
"LastName": "Doe",
"Email": "jane.doe@example.com",
"Phone": "1234567890"
Response:
{
"id": "0038d00000K2XXXXAAK",
"success": true,
"errors": []
2. Update Contact
Request:
PATCH /services/data/v60.0/sobjects/Contact/0038d00000K2XXXXAAK
Content-Type: application/json
"Phone": "9876543210"
Response:
Required Fields:
Common Errors:
Assumptions:
Edge Cases:
- Multiple Contacts with the same email: system should decide whether to update the most recent or
log as a conflict.
2. Mock Testing: Use Salesforce sandbox or mocks to test without affecting live data.
3. Integration Testing:
5. Logging & Monitoring: Ensure error handling and logs are in place.