Sage CRM Developers Course Workflow 1 Looking ahead

  • Slides: 23
Download presentation
Sage CRM Developers Course Workflow (1)

Sage CRM Developers Course Workflow (1)

Looking ahead to the classes DP 01: Introduction to the Development Partner Program DP

Looking ahead to the classes DP 01: Introduction to the Development Partner Program DP 02: Entities and the Data Model (Part 1 of 2) DP 03: Entities and the Data Model (Part 2 of 2) DP 04: Implementing Screen Based Rules (Part 1 of 2) DP 05: Implementing Screen Based Rules (Part 2 of 2) DP 06: Screen and User Independent Business Rules DP 07: Workflow (Part 1 of 2) DP 08: Workflow (Part 2 of 2) DP 09: Using the API Objects in ASP Pages (Part 1 of 2) DP 10 : Using the API Objects in ASP Pages (Part 2 of 2) DP 11: Using the Component Manager DP 12: Programming for the Advanced Email Manager DP 13: Using the Web Services API DP 14: Using the Web Services API (Part 2 of 2) DP 15: Coding the Web Self Service COM API (Part 1 of 2) DP 16: Coding the Web Self Service COM API (Part 2 of 2) DP 17: Using the. NET API (Part 1 of 2) DP 18: Using the. NET API (Part 2 of 2)

Workflow Control of process and data tasks CRM offers graphical representation Progress through logical

Workflow Control of process and data tasks CRM offers graphical representation Progress through logical arbitrary steps/states using ‘rules’ that govern transition Rules User driven action – Uses JScript to check the data condition – E. g. . whether rule is available Time driven action – Uses SQL to check the data and time condition – E. g. . whether the rule is executed Workflow as a mechanism for implementing business rules Integrate tightly with other scripting E. g. . Field Level and Table Level

A Simple Opportunity Workflow Sold Negotiating Quoted Qualified Quoted Lost Lead New Oppo Lost

A Simple Opportunity Workflow Sold Negotiating Quoted Qualified Quoted Lost Lead New Oppo Lost Reassign Convert from Lead Qualified Sold

Graphical Workflow Flow diagram of workflow process produced following analysis (previous slide) has to

Graphical Workflow Flow diagram of workflow process produced following analysis (previous slide) has to be understood and turned into CRM Graphical form. Decision Tree like diagram Looping and branching and reuse of rules and states supported

Custom Workflow Entities Entity Opportunity Cases Solutions Leads Person Company Communications Campaigns Waveitems Custom

Custom Workflow Entities Entity Opportunity Cases Solutions Leads Person Company Communications Campaigns Waveitems Custom Entity Default Workflow Mentioned in Progress Table Config New Workflow P P O O O P P P P O O O O P P P P P O P P P O

Workflow Configuration Default Workflow provided for: Leads Opportunity Cases Solutions Campaigns Wave. Items Enable

Workflow Configuration Default Workflow provided for: Leads Opportunity Cases Solutions Campaigns Wave. Items Enable Workflow in Admin>Configuration>Workflow For other workflow capable entities then workflow always enabled

Workflow Tracking Workflow Lead Solution Case Opportunity All entities above work in same way.

Workflow Tracking Workflow Lead Solution Case Opportunity All entities above work in same way.

User Driven Workflow Rule Types Primary Rules Transition Rules Conditional Rules Global Rules

User Driven Workflow Rule Types Primary Rules Transition Rules Conditional Rules Global Rules

Primary Rules Initial creation of record Condition Controls whether button displays NOTE: Where entity

Primary Rules Initial creation of record Condition Controls whether button displays NOTE: Where entity life cycle starts with Dedupe Search or Inbuilt System Action Custom Workflow needs to start with Transitional Rule e. g. . New. Company New. Individual

Limiting Access to Rules Simplest way of limiting access is by using the "Restrict

Limiting Access to Rules Simplest way of limiting access is by using the "Restrict to Team" selection box. Code Needed for more complex restrictions The Java. Script Condition field on Primary, Transition, and Global rules limits whether or not the rule appears for a given record. The workflow button will be hidden where the script sets Valid to be false, and where Valid equals true then it will be displayed. To limit access to the rule to members of the Support and Operations team the Java. Script condition would be: var int. Team. ID = Current. User. user_primarychannelid; if (int. Team. ID == 1 || int. Team. ID == 5) { Valid = true; } else { Valid = false; }

Access to Primary Rules and Main Menu ‘New’ options Using the Java. Script Condition

