Projects

CRM Agent

A Business Central extension that logs sales email into Relationship Management on its own: it reads Exchange Online through Microsoft Graph, lets a language model filter out noise, and records each interaction with sentiment and summary.

Published

Built with

  • Business Central
  • AL
  • Microsoft Graph
  • OpenAI
CRM Agent: sales email logged into Business Central on its ownA monitor showing the Business Central list of processed emails, three with a sentiment chip and one newsletter marked skipped, a contact card flagged as created by AI with three interactions, and a button that runs the sync now.CRM Email LinksSetupMailboxesRe: Offer for line 3PositiveDelivery schedule Q4NeutralNewsletter: autumn dealsSkippedMeeting notes, TuesdayPositiveSync all nowContactNameCreated by AIYesInteractions 3
Sales email into Business Central without data entryArnitek built CRM Agent. Exchange Online sends mail, read only to CRM Agent. CRM Agent sends contacts and interactions to Business Central. CRM Agent and Language model exchange filter, sentiment, summary.Exchange Onlineshared and salespersonmailboxesBusiness Centralcontacts andinteraction logCRM AgentAL extension, runsevery five minutesLanguage modelany OpenAI-compatibleendpointmail, readonlycontactsandinteractionsfilter,sentiment,summary
Sales email into Business Central without data entry

Sales teams write and receive dozens of emails a day, and almost none of them end up in Business Central’s Relationship Management. CRM Agent closes that gap. It is an extension written in AL and published by Navtech Group for Business Central 27. It runs in the background, reads the mail that matters, and logs each exchange as an interaction on the right contact.

How it works

A job queue entry runs the agent every five minutes. Each run calls Microsoft Graph with application permissions limited to reading mail and walks through the configured shared mailboxes and each salesperson’s inbox and sent items. Salespeople are picked up from the standard Salesperson/Purchaser table, so there is nothing to maintain when the team changes. Every message that qualifies is logged through Business Central’s own segment management, with separate inbound and outbound interaction templates, so the entries look exactly like the ones a user would create by hand.

A language model decides what counts

Three decisions are handed to a language model, through any OpenAI-compatible chat endpoint the customer chooses. A filter prompt decides whether mail from an unknown sender is real business correspondence or spam, a newsletter, an auto-reply or cold outreach. An analysis prompt rates each interaction on Business Central’s five-level evaluation scale and writes a summary of at most 75 characters in English, whatever language the email was written in. A third call reads the signature of a genuine new sender and suggests the contact’s name. Only the subject and a short preview of the body are sent to the model. Administrators can edit the prompts from inside Business Central.

Guardrails

Contacts are created only for unknown external senders who write to a monitored shared mailbox. Outbound mail and salespeople’s personal inboxes never create contacts; there, only existing contacts are logged. Internal mail is always excluded, and customer and vendor addresses can be skipped. Contacts that the agent created carry a read-only “Created by AI” flag on the contact card. A list of processed messages shows the sentiment, the reason a message was skipped and whether a contact was created, with an action to reprocess any message. If the model is unavailable, the message is simply retried on the next run.

Built for production

Secrets live in isolated storage, access to Graph follows least privilege with Exchange application access policies, and retention policies clean up the processing log after six months for linked messages and a year for the rest. Telemetry is scoped to the publisher. The extension ships with about 130 automated tests covering the sync rules and the AI calls.