Start from a screen and a decision
The right place for AI is a moment where someone makes the same judgement, or writes similar text, many times a day. Name the screen, the input the person looks at, the output they produce and what they do with it. That definition decides everything that follows.
| System | A useful AI feature | Data it needs | Who checks the output |
|---|---|---|---|
| Help desk such as Zendesk | A drafted reply, or a ticket routed by topic and urgency | The ticket, the customer's recent history, help articles | The support agent, before sending |
| CRM such as HubSpot or Salesforce | Call notes summarised into the right fields, with a suggested next step | The transcript or notes, the deal record | The sales rep, before saving |
| ERP or accounting system | A suggested expense account and cost centre for each invoice line | The invoice lines, the supplier's past coding | The finance clerk, with stricter rules above a set amount |
| Your own app | Search across records in plain language | Indexed records, filtered by the user's permissions | The user, who sees the source records |
If a feature cannot name who checks its output, it is not ready to build. For a structured way to pick the first one, see the AI readiness assessment.
Where the model call should run
| Option | Good for | Trade-off |
|---|---|---|
| The vendor's built-in AI features | Standard tasks inside one product, switched on quickly | Little control over prompts, providers and logs; check the data terms |
| An automation platform calling a model API | Back-office steps triggered by events, such as tagging new tickets | Harder to test and version; prompts end up spread across flows |
| A small service of your own between the system and the model | Control over prompts, data filtering, caching, logging and the choice of provider | One more thing to build, host and monitor |
| Inside your custom app's back end | Features that are part of your own product | The same discipline as any production code, including tests |
Whichever you choose, the model is called from a server, never from the browser or a mobile app, where an API key can be extracted. A thin service of your own also lets you change model provider later without touching the systems on either side.
APIs, authentication and permissions
The integration reads and writes through the system's API, not by scraping screens. Register a dedicated integration, usually an OAuth app or an integration user, with only the scopes the feature needs, and keep its tokens in a secrets manager rather than in code or configuration files copied between machines.
Then decide whose rights apply. A feature that acts for a signed-in user should see only what that user may see: if a sales rep cannot open a record, the AI search they run should not surface it. A background job runs as a service account scoped just as tightly. Plan for the API's rate limits, use the vendor's sandbox or a test account where one exists, and subscribe to webhooks instead of polling where the system offers them. The API glossary entry covers the basics.
Mapping your data into the model and back
Systems store data for software, not for language models. Status 7 means nothing to a model until you translate it to “awaiting parts”. The mapping layer decides what goes in and what may come back out.
- Send only the fields a task needs. Less data means lower cost, faster responses and less personal data leaving your environment.
- Translate codes into meanings, and include the record's language, since many Gulf systems hold Arabic and English values side by side.
- Ask for structured output against a schema, and validate every value before writing it back: picklist values must match, amounts must parse, dates must be dates.
- Never let free text overwrite fields that drive reports without a check, or your dashboards will slowly fill with near-duplicates.
- Log what was sent and returned, with record IDs, so any suggestion can be traced.
When the underlying records are messy, fix them first; data integration and cleanup covers duplicates and inconsistent fields.
Latency and cost inside a live screen
People will wait a second or two for a suggestion and not much longer, so design for that. Stream long answers so text appears as it is written, or do the work in the background when an event arrives, so a ticket summary is ready before anyone opens the ticket. Use a smaller model for classification, cap the input size, and set a timeout after which the screen simply works without AI.
Estimate cost before building: run a sample of real records through the prompt and multiply by your volume. In production, track cost per ticket, per invoice or per call, with an alert when it moves. A prompt that quietly grows with every release is the usual cause of a surprise bill.
Rolling out behind a feature flag
- Shadow mode: the feature runs on real records, but results are only logged and compared with what people did.
- A pilot group: a few users see suggestions, with accept, edit and reject tracked for each one.
- Wider release, team by team, once acceptance and error rates meet the threshold you agreed.
- A kill switch that turns the feature off at once and leaves the original workflow untouched.
A high edit rate is useful information, not failure: it shows where the prompt, the data or the feature's scope is wrong. Keep watching after release with AI monitoring, and treat text that customers write as untrusted input, because an email can contain instructions aimed at your model. AI security explains prompt injection and how to limit it.