Beyond CRM: Extending Dynamics 365 to manage contracts

Two men use tablet touch screen.

When managing advertising agreements became complex and error-prone, Microsoft Digital turned to Microsoft Dynamics 365 to create a contract life cycle solution. The system streamlined contract creation, approval, and management—and moved Dynamics 365 beyond customer relationship management. It integrates with external systems like SAP and DocuSign to automate, digitize, and simplify contracts and transactions. The system set the standard for hybrid cloud configurations at Microsoft.

Managing advertising operations—specifically, selling or buying ad space—became unwieldy at Microsoft. Complex, nonstandard advertising agreements resulted in a manual, inconsistent, and highly segmented system that was sometimes prone to errors. The Advertising Operations team needed a consolidated system to streamline and manage online advertising agreements, end-to-end, so they approached Microsoft Digital for a new solution.

Our Agreement Management Tool (AMT) has evolved into a cloud-based managed service that uses Microsoft Dynamics 365 to push the limits of what customer relationship management (CRM) can be. AMT started as an on-premises, customized version of Dynamics CRM that improved our advertising contracts system. Today, AMT delivers a global, cloud-based, feature-rich system that manages the entire life cycle of online advertising agreements by automating, digitizing, and simplifying processes. AMT is a pioneering example of how we extended CRM to manage not just relationships—but contracts and transactions too—and it set the standard for hybrid cloud configuration systems at Microsoft.

Managing complex advertising contracts

Managing advertising operations is complex. Contracts for buying, publishing, and managing advertising incentives and partnerships all have their own rules and come with their own sets of obligations. Microsoft sells advertising space on its own websites, like MSN.com. They also buy advertising space on other companies’ websites. It’s a big business—they recognize hundreds of millions of dollars from advertising.

Advertising agreements are nuanced, often non-standard, and they contain unique negotiated terms—like revenue incentives. As Microsoft grew, Advertising Operations had to coordinate across multiple systems and tools. For example, to process an end-of-year payment, staff had to:

  1. Find the contract and get contract details.
  2. Calculate the payout by inputting data from a custom Excel spreadsheet into another system.
  3. Enter data into our expenditure tracking tool.
  4. Enter data into SAP for reconciliation.

It was hard to consistently apply business rules across multiple tools and processes. And analyzing data across multiple repositories was challenging.

As you can imagine, navigating though complex and disjointed processes needed deep institutional knowledge. The system was labor intensive and exposed opportunities for error. Something as simple as searching for a contract meant emailing the Advertising Operations team and then pulling the data. And end-of-contract financial obligations were sometimes affected by contract unavailability, data extraction issues, or data entry errors.

As the business grew, using separate tools such as Excel and Outlook made it difficult—and sometimes impossible—to enforce business rules, track processes, and analyze data. The original, internally developed system was highly customized, which made it both time- and resource-intensive.

Ultimately, the need to reduce compliance risks triggered Advertising Operations ask us for a new solution that would give them a new level of control over how they manage contracts. The business needed a solution that used fewer tools, offered greater control, and had the ability to automate workflows.

Our AMT evolution

When we started investigating a new solution, we were immediately drawn to Microsoft Dynamics CRM. Dynamics CRM can be configured rapidly, and it integrates easily with other applications. An on-premises instance of Dynamics CRM was quickly created by an external IT partner, which improved the contract-creation system.

As our knowledge of Dynamics 365 capabilities matured, we recognized the opportunity for a much more sophisticated system. We knew that Dynamics 365 would improve the advertising contract process by:

  • Moving it to the cloud.
  • Adding significant features continuously and incrementally.
  • Addressing business complexities that are governed by agreements with companies such as Yahoo and AOL.
  • Automating workflows.
  • Integrating with other line-of-business apps and operations applications, such as SAP.
  • Reducing support costs. Dynamics 365 eliminated most of our support costs.

Extending CRM in new ways

