30 day trial
This post is in continuation to the previous introductory post on Dialogs Part I. In this post, we’ll take you through an example of contact creation dialog and give you a basic introduction to data slugs, how to use them and also, how to use a data slug for Optionset values. This post also contains a brief introduction of the running dialog like tips, comments, next, previous etc.
So, let’s start with an example of how to create/author a basic dialog which takes input from the user and based on the inputs received, creates a contact in Microsoft Dynamics CRM 2011. We will be creating the Contact on outgoing/incoming Phone Calls. The Phone Call will be the context Entity.
Here is a screenshot of a running dialog:
1. Go to Settings->Processes and click New.
2. A dialog will appear. Fill the details as shown below (Don’t forget to choose category as dialog):
A new window will appear.
3. Click Add Step->Page as shown below:
4. Type page description as: Contact's first, last and middle names
5. Add step->Prompt/Response and click on Set Properties, you will get a page to set the Prompt and Response properties.
6. Fill the required information as shown in the following figure(Response Type: Single Line, Data Type: Text):
And then click on Save and Close.
7. Add two more prompt/response steps in the similar way asking for Middle Name and Last Name. You can add these prompts on same page or on new pages if you want to take only one input at a time.
8. Then add a prompt/response step with response type as Option Set (picklist) and ask for gender of the contact as shown below. We’ll use the response of this prompt to fill the gender information (male/female) on contact form.
a. Add 2 response values:
i. Label – Male, Value – 1
ii. Label – Female, Value – 2
(The values given here should match the exact Optionset values for that particular options taken by gender field of Contact Entity). For example: you want to fill the gender optionset of contact, the value of Male in that Optionset is 1 and that of female is 2. You can check for these values by going to Settings->Customizations-><Entity>-><Field> (Settings->Customizations->Contact->Gender in our case.))
9. Then add one more page and add prompt/response steps to get email address and mobile number in the similar fashion as done for the first page.
10. Now Add Step: Create Record - Choose entity as contact and click on Set Properties button. You will get Contact form to fill the desired values as shown in the following figure.
11. Click on First Name Text Box and choose First Name from local values on form assistant as shown above.
Note: Response Values will be available as Local Values in form assistant
12. Click Add and then click ok.
13. A data slug will be inserted in First Name field (highlighted in yellow color). Data Slugs are the dynamic values which are replaced with actual values while the Dialog run is in progress. In this case, it'll be replaced by the values filled by the user while running dialog for the response of First Name Prompt.
14. Do the similar steps for Middle Name, Last Name, Mobile Phone and E-mail in the same form.
15. Now, click on the gender field in contact form. In look for, choose gender (Label of the gender prompt) and choose Response option set value below and click add. A data slug will be inserted as shown below (encircled one):
Once you are done with setting all the dynamic values the final Contact Form will look as shown below:
16. Click on Save and Close.
17. Add Page with title "Contact has been created".
18. Add step prompt/response and click on Set Properties.
19. In prompt text, write "A contact has been created for" and then add first name, middle name and last name data slugs.
An important point to note here is that you need to add these values one by one otherwise all the Response Values would be replaced in same field. What you need to avoid is shown in next figure.
If you add all these items in one field, this will mean that if first name is null, then the middle name will be used and if that is also null, then the last name will be used. So, if you want to display all three, then add them separately.
Your final Dialog, you just authored will look like this:
20. Now it’s time to Activate and test it. Click Activate and close the Dialog definition page.
Contact center sales person will open his phone call activity and click on the "Start Dialog" button present in Process section of ribbon.
Then he'll choose the contact creation dialog from the lookup.
On clicking ok, dialog will start running. He'll ask the questions from the customer as mentioned in the dialog and fill the corresponding responses.
Here is a screenshot of the contact creation dialog in action:
To navigate to the next page, Next button has to be clicked.
Similarly if you want to go back to the previous page, you’ll have to click the previous button.
But it should be kept in mind that if you are going to the previous page, then data in your current page will not be persisted.
To cancel the dialog at any moment, cancel button will have to be clicked.
Summary of what has been done till now as a part of this dialog can also be viewed using the summary button. Clicking on this button will open the corresponding process session record which contains all such details.
Similarly notes can be taken in the comments section while running the dialog. For example, in the above screenshot, we have added the comment that customer doesn’t have an email address.
Tip area shows tips corresponding to the highlighted prompt which aids Sales Person in filling the response. This area is collapsible too in case it seems unnecessary. If you click on the arrow present at the top right of this area, then tip area will get collapsed and the wizard will look like this:
Highlighted pane on the right can be clicked to show tips again.
After clicking Finish button in the last step, go to Sales->Contacts.
You'll notice the following entry (which has been created by the dialog which was just run):
In this way, Contact center Sales Person was able to create a contact very easily.
If dialogs are used, then user doesn’t have to go to various grids and create/update/assign various records by himself. He’ll just run the dialog, fill the entries and everything will be done in the background. It also guides user how to interact with the customers and hence, can be used for self help as well as assisted learning.
Watch out for more advanced posts on dialogs which will be published pretty soon.
This is really a different post. "Creating a dialog" this is new concept for me to learn. But its quite interesting. The way of explanation seems to be good. Screenshots are very useful and easy to understand the concept.
I was unable to complete #15. When selecting any drop-down list on Contact form, including Gender, I was not presented with any options in the box below Gender. This works in the Prompt and Response slugs, but not when you actually click on the Gender field in Contact form to add slug.
In step 8, you will have to choose your response data type as Integer. Did you do that?
Response Data Type is "Text" always. how can we change that? Even in your screen shot "Data Type" is Text under Response details section and it is disabled.
Can you please tell me where dialogue data has been saved. and plz give me your mail id to contact you.
Thanks in advance.
Once you have saved a prompt step, then you can't change the response type. You can set the response type only while creating a prompt/response step. So, what you can do is: you can delete that step and create a new one in its place to set the response type as int.
In screenshot, it's not showing properly because of a bug in the Beta build. It's working fine in RTO/RTM builds.
Any way to increse the max size of the multiple line response of 2,000 characters? This will match one of our target fields.
Unfortunately, there is no way to increase the max size of the multiple line response type currently.
Thanks, Manish. Is there somewhere that shows how you include Lookup fields?
if one of the steps creates an acount (the dialoge has not ended yet) and then the user hits the Back button and changes the name of the customer then hits next or even worse :cancel. will another account be created, will the created account gets cancelled?
what happens if i click CANCEL on the last page of the dialog ?
except for changing the dialog status to cancelled, will it also deletes any changes made to the entities involoved in the process? such as new tasks, email and etc? if not whats the purpose of that button?!?!
@jg: I am afraid lookup fields can not be included as Response Types currently. Thanks for providing your input btw. We'll consider for the next release.
@ts: If there is an action between two steps (Eg: Create/Update/Assign/Send Email/Set state etc), then those actions will get executed again if you go back and come forward. So, in this case, one more account will get created.
Actions are not rolled back i.e. once an action has happened, it can't be undone. For scenarios like create account/contact etc, you can take the complete data before creating the entity and preview it using Prompt step before firing the create record acrtion.
The purpose of cancel button is to notify the state in which dialog was closed i.e. whether dialog was executed completely till the end or not. Cancel just shows that it was cancelled in between.
i am a student of computer sce, and i would like to knw what is it all about ,i am realy curious to knw this pls let me knw in a simple manner. i'll wait for your ans .
Thank you for this post. I've been working with a dialog to populate a custom entity that includes numerous yes/no value fields. I've meticulously matched the option set type and values in the dialog and entity. When I first tested it mapped the responses fine. As I've built out the dialog to include the approximately 50+ fields, the yes/no fields no longer offer values to insert in the "Create Form". All the other fields work fine but none of the yes/no work. Any suggestions? Thank you!
Hi, could you please tell me, how can I reach for notes from comments section and put them into lead comment area?
Thank you for answer.