Documentation
Guides, API reference and events for CRM.
On this page
Rules shared by every R&D Copilot API are in the Developer guide.
Get started
- Overview: What the CRM API does, how a call is built and where to go next.
- Quickstart: Create a company and a deal, check the result and read both back, with five requests.
- Authentication: Get client credentials, request a token and call the CRM API with it.
- Sandbox and live: Build and test against a test company, then move the same calls to your live company.
- Go-live checklist: What to check in your integration before it works on your live company.
Concepts
- Companies and persons: A company is who you sell to; a person is someone you deal with there. How they relate to deals.
- Deals, pipelines and stages: How a deal moves, what ends it, how it is weighted in the forecast and when it counts as stale.
- Activities: E-mails, calls, meetings, notes and tasks: the timeline of a company and the next step of a deal.
- Custom fields: Define the extra fields your companies, persons and deals carry, and read and write their values.
- Owners and permissions: Who owns a record, who made a change, and what a token is allowed to do.
- Your own ids: Give a record the identifier your own system uses, and find it by that identifier instead of keeping ours.
Guides
- Capture leads from a form: Turn each submission of a form on your website into a lead with its first step, safe to send twice.
- Import from a file: Load companies and deals from a file with the API, in a way that is safe to run again after a failure.
- Move a deal through stages: Read a deal, move it, schedule its next step, win or lose it, and handle a change made by someone else.
- Create an ERP order from a won deal: Turn a won deal into its order in ERP with one request, and read the order number back on the deal.
- Find and merge duplicates: Find the earlier lead that a new lead repeats, merge the two and keep everything written on either.
Reference
- Errors: The error object of the CRM API and the codes that say what went wrong.
- Idempotency and concurrency: Repeat a request without applying it twice, and refuse a change made on an out-of-date record.
- Pagination: Lists come in pages. Follow the cursor until it is empty.
- Limits: The limits of the CRM API, with their values and what happens over them.
- Versioning: The version is in the path. Additions keep it; a change that could break a caller gets a new one.
- Changelog: The versions of the CRM API contract, newest first, with what each one changed.
API reference
- Companies: The companies you sell to, with their properties and owners.
- Persons: The people you deal with at a company.
- Deals: Create deals, move them through the stages, win or lose them, reopen them, create their order in ERP and merge duplicates.
- Pipelines and stages: Read the pipeline: its stages, their weights and the days after which a deal is stale.
- Activities: The timeline of a company: e-mails, calls, meetings, notes and tasks, and the log of an activity that happened.
- Notes: Write a note on a company or a deal, and read the notes.
- Tasks: Schedule the next step of a deal, complete it, and read the open and the done ones.
- Custom fields: Define the extra fields your companies, persons and deals carry.
- Events and subscriptions: Register an endpoint for events, read the events and their delivery state, and replay a parked event.
- Operations: A request that changes data is accepted once and answered with an operation result you can read again.
Events
- Event envelope: Every CRM event has the same envelope; only
datachanges with the type of the event. - Event catalogue: Every event CRM sends, when it is sent and what its
dataholds. - Subscriptions: Register an HTTPS endpoint and CRM sends your events to it, each one signed.
- Verify signatures: Every delivery is signed. Check the signature on the raw body before you trust the event.
- Delivery and retries: An event is sent again when your endpoint does not confirm it, and is kept for replay after the last attempt.
- Replay: Send a parked event again once your endpoint is ready to take it.