AMT manages the end-to-end life cycle—creation, approval, and management—of online advertising agreements, plus the transactions associated with them. AMT extends Dynamics CRM in unique and new ways. CRM systems are typically used to manage and analyze customer interactions and data throughout the customer life cycle, with the goal of improving business relationships, retaining customers, and driving sales growth. When we developed AMT, we adapted Dynamics CRM to:

  • Manage agreement and signature processes. AMT uses readily available Dynamics CRM connectors, such as the DocuSign for Dynamics CRM Online Connector, to manage advertising contracts and transactions. DocuSign automates and tracks advertising contract signatures.
  • Support compliance with a cohesive workflow. AMT captures contract metadata and employs a standard, automated workflow for signing documents, including local storage for draft agreements, workflow initiation, and review with other business teams. The same stages and steps are followed for each customer interaction. Integrated business rules ensure that people complete all required steps and meet SLAs. The cohesive workflow ensures that our advertising operations transactions comply with Microsoft policies and controls.
  • Integrate with internal and external systems. AMT integrates with internal systems, like an internal data staging warehouse; external systems, like the Microsoft Records Center; and third-party solutions, such as DocuSign and SAP. A single repository provides business insight, aids in decision making, and facilitates reporting.
  • Automate processes and reduce errors. To make sure contract obligations are met, AMT guides people through activities when obligations are due, past due, and more. SAP integration automates and standardizes processes for sending and receiving invoices, and for accepting and making payments. SAP plus automation reduces error and business risk.
  • Adapt to business security needs. AMT offers a customized security model by segregating data within the system. For example, to limit possible exposure of highly strategic contracts. AMT selectively partitions data records, so that only a few people have access to certain contracts.
  • Facilitate one-stop-shop decisions. A single AMT repository simplifies queries and enhances business visibility. Contracts can be monitored at any point in the process. Visualizing data from a single repository supports better business decisions and simpler reporting.

Digitizing the ad contract experience

AMT effectively digitized the creation and management of advertising contracts. Here’s an example, using the old contract signature workflow:

  1. Salesperson emails draft contract to customer for signature.
  2. Customer scans or faxes back.
  3. Salesperson gives to operations team.
  4. Operations team signs document.
  5. Operations team sends back to salesperson, then uploads to document repository.

Today, AMT with integrated DocuSign eliminates these steps and digitizes every aspect of the transaction. AMT distributes the draft to relevant parties, such as Microsoft Corporate, External, and Legal Affairs or Microsoft Finance, and manages those signatures. The AMT workflow brings the document back into Dynamics 365 and routes it into the signing repository.

A comparison between contract operations before AMT, and after. Before AMT, our team had to follow multiple disjointed processes. With AMT, they follow a single workflow. The graphic shows multiple steps in the old system, and one in the new system.
Figure 1. Simplified workflow using AMT

The team follows the same stages and steps for each customer interaction. AMT automatically sends emails, tracks responses, analyzes data, and manages other operations.

Envisioning AMT

When we were planning AMT, we knew that we wanted to take advantage of modern engineering principles that would get us to the cloud, fast. We envisioned an economical and efficient managed service model and a sprint delivery system, which would continuously deliver new functionality. We chose to configure out-of-the-box features—rather than customizing code—to economically and rapidly introduce new features.

Agile delivers continuously

We used an Agile software development process, so that we could roll out technologies on an ongoing basis. We focused on business value, rather than features. Overall, we sought to build for the least amount of effort.

Our continuous build, integrate, and deploy process used Visual Studio Team Services (VSTS), and we delivered to production in three-week sprint cycles consisting of:

  • Weeks one and two—develop and test functionality.
  • Week three—deliver user stories for testing and user acceptance (usability) testing. A user story is an Agile software development concept, which simply states what a person wants to do with software and describes it from their perspective.

Sometimes, business issues extended our sprints by one week. But overall, we continuously deliver new features and quickly realize the benefits.

Using a managed services model

AMT was envisioned and developed as a managed service. A managed service is an outsourced IT function, where the service provider takes on proactive management responsibilities and tasks. It’s a strategic way to improve operations and cut expenses.

AMT is based on modern engineering principles, such as DevOps, where development and operations roles merge, increasing efficiencies with maturity. In DevOps, the ideal is for any engineer to be able to do any task on the team. We used to separate our AMT team into infrastructure, development, test, and deployment roles. Now, it’s a single feature group.

We incorporated unit test automation as part of the build process. The process automates repetitive but necessary tasks, and runs additional tests that would be difficult to do manually. Test automation is critical for continuous delivery and continuous testing, and is automated through VSTS. Deployment is also automated through VSTS.

Configure, don’t customize

Month over month, we deliver new features and gain benefits. We make very few changes to our processes to get the rewards. This changes the focus to reconfiguring existing features instead of customizing and creating new ones. Customizing code increases development and support costs, and potentially limits future upgrades. For example, we found that DocuSign customization requires additional management tasks during upgrades. As a rule, we avoid custom code at all costs, except for some custom entities, such as contract agreements and obligations.

Architecture

AMT is organized around cloud services, Azure services, and our corporate network. Because SAP lives on-premises in our corporate network, Microsoft Digital created a hybrid connectivity solution to facilitate the flow of data from the cloud through our corporate firewall to on-premises systems. Figure 2 shows an overview of the solution.

