Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab -...

20
Lab: AX 2012 Cortana intelligence services management & Product recommendations in Customer service Time: 45 minutes In this hands-on lab, you will take a tour of the Cortana intelligence service management module and see how to work with Azure Recommendations SaaS service in Dynamics AX 2012 R3. You will walk-thru an end-to-end scenario based on the Call- center service recommendations that this sample application is designed to support. The overview provided in this lab will demonstrate the capabilities of the Azure Recommendations SaaS service and from an end-user point of view is meant to provide an example of a completed scenario. Note: You can run this lab in the one-box environment provided. Overview Product recommendations are a common feature in all eCommerce and several other business domains today. Microsoft Cognitive Services APIs looks to simplify this experience by providing a Recommendations API. This API simplifies the whole process by abstracting away the complex machine learning models and its operationalization aspects so that users can focus on incorporating a real-time recommendations engine in their product and scenarios. In line with this, we now showcase the following through this lab. Cortana intelligence services management - Showcase Azure Recommendations API integration in AX. We will use this capability create a model and a train model for generating recommendations using a sample dataset. Product recommendations in AX – Leveraging the recommendations model that we will build, the lab will demonstrate via the Customer service scenario as to how one can generate product recommendations such that both the seller and the customers benefit. Key concepts Installing and configuring pre-requisites Lab 5: Creating a model and data model elements 1

Transcript of Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab -...

Page 1: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Lab:  AX 2012 Cortana intelligence services management & Product recommendations in Customer serviceTime: 45 minutes

In this hands-on lab, you will take a tour of the Cortana intelligence service management module and see how to work with Azure Recommendations SaaS service in Dynamics AX 2012 R3. You will walk-thru an end-to-end scenario based on the Call-center service recommendations that this sample application is designed to support. The overview provided in this lab will demonstrate the capabilities of the Azure Recommendations SaaS service and from an end-user point of view is meant to provide an example of a completed scenario.Note: You can run this lab in the one-box environment provided.

Overview

Product recommendations are a common feature in all eCommerce and several other business domains today. Microsoft Cognitive Services APIs looks to simplify this experience by providing a Recommendations API. This API simplifies the whole process by abstracting away the complex machine learning models and its operationalization aspects so that users can focus on incorporating a real-time recommendations engine in their product and scenarios. In line with this, we now showcase the following through this lab.Cortana intelligence services management - Showcase Azure Recommendations API integration in AX. We will use this capability create a model and a train model for generating recommendations using a sample dataset. Product recommendations in AX – Leveraging the recommendations model that we will build, the lab will demonstrate via the Customer service scenario as to how one can generate product recommendations such that both the seller and the customers benefit.

Key concepts

Installing and configuring pre-requisites Provisioning an Azure Cognitive Services account Azure Recommendations in Dynamics AX 2012 R3 Conclusion

Lab 5: Creating a model and data model elements

1

Page 2: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Installing and configuring pre-requisites

The AX 2012 R3 CU 11 instance on your VM is re-built with a few prerequisites. Entity Store hotfix Cortana Intelligence Suite AX project Demo dataset

The only other requirement is to create a subscription key for the Azure Recommendations APIThat will be used to generate a token to sign the service requests.

Provisioning an Azure Cognitive Services account

The The Azure Cognitive Services account must be provisioned in your Azure subscription to use any of the Cognitive services APIs including the Recommendations API. To do so, login to the Azure portal – https://ms.portal.azure.com – search for Cognitive Services accounts and then create a new account for Recommendations service.

For the purposes of this lab, a Cognitive services account is already provisioned. Use the following account information to proceed.

Cognitive services account name: MyCognitiveServicesAccountCognitive services account key: 63f0c534ec70470ba418391325d38074

Lab 5: Creating a model and data model elements

2

Page 3: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Azure Recommendations in Dynamics AX 2012 R3

The lab will follow this process flow outlined below. We will first inspect the Cortana intelligence management module and configure certain parameters before moving to create Recommendations artifacts. Using these artifacts we will then generate product recommendations in the Call center > customer service scenario.

Lab 5: Creating a model and data model elements

3

Setup CIS parameters

Create model

Import catalog data

Import usage data

Build a recommendation

model

Consume recommendations

Page 4: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

