Now that we are able to have a very simple conversation with our Kylie Bot, we are going to create an object in Dynamics 365 to represent these chats. To do this, let's begin by navigating to the Settings menu tab in our Dynamics 365 Customer Engagement trial and then selecting Solutions.
Solutions are a way of grouping a number of Dynamics 365 configurations ans customisations together and we will use them to group Kylie Bot specific changes together. More information on Dynamics 365 solutions can be found here. The solution screen looks like this:
Let's create our own solution by clicking on 'New' from the menu bar which will result in the following:
Specify the relevant information as in the image above before clicking on the icon next to the Publisher field. You should be presented with a drop down like this:
Click on the 'Look Up More Records' option and you should be presented with:
Click on 'New' in the bottom left of the screen and a screen to create a new Publisher should be presented like:
Fill in the Display Name and Prefix fields before clicking 'Save and Close' from the menu bar. Publishers are a way of stamping customisations with a prefix of the responsible party of the customisations. More information on Publishers is available here. Once this is done, you will be returned to your Solution creation page but the Publisher field should now be completed as follows:
Click on the Save icon in the menu bar (not Save and Close) to save the Solution without closing it. Next, select the Entities menu option from the navigation tree on the left of the screen. You should be presented with a screen like this:
Click on 'New' from the menu bar and you should see this:
Fill in the details as in the image above, and make sure that you check the 'Define as an activity entity' checkbox. Details on custom Activity entities are here, but in short, Activity entities will provide us with a lot of pre-built functionality from the Dynamics 365 side of things. Click on the Save icon in the menu bar (not Save and Close) to save the Entity without closing it. Once this has completed, select the 'Forms' item from the navigation structure on the left hand side of the screen and you should be looking at the following:
Select the Main form (you can see it's the main form from the 'Form Type' column), its name will be Information and double click on the item to open it. You should be presented with this:
Click on the 'New Field' button in the bottom right of the screen to add a new field to the entity. You should see this:
Complete the details for the Transcript field as in the above image. Notice the change to the 'Maximum Length' field as this will provide as the space to store a conversation transcript with our bot and needs to be slightly bigger than the standard 2000 characters. If necessary, we can update this at a later stage too. Click on the Save and Close option in the menu to complete the creation of the field. You should be returned to the main form screen where you will need to refresh the list of fields by pushing 'F5' on your keyboard. Once the form has reloaded, you will be able to drag your newly created field onto the form from the list of fields on the right of the screen as follows:
Next, select the field on the form and double click on it to bring up its properties like this:
Select the 'Formatting' tab and update the 'Number of Rows' field to 15 like the image above. Click on 'OK' to return to the main form screen. Next, select the 'General' tab on the form (it should be highlighted in blue like the main form image, two images above) and then click on 'Change Properties' from the menu bar. The following screen should appear:
Update the properties on the Formatting tab as in the image above. This change will give us more space on our main form to see the Transcript field we created earlier. Click on the 'OK' button to return to the main form where you can then click on 'Save and Close' from the menu bar. You should then be returned to the Entity's solution page like this:
It is now time to publish our customisations by clicking on the 'Publish All Customisations' button on the menu ribbon.
Great work! We have now created and customised a entity in our Dynamics 365 instance that we will link to in the next post!