In brief
- The requirements document should begin with the business process and a clear boundary for the first version, not with a list of APIs and fields.
- For each entity, define its source of truth, mapping rules, and permitted direction of changes.
- Event contracts must describe identifiers, ordering, retries, idempotency, and behavior when systems are unavailable.
- Acceptance should be based on end-to-end scenarios, an exchange log, and actions agreed in advance for handling errors.
- Supporting an integration requires named owners, contract change rules, and a clear incident investigation process.
Requirements Are Not a List of Systems to Connect
The phrase “integrate the website, CRM, and telephony” indicates a direction, but it does not define a task. It does not say where a customer is created, who assigns the responsible employee, whether a phone number can be changed after qualification, what to do with a repeat inquiry, or which system reports a completed sale. If development begins with this description, each party will fill the gaps with its own assumptions. The data exchange may technically work, but the process will remain unpredictable.
Useful requirements connect three levels. The business level explains which company activity should become faster or more reliable. The process level identifies participants, states, and exceptions. The technical level defines entities, fields, events, and exchange rules. These levels cannot be replaced with one large field table: the same dataset can support entirely different processes.
- The integration goal stated in terms of the working process.
- The participants and roles that create, verify, and use the data.
- The systems within scope and why each one participates.
- Measurable indicators that a scenario has completed correctly.
- First-version constraints and explicitly deferred scenarios.
Define Boundaries and End-to-End Scenarios
The first section of the requirements should limit the project. Specify the forms, channels, pipelines, departments, and customer types included in the first version. List separately what remains out of scope: historical migration, bidirectional editing, international divisions, nonstandard deals, or a legacy communication channel. This does not reject future development; it protects estimation and acceptance from constantly expanding scope.
Next, describe several end-to-end scenarios, from the user’s action to the result in the CRM and adjacent systems. The main scenario shows the normal path. Exceptions reveal the real complexity: the contact already exists, a required field is empty, the CRM is unavailable, the manager has been removed, or an external service has sent the event again. Each scenario needs an initiator, input data, sequence of actions, final state, and visible error message.
-
01
Name the Starting Point
Specify the exact event: a form submission, inbound call, change in deal status, or payment confirmation.
-
02
Trace the Path
List the systems and decisions through which the event passes, including validation, enrichment, and routing.
-
03
Define the Result
Describe the entities created or changed, the responsible employee, the notification, and the state of the source system.
-
04
Add Exceptions
Test a duplicate, incomplete data, lack of access, timeout, and redelivery.
Assign a Source of Truth for Every Entity
When the same field can be changed in several places, the integration quickly turns into a contest between the latest updates. The requirements therefore need to assign a source of truth: the system whose value is considered authoritative for a particular entity or attribute. The CRM may own the lead status and assignee, the accounting system may own payment and contract data, and the customer portal may own user preferences. Ownership is assigned to specific types of data, not permanently to an entire system.
Define a stable external identifier for each entity. Phone numbers and email addresses are useful for finding matches, but they can change, be absent, or be associated with several inquiries. It is better to store mappings between internal system identifiers and separately describe the initial matching rules. If an automated decision is ambiguous, the requirements should route the record for manual review instead of silently merging customers.
| Entity or Field | Source of Truth | Who Can Change It | Conflict Rule |
|---|---|---|---|
| Contact details | CRM after qualification | Manager and verified channel | Save the new value with its source and timestamp |
| Deal status | CRM | Responsible role | Reject an invalid transition and record the reason |
| Payment confirmation | Payment or accounting system | A verified event only | Do not replace it with a manual mark without a separate rule |
| Consent to communication | The system where consent was obtained | The user or an authorized employee | Store the legal basis, channel, and date of the change |
An integration is reliable not when the data exists everywhere, but when the origin of each value and the authority to change it are clear.
Agentix Labs design principle
Describe Field Mapping and Transformations
The field-mapping table should be an executable part of the requirements, not an appendix with two columns labeled “from” and “to.” For each field, specify its type, whether it is required, its format, allowed values, transformation, default value, and behavior on error. If the source system sends free text while the CRM expects a value from a directory, the requirements need an explicit mapping dictionary and an owner for that dictionary.
Dates, time zones, currencies, phone numbers, addresses, and enumerations require particular attention. For example, a date without a time zone can refer to different moments for the server and the employee. An empty string, an omitted field, and a null value may also have different meanings: clear the value, leave it unchanged, or report that it is unknown. These decisions cannot be left to the developer during implementation.
- The technical name and clear business name of the field in both systems.
- Type, format, length, required status, and allowed values.
- Transformation, normalization, and directory mapping table.
- Behavior for an empty, unknown, or invalid value.
- Update rule: always, only on creation, or only at a particular status.
- An example of a valid value and an example of the expected error.
Agree on Command and Event Contracts
An integration can operate on request, on a schedule, or through events. In every case, the requirements define the contract: the operation name, initiator, endpoint and request method, request schema, response schema, error codes, authorization requirements, and version. The OpenAPI Specification is suitable for describing HTTP interfaces, while AsyncAPI is suitable for event-driven channels, but the document format itself does not replace the business meaning of fields and states.
For an event, it is important to distinguish a fact from a command. “Payment confirmed” reports something that has happened and does not ask the recipient to change the past. “Create a deal” requests an action and may be rejected. The requirements should state who publishes the event, who subscribes, which identifier provides traceability, whether events can arrive out of order, and how long a message remains valid.
| Contract Element | What to Define | Why |
|---|---|---|
| Identifiers | eventId, correlationId, and the entity identifier | Connect a retry, the log, and the original operation |
| Version | Schema version and compatibility rules | Change the contract without stopping all systems at once |
| Result | Success, transient error, and permanent error | Choose a retry, manual handling, or rejection |
| Order | Dependencies on the sequence of events | Avoid applying an older state over a newer one |
| Time limit | Request timeout and permissible event age | Avoid executing an expired operation without validation |
Design Retries and Idempotency in Advance
Networks and external APIs sometimes respond slowly or become unavailable. No response does not always mean that an operation failed: the CRM may have created the deal, but the connection may have dropped before the result was returned. Simply repeating the request would create a duplicate. The requirements must therefore describe idempotency—the ability to process a repeated logical operation safely without producing a second business effect.
Specify the idempotency key, how long it is stored, and the response returned for a repeat. The key should identify the business operation rather than being generated anew for every network attempt. For transient errors, define a limited number of retries with increasing intervals. For permanent errors—such as an invalid status or missing required field—automatic retry is useless: the record should be placed in a log and a manual review queue.
-
01
Classify the Error
Distinguish temporary unavailability, rate limiting, a data error, missing permissions, and a state conflict.
-
02
Retry Safely
Use the same operation identifier, limit the number of attempts, and increase the interval between them.
-
03
Verify the Outcome
If the response was lost, query the state by the external identifier before creating a new entity.
-
04
Hand It Over to a Person
After retries are exhausted, preserve the context, display the reason, and provide a safe command for reprocessing.
Include Security and Access in the Core Contract
An integration expands the access surface for customer and commercial data. The requirements should list the categories of information transmitted, the grounds for access, roles, permitted operations, and the retention period for technical logs. Secrets and tokens must not appear in the requirements document, repository, or request examples. The document defines how they will be stored and rotated securely, while actual values are transmitted through a protected channel.
Checks are performed on the server for every object, not only at the interface level or through general access to a method. This is particularly important for systems serving multiple organizations. In the verified Crypto Exchange CRM case, the server determines the organization from the employee’s active profile, checks whether related records belong to it, and applies the restrictions to APIs, reports, and protected files. This approach shows why a hidden button or client-side filter is not a security boundary.
- A separate technical account with the minimum required permissions.
- Server-side verification of the role, organization, and availability of every related entity.
- Encrypted transmission and secure storage of secrets outside the source code.
- Masking personal data and tokens in logs and error messages.
- Limits on request frequency, request size, and permitted operations.
- An access log and a procedure for revoking a key after an incident or contractor change.
A hidden menu item is not protection: the same rules must apply to the interface, direct API access, reports, and files.
The approach implemented in Crypto Exchange CRM
Make Acceptance Reproducible
The criterion “data is transmitted correctly” cannot be tested consistently. Instead, prepare a set of scenarios with input data and the expected state in every system. Acceptance should cover the normal path, a duplicate, invalid data, missing permissions, a timeout, a retry, recovery after a failure, and events arriving out of order. For each test, specify where to verify the result and which log explains the decision made.
Observability is designed together with the exchange. At minimum, the log records the time, initiating system, correlationId, operation type, external entity identifier, result, and a safe description of the error. It must not store passwords, tokens, or unnecessary personal data. A dedicated dashboard or queue for problematic operations is useful, allowing an employee to see the state and initiate an authorized retry.
| Test | Expected Result | Evidence |
|---|---|---|
| New lead | The required entities are created and a route is assigned | CRM record and log entry with one correlationId |
| Repeat of the same event | A second business object is not created | The reprocessing response and original identifier |
| Invalid required field | The operation is rejected without a partial update | A clear error identifying the field |
| Temporary CRM unavailability | The operation is retried according to the rules or sent to a queue | Attempt history with no loss of the original data |
| Insufficient permissions | The data is neither read nor changed | Access denied without exposing protected information |
Describe Support and Contract Changes
After launch, the CRM, forms, and external services continue to change. Without maintenance rules, a minor field rename can stop the flow of leads. In the requirements or an appendix, assign an owner for the business process, an owner for each system, and a technical owner for the integration. Define incident channels, priorities, access to logs, and the boundaries of responsibility between the internal team and contractors.
A contract change proceeds through versioning and a compatibility period. A new required field cannot be enabled suddenly before senders are ready. Support for the new version is added first, participants are then updated, observability is verified, and only after that is the old schema disabled. Critical changes need a rollback plan, while directories need a clear owner and a process for approving values.
- Contact details for the owners of the process, systems, and technical support.
- Incident classes, response times, and the escalation channel.
- The log retention period and the procedure for granting access to logs.
- Schema versioning and the minimum backward-compatibility period.
- The process for changing directories, required fields, and routing rules.
- A plan for disabling the integration or returning to the previous version.
The final CRM integration requirements should enable an independent team to understand the process, implement the exchange, and prove its readiness without relying on verbal agreements. If the document answers who owns the data, how one operation is identified, what happens on a retry, who has access, and how recovery after a failure is verified, it becomes a working contract. Such a contract does not reduce the number of inevitable changes; it reduces the cost of understanding and implementing them.
Frequently asked questions
Does every CRM field need to be described in the requirements?
Describe every field that participates in the integration or affects routing, permissions, or the process result. For each one, specify the source, type, required status, transformation, and behavior on error. Internal CRM fields unrelated to the exchange can be omitted.
Who should prepare CRM integration requirements?
The business process owner and a technical specialist should prepare the document together. The business side is responsible for scenarios, roles, and the expected outcome; the technical side is responsible for contracts, constraints, security, and recovery. Neither side should have to guess the other’s decisions.
How is a webhook different from a regular API request in the requirements?
A regular request is initiated by the consumer when needed, while a webhook sends an event when something changes in the source system. A signature, redelivery, an idempotent identifier, and the recipient’s response are especially important for a webhook. In both cases, the data schema and errors must be described.
How can CRM integration duplicates be avoided?
Use a stable identifier for the business operation, store mappings between system identifiers, define matching rules, and process a retry with the same key without producing a second effect. A phone number or email address may be used for matching, but it is not always suitable as the sole identifier.
Which integration acceptance criteria are essential?
Tests are needed for the successful scenario, redelivery, invalid data, missing permissions, temporary unavailability, recovery, and logging. For each test, define the input data, the expected state of every system, and how the result will be confirmed.
What should be handed over to the support team after launch?
Current contract schemas, a system map, owners, access rules, a description of logs, the queue of problematic operations, safe retry scenarios, escalation procedures, and versioning rules. Secrets are transmitted separately through a protected channel and are not included in the documentation.
Sources
- OpenAPI Initiative: OpenAPI SpecificationChecked 30 July 2026
- RFC 9110: HTTP SemanticsChecked 30 July 2026
- OWASP API Security Top 10 — 2023Checked 30 July 2026
- AsyncAPI Initiative: AsyncAPI SpecificationChecked 30 July 2026