Difference between revisions of "Request Variables"

From Hornbill
Jump to navigation Jump to search
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<div style="border:1px solid #90C0FF; background:#D0E0FF; width:99%; padding:4px; margin-bottom:10px;">
 
<div style="border:1px solid #90C0FF; background:#D0E0FF; width:99%; padding:4px; margin-bottom:10px;">
__NOTOC__[[Main Page|Home]] > [[Administration]] > [[Service Manager Administration | Service Manager]] > [[Service Manager Business Process Workflow|Business Processes ]] > Request Variables
+
__NOTOC__
 +
{| style="width:100%"
 +
|[[Main Page|Home]] > [[Administration]] > [[Service Manager Administration | Service Manager]] > [[Service Manager Business Process Workflow|Business Processes ]] > Request Variables
 +
|style="text-align:right;"|[[:Category:Administration|Index]]
 +
|}
 
</div>
 
</div>
 
{|style="width: 100%"
 
{|style="width: 100%"
Line 6: Line 10:
 
|style="width:73%"|
 
|style="width:73%"|
 
==Introduction==
 
==Introduction==
When creating human tasks, update request details nodes and or authorisations it is possible to insert variables from the '''Parent Request''' into the text fields of the task / authorisation / update request nodes.   Adding variables is useful to give the task assignee more context around the task from the parent request, and also allows '''Collaboration''' Users who do not have access to Service Manager requests to be able to view and complete a task where variables have been injected from the parent request. It is also useful to inject the answer from a specific question on a custom progressive capture form into the Summary or Description of the request running the process.
+
As a process designer it is beneficial to have access to and use variables in your process nodes for varying purposes, it could be to insert answers from progressive capture questions into the summary, description or custom fields of a request, to branch and make decisions in your process based on the site of the request customer, or the outcome to particular tasks. You may even want to add details into a task or authorisation details field which is made up of details from the parent request, progressive capture answers or related entities (Customer, Service, Organisation etc), or you may simple want to assign tasks and authorisations to variables such as a requestors owner.
 +
 
 +
In all these examples and many more there is a need in the designer to be able to insert these variables into the relevant fields on the different business process forms
 +
 
 
|style="width:5%"|
 
|style="width:5%"|
 
|
 
|
|style="width:22%; border-style: solid; border-width: 1px; border-color:#e6e6e6; background-color:#f2f2f2;"|  
+
|style="width:22%; border-style: solid; border-width: 1px; border-color:#e6e6e6; background-color:#f2f2f2;"|
 +
 
 
== Related Articles ==
 
== Related Articles ==
 
:* [[Service Manager Business Process Workflow]]
 
:* [[Service Manager Business Process Workflow]]
 +
:* [[Business Process Designer]]
 +
:* [[Variable Picker]]
 
|}
 
|}
  
 +
==Using Variables==
 
[[File:Request_Variables.png|300px|right]]
 
[[File:Request_Variables.png|300px|right]]
 +
It is possible to both manually add variables to node fields and also use the '''[[Variable Picker]]''' to inject variable values into node fields.  Please follow the link in the related articles section to learn more about using the variable picker.
  
==Adding Request Variables==
+
When working with variables it is important to understand what you can use, when and how.
  
It is possible to include variables from both the parent request, and answers to questions from custom forms used in Progressive Capture.  It is possible to include multiple variables from both the request and questions from a custom form in the same task / authorisation description / Summary or Description Update of the Request.
+
In many business process node fields there will be the option to use variables, the nodes include:
  
In order for the variables to be used, you will need to include both or either of the following automated task nodes before the task, authorisation or Update Request node in which you want to use the variables. Using one or both will depend on if you want to inject the answers to questions from a specific Progressive Capture Form, and or variables like Summary, Description or custom fields from the parent request.
+
* Human Tasks
 +
* Custom Expressions following Decision nodes
 +
* Integration Calls
 +
* Automated Tasks
 +
* Authorisations
 +
 
 +
The key consideration when looking to add variables into a field, or use a variable to make a decision in the process node, is do I have the variable information available to me, preceding the node I want to use it in? By this I mean have I used the '''Automated Task > Requests > Get Request Information''' nodes to load the required variables into my process, this could be:
  
 
* Request Details
 
* Request Details
:: Requests > Get Request Information > Request Details
+
* Customer Details
*Request Questions
+
* Organisation Details
:: Requests > Get Request Information > Request Questions
+
* Progressive Capture Answers
[[File:Request_Variable.png|300px|thumb]]
+
 
