Back to Home

RPA Reset

Overview

The script will move audit(s) back into the RPA New Inventory bucket and remove BOT comments and excel attachments from the record.

Note: What is the RPA process?

Script 1: RPA Reset

USE SAM_AUDIT
GO

SELECT UniqueClaimNo INTO #UCN FROM smart.sam_Audit_Open 
WHERE ClaimID IN (
-- Add ClaimID provided by business
)

-- RPA will be able to pick up the audit if AuditorNo is -1
UPDATE smart.sam_Audit_Log SET AuditorNo = - 1
WHERE UniqueClaimNo IN (SELECT UniqueClaimNo FROM #UCN)

-- RPA Audit Stage is AuditStageNo = 0
UPDATE smart.sam_Audit_Open SET AuditStageNo = 0
WHERE UniqueClaimNo IN (SELECT UniqueClaimNo FROM #UCN)
DELETE FROM smart.sam_Audit_AttachedFile WHERE UniqueClaimNo IN (SELECT UniqueClaimNo FROM #UCN)
DELETE FROM smart.sam_Audit_Comments WHERE UniqueClaimNo IN (SELECT UniqueClaimNo FROM #UCN)