Transcript:
0:04 so you can see here we've also got a
0:05 site map
0:06 where we've got our core you know
0:07 formulas schedules x cache records
0:09 so just click on formula so
0:12 we we use a an entity in crm to store
0:16 all the formulas so um you know it works
0:19 just like you
0:20 you'd expect within crm so it's a very
0:22 native ui
0:24 and the first example i'm going to show
0:25 you today is a
0:28 is around eligibility so eligibility is
0:30 very common
0:31 in crm type projects and what
0:34 eligibility is is like
0:35 do you qualify or are you entitled to
0:38 something
0:39 and in this case where a financial
0:41 services company
0:42 is the example and they're working out
0:45 are you eligible for a platinum
0:47 um credit card so this is
0:50 just again for new people who might not
0:52 you know have seen r52 before
0:54 this is the editing experience that we
0:56 have within dynamics crm to be
0:58 able to create your formulas and for
1:01 like 95
1:02 you never have to leave this screen so
1:05 and you can like
1:06 configure the vast majority of your
1:08 business rules just in this one screen
1:10 it's very very powerful um
1:12 it's broken up into three main sections
1:15 so you can see here on the right hand
1:16 side we have
1:17 what we call the registration or um when
1:20 is the
1:21 formula or the business rule going to be
1:22 triggered
1:24 so it's got a safe perform action is
1:26 this type um
1:27 which really means it's going to be a
1:29 plug-in um in in effect
1:31 it's going to execute in the server side
1:33 um it could be client-side as well we've
1:35 got that capability if you needed to do
1:36 it like in the unchanged event of a
1:38 of a field in a form and then we have
1:41 got all the events
1:42 so this one is just um create an update
1:44 so
1:45 but you can configure others we then say
1:47 which entity do we want the trigger to
1:49 be placed on
1:50 so this one is just contact and we've
1:52 got all custom entities as well as you'd
1:53 expect
1:54 and then you can also specify exactly
1:57 when
1:58 does this decision table execute
2:01 so it'll only be if the annual income
2:04 changes
2:05 if the credit score changes or if the
2:08 total assets of the applicant
2:10 changes so if any one of those three
2:12 change
2:13 on the contact entity will execute the
2:15 decision tape
2:16 so that's really for performance issues
2:18 you know you can make it you know really
2:19 zoned into what you wanted to execute
2:22 then we get to the the main logic which
2:24 you can see here is the
2:25 decision table so it it kind of looks
2:28 like excel
2:29 it's a very familiar look and feel to
2:31 people so
2:32 what we've done is we've got columns and
2:35 rows
2:36 so we've got these conditions and we
2:39 have
2:40 actions so we have a condition and we
2:42 have one here called
2:43 your annual income total assets of
2:46 applicant and credit score
2:47 then we have a row and this row makes up
2:49 the
2:50 kind of the rule that you want to
2:52 implement so this rule that i've
2:53 highlighted it says
2:55 if the annual income is less than 100
2:57 000
2:58 and the um the total assets of the
3:02 contact is less than half a million then
3:04 they need to have a really
3:06 high credit score of 188 and if it is
3:09 so if these are all true then there's an
3:11 option set on the
3:14 contact entity called credit card type
3:16 and we set that to platinum so that
3:17 means they're entitled you know they're
3:19 they're eligible for for a platinum one
3:21 and then just to the up
3:22 then just down the bottom you know if
3:24 you have over two hundred thousand
3:26 dollars as a salary and you've got over
3:27 a million in assets
3:29 then you need a much lower credit score
3:31 so it's just 112
3:33 and will allow you to um to become
3:36 a platinum card holder so
3:39 so that's pretty pretty cool so let me
3:41 just give you a quick demo
3:42 just showing you that so i go to sales
3:45 got contacts
3:49 and open up scott
3:53 hopefully he's blank he is so if we just
3:56 put in a
3:57 um an annual income of
4:02 50 000 assets of 250
4:07 and a credit score of um
4:10 117 six let's say and i hit save
4:16 so that should work out so what's
4:17 happening when i hit save is
4:19 the decision table is executed behind
4:21 the scenes um and actually you can see
4:23 that
4:23 this one he didn't actually qualify as a
4:26 as a
4:26 as a platinum because there's another
4:29 decision table there
4:30 that he actually qualified as gold so if
4:31 anybody just increased this to
4:33 six seven eight hit save so
4:36 you can see when i upped the credit
4:38 score um it went to the other decision
4:41 table kicked in
4:42 um or what overrode the the gold one and
4:45 set it to platinum so so that's just
4:47 showing you to in in operation
4:49 so just some of the items to call out on
4:52 on the decision table um
4:56 when a business rule changes and so
4:58 somebody comes back and they
4:59 say the decision decision table looks
5:01 good but we forgot to add in that you
5:04 need to be over 18 years of age to
5:06 qualify for a credit card
5:08 so we need to add in that condition that
5:11 new condition
5:11 into um into the decision table now
5:14 age is a is a number like you know 18
5:17 years of age
5:18 uh 25 years of age so we don't store
5:21 that number
5:22 we don't have a feel and crm to do that
5:25 with the latest version of crm you can
5:26 you can
5:27 you can actually put a calculated field
5:29 on there and put a formula in
5:30 in there to do it um but then you're
5:33 creating a field and you're only allowed
5:34 so many on your entity and in a real
5:36 world environment you're going to run
5:37 out very very quickly
5:39 so what we can do is we can allow you to
5:40 extend the data model
5:43 and create a that type of calculated
5:45 field
5:46 just for this decision table and this
5:47 will all execute in memory so it'll be
5:49 super super fast
5:50 so what we do is we go to calculations
5:54 and we say we want a calculation called
5:55 age
5:57 and what we can do is so the third part
6:00 is over here on the left hand side we've
6:02 got functions
6:02 source and explore you can see all all
6:05 our functions here
6:06 so i'm going to search for the
6:11 the diff function and again some of you
6:13 might know this
6:14 this is this search feature is is um is
6:17 a is a new feature that's going to be
6:19 released
6:20 on on monday um because we're getting
6:22 like over 300 functions we said we
6:24 really needed a
6:25 search facility to see what functions we
6:27 have so we bring in date div
6:30 so you can see when i hover over the
6:32 diff it gives me just some contextual
6:34 help
6:35 so i can see i need a from date a two
6:37 date and i need an interval
6:38 so the interval i want is years and it
6:40 gives you some examples as well
6:42 so i'm going to put in here the from
6:45 date
6:46 so the from date we want the date of
6:48 birth of the contact
6:50 so you know easy over 18. uh so go to
6:53 source
6:54 and see all the nodes i have so i got a
6:56 source
6:57 and i scroll down i'm going to find the
7:00 birthday
7:01 so this is like the out of the box field
7:02 dynamics crm so you can see it brings
7:04 that into the calculation
7:06 and the two days so what i need
7:09 to do i need to get the the current date
7:11 time and i actually need to get the utc
7:14 time because it's stored in utc
7:16 in the database so i go back to
7:17 functions and i can just
7:19 type in and i can click on
7:23 utc datatime yep so that brings in that
7:26 function
7:27 and then we just put for years
7:31 so that's let's do home so we've now
7:34 just
7:35 extended the data model and are after
7:37 adding in an extra field called age
7:39 based on a
7:40 on a formula so now i can go back to my
7:42 decision table
7:44 and you can see here we have this um i
7:46 just right clicked on the decision table
7:48 and what i'm going to do is i'm going to
7:50 insert a new condition
7:52 so bring in the condition then i go back
7:54 to my source
7:58 if you look under where's the
7:59 calculations
8:01 um i can click age and now i've just
8:03 brought that age
8:05 um and that calculation into the
8:07 decision table so now it's pretty easy
8:09 i just need to do greater than 18
8:13 and just bring that down so now you can
8:16 see
8:17 that i've just extended the decision
8:19 table to say that
8:21 um you know you have to be over 18 years
8:23 of age to be able to um qualify for
8:26 a uh a platinum alright for any credit
8:29 card
8:31 um just one writing as well let me just
8:33 kill this one so you can see here we've
8:34 got a set of menu options you know
8:36 insert row and start condition action
8:38 delete we're also connected to the
8:40 column
8:41 so one of the items i just wanted to
8:42 show you is um you know
8:44 how easy it is to create these decision
8:46 tables from scratch
8:48 um so what i'm just going to do is i'm
8:50 going to copy this
8:52 into my clipboard
8:55 and then delete it and then
8:58 just delete all this
9:02 so how would we you know if i was at a
9:05 blank
9:06 canvas i just want to kind of show you
9:07 the experience um
9:10 so the first one we needed was the um
9:13 their annual income so again so how
9:15 would you build it from scratch so we go
9:17 to source
9:18 and again it's just all point and click
9:20 so and they're all here so i find annual
9:22 income
9:23 i bring in the annual income then the
9:24 next one was the total assets of the
9:26 applicant
9:27 total assets bring in that value
9:32 and then condition and the last one was
9:34 the credit score so let's find the
9:35 credit score
9:38 credit score channels
9:41 there he is so these are our conditions
9:45 and then we would go ahead and we went
9:47 right to rules
9:48 so just i'll just control v those in
9:50 there just to save time
9:52 um and just call out that i guess most
9:54 people can work out um
9:56 you know we have half a million here to
9:58 a million so anything in double brackets
10:00 is a is it betweens um so that's just
10:03 like
10:04 um a shortcut to be able to do that um
10:07 and then we need to set up the action so
10:10 what's the phone that's where
10:11 here's the um the option set
10:14 for that for that so we bring in the
10:16 credit card type and then
10:18 you can see here we've got all the
10:20 options on the on the
10:22 option set so gold platinum and standard
10:24 so i bring in platinum
10:26 so that's pretty cool and then i drop
10:28 that down
10:29 and there so i've just recreated that uh
10:31 decision table so hopefully you can see
10:33 there
10:34 how easy it was to do it and actually i
10:36 meant to call out sooner um
10:37 there are you know in this basic one
10:40 there are
10:40 36 decision points so you have three
10:43 columns and you have 12 rules 12 3's 36
10:47 so um the decision tables really
10:50 represent
10:51 you know lots of business points and
10:54 decisions in a very
10:55 compact format and it's easy to see and
10:58 actually but just i just want to
11:00 head back in that condition let's just
11:02 back in the age quickly
11:05 and add an inch greater than 18
11:10 and then a bit longer
11:14 so so then the next business rule
11:18 um sorry the next uh you know it's a
11:20 month later and they say
11:22 um they say to the to the dev team um
11:25 we need to whenever somebody gets
11:28 assigned a platinum
11:30 card we need to do a follow-up workflow
11:32 to send out some documentation that they
11:34 need to sign
11:35 so we need to and and the team already
11:38 have a workflow that does that and
11:40 they're
11:40 they're manually kicking it off but they
11:42 said you know why can't we just build it
11:44 into the into the decision table itself
11:46 so how can we call a workflow so
11:50 we've got our um actions so if i go to
11:53 actions
11:54 and we give it a name and send
11:58 paper work so do some paperwork
12:01 then go back to functions so we have a
12:04 function
12:09 so we have a function called xq workflow
12:13 so i'm able to bring that in
12:14 so i'll just give i just need to type in
12:16 the name and actually one of the
12:18 really cool things about note 52 is you
12:20 know nearly everything goes off name so
12:25 there's all these issues around goods
12:26 and you know if you've got a workflow
12:28 and a reference as a team inside and the
12:30 workflow you could
12:31 yeah there's a good assigned to that
12:34 behind the scenes so when you deployed
12:35 from your development system your
12:37 production system the workflow will
12:38 actually break
12:39 we take care of all those types of
12:41 issues for you seamlessly
12:42 yeah so we really do try to make your
12:44 life a lot easier and then we need to
12:46 pass in
12:47 the good of the record
12:50 so we'll go back to source and
12:53 i'm going to go to the we're on the
12:54 contact entity so we need to go to the
12:56 contacts so
12:59 contact so we'll bring that in there
13:02 let me just do the mute again
13:07 let's kill people off um so now you've
13:10 you've just seen that i've brought in a
13:13 an action to execute the workflow send
13:15 and paper
13:17 actually i send paperwork um so now i
13:20 can go back to my decision table
13:22 and i can add in an action
13:26 and i just go up to source
13:30 for my actions now i've got send
13:32 paperwork
13:34 i can drag that down so you can see how
13:37 easy it was just to extend
13:38 the decision table to start sending a um
13:41 a workflow
13:42 when the conditions were met and then it
13:45 might be
13:46 you know it might be sanctions you know
13:50 you know if they're if they're um
13:54 if their annual income is over two
13:55 million you're a big spender let's say
13:57 so you might have a different slightly
13:59 different workflow for those guys
14:01 you know you can see how easy it is for
14:03 me and
14:06 you can see how easy it is for me just
14:07 to be able to add
14:09 that in so just for this one i'm going
14:10 to get rid of that we bring in big
14:12 spender
14:14 so you can see how we just slightly
14:15 changed it for someone that's over
14:17 um an annual income over two hundred
14:18 thousand dollars um
14:21 so hopefully you can see you know um
14:23 trying to make your life a lot easier
14:25 so um this all looks pretty good right
14:29 now
14:30 um you know most people would be happy
14:31 with that and it's a you know this is
14:33 fantastic functionality
14:34 but can we do better so um
14:38 one of the things is uh the data all the
14:41 values are hardcoded
14:42 so if we look here at the credit score
14:46 these are all hardcoded into the
14:47 decision table so
14:49 we wouldn't consider that a best
14:50 practice um what we really want to be
14:53 able to do is
14:54 separate the the logic
14:57 of the decision table and the underlying
14:59 data um
15:00 so that you know if those credit scores
15:02 change you
15:04 um you don't change the logic of the
15:06 decision table you don't go and edit the
15:07 decision table you just change the
15:09 underlying data
15:10 and that's great for separation of
15:11 concerns because you might have a
15:14 um kind of like your dev team looking
15:15 after the decision table itself but the
15:18 the bas or the functional consultants
15:20 they can modify the
15:22 data select the credit scores so it's
15:24 great for separation of concerns
15:26 and you know a typical thing with credit
15:28 scores is
15:30 the scores we're looking at right now
15:31 might be the 2015 scores
15:33 but when 2016 comes along there might be
15:36 a different set of scores
15:37 so how do you how do you do that
15:39 seamlessly within the
15:41 decision table um and have it just work
15:44 so what we can do um so let me just
15:47 go back to my list of formulas so let me
15:51 just open up the gold card one where
15:52 i've
15:53 just slightly extended it to pick up on
15:56 this notion of
15:57 configuration data and what we're going
15:58 to be using is xcache behind the scenes
16:01 to store all this configuration data so
16:04 you can separate the two apart
16:06 so you can see this is the decision
16:08 table for a goal card
16:09 very very similar to the first one
16:11 except instead of
16:12 hard coding in the um the values
16:16 you can see here i'm using um
16:19 a nx cache reference so you can see like
16:21 eligibility code card tier one
16:23 so if i actually get rid of that and
16:25 just show you how i brought it in
16:26 um greater than
16:30 and again if i go under there's x cash
16:33 the eligibility goal card so you can see
16:36 here all my
16:37 configuration data so i can just bring
16:39 in tier one and then you just do the
16:41 same for all the others
16:42 so that's now just separated the two
16:44 concerns
16:46 so that looks like in crm itself so if i
16:49 just
16:50 go settings
16:53 xcache so here you can see let me just
16:57 highlight for you
16:58 here's our our configuration data
17:01 for that um and gold card for the
17:04 eligibility and you can see here's the
17:06 scores
17:07 88 for tier 1 80 for tier 2. so it's not
17:10 hard coded anymore into the decision
17:12 table
17:12 so if i just show you and open up one of
17:16 these
17:18 so that there's a there's a lot 2x to 2x
17:20 cache and what it can do
17:22 so i'm just going to keep it really
17:23 simple for this one just there's a
17:25 category and there's a base key and
17:28 there's some other items here
17:29 and what we have is we have a value um
17:32 so we set it to 88
17:33 and we set the data type so this one
17:36 just happens to be whole number
17:37 if you needed it secure for some reason
17:39 we do have a secured
17:41 area to store the values like for
17:43 passwords and items like that and we're
17:46 just using
17:46 field fl security from microsoft to do
17:49 that
17:50 um but one of the interesting things is
17:53 this um start date
17:54 so you can see that this x cache record
17:56 is effective from
17:58 one one two thousand 2015 on onwards
18:01 so if i just go back so you'll see here
18:05 that the
18:05 start date and there all the x-cache
18:08 records are set to
18:09 at the start of this year so um what
18:12 would
18:12 what would we do if the credit cards
18:15 scores change in 2016 you know how
18:17 how do we handle that um how would a
18:20 functional consultant
18:21 handle that and this is one of the great
18:23 advantages for not 52 being native to
18:25 dynamic crm is
18:26 we can take advantage of a lot of the
18:28 features that microsoft bring out
18:30 so if i just do a quick
18:33 filter so just those ones and then i can
18:37 do
18:37 export to excel online
18:45 and what i can do here is i can come in
18:48 and i can just select the data control c
18:54 ctrl v so now i've just duplicated
18:57 um my data so the 2016 scores
19:01 you know i'm just going to make them up
19:02 obviously for right now
19:04 so there's the 26 2016 scores
19:07 and then i just need to come over and i
19:09 just need to manipulate the dates
19:10 so i need to close off this year
19:20 and then i would just copy that all the
19:22 way down
19:24 for the existing records and then for
19:25 the new ones i just come in 1
19:28 1 2016 and obviously
19:31 copy that down for all of those as well
19:35 and then you just click the save to
19:36 changes in crm so it would
19:39 upload that x cache data into crm
19:43 so the great advantage is let's go back
19:46 here
19:46 this reference eligibility gold card
19:49 tier one
19:51 when we're in the 2015 year x cash is
19:54 smart enough to know
19:55 i need to pull the 2015 credit score but
19:58 as soon as we tick over
20:00 into 1 1 2016 it will start to use
20:03 the 2016 credit score so like 123
20:07 and we'll just do that for you
20:08 automatically and seamlessly
20:10 um so very very powerful around the
20:13 configuration parts for that
20:15 um the next part
20:19 so oh yeah i just wanted to show you
20:23 people always ask us um can you do like
20:27 r statements in the decision tables
20:29 so just to give you an example of that
20:32 insert condition you have to do that
20:35 go back to my source um so let's say the
20:38 freight terms
20:41 and we're shooting it will be a better
20:42 one so if you wanted to be able to
20:45 so let's bring in that field so let's
20:47 say you want to be able to do a match
20:49 on airborne and dhl
20:52 that's all you need to do and you can
20:53 bring in another one like fedex
20:55 so you can just add in and then it'll do
20:57 you know if it's equal to any one of
20:59 those
20:59 then it'll equal true overall so very
21:02 very powerful
21:03 for that um if i just
21:06 delete that column the other item
21:09 i just wanted to call out was how do we
21:11 handle null data or
21:14 empty nt values if you're familiar with
21:16 North52
21:18 you probably know what i'm kind of going
21:19 to show you um i can toggle the advanced
21:22 mode
21:22 so in the advanced mode you can see
21:24 here's the underlying field
21:26 and you can see here's um dot zero so
21:29 that means we've applied a default if
21:30 somebody forgot to enter in the annual
21:32 amount
21:33 um you know it might throw an exception
21:35 in the code depending on what you're
21:36 what you're doing we're just going to
21:38 set a default of zero um
21:40 and we've done the same for the assets
21:43 and the credit score
21:44 itself so that's just how uh defaults
21:46 are set
21:48 um and then the last item on this demo
21:51 isn't just hiding that box is uh
21:56 sometimes there's the need that as part
21:58 of the decision table
22:00 um you need to be able to do a cond
22:03 do an action just once at the very start
22:05 of the processing
22:06 and um so what you can do is you can
22:09 actually put in an action here and
22:12 you know this might be
22:16 i don't actually have any here to play
22:20 interactions um but you can put in like
22:22 a an action
22:24 uh you know we might have the thoughts
22:26 of something in bracket
22:33 um so when you define no conditions here
22:37 that means it will always execute so
22:38 typically you want that at the start to
22:39 like
22:41 set some default values or initialize
22:43 something or call a workflow to do
22:45 something
22:45 so by leaving out all the conditions you
22:48 can just
22:49 automatically call your action whatever
22:51 it is so that's
22:52 that's very very useful um so that's
22:55 cool
22:56 so the next that's the um eligibility
22:58 example
23:00 so the next one i just want to call out
23:02 to people
23:03 so that let me just open it up first
23:05 john got a couple of questions
23:08 while we