Access to Primary Rules and Main Menu ‘New’ options Using the Java. Script Condition to Control Primary Rule Availability To hide the 'New' button on the case list called from the company and person tab bars (where the company is "on hold") the following Java. Script condition can be used: var str. Status = CRM. Get. Context. Info("company", "comp_status"); if (str. Status == "On Hold") { Valid = false; } else { Valid = true; } Note: The method Get. Context. Info can be used here because the company entity is in context. The Main Menu New Button & Context The example given will not hide the New Button that is called from the Main Menu, nor will it hide the New Button on the 'My CRM' nor the 'Team' menus. This is because the customer may not be known until the user chooses it in the company field of the case entry screen and confirms it using the Save button. In this example to stop the users creating a support case for a customer that is "On Hold" we need to use a validation rule. This example validation rule can be added to a field such as case_referenceid that appears in the casedetailbox screen. This validation rule will also act as a double check to the first example given. int. Comp. ID = Values("case_primarycompanyid"); var rec. Comp = CRM. Find. Record("company", "comp_companyid ="+int. Comp. ID); if (rec. Comp. comp_status=="On Hold") { Valid = false; Error. Str = "You may not create a case for a company placed on hold. "; }

Transition Rules Movement from state to state Condition – Controls whether button displays A

Transition Rules Movement from state to state Condition – Controls whether button displays A transition rule that is linked to the workflow 'entry state' can then be used to attach the record to a workflow. If a record is created by system default behaviour (e. g. via a lead converted to opportunity) then the newly recreated record will have a null workflowid field.

Global Rules No movement from state to state Available at all states once record

Global Rules No movement from state to state Available at all states once record added to workflow Condition Controls whether button displays

Conditional Rules Similar to Transition rule: Movement from state to state Condition Button always

Conditional Rules Similar to Transition rule: Movement from state to state Condition Button always displayed Controls branching of to alternate states triggering different actions based on data values

Primary Global Escalation Transitional P P Conditional P P P P O P P

Primary Global Escalation Transitional P P Conditional P P P P O P P NA NA P P P O O O O O Create Outbound Call List Export Target List to File Create Task for Target List Create Document for Target List Run Stored Procedure Execute SQL Statement Create Merge Document Create Solution Create Lead Create Case Create Opportunity Create Task Send SMS Message Send Email Show Notification on Screen Show Message on Screen Display Field for Amendment Reset Column Value Set Column Value Action Availability O O P P P P P P P P P P P P P P O

Follow up Actions The ability to create Tasks, Opportunities, Cases, Leads and Solutions is

Follow up Actions The ability to create Tasks, Opportunities, Cases, Leads and Solutions is available to the following Workflow Rules types: Transitional Global Conditional Create Task This will always create a communication that references the same workflowinstance as the creating entity. The Task will be attached to the same workflow Create Opportunity This will create a new opportunity that is unattached to workflow. This means that the oppo_workflowid will be null. The exception is when created from a opportunity workflow then same workflowinstance is referenced. The new Opportunity is part of the same workflow as the original opportunity Create Case This will create a new case that is unattached to workflow. This means that the case_workflowid will be null. The exception is when created from a case workflow then same workflowinstance is referenced. In this instance the new case is part of the same workflow as the original case. Create Lead This will create a new Lead that is unattached to workflow. This means that the lead_workflowid will be null. The exception is when created from a Lead workflow then same workflowinstance is referenced. In this instance the new Lead is part of the same workflow as the original Lead. Create Solution This will create a new Solution that is unattached to workflow. This means that the soln_workflowid will be null. The exception is when created from a Solution workflow then same workflowinstance is referenced. In this instance the new Solution is part of the same workflow as the original Solution.

Direct Execution of SQL statements Complete SQL Statement (Full DML) Multiple Statements Allowed (;

Direct Execution of SQL statements Complete SQL Statement (Full DML) Multiple Statements Allowed (; ) Use of #field# E. g. . update Comm_Link set Cm. Li_Deleted = 1 where Cm. Li_Communication. Id in (select Comm_Communication. Id from Communication where Comm_Wave. Item. Id=#Wa. It_Wave. Item. Id#); update Communication set Comm_Deleted=1 where Comm_Wave. Item. Id=#Wa. It_Wave. Item. Id# NOTE Separate statements can not pass variables Can’t declare variable in one statement then use it in another

Q&A

Q&A

Looking ahead to the classes DP 01: Introduction to the Development Partner Program DP

Looking ahead to the classes DP 01: Introduction to the Development Partner Program DP 02: Entities and the Data Model (Part 1 of 2) DP 03: Entities and the Data Model (Part 2 of 2) DP 04: Implementing Screen Based Rules (Part 1 of 2) DP 05: Implementing Screen Based Rules (Part 2 of 2) DP 06: Screen and User Independent Business Rules DP 07: Workflow (Part 1 of 2) DP 08: Workflow (Part 2 of 2) DP 09: Using the API Objects in ASP Pages (Part 1 of 2) DP 10 : Using the API Objects in ASP Pages (Part 2 of 2) DP 11: Using the Component Manager DP 12: Programming for the Advanced Email Manager DP 13: Using the Web Services API DP 14: Using the Web Services API (Part 2 of 2) DP 15: Coding the Web Self Service COM API (Part 1 of 2) DP 16: Coding the Web Self Service COM API (Part 2 of 2) DP 17: Using the. NET API (Part 1 of 2) DP 18: Using the. NET API (Part 2 of 2)