1.8 KiB
Data quality assessment: Guest Journeys with Payments but that are not completed (or not even started)
This is a brief explanation of some edge cases that could incur into data quality problems - or potentially, be linked to a bug.
Problem
During the initiative of creating business KPIs, we are in need of computing a rate between Guest Journeys with Payment and Guest Journeys Completed. The assumption we had was that these were sequential steps in the guest journey, namely:
- Guest Journey gets created
- Guest Journey starts
- Guest Journey is completed
- Guest Journey has payment
We know it’s possible some guests do not start the guest journey, or start it but not complete it; but our assumption is that in these cases, these guests should not be able to complete following steps.
What we observe is that we can have guests journeys with a payment but that:
-
have not been completed
-
have not been even started
Initially this was spotted into the DWH logic. However, we have the same problem on the source by executing the function GetVerificationProgress()
Backend Snippet
For further investigation on backend side
SELECT
vr.Id,
b.BookingId,
p.PaymentId,
ps.Name,
dbo.GetVerificationProgress(
b.BookingId,
vr.VerificationSetId
) as VrProgress
FROM
dbo.VerificationToPayment vtp
LEFT JOIN dbo.Verification v
ON
v.Id = vtp.VerificationId
LEFT JOIN dbo.VerificationRequest vr
ON
v.VerificationRequestId = vr.Id
LEFT JOIN dbo.Payment p
ON
vtp.PaymentId = p.PaymentId
LEFT JOIN dbo.PaymentStatus ps
ON
p.PaymentStatusId = ps.Id
LEFT JOIN dbo.Booking b
ON
b.VerificationRequestId = vr.Id
WHERE dbo.GetVerificationProgress(
b.BookingId,
vr.VerificationSetId
) != 'Complete' AND ps.Name = 'Paid'
