Architecture Overview
Architecture Diagram
- CPQ is an application which is composed of software components, hosted and managed by Conga.
- CPQ implementations are accessible through the public domain proscloud.com. A CPQ server can be exclusively dedicated to one customer or shared by multiple customers. Moreover, one or more public URLs are allocated to access the customer’s environments (test, production, etc.).
- The transport layer between your thin client (browser) and CPQ web application server is ensured by HTTPS protocol.
- The data exchange between MSCRM and CPQ web application servers is performed through Web Services (REST / HTTPS).
- A CPQ integration solution is deployed and hosted on the Microsoft Dynamics CRM platform. It implements several techniques specific to the MSCRM platform (custom entities, plugins, workflows, etc.). It can also leverage Azure functions for various tasks like document generation or synchronization back from CPQ.
Process Flow
- From the CRM Quote entity, in the Summary tab, you can edit the active quote general information. Then you can access the CPQ Quoting step of your choice in the Smart CPQ Steps PowerApp component on the CRM quote tab. Via this action, the corresponding CPQ Quoting step is displayed in an iframe in a dedicated CPQ Quote tab of the CRM Quote entity.
- When switching to the CPQ Quote tab via the Smart CPQ Steps PowerApp component, a call is made to a MSCRM JavaScript that initializes the external context of the quote. If the quote version is not the latest one available, then the quote is migrated - a message is displayed to let you know that the quote is being migrated.Note: The quote model migration might imply that a step visible in the step navigator in the CRM is not accessible anymore to you. If you clicked on such a step in the CRM, then you will be redirected automatically to the first quote step accessible to you in Smart CPQ.
- The client side JavaScript executes a custom code activity that runs server side and calls CPQ, passing some CPQ session parameters and MSCRM contextual data. This data and associated mapping may be configured through the Smart CPQ Setup and Smart CPQ Mapping Set entities. An exception is made with the quote status (CRM Status Reason) that is updated in
CPQ independently from the rest of the data and without requiring any data mapping definition in the Smart CPQ Mapping Set.
The actions of the CPQ Web Services called from the CRM consist in:
- Updating the quote status.
- Validating the session parameters.
- Loading the quote data.
- Completing the initialization tasks.
- If the initialization is successful, an URL is returned to MSCRM to display the CPQ UI embedded in the CPQ Quote tab of the CRM Quote entity. Otherwise, an error is thrown. The CPQ quote model that runs in the iframe is the one configured in the Smart CPQ Setup entity and associated to the current quote form.
Within the Quote iframe, you can access CPQ Catalog and Configurator modules – if configured - from the CPQ Quote spreadsheet. Therefore, you can benefit from all the advanced features of Smart CPQ.
Smart CPQ is setup to take 100% of the available space in the iframe. However, if the iframe is reduced to a too small width (400px or less) or height, then Smart CPQ considers it too small to be properly displayed and a blank page is displayed instead.
- When clicking on Close Cart & Sync in the CPQ Quote tab, MSCRM makes a call to a CPQ Web Service to start the sync from CPQ to the CRM.
- A client side JavaScript executes a custom code activity that runs server side and calls CPQ to retrieve and synchronize data from CPQ - Quote data and Quote Lines - and update the CRM Quote entity and any other entity linked to the Quote and setup in the Smart CPQ Mapping Set entity. Alternatively, if set up, Azure Functions may be called to perform the sync asynchronously instead of leveraging the standard CRM plugin.
- Once the synchronization is done, you are automatically redirected to the CRM Quote tab in the CRM Quote entity.
- Optionally, you can leverage the Smart CPQ Reports PowerApp component on the CRM Quote tab. By this means, you are invited to choose a document template and generate a proposal document. Using the button in the component triggers a call to a MSCRM JavaScript.
- The MSCRM Javascript sends the context of the quote to the Smart Document module via Web Service. The CPQ module then generates the document which is ultimately stored on the CRM Quote entity.
Authentication
INTEGRATING YOUR IDENTITY PROVIDER WITH THE APP PORTAL
The authentication with Dynamics 365 relies on standard S2S OAuth2.0. It is made possible via an integration with the App Portal.
The following page details the different ways for you to connect to the App Portal: Application Portal Configuration.
The App Portal supports integration with external identity providers such as Azure Active Directory for instance.
AZURE ACTIVE DIRECTORY AUTHENTICATION
The architecture supporting the integration of CPQ with MSCRM leverages Azure Active Directory (AAD) to manage the authentication between the two systems.
SMART CPQ MANAGED SOLUTION
In the Smart CPQ managed solution, the Tenant ID obtained from a request to Cloud Services must be set in the Smart CPQ Settings entity (for more details, see D365 Integration - Link MSCRM with a CPQ Server)
Based on these elements:
- When a call to CPQ is made
- These settings are sent to AAD requesting for a security token.
- A token is returned by AAD and stored in MSCRM for future calls.
- The token is sent as part of each call to CPQ.
- When CPQ syncs back to the CRM:
- This token is used to authenticate.
- Either an exchange of data or a use of the Web API is leveraged to fire the MSCRM custom
workflow responsible for the CRM update.
