This content applies solely to Connected Servicing, which must be purchased separately from the Appian base platform. |
IntroductionCopy link to clipboard
Task due dates allow the Connected Servicing solution to quantitatively measure if Service Requests and their associated tasks are being completed on time. Further details and data about task due dates across an institution are displayed on the Reports tab.
By default, task due dates are calculated based on a service request's target completion date. This is set by the business owner in the Connected FS Settings site. A task's due date may also be calculated based on other associated due dates for that Service Request.
Adding a key dateCopy link to clipboard
The examples in this section will follow adding After Created Date as a key date option.
Step 1: Add a new key date rule to the databaseCopy link to clipboard
Add a new row in the AS_SRQ_R_DATA
table with the following attributes:
- LABEL: The bundle label key
- TYPE: SLA Rule Type
- CODE: SLA_RULE_TYPE_NEW_KEY_DATE
- IS_ACTIVE: true (1)
- CREATED_BY: Your Appian username.
- CREATED_DATETIME: The current timestamp, in the format YYYY-MM-DD HH:MM:SS.
- MODIFIED_BY: Your Appian username.
- MODIFIED_DATETIME: The current timestamp, in the format YYYY-MM-DD HH:MM:SS.
EXAMPLECopy link to clipboard
1
2
INSERT INTO `AS_SRQ_R_DATA` (`R_DATA_ID`, `LABEL`, `TYPE`, `CODE`, `SORT_ORDER`, `ICON`, `COLOR`, `IS_ACTIVE`, `CREATED_BY`, `CREATED_DATETIME`, `MODIFIED_BY`, `MODIFIED_DATETIME`)
VALUES (NULL, 'SlaRuleType.lbl_AfterCreatedDate', 'SLA Rule Type', 'SLA_RULE_TYPE_AFTER_CREATED_DATE', NULL, '', '', '1', <username>, CURRENT_TIMESTAMP(),<username>, CURRENT_TIMESTAMP());
Copy
Step 2: Create a constant for the new SLA ruleCopy link to clipboard
Create a new constant that's value is the code from the row in the database you added to AS_SRQ_R_DATA
in Step 1.
EXAMPLECopy link to clipboard
Create a constant called AS_SRQ_ENUM_SLA_RULE_AFTER_CREATED_DATE
with the value: SLA_RULE_TYPE_AFTER_CREATED_DATE.
Step 3: Update the bundle fileCopy link to clipboard
Open the SlaRuleType bundle file in each language and add the labelKey in that you added to the AS_SRQ_R_DATA
in Step 1.
EXAMPLECopy link to clipboard
1
2
3
lbl_BeforeFundingDate=Before Funding Date
lbl_AfterFundingDate=After Actual Funding Date
!lbl_AfterCreatedDate=After Created Date
Copy
Step 4: Update the rule to calculate due datesCopy link to clipboard
Open up the rule AS_TMG_BL_calculateTaskDueDateFromSlaDays
and add to the conditional if() statement the logic needed for the new key date and add the new date as a rule input.
EXAMPLECopy link to clipboard
AS_TMG_BL_calculateTaskDueDateFromSlaDays Rule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
if(
or(
rule!AS_CO_UT_isBlank(
ri!slaDays
),
rule!AS_CO_UT_isBlank(
ri!fundingDate
),
! rule!AS_CO_UT_isBlank(
! ri!createdDate
! )
),
null,
if(
ri!slaRule = cons!AS_TMG_ENUM_SLA_RULE_BEFORE_EST_FUNDING_DATE,
if(
ri!slaDayType = cons!AS_TMG_ENUM_SLA_DAY_TYPE_BUSINESS_DAYS,
workday(
ri!fundingDate,
- ri!slaDays
),
/*default is calendar days*/
ri!fundingDate - ri!slaDays,
),
! if(
! ri!slaRule = cons!AS_SRQ_ENUM_SLA_RULE_AFTER_CREATED_DATE,
! if(
! ri!slaDayType = cons!AS_SRQ_ENUM_SLA_DAY_TYPE_BUSINESS_DAYS,
! workday(
! ri!createdDate,
! - ri!slaDays
! ),
! /*default is calendar days*/
! ri!createdDate - ri!slaDays,
! ),
if(
ri!slaDayType = cons!AS_TMG_ENUM_SLA_DAY_TYPE_BUSINESS_DAYS,
workday(
ri!fundingDate,
+ ri!slaDays
),
/*default is calendar days*/
ri!fundingDate + ri!slaDays,
)
)
)
)
Copy
Step 5: Add the new rule input to all dependent rulesCopy link to clipboard
Add new rule input to the two rules that AS_TMG_BL_calculateTaskDueDateFromSlaDays
is dependent on and then pass in the appropriate logic.
The rules to update are:
AS_TMG_CDT_mapTemplateTaskToRuntimeTask
AS_TMG_UT_updateTasksDueDate
EXAMPLECopy link to clipboard
AS_TMG_CDT_mapTemplateTaskToRuntimeTask Rule
1
2
3
4
5
6
7
8
9
10
11
12
...
modifiedDatetime: null,
dueDate: rule!AS_TMG_BL_calculateTaskDueDateFromSlaDays(
slaDays: ri!templateTask.slaDays,
slaRule: ri!templateTask.slaRule,
fundingDate: ri!request.fundingDetails.estFundingDate,
slaDayType: ri!template.slaDayType,
! createdDate: todate(ri!request.createdDatetime)
),
slaDays: ri!templateTask.slaDays,
slaRule: ri!templateTask.slaRule
)
Copy
Removing a key dateCopy link to clipboard
To remove a key date from the dropdown list in Connected FS Settings, update the 'isActive' column to false (0) in the AS_SRQ_R_DATA table for the corresponding row.