1. Setup Cortana intelligence services management parameters

Launch the AX 2012 R3 client and navigate to the pre-installed “Cortana intelligence services management” module.

Click on the “Getting started with recommendations” menu item. This launches the public Cognitive Services - Recommendations APIs landing page. NOTE: Detailed API reference as well as the Recommendations UI for viewing the projects, builds etc., can be found here

Lab 5: Creating a model and data model elements

4

Page 5: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Switch back to the Ax Client and launch the – Cortana intelligence services management > Setup > Global parameters form

Enter the cognitive services account name and key specified in the previous lab section into their respective fields in the Global parameters form. Close the form to save the values.

Lab 5: Creating a model and data model elements

5

Page 6: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Open Model build parameters configuration form from – Cortana intelligence services management > Setup > Azure recommendation settings > Model build parameters configuration

Inspect all the tabs and click File > Save action pane menu to save these default build parameters.

NOTE: These build parameters offer an advanced capability to customize your default build attributes. For a detailed description of what each parameters indicates refer the Recommendations API document mentioned earlier.

Lab 5: Creating a model and data model elements

6

Page 7: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

2. Create models

The first step in the process is to create a Recommendations “model”, which is simply a container project for a specific use. Each model can have one catalog file and as many usage files. You can trigger builds as usage files are added although there are restrictions currently on the number of builds that can be triggered per model.

Click on the – Cortana intelligence services management > Azure Recommendations > Recommender models - menu to launch the Recommender models form

NOTE: The action pane outlines the list of functionality that can be leveraged to create models and its associated artifacts.

Click “New” action pane menu to launch the Create new recommender dialog. Enter a valid recommender model name, give a description and enter a name for the specific model entity. Click OK.

NOTE: o Model name must be 3-20 characters longo Set Entity field value to - CustomerServiceRecommender

NOTE: The Entity attribute is a loose association that indicates the category or the entity that a model is being created for. The Recommendations API does not maintain such context and this is strictly only an AX attribute for enabling multi-category recommendations.

Lab 5: Creating a model and data model elements

7

Page 8: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

If the model creation is successful, then a new model will be shown in the models list page. Click Synchronize to retrieve all models and their updated attributes. NOTE: If there are other models in the configured Cognitive services account those would be synced locally as well

Select the model and click “Set default for entity category” action menu button to make this the default model to use for the scenario.NOTE: Recommendations models do not have any application context. The entity attribute is a context we maintain in AX to enable different scenarios using different models or for that matter to enable business logic to consume different models for the same scenario.

3. Import catalog data

After a model is created, catalog data – the collection of all items is to be imported. In our lab, we will use a Retail catalog data file based on the DEMO dataset

In the Recommender models form click Upload catalog action pane menu button to launch the catalog file upload dialog.

Lab 5: Creating a model and data model elements

8

Page 9: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Browse and select the catalog data file. Provide a description for the data file and click OK.NOTE: Use file from – C:\Users\Administrator\Desktop\AX2012 Recommendations Demo\Datasets\CatalogAndUsageFiles\ProductCatalog.csv

After the import completes, click on the View file upload history menu to verify that the upload status for Catalog file is Completed.

Lab 5: Creating a model and data model elements

9

Page 10: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

4. Import usage data

The next step in the recommendations process is to import usage file data. This is typically the sales transactions or click stream event data (from an eCommerce portal for e.g.,). The usage data is used to “train” the Recommendation models for better and more accurate predictions i.e., as more usage data of good quality is fed to the models, the quality of recommendations improves.

In the Recommender models form click Upload usage file action pane menu button to launch the usage file upload dialog.

Browse and select the usage data file (see below). Provide a description for the data file and click OK.

NOTE: The usage files to import are – C:\Users\Administrator\Desktop\AX2012 Recommendations Demo\Datasets\

CatalogAndUsageFiles\UsageFile1.txt C:\Users\Administrator\Desktop\AX2012 Recommendations Demo\Datasets\

CatalogAndUsageFiles \UsageFile2.txt C:\Users\Administrator\Desktop\AX2012 Recommendations Demo\Datasets\

CatalogAndUsageFiles\UsageFile3.txt C:\Users\Administrator\Desktop\AX2012 Recommendations Demo\Datasets\

