Rules Engine for Salesforce

Report 32 Downloads 73 Views
Rules Engine for Salesforce

                     

 

 

 

 

 

 

 

 

 

 

 

Contents     1. Introduction   2. Schema   3. Walkthrough    

INTRODUCTION     Install  URL:  https://login.salesforce.com/packaging/installPackage.apexp?p0=04t90000000QGG6   Demo  video:  https://www.youtube.com/watch?v=9E147e__9QY   This  application  provides  an  easy  way  to  setup  and  manage  rules.  Basically  we  are  using  objects  Rules,   Rule  Criteria  and  Rule  Action.  Following  are  their  functionality:     Rules:  Rule  object  is  defining  a  rule  on  any  object  such  as,  Accounts,  Contact,  etc.  with  specified  criteria   and  action.   Rule  Criteria:  Rule  criteria  object  is  defining  any  criteria  related  to  Rules  such  as  “Industry”  is  equal  to   “Agriculture”.   Rule  Action:  Rule  action  object  is  defining  any  rule  related  to  Rules  such  as  “Update  Field”  or  “Insert   classification”.  

               

SCHEMA                          The  application  contains  three  objects  Rules__c,  RulesCriteria__c  and  RulesAction__c.  It  has   following  schema:  

                 

WALKTHROUGH      

Create  Rule     i. ii. iii. iv. v.

Select  the  Rules  tab  from  Rule  Engine  App   Click  on  New  button   Enter  fields  Rule  Name  and  object  type  (List  of  Objects  in  the  Org  is  displayed).   Click  on  Save.   Rule  is  created  and  appears  on  list  view.  

      1. Create  rule  Criteria.   i. Select  the  rule  under  which  you  want  to  create  rule  criteria.   ii. Under  the  Rule  Criteria  related  list,  click  on  new  button.   iii. Related  Object  is  defaulted  with  the  object  that  the  rule  is  defined.  Application  

allows  to  select  one  of  the  children  object  related  to  object  the  rule  is  defined     iv. Field  Name:    Application  presents    all  the  fields  (  Field  Name  –  Field  API  Name  )    of   the  object  selected    in  the  related  object     v. In  the  Rule  Object  type  field,  the  name  of  the  object  from  the  Rule  is  auto  populated.   vi. Enter  the  required  fields.   vii. Enter  matching  type,  matching  value   viii. Click  on  save.  

    3.  Create  Rule  Action   i. ii.

Select  the  rule  under  which  you  want  to  create  rule  criteria.   Under  the  Rule  Action  related  list,  click  on  new  button.  

iii.

Type  :  The  type  of  action  can  be  Update  /  Insert  Classification  .       Related  Object  is  defaulted  with  the  object  that  the  rule  is  defined.  Application   allows  to  select  one  of  the  children  object  related  to  object  the  rule  is  defined     Field  Name:    Application  presents    all  the  fields  (  Field  Name  –  Field  API  Name  )     of  the  object  selected    in  the  related  object     Enter  value.  

iv. v. vi. vii.

Click  on  save.