To add a variable to the task, authorisation details section or Summary / Description of an Update Request node, please use the following format:
+
Or is the node preceded by a task off which I want to branch from or another integration call node with output values.
 +
 
 +
[[File:Authorisation_variables_example.png|right|300px]]
 +
If you have included the relevant nodes before a node in which you want to use a variable then you can then either use the [[Variable Picker]] or in some cases manually add the variable in a field.
 +
 
 +
Once you have added the variables to the node fields they will display like: '''&[global["flowcode"]["summary"]]'''
 +
 
 +
Once the request runs and the variables are added to displayed request fields, task descriptions etc they will appear as shown in the image opposite
 +
 
 +
==Variables in Custom Expressions==
 +
[[File:Custom_Expressions_variables.png|right|px300]]
 +
In the same way as injecting variable values into node fields, you may also want to use variables to help with decisions and branching in your processes.
 +
 
 +
Here the same rules apply and you would need to ensure you have the relevant nodes preceding any decision node off which you wanted to evaluate variables to branch your process flow.
 +
 
 +
On the lines out from a decision node, you can use the '''Custom Expression''' option and then use the '''[[Variable Picker]]''' to select which variable you want to evaluate and either use a static or variable for the answer you are looking for to folow that path in your flow.
 +
 
 +
 
 +
 
 +
 
 +
==Manually Adding Variables==
 +
 
 +
Hornbill have provided the [[Variable Picker]] to make the adding of variables easier, however if you wanted to manually add variables then the below will provide the format which can be used.
  
* Request Variable: '''&[global["flowcode"]["summary"]]''' or '''&[global["flowcode"]["customFieldA"]]'''
+
* Request Details Variable: '''&[global["flowcode"]["summary"]]''' or '''&[global["flowcode"]["customFieldA"]]'''
* Answer Variable: '''&[global["flowcode"]["answer1"]]'''
+
* Service Details Variable: '''&[global["flowcode"]["serviceName"]]''' or  '''&[global["flowcode"]["customA"]]'''
 +
* Customer Details Variable: '''&[global["flowcode"]["jobTitle"]]''' or '''&[global["flowcode"]["custom1"]]'''
 +
* Organisation Details Variable '''&[global["flowcode"]["industry"]]''' or '''&[global["flowcode"]["custom2"]]'''
  
Or Highlight the text area you wish to insert the variable into and select '''ctrl'' or '''cmd'' and '''left mouse click''', this will expose a menu of the available request an question variables based on which preceding '''Get Information''' nodes you have used.
+
Request variables are fairly self explanatory, and a list is provided below.  Answer variables are specific to the '''Custom Form''' defined in the '''Get Request Information''' > '''Progressive Capture Answers''' node specified before the node you wish to use them in, and can be included simply by referencing them as follows:
  