CatalogAndUsageFiles\UsageFile4.txt C:\Users\Administrator\Desktop\AX2012 Recommendations Demo\Datasets\

CatalogAndUsageFiles\UsageFile5.txt

After the import completes, click on the View file upload history menu to verify that the upload status for all Usage file’s is shown Completed.

Lab 5: Creating a model and data model elements

10

Page 11: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

5. Build a recommendation model

The next step in workflow is to train the models. This is done by triggering builds on the model that can then be used generating recommendations. The Azure Recommendations supports 3 types of builds – FBT (Frequently bought together) or I2I, Recommendations or U2I and then Rank build. For details on these builds and their parameters see – Azure Recommendations Quick Start Guide.

In AX 2012 R3, the model builds can be triggered by using the Cortana intelligence services management > Azure Recommendations > Manage recommendation builds menu or by clicking the View model builds action pane menu on the Recommender models form

Click New to launch the model build dialog. Choose “Recommendations build” option for Model build type. Specify a description for the build and click Create Build button.

Lab 5: Creating a model and data model elements

11

Page 12: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

NOTE: Expanding the “Customize build parameters” fast tab allows you to specify custom build settings for the build you are trying to trigger. Otherwise default parameters set for that build earlier are used. Once the build is triggered a build id is generated. The list page is then refreshed with the new build details.

Refresh the Model build form (F5) and click Refresh status to refresh the build status. Wait for the build status to be Successful.NOTE: Recommendations build should take < 5 minutes to build. Also note that you can have utmost one build of a specific type in progress at any given time.

Lab 5: Creating a model and data model elements

12

Page 13: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Select the newly created build and click Set active build.NOTE: A model can have many builds for each of the supported types and it is expected that user selects a specific build to be used in a recommendation scenario.

Lab 5: Creating a model and data model elements

13

Page 14: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Close the Recommender model builds form In the Recommender models form, click Synchronize to ensure that the “Active build id” is set

to the “Build name” value of the build created and close the form.

6. Consume recommendations

Once the model is trained (i.e., successful builds are generated), it is ready to be consumed in recommendation scenarios. We are now going to try generating the recommendations in the Customer service scenario. In this scenario a B2C customer places orders via a call-center agent.The call-center agent launches the Customer service form, pulls up the customer and works with either an existing order or a new order. Lets see how we can demonstrate recommendations help with upselling or cross-selling in these cases.

Launch AX Client and switch to company - USRT Launch the Customer service form from Call center > Journals > Customer service menu Enter customer name - 1001 and click Search.

Lab 5: Creating a model and data model elements

14

Page 15: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

In the Customer search form, select and click “Select customer” action pane menu Wait for the Customer service form to refresh with the order history for this customer

Lab 5: Creating a model and data model elements

15

Page 16: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Select sales order with id – 012291 and click Cortana Recommendations > View recommendations for sales order - action pane menu

In a few seconds you will see the recommendations show up for this sales order (that contains a basket of items).

Now, lets try creating a new sales order and see if we can get some recommendations that we can ask the customer about, in real time, as he is placing the order. To do so:

Click New > Sales order action pane menu In the Sales order form, add a line and select item – 0007 [Full Finger BMX Gloves] Ctrl + S to save Wait for a few seconds and then refresh the Recommended items form part

NOTE: To refresh, collapse and expand the said form part You should now see item recommendations for the added item

NOTE: As you add items, the recommendations can be refreshed to generate recommendations for the entire basket and not just a single item

Lab 5: Creating a model and data model elements

16

Page 17: Overview - Home Page - AXCISWorkshopWebsiteax-cis-ws.azurewebsites.net/modules/Hands-on lab - AX2012... · Web viewAzure Recommendations in Dynamics AX 2012 R3 The lab will follow

Conclusion

It is very well known that product recommendations that tailor a user’s shopping experience based on his preferences and purchase history increase customer satisfaction. It is also well knows that higher click through and conversion rates are seen when such recommendations are incorporated in the sales experience. With Microsoft Azure Recommendations API, we see that all the pain points relating to creating and creating and managing these complex models, running computations and getting recommendations is made very simple. With this experience enhanced from AX with its own model management skin this become quite straight-forward to incorporate in your scenarios.

Lab 5: Creating a model and data model elements

17