Views:

Scenario Overview

This scenario relates to a banking requirement about having all contact records restricted from normal users by default. However when a customer rings up to make inquires about their account the customer support representative needs to be able to gain access to the contact record. This is achieved by asking the customer on the phone some questions like their Banking Identifier & a random set of 3 digits from their banking pin code.

If the details are correct then the customer service representative will gain temporary access to the contact record as it will be shared with that system user. In terms of un-doing the share option this could be handled by having the user click a button to unshare the record so they lose access and \ or we could setup a North52 schedule to execute each night to query all shares on that day & undo them. In this sample we will just deal with the sharing part.


** Please note that we have tried to keep this sample as simple as possible given its complexity. It could be significantly enhanced with custom ribbon \ command  buttons, more validation & safeguards. But we just want to demonstrate the core principals of how to solve this business requirement.

In this sample the data model is very simple we have the contact record with 2 custom fields which are used to make security checks, 

  • Banking Identifier (string)
  • Pin Code (whole number)

North52 Decision Suite Solution

The North52 Decision Suite solution works like this,

  • A dialog is created on the User entity
  • Whenever a user wants to gain access to a contact record they execute this dialog
  • The dialog asks a set of questions that only the person that owns the account can answer
  • In this example it is a banking identifier & 3 digits of their pin code 
  • We add a Process Genie formula to check in the dialog that the user has entered 3 digits of the pin code otherwise it will fail
  • When the user submits the request a Process Genie formula executes with elevated privileges to check do the answers match the data on contact record
  • The elevated privileges are those defined by the Manager field on the users system record
  • If the entered data matches the contact record it will be shared with the user
  • In addition a hyper-link will be presented to the user to quickly open the contact record


Screenshots showing a Customer Representative gaining access to the Contact record 

Dialog Executed on the current user





The 'Banking Access Request - Contact' dialog is executed

 



The banking customer needs to supply information to the customer representative 

 



If Security Checks pass then a hyper-link to the contact is presented to the user.

 

 

Process Genie Formula - Validate 3 Pin Digits Entered

The following set of steps outline how to create this Formula

  • Create a new formula of type 'Process Genie '
  • Set the Source Property to 'User'
  • Set the Display Format to 'Whole Number'
  • Copy & paste the formula from below into the formula description & click save

Note 1: that the pin digit fields (e.g. [systemuser.pindigit1] ) in the formula below are not fields on the system user entity. They are in fact parameters on the Process Genie step which are taken  from the data entered in the dialog. They are passed in the second paramter of the Process Genie as 'Parameter Xml'.

Formula

if (ContainsData([systemuser.pindigit1]), 1, 0) + 
if (ContainsData([systemuser.pindigit2]), 1, 0) +
if (ContainsData([systemuser.pindigit3]), 1, 0) +
if (ContainsData([systemuser.pindigit4]), 1, 0) +
if (ContainsData([systemuser.pindigit5]), 1, 0) +
if (ContainsData([systemuser.pindigit6]), 1, 0) 

/*Effectively returns a count of how many pin digits were entered*/

Process Genie Formula - Validate Security Credentials & Share Record 

The following set of steps outline how to create this Formula

  • Create a new formula of type 'Process Genie'
  • Set the Source Property to 'User'
  • Set the Display Format to 'String'
  • Copy & paste the formula from below into the formula description & click save

Note 2: The pin digit fields (e.g. [systemuser.pindigit1] ) in the formula below are not fields on the system user entity. They are in fact parameters on the Process Genie step which are taken  from the data entered in the dialog. They are passed in the second paramter of the Process Genie as 'Parameter Xml'. The same goes for the parameter [systemuser.bankidentifier].

Formula