An overview of the AMT system. It is a combination of cloud-based components, and on-premises components, specifically the SAP system.
Figure 2. AMT architecture overview

In the cloud, we use Dynamics 365, SharePoint Online, and Microsoft Record Center. In these applications, documents are created, stored locally, digitally signed, and then stored in Microsoft Record Center. SharePoint Online is used for local data storage. AMT business processes collect documents and stores them in SharePoint Online until automated workflows are executed. DocuSign is the third-party component that digitally signs documents. Final output from the contract signing process is stored and kept in Microsoft Record Center.

In Azure, the CRM SAP Web Service and our hybrid connection create a path for different types of data—such as agreement, SAP-specific, and fulfillment—to flow from cloud-based AMT services to our corporate network and SAP. For example, specific agreement data used to create contracts, such as a business partner name, or an obligation identification code, needs to flow from AMT in the cloud, to SAP on-premises. The CRM SAP web service replicates AMT functions, and routes data back into internal systems for integration.

In the Corporate Network, there are data staging services, a data mall for data storage and extraction, and on‑premises SAP. In the AMT staging database, data is extracted from corporate invoicing and customer data stores, and then ported into a staging database. This is where SQL jobs and tasks—such as data transformation and data aggregation from multiple sources—occur. The data mall is a repository for distributed systems, such as customer and invoicing data. Once the transformation and aggregation tasks are completed, the subset of data from the staging database is made available to AMT.

Integrating other tools with AMT

AMT streamlined multiple tools and repositories into a single system. It integrates SAP and our internal data staging warehouse for managing invoices and payments. AMT integrates with Feed Store, DocuSign, and the Microsoft Records Center. Out-of-the-box Dynamics 365 tools work with Microsoft systems such as SharePoint and Power BI.

SAP integration

There are two SAP integration points in AMT:

  • When a new obligation or contract is created, AMT sends information to SAP and a contract number comes back from SAP.
  • After a contract is created, it has an associated financial obligation. To manage fulfillment, data is sent to SAP to create an invoice. Invoice numbers are sent to our SAP staging repository, and then invoice details are sent back to AMT.

DocuSign integration

The DocuSign for Dynamics connector easily creates relationships between DocuSign and Dynamics CRM entities. Most of our integration was achieved with the standard DocuSign connector. Only 10 percent was customized for Advertising Operations business needs. We preconfigured “Send for Signature” actions with the right recipients so that documents in Dynamics 365 can be easily signed or sent.

The workflow progresses naturally from the contracting process. For example, in an agreement, the CRM user clicks a “Send for Signature” button. The user uploads and identifies specific documents that need to be sent for signature in DocuSign. We incorporated custom JavaScript because we didn’t want to display all the default DocuSign buttons, and we applied a custom action to the button that people see.

When a user clicks our custom “Send for Signature” button:

  1. The button creates a connection between the CRM user and DocuSign, and calls out-of-the-box DocuSign workflows.
  2. A custom plug-in passes defined parameters to DocuSign.
  3. A DocuSign window opens, prompting the signer where a signature is required.
  4. The CRM user indicates who the document needs to be routed to.
  5. The document is sent for signature, allowing decision makers to review and approve contracts within minutes.
  6. All workflow steps are tracked as the document is brought into Dynamics 365 until the user signs.

AMT dashboards allow the business to closely manage the signature process. They track DocuSign transactions from beginning to end, and it’s easy to see if an agreement is signed or not.

SharePoint integration

SharePoint integration is, for the most part, out of the box. We use SharePoint as a document repository. Whenever an agreement is created in AMT, two things happen. First, AMT uses a plug-in to dynamically create a corresponding SharePoint document library and URL. Then, a web app captures logs, reflecting the process. Embedded metadata routes documents to DocuSign or the Microsoft Records Center.

Cloud migration and hybrid connectivity

AMT was developed as an on-premises solution in 2013. In 2016, we moved it to the cloud. To make the move, a hybrid connectivity solution had to be created to move data between our cloud-based Dynamics 365 instance and on-premises SAP resources behind our firewall. We worked with the Azure Operations group on our hybrid connectivity solution, and it’s now the standard across Microsoft.

When we moved data from Dynamics CRM to Dynamics 365, the transition was fairly smooth, as we followed a well-defined process of data cleansing and testing. The main challenge was integrating our on-premises SAP and our cloud configurations. In our original on-premises configuration, databases were directly connected. We had to incorporate hybrid connections into our Azure Web App and AMT staging databases, so that we could integrate with on-premises SAP system.

