LOGIC CHANGES:
F_Callbacks.EnterTime
F_Callbacks.LastAttemptTime
Callback Requested Time - Final Attempt Time
F_Callbacks.LastAttemptInteractionStateID → D_InteractionState.LastInteractionStateID → D_InteractionState.LastInteractionStateName
F_Attempts.AttemptTime
(Agent Attempt Time - Opt In Time) where Attempt Number = 1
(Agent Attempt Time - Agent Attempt Time(previous attempt number)) where Attempt Number > 1
DBA.dbo.Settings where SettingName = 'RecordingBaseUrl'
replace ORGANIZATIONID → Users.dbo.UserGroup.OrganizationGUID
replace FILENAME → F_Interactions.RecordingPath
F_Interactions.RecordingTranscription
[Ended State] = 'Purged'
OR
Exists:
F_Attempts.InteractionState = @AttemptState
Exists:
F_Attempts.InteractionState = @AttemptState
[Ended State]
OR
@EndedState LIKE ''%|HandledOnFirstTrial|%'' && F_Callbacks.LastInteractionState = ''Handled''
AND F_Callbacks.NumberOfAttempts = 1
[Ended State]
OR
@EndedState LIKE ''%|HandledOnFirstTrial|%'' && F_Callbacks.LastInteractionState = ''Handled''
AND F_Callbacks.NumberOfAttempts = 2