SmartFlow( 
         SetVar('ResultRow', FindRecords('contact', 'new_bankidentifier', [systemuser.bankidentifier], SetFindSelect('contactid', 'fullname', 'new_pincode'), '1', true)), 
  
         SetVar('ResultPin',  If (FindEntityCollectionCount(GetVar('ResultRow')) = 1 and
                         ( (Substring(FindRecordsValue(GetVar('ResultRow'), 'new_pincode', '0'), 0,1) = 
                          [systemuser.pindigit1]) or (DoesNotContainData([systemuser.pindigit1])) ) and
                         ( (Substring(FindRecordsValue(GetVar('ResultRow'), 'new_pincode', '0'), 1,1) =
                           [systemuser.pindigit2]) or (DoesNotContainData([systemuser.pindigit2])) ) and
                         ( (Substring(FindRecordsValue(GetVar('ResultRow'), 'new_pincode', '0'), 2,1) =
                          [systemuser.pindigit3]) or (DoesNotContainData([systemuser.pindigit3])) ) and
                         ( (Substring(FindRecordsValue(GetVar('ResultRow'), 'new_pincode', '0'), 3,1) =  
                          [systemuser.pindigit4]) or (DoesNotContainData([systemuser.pindigit4])) ) and
                         ( (Substring(FindRecordsValue(GetVar('ResultRow'), 'new_pincode', '0'), 4,1) = 
                         [systemuser.pindigit5]) or (DoesNotContainData([systemuser.pindigit5])) ) and
                         ( (Substring(FindRecordsValue(GetVar('ResultRow'), 'new_pincode', '0'), 5,1) = 
                         [systemuser.pindigit6]) or (DoesNotContainData([systemuser.pindigit6])) ) , 
                          true,
                           false)
                   ), 
  
   If (GetVar('ResultPin') = true , 
         RecordShare('contact', FindRecordsValue(GetVar('ResultRow'),'contactid'), 'systemuser',
                     [systemuser.systemuserid], true, true, true, true, true, true, true), 
       'NoOp'),
   
   SmartFlowReturn(  
                   If (FindEntityCollectionCount(GetVar('ResultRow')) = 1 and GetVar('ResultPin') = true,  
                             LinkDialogUrl('https://north52.crm4.dynamics.com', 
                                                  'contact', 
                                                  FindRecordsValue(GetVar('ResultRow'), 'contactid'),
                                                  FindRecordsValue(GetVar('ResultRow'), 'fullname')                                               
                                                )
                   ,'NoOp')
                 )
    )

 

Dialog Steps

The following set of steps outline how to create this Formula

  • Create a new Dialog as shown below in the 2 screenshots
  • Set it to run only 'On Demand'
  • Add a new step to the workflow to call the North52 Process Genie
  • Set the formula shortcode to be the one on the formula you just created, in this case 'HS2'
  • Publish the workflow
  • You are now ready to test


Dialog Part 1

 

Dialog Part 2

Configuration for Process Genie Formula - Validate 3 Pin Digits Entered

The configuration of the Process Genie step involves setting the 'Formula ShortCode' to be the one that is on the formula. 

Second you need to set the 'Formula Parameter Xml' to the defined XML shown below with the parameters set to the fields on the dialog. 




Parameter XML

<systemuser>
   <pindigit1></pindigit1>
   <pindigit2></pindigit2>
   <pindigit3></pindigit3>
   <pindigit4></pindigit4>
   <pindigit5></pindigit5>
   <pindigit6></pindigit6>
</systemuser>

Configuration for Process Genie Formula - Validate Security Credentials & Create Record 

The configuration of the Process Genie step involves setting the 'Formula ShortCode' to be the one that is on the formula. 

Second you need to set the 'Formula Parameter Xml' to the defined XML shown below with the parameters set to the fields on the dialog.

Parameter 

<systemuser>
   <bankidentifier></bankidentifier>
   <pindigit1></pindigit1>
   <pindigit2></pindigit2>
   <pindigit3></pindigit3>
   <pindigit4></pindigit4>
   <pindigit5></pindigit5>
   <pindigit6></pindigit6>
   <executeas></executeas>
</systemuser>

 

 

Did you know?

North52 Decision Suite helps organizations in all Industries

The North52 Decision Suite allows organizations to manage and automate the many decisions found in your processes. North52 helps:

  • Automate costly and repetitive decisions
  • Monitor and improve the quality of decisions
  • Ensure consistency
  • Enable fast response to change

All organizations in all industries can benefit from software that automate decisions related to risk, compliance, and configuration.

Learn more about the North52 Decision Suite