* To insert one or multiple variables simply select the variable from the various available menu options (depending on what '''Get Information''' nodes have been included'''.
+
* &[functions.pcf("Application_Access","field_2")] - Where in this case '''Application_Access''' is the custom form name and '''field_2''' is the specific question name on the custom form (if you have renamed the default field names on the custom from from '''field_2''' for example to anything else, then you would need to use the new field name here.
  
Request variables are fairly self explanatory, and a list is provided below.  Answer variables are specific to the '''Custom Form''' defined in the '''Get Request Information''' > '''Request Questions''' node specified before the task, authorisation or Update Request node, and can be included simply by referencing the number of the answers, as they are listed on the the custom form, so answer1, answer2, etc as needed.
+
'''List of Available Request Details Variables'''
[[File:Variables_onTask.png|right|700px]]
 
'''List of Available Request Variables'''
 
  
 
* &[global["flowcode"]["assignedTeam"]]
 
* &[global["flowcode"]["assignedTeam"]]
Line 69: Line 109:
 
* &[global["flowcode"]["withinResponseTime"]]
 
* &[global["flowcode"]["withinResponseTime"]]
  
* Plus custom fields A through Q in the format : &[global["flowcode"]["customFieldA"]]
+
* Plus custom fields in the format : &[global["flowcode"]["customFieldA"]]
  
 
[[Category:Administration]] [[Category:Service Manager]]
 
[[Category:Administration]] [[Category:Service Manager]]

Revision as of 10:24, 25 February 2021

Home > Administration > Service Manager > Business Processes > Request Variables Index

Introduction

As a process designer it is beneficial to have access to and use variables in your process nodes for varying purposes, it could be to insert answers from progressive capture questions into the summary, description or custom fields of a request, to branch and make decisions in your process based on the site of the request customer, or the outcome to particular tasks. You may even want to add details into a task or authorisation details field which is made up of details from the parent request, progressive capture answers or related entities (Customer, Service, Organisation etc), or you may simple want to assign tasks and authorisations to variables such as a requestors owner.

In all these examples and many more there is a need in the designer to be able to insert these variables into the relevant fields on the different business process forms

Related Articles

Using Variables

Request Variables.png

It is possible to both manually add variables to node fields and also use the Variable Picker to inject variable values into node fields. Please follow the link in the related articles section to learn more about using the variable picker.

When working with variables it is important to understand what you can use, when and how.

In many business process node fields there will be the option to use variables, the nodes include:

  • Human Tasks
  • Custom Expressions following Decision nodes
  • Integration Calls
  • Automated Tasks
  • Authorisations

The key consideration when looking to add variables into a field, or use a variable to make a decision in the process node, is do I have the variable information available to me, preceding the node I want to use it in? By this I mean have I used the Automated Task > Requests > Get Request Information nodes to load the required variables into my process, this could be:

  • Request Details
  • Customer Details
  • Organisation Details
  • Progressive Capture Answers

Or is the node preceded by a task off which I want to branch from or another integration call node with output values.

Authorisation variables example.png

If you have included the relevant nodes before a node in which you want to use a variable then you can then either use the Variable Picker or in some cases manually add the variable in a field.

Once you have added the variables to the node fields they will display like: &[global["flowcode"]["summary"]]

Once the request runs and the variables are added to displayed request fields, task descriptions etc they will appear as shown in the image opposite

Variables in Custom Expressions

px300

In the same way as injecting variable values into node fields, you may also want to use variables to help with decisions and branching in your processes.

Here the same rules apply and you would need to ensure you have the relevant nodes preceding any decision node off which you wanted to evaluate variables to branch your process flow.

On the lines out from a decision node, you can use the Custom Expression option and then use the Variable Picker to select which variable you want to evaluate and either use a static or variable for the answer you are looking for to folow that path in your flow.



Manually Adding Variables

Hornbill have provided the Variable Picker to make the adding of variables easier, however if you wanted to manually add variables then the below will provide the format which can be used.

  • Request Details Variable: &[global["flowcode"]["summary"]] or &[global["flowcode"]["customFieldA"]]
  • Service Details Variable: &[global["flowcode"]["serviceName"]] or &[global["flowcode"]["customA"]]
  • Customer Details Variable: &[global["flowcode"]["jobTitle"]] or &[global["flowcode"]["custom1"]]
  • Organisation Details Variable &[global["flowcode"]["industry"]] or &[global["flowcode"]["custom2"]]

Request variables are fairly self explanatory, and a list is provided below. Answer variables are specific to the Custom Form defined in the Get Request Information > Progressive Capture Answers node specified before the node you wish to use them in, and can be included simply by referencing them as follows:

  • &[functions.pcf("Application_Access","field_2")] - Where in this case Application_Access is the custom form name and field_2 is the specific question name on the custom form (if you have renamed the default field names on the custom from from field_2 for example to anything else, then you would need to use the new field name here.

List of Available Request Details Variables

  • &[global["flowcode"]["assignedTeam"]]
  • &[global["flowcode"]["authorisation"]]
  • &[global["flowcode"]["closureCategory"]]
  • &[global["flowcode"]["customer"]]
  • &[global["flowcode"]["customerCompany"]]
  • &[global["flowcode"]["customerManager"]]
  • &[global["flowcode"]["customerPrimaryEmail"]]
  • &[global["flowcode"]["customerPrimaryPhone"]]
  • &[global["flowcode"]["customerSecondaryEmail"]]
  • &[global["flowcode"]["customerSecondaryPhone"]]
  • &[global["flowcode"]["dateLogged"]]
  • &[global["flowcode"]["description"]]
  • &[global["flowcode"]["impact"]]
  • &[global["flowcode"]["loggingCategory"]]
  • &[global["flowcode"]["owner"]]
  • &[global["flowcode"]["ownerId"]]
  • &[global["flowcode"]["priority"]]
  • &[global["flowcode"]["requestId"]]
  • &[global["flowcode"]["resolution"]]
  • &[global["flowcode"]["service"]]
  • &[global["flowcode"]["source"]]
  • &[global["flowcode"]["site"]]
  • &[global["flowcode"]["status"]]
  • &[global["flowcode"]["summary"]]
  • &[global["flowcode"]["timeLogged"]]
  • &[global["flowcode"]["urgency"]]
  • &[global["flowcode"]["withinFixTime"]]
  • &[global["flowcode"]["withinResponseTime"]]
  • Plus custom fields in the format : &[global["flowcode"]["customFieldA"]]