From 486f281d386e18e0261d703da31946297a5a745a Mon Sep 17 00:00:00 2001 From: Morten Mikalsen Date: Fri, 23 Feb 2024 14:02:30 +0100 Subject: [PATCH 1/3] Adds external reference to journal requests --- .../CHAT_Journal_CHAT_Thread.flow-meta.xml | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml b/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml index ccb1902a..55c9a005 100644 --- a/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml +++ b/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml @@ -289,13 +289,6 @@ Get_Account_Info.INT_PersonIdent__c - - Journal_Request.avsenderMottaker.navn - Assign - - Person_Full_Name - - Journal_Request.tema Assign @@ -317,6 +310,13 @@ Bot_Journal_Documents + + Journal_Request.eksternReferanseId + Assign + + externalReference + + Post_Journal_Request @@ -503,16 +503,15 @@ 'Innlogget chat med NAV - ' + {!THREAD_CLOSE_DATE} + ' - ' + {!JOURNALED_THREAD.CRM_Theme_Name__c} - Formula to define the journal case type (Sakstype). If no Journal Case ID has been input, default is GENERELL_SAK - Journal_Case_Type + externalReference String - IF(ISBLANK({!Journal_Entry_SF.NAV_Case_Reference__c}), 'GENERELL_SAK', 'FAGSAK') + {!JOURNALED_THREAD.Id} + {!Journal_Entry_SF.Theme__c} + {!Journal_Sak.fagsakId} - Formula to generate name convention on journal required format (For persons) - Person_Full_Name + Formula to define the journal case type (Sakstype). If no Journal Case ID has been input, default is GENERELL_SAK + Journal_Case_Type String - {!Get_Account_Info.CRM_Person__r.INT_LastName__c} & ', ' & {!Get_Account_Info.CRM_Person__r.INT_FirstName__c} & ' ' &{!Get_Account_Info.CRM_Person__r.INT_MiddleName__c} + IF(ISBLANK({!Journal_Entry_SF.NAV_Case_Reference__c}), 'GENERELL_SAK', 'FAGSAK') Formula to generate a text for when the thread was closed. From eaaff01c6e7ffd6edf2f10c732a0cb6c3f51ecde Mon Sep 17 00:00:00 2001 From: Morten Mikalsen Date: Tue, 27 Feb 2024 10:24:29 +0100 Subject: [PATCH 2/3] Update dependecy --- sfdx-project.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfdx-project.json b/sfdx-project.json index 876353ee..0c39a6b9 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -24,7 +24,7 @@ }, { "package": "crm-journal-utilities", - "versionNumber": "0.25.0.LATEST" + "versionNumber": "0.27.0.LATEST" }, { "package": "crm-platform-oppgave", From 41c478a74f0a8f556b68ffc2607a3b31e652b4b0 Mon Sep 17 00:00:00 2001 From: Morten Mikalsen Date: Tue, 12 Mar 2024 14:07:17 +0100 Subject: [PATCH 3/3] Set duplicate status --- .../CHAT_Journal_CHAT_Thread.flow-meta.xml | 122 ++++++++++++------ 1 file changed, 86 insertions(+), 36 deletions(-) diff --git a/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml b/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml index 55c9a005..f38883ab 100644 --- a/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml +++ b/force-app/main/default/flows/CHAT_Journal_CHAT_Thread.flow-meta.xml @@ -3,7 +3,7 @@ Generate_Bot_Conversation - 182 + 380 566 CRM_JournalUtilities apex @@ -29,7 +29,7 @@ Generates the document from the human chat session Generate_Chat_Document - 182 + 380 458 CRM_JournalUtilities apex @@ -58,7 +58,7 @@ Calls journal utils to perform the API post action Post_Journal_Request - 182 + 380 1406 CRM_JournalUtilities apex @@ -97,7 +97,7 @@ Add document variants to document list and assign document title Assign_Journal_Documents - 182 + 380 1082 Chat_Journal_Documents.dokumentvarianter @@ -148,8 +148,8 @@ Assign_Journal_Entry_Default_data - 182 - 1814 + 380 + 2114 Journal_Entry_SF.CRM_Journal_Date__c Assign @@ -161,11 +161,34 @@ DML_Check + + Set_Journal_Entry_ID + + 182 + 1922 + + Journal_Entry_SF.Journal_Entry_ID__c + Assign + + Post_Journal_Request.journalpostId + + + + JOURNALED_THREAD.CRM_Journal_Status__c + Assign + + Journal Completed + + + + Assign_Journal_Entry_Default_data + + Assigns needed values to document variant wrapper Chat_Document_Variant_Assignment - 182 + 380 974 Document_Variant_PDF.filtype @@ -217,7 +240,7 @@ Assigns needed values to the journal requests and adds the document list. Journal_Request_Assignment - 182 + 380 1298 Journal_Request.tittel @@ -325,7 +348,7 @@ Assigns necessary values to the Sak wrapper for journal entry. Journal_Sak_Assignment - 182 + 380 1190 Journal_Sak.fagsakId @@ -355,7 +378,7 @@ Set_Journal_Subtheme_Null - 270 + 468 782 Journal_Entry_SF.Subtheme__c @@ -368,8 +391,8 @@ Set_Post_Completed - 50 - 1622 + 314 + 1730 Journal_Entry_SF.Journal_Entry_Status__c Assign @@ -377,28 +400,30 @@ Completed + + Set_Journal_Entry_ID + + + + Set_Post_Duplicate + + 50 + 1730 - Journal_Entry_SF.Journal_Entry_ID__c - Assign - - Post_Journal_Request.journalpostId - - - - JOURNALED_THREAD.CRM_Journal_Status__c + Journal_Entry_SF.Journal_Entry_Status__c Assign - Journal Completed + Duplicate - Assign_Journal_Entry_Default_data + Set_Journal_Entry_ID Set_Post_Failed - 314 + 578 1622 Journal_Entry_SF.Journal_Entry_Status__c @@ -418,10 +443,35 @@ Assign_Journal_Entry_Default_data + + Check_if_Journal_Entry_was_duplicate + + 182 + 1622 + + Set_Post_Completed + + Default Outcome + + Was_duplicate + and + + Post_Journal_Request.duplicate + EqualTo + + true + + + + Set_Post_Duplicate + + + + Check_Post_State - 182 + 380 1514 Set_Post_Failed @@ -438,7 +488,7 @@ - Set_Post_Completed + Check_if_Journal_Entry_was_duplicate @@ -447,8 +497,8 @@ Decision to determine if the dml should be performed directly in the flow or handled by a parent calling this. DML_Check - 182 - 1922 + 380 + 2222 No DML Do_DML @@ -470,7 +520,7 @@ Check if the subtheme has been set for the journal entry from the parent calling the flow. If not this is strictly set to null Validate_Subtheme - 182 + 380 674 Set_Journal_Subtheme_Null @@ -550,7 +600,7 @@ Get necessary account information to post a journal entry Get_Account_Info - 182 + 380 242 false @@ -572,7 +622,7 @@ Query the case related to the chat transcript for getting the bot conversation Get_Case - 182 + 380 350 false @@ -596,7 +646,7 @@ Query the info needed from record and relations to submit a journal entry Get_Necessary_Record_Info - 182 + 380 134 false @@ -625,8 +675,8 @@ Update_Journal_Entry - 50 - 2030 + 248 + 2330 Update_Thread @@ -635,13 +685,13 @@ Update_Thread - 50 - 2138 + 248 + 2438 JOURNALED_THREAD SystemModeWithoutSharing - 56 + 254 0 Get_Necessary_Record_Info