Smart Paste in Dynamics 365 Sales parses unstructured text a user has copied — an email, an RFP, a document extract — and maps what it finds onto the matching Dataverse fields for review. It proposes values; the user confirms them before anything is saved.

The problem it addresses

CRM data quality does not fail because people disagree about its importance. It fails because filling twelve fields from an email is tedious, and a rep with a call in four minutes fills three of them.

Everything downstream inherits that: forecasting, segmentation, routing, and every report anyone builds on top. Removing the tedium is a data quality intervention dressed as a convenience feature.

How it works

SmartPasteFormScript.js
// DataDaur Smart Paste Form Script for Dynamics 365 Sales Lead / Opportunity Forms
function onSmartPasteButtonClick(executionContext) {
    var formContext = executionContext.getFormContext();
    
    // Read text payload from user clipboard
    navigator.clipboard.readText().then(function(clipboardText) {
        if (!clipboardText) {
            Xrm.Navigation.openAlertDialog({ text: "Clipboard is empty. Please copy an email or document text." });
            return;
        }

        formContext.ui.setFormNotification("AI Smart Paste: Analyzing clipboard content...", "INFO", "smart_paste_notify");

        // Invoke Custom Dataverse Action tied to Azure AI Document Intelligence
        var req = {
            UnstructuredText: clipboardText,
            getMetadata: function () {
                return {
                    boundParameter: null,
                    parameterTypes: {
                        "UnstructuredText": { "typeName": "Edm.String", "structuralProperty": 1 }
                    },
                    operationType: 0,
                    operationName: "datadaur_ParseUnstructuredLeadText"
                };
            }
        };

        Xrm.WebApi.online.execute(req).then(
            function (result) {
                result.json().then(function (parsedData) {
                    formContext.ui.clearFormNotification("smart_paste_notify");
                    
                    // Auto-fill CRM Form Fields
                    if (parsedData.CompanyName) formContext.getAttribute("companyname").setValue(parsedData.CompanyName);
                    if (parsedData.FirstName) formContext.getAttribute("firstname").setValue(parsedData.FirstName);
                    if (parsedData.LastName) formContext.getAttribute("lastname").setValue(parsedData.LastName);
                    if (parsedData.Email) formContext.getAttribute("emailaddress1").setValue(parsedData.Email);
                    if (parsedData.EstimatedBudget) formContext.getAttribute("budgetamount").setValue(parsedData.EstimatedBudget);

                    formContext.ui.setFormNotification("Smart Paste Completed! Verified 5 fields auto-filled.", "WARNING", "smart_paste_success");
                });
            },
            function (error) {
                formContext.ui.clearFormNotification("smart_paste_notify");
                Xrm.Navigation.openAlertDialog({ text: "Smart Paste Error: " + error.message });
            }
        );
    });
}

Form Fill Assist handles the pasted-text case on a form. For documents — scanned purchase orders, invoices, structured PDFs — Azure AI Document Intelligence does the extraction, and the mapping into Dataverse is configured against the model's output fields.

What extracts reliably, and what does not

ContentReliabilityHandling
Names, email addresses, phone numbers, job titlesHigh — structurally distinctiveAccept with a glance.
Company names and addressesHighCheck against existing accounts to avoid duplicates.
Dates and deadlinesModerate — relative dates are ambiguousVerify anything that drives a task or reminder.
Commercial terms stated in proseLowRead it. Do not accept a value you have not confirmed.
Implied or inferred informationNot extraction — inferenceOut of scope. Treat any such value as unsourced.
The distinction that matters is between reading a value out of the text and producing one that fits. The first is extraction. The second is a guess with good formatting.

Where the data goes

Smart Paste operates within the Microsoft Azure compliance boundary. Content stays inside your tenant and is not used to train public foundation models. For most procurement reviews that is the whole question, and it is worth having the answer ready with the documentation reference rather than reconstructing it later.

What still needs a local decision is which record types it is enabled on. A feature that reads whatever a user pastes is one a user can paste the wrong thing into, and some record types warrant more care than others.

Rolling it out

  1. Enable it on lead and contact forms first — highest volume, lowest risk.
  2. Watch what gets corrected in the first fortnight; that tells you where the mapping is wrong.
  3. Extend to opportunity forms only once the mapping is settled.
  4. Keep human confirmation on. There is no version of this where skipping review is the right call.