# Salesforce integrations

Work with the Salesforce REST API, SOQL queries and scheduled CRM syncs in Python.

## Get started

Connect to the Salesforce REST API from Python services - credentials, connected apps and the self.salesforce API.

[The REST API from Python](https://zato.io/docs/dev/salesforce/rest-api-python.html)

service.py

```
# Create a Salesforce record
conn = self.salesforce['My Salesforce']
response = conn.post(
    '/sobjects/Campaign/', request)

response['success']
True

response['id']
'701RO00000BpkfMYAR'
```

## Working with records

[Create and query records A REST channel that creates campaigns and reads them back with SOQL.](https://zato.io/docs/dev/salesforce/create-and-query-records.html) [SOQL relationships and pagination Parent traversal in the select list and the nextRecordsUrl loop.](https://zato.io/docs/dev/salesforce/soql-relationships-and-pagination.html) [Upserts and external IDs Idempotent create-or-update and parent references by external ID.](https://zato.io/docs/dev/salesforce/upserts-and-external-ids.html) [Updates and deletes Diff-driven partial updates and deleting records by ID.](https://zato.io/docs/dev/salesforce/updates-and-deletes.html)

## Reliability

[Error handling and API limits Error arrays, per-record success flags and the daily request allowance.](https://zato.io/docs/dev/salesforce/error-handling-and-api-limits.html)

## Scenarios

[A CRM sync, end to end A scheduled one-way sync with correlation keys and drift detection.](https://zato.io/docs/dev/salesforce/crm-sync-scenario.html)
