Skip to end of banner
Go to start of banner

Reclassification View

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

Name

Reclassification

Type

View

Description

A normalized version of Reclassification table.

Fields

Data Category

Event Field/Column Name

Data Type

Description

Applicability

Sample Value

Notes

Key

TenantId

VARCHAR(32)

Unique ID associated with each Quavo client.

ALWAYS

qvo-stg

Key

Tenant

VARCHAR(64)

A tenant is a Quavo customer that uses QFD.  Each tenant is assigned a unique Tenant ID.

ALWAYS

Default

Key

ClientId

VARCHAR(64)

A unique ID representing a single client.

ALWAYS

Default

Key

Client

VARCHAR(64)

A client is a Quavo customer that uses QFD through a relationship with a Quavo tenant.  Each client is assigned a unique Client ID.

ALWAYS

Default

Claim Details

ClaimType

VARCHAR(64)

See Transaction Type.

ALWAYS

Card-Pinless

Claim Details

ClaimCategory

VARCHAR(64)

General categorization of the claim.

For a more precise description, see Claim Reason.

ALWAYS

Fraud

Claim Details

ClaimReason

VARCHAR(64)

Identifies the specific reason associated with the claim.

ALWAYS

Stolen

Reclassification Details

PreviousClaimCategory

VARCHAR

Claim Category prior to reclassification.

ALWAYS

Dispute

Reclassification Details

PreviousClaimReason

VARCHAR

Claim Reason prior to reclassification.

ALWAYS

Not Received

Key

ClaimId

VARCHAR(32)

Unique ID associated with a claim.  Format: YYMMDD<Ordinal Number>"C"

Example: 2405230003C

ALWAYS

2306060014C

Claim Details

ClaimCreateDate

DATE

The datetime that a record was created.

ALWAYS

2023-09-09

Claim Details

ClaimCreatedBy

VARCHAR

Name of user that originally created the claim.

ALWAYS

D. Robertson

Reclassification Details

ReclassificationDateTime

DATE

Datetime that the claim was reclassified.

ALWAYS

2023-09-09

SQL

select
    r.tenantid,
    t.name,
    r.clientid,
    cl.commonname,
    c.claimtype,
    r.reasontype,
    CAMEL_CASE_TO_STRING(r.reason),
    (case
        when r.previousreasontype = 'NonFraud' THEN 'Dispute'
        when r.previousreasontype = 'NonFraudATM' THEN 'ATM'
        when r.previousreasontype = 'AuthChargeback' THEN 'Authorization'
        when r.previousreasontype = 'FraudAccountIssue' THEN 'Identity Theft'
        else r.previousreasontype
    end),
    CAMEL_CASE_TO_STRING(r.previousreason),
    r.claimid,
    (CASE
        WHEN c.createdbyuserid = 'System' THEN 'System'
        ELSE CONCAT(LEFT(u.firstname, 1), '. ', u.lastname)
    END),
    TO_TIMESTAMP_TZ(c.createdatetime::varchar || ' +0000'),
    TO_TIMESTAMP_TZ(r.eventdatetime::varchar || ' +0000')
from reclassify as r
join tenant as t on r.tenantid = t.tenantid
join client as cl on r.tenantid = cl.tenantid and r.clientid = cl.clientid
join claim as c on r.tenantid = c.tenantid and r.claimid = c.claimid
left join userprofile as u on r.tenantid = u.tenantid and c.createdbyuserid = u.userid

Change Log

Date

Change Summary

12/11/24

  • Added SQL

  • Converted timestamps from NTZ to TZ format for compatibility

  • No labels