Support Portal ContactGet in touch

Using Cognitive Services and DocDrive365 for automatic Document Recognition

   Words by CRM Consultancy

   on 05/10/2018 11:23:00

Tracking Metadata for your Documents in SharePoint is invaluable – it allows you to see key facts about a Document at a glance, control Document Workflow and make searching for Documents quicker and easier

On the other hand, remembering to manually set the Metadata for a Document in CRM or Word is a chore.

And as with anything that is a chore, we can lose the benefits here from the extra effort involved.

However Azure Cognitive Services allows us to read the Content of a Document on upload, which DocDrive365 can then use to flag up key facts about the content and use this to pre-populate the Metadata about the Document – this then removes the manual intervention and helps automate the link up between CRM and SharePoint.

STEP 1 – Define our Cognitive Services Handler

First of all, we browse to the DocDrive365 Configuration Area in Dynamics and add a new Cognitive Services Handler to our use of DocDrive365 :


Viewing the DocDrive365 Configuration Area in Dynamics 365

Here we supply the Type of Handler we are adding, our Azure Cognitive Services API Key and the Region we are invoking in the Microsoft Cloud.


Configuring our new Handler to connect Azure Cognitive Services to DocDrive365

STEP 2 – Specify how the Handler should match Uploads to a Content Type

We can add Rules to our Handler that define what Content to look for in a Document or Image to then set the Content Type on upload.

This Ruleset then governs the automatic population of the SharePoint Content Type.

The most obvious example is to add a new Rule and set the following:

Cognitive Term (to look for): Proposal

Cognitive Operation: Find

Cognitive Strength: 5

What is Cognitive Strength?  Well a Document will often involve multiple Terms and we do not want an Invoice being uploaded with Content Type Contract just because the Invoice Description references Contract once.  So we add a Cognitive Strength to define how strongly we count each occurrence of the term ‘Contract’ and compare to any other Content Type Rules we have in place when determining the final Content Type for the Document.


Defining the Rule that identifies the Document as a Proposal based on the Content

This sets our Handler and informs the Handler how to identify the Content Type from the Content in the Document. (or Image if using the Image Processor, or Handwriting if using the OCR Processor)


Viewing the List of Rules for our Handler to identify the SharePoint Content Type of a Document on upload

STEP 3 – Attach the Handler to our intended Entity in CRM

We will work with various Entities in Dynamics and we can control which Handler(s) will process the upload to the Document Area for an Entity.

So we add the Entity or Entities to the Handler definition to specify that an upload to this Entity will invoke this Handler and the Rules for the Handler:


Defining the behaviour of the Case Entity in DocDrive365 and ensuring we have our New Handler attached to implement our Rules on Document Upload

At this point, we can also add additional Rules to either the Handler, Content Type or Entity to specify how Content found or scored in the Document can be mapped to the Fields in CRM  or Metadata in SharePoint. (the Rule then being specified to the Content Type or Entity, or left blank to always being invoked for the Handler)

STEP 4 – See it in action

We can then browse to our Entity in Dynamics and upload a Document or Image to see this in action.

So if we take our Case Entity as an example – we drag 3 Documents into the Documents Panel of the Case, this then:

  • Uploads the Documents to SharePoint
  • Cognitive Services reads Content from the Document
  • DocDrive365 interprets this Content into a Content Type, Metadata and any updates to CRM
  • Documents stored in SharePoint with the right Content Type and Metadata automatically populated


Our Documents uploaded to the Case with the Content Type and Metadata populated automatically – as if by magic!

In the above example, we can see how the Invoice Amount and GDPR Data Classification flags have also been automatically populated on upload of the relevant document – this is done by adding additional Rules to the Content Type to populate other Fields from the Document Content.

We will see this in more detail in the next DocDrive365 Article on Automatic Metadata Population.

NEXT: DocDrive365 for Dynamics - Cognitive Services to set Content Types on Upload

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

CRMCS Quick Start Guide: How To Produce a Microsoft Teams Live Event Dynamics 365 Marketing: Lead Scoring and Sales Acceptance Designing and Developing Microsoft Power Apps Portals Thank You for Attending CRMCS’ Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Thank You for Attending Our Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Webinar: Discover How CRMCS Have United Dynamics 365, SharePoint and Microsoft Teams To Create Sales Excellence Ignite your workflow by adding DocDrive365 to Office 365 The CRMCS guide to everything you need to know about integrating Teams with Dynamics 365 Saving Time By Keeping Documents In One Place TDE Database Encryption with On Premise Dynamics The Key to Successful Compliance in 2020 Part 2: Let’s get GDPR Compliant with Microsoft Power Automate Top 3 Essential Tips for Remote Working Dynamics 365 Marketing: Top 5 Best Features Dynamics Day in the Life - Puma Investments Can you use Teams to amplify collaboration in Dynamics? Part 1: Using a Scheduled Power Automate to Trigger Expiry Date Reminders The secrets of successful document collaboration in Dynamics CRMCS launches new AppSource approved DocDrive365 Dynamics Day in the Life - Moneypenny Release Management Add the App to Dynamics DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Building a New Scheduled Process using Flow
  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue

Content © CRM Consultancy.