The hybrid connection created for AMT was the first at Microsoft, and set a precedent and standard for part on‑premises, part cloud configurations. We worked closely with Dynamics 365 product architects to make it happen.

It’s designed in a reusable way that can be applied to other IT solutions in our portfolio that integrate with SAP or that need a hybrid connector. We’ve created documentation for other teams on how to set up a hybrid connection, what to consider beforehand, and best practices.

What we’ve gained from AMT

The AMT solution offers Microsoft many business and technical benefits. They include:

  • Reduced support costs. By moving to the cloud and creating a solution with modern engineering principles, we could avoid significant support costs. Under the managed services model, support costs are about one third of what they were.
  • Enhanced compliance. Expert knowledge of Microsoft policies and controls was built into AMT, which helps ensure that our solutions are compliant.
  • Continuous improvements. With our managed services model and sprint delivery system, we can continuously deliver new features and gain benefits.
  • Reduced business risks. As a single, cohesive system, AMT enforces business rules, tracks processes, and comprehensively analyzes data in a single repository.
  • Complete visibility. With AMT, the Advertising Operations team can monitor the end-to-end pipeline of any contract. Queries quickly find contracts across the system.
  • Efficiency and accuracy. A standardized business process—with the same stages and steps for each customer interaction—helps everyone follow best practices and improves the efficiency and accuracy of the organization.
  • Business insights. Seeing across one data repository aids in decision making and reporting. Users can quickly spot and respond to issues that could potentially block agreements. This ensures that SLAs are met.
  • Reduced errors. Integration with SAP and Velocity for managing invoices and payments greatly increases process automation and reduces errors.
  • Streamlined reviews. Instead of manually sending hard-to-track emails to reviewers, such as Microsoft Corporate, External, and Legal Affairs or Microsoft Finance, AMT automatically sends email, tracks responses, and helps us complete reviews on time.
  • Digitized and automated signatures. DocuSign integration allowed Microsoft to move away from all manual signature processes. AMT distributes drafts, accepts signed documents, ports them into CRM, and routes into a signing repository.
  • Proactive financial management. The tool captures the various financial obligations described in the contract. This gives visibility into contract obligations, so they can be proactively managed.

Best practices

Overall, the AMT solution evolved smoothly from its initial on-premises Dynamics CRM instance to the cloud‑based solution. There were some lessons that came out of the experience, such as:

  • Manage DocuSign upgrades closely. When upgrading DocuSign, if custom code has been used, some relationships need to be reestablished. It is important to back them up ahead of time.
  • Integrate Azure Web App carefully. It is important to establish the connection between Azure and CRM carefully. Azure Key Vault and domain SSL certification must be configured with care to connect securely.
  • Create reusable solutions. We found that maximizing reusable solutions, such as our hybrid connectivity configuration, and DocuSign configurations, led to reuse across our IT portfolio and even across the company.
  • Minimize customizations. Custom code always has the potential to affect performance and increase maintenance costs. To reduce customization in AMT and ease future Dynamics 365 product upgrades, we used out-of-the-box Dynamics 365 entities and features wherever possible.
  • Automate build and release processes. We used the Visual Studio Team Services (VSTS) automation suite to more efficiently build and release Dynamics 365 and Azure components. VSTS automation reduces manual deployment efforts, and helps mitigate risk to production environments by defining toll gates and approvals for code release.

Looking ahead

Today, AMT applies to advertising operations. Going forward, we want to scale this business and then take on other business scenarios. We’re poised to grow. Next year, we anticipate that AMT will process over a billion dollars. We’re continuing to drive automation into our development processes, and UI automation will be incorporated. AMT passes internal Microsoft Digital Security controls. Our next step is to adopt Sarbanes Oxley best practices.

We want to pilot other Microsoft businesses—outside of advertising—that have similar needs. There are many groups that process contracts. We want to use common connectors and features such as data export services, Azure Logic Apps, and common data models, to track and process them through AMT.

We look forward to integrating AMT with our advertising operations pre-sales Dynamics CRM system. This will give us an end-to-end view of advertising operations from pre-sales through post-sales and, ultimately, to the end of relationships.

Key takeaways

We’ve reimagined what a CRM can be. We’ve created a scalable, economical, and reusable system to manage our advertising operations. In the process, we’ve reduced support costs, standardized and automated workflows, and reduced errors. AMT has improved workflows for Advertising Operations using available programs and connectors. AMT contract and transaction management can apply to many other teams at Microsoft.

Recent