End to End Scenarios
Common opt-in step
- Customer opted in and starting reward progress MKEL logs (common to all end to end case scenarios):
Splunk query:(index="marketing-mkel" OR index="custaccounts-shared") {{ accountId }}:
[rid=a4eeb9b0-dc8e-11ef-b010-fa163e575f6d] PromotionStateService - updated optInId=CALLISTOTESTPAT3:714840633:1737969068242, cause=Unknown
[rid=a4eeb9b0-dc8e-11ef-b010-fa163e575f6d] ProgressEventPublisher - Progress optInId=CALLISTOTESTPAT3:714840633:1737969068242, event={"version":1,"messageId":"d9b30eec-8d8b-4fc1-9343-58b443c22cd3","date":"2025-01-27T09:11:08.280Z","promotionCode":"CALLISTOTESTPAT3", "accountId":714840633,"attemptId":"1737969068242","fulfillmentStartDate":"2025-01-27T08:18:52.694Z","fulfillmentEndDate":"2025-01-27T09:18:52.694Z", "fulfillmentCriteriaDetails":{"fulfillmentRatio":"0.0","displayRatio":"0.0","compoundFulfillmentCriteria":{"criteria":[{"fulfillmentRatio":"0.0", "displayRatio":"0.0","tierDefinition":{"name":"Bronze","level":1},"compoundFulfillmentCriteria":{"criteria":[{"progress":"0.0", "fulfillmentRatio":"0.0","displayRatio":"0.0","qualifyingCriteriaType":"SPORTSBOOK_TOTAL_BET_CRITERIA"},{"fulfillmentRatio":"0.0", "displayRatio":"0.0","criteriaStateDetails":{"customerPreferencesCriteriaStateDetails":{}},"qualifyingCriteriaType":"CUSTOMER_PREFERENCES_CRITERIA"}], "tierDefinition":{"name":"Bronze","level":1},"operator":"OR"},"qualifyingCriteriaType":"COMPOUND_CRITERIA"}],"operator":"OR"}, "qualifyingCriteriaType":"COMPOUND_CRITERIA"},"reward":{"compoundReward":{"id":"CompoundRewardModel","rewards":[{"walletAwardingReward":{ "id":"FREE_BET_BONUS_69303ea0-0ab0-4200-b11d-6fccf1dd182a","template":false,"initialAmountPerCurrency":{"GBP":"10.0"},"products":["SPORTSBOOK"], "redeemable":false,"period":"PT1H","tierDefinition":{"name":"Bronze","level":1}}}]}},"awaitingConsent":false,"status":"ONGOING"}
Scenario 1: Reward is granted and hasn't been used
- Customer opts into the promotion
- Customer places qualifying bet/bets during that cycle, we would see it as follows in MKEL logs
Splunk query:(index="marketing-mkel" OR index="custaccounts-shared") {{ accountId }}
[rid=ie2-mkelsbg01a-nxt-01231343-00000120cb] ProgressEventPublisher - Activity progress event=Activity[accountId=714695224,attemptId=1737712316350,consent={"awaitingConsent": false, "cancelConsent": null},criteriaProgress=[{"id": "CompoundCriteriaModel.CompoundCriteriaModel-1.SportsbookTotalBetCriteriaModel-1", "fulfillmentRatio": 1.0, "params": null}, {"id": "CompoundCriteriaModel.CompoundCriteriaModel-1.CustomerPreferencesCriteriaModel-2", "fulfillmentRatio": 0.0, "params": null}],currency=GBP, date=2025-01-24T10:18:56.112Z,messageId=1af31e84-e8f6-47e4-a8c8-b89a784c32dc,optIn={"date": "2025-01-24T09:51:56.358Z", "expiryDate": "2025-01-24T11:18:55.983Z", "awaitingConsent": false, "audit": {"optedInBy": {"userType": "CUSTOMER", "username": null}, "removedBy": null, "canceledConsentBy": null}, "status": "REWARD_AWARDED", "cycleStartDate": "2025-01-24T09:18:52.694Z", "cycleEndDate": "2025-01-24T10:18:52.694Z"},payout={"date": "2025-01-24T10:18:56.086Z", "status": "COMPLETE"},promotionCode=CALLISTOTESTPAT3, rewardProgress=[{"id": "FREE_BET_BONUS_69303ea0-0ab0-4200-b11d-6fccf1dd182a", "params": {"walletId": "22304290192", "targetAmount": "10.0", "walletType": "NON_WAGERING", "initialAmount": "10.0", "remaining": "10.0", "expirationDate": "2025-01-24T11:18:55.983Z"}}]]
Splunk query for everything else: index=ppb-personalisation sourcetype="kubernetes_logs" k8s.cluster.name="Ssk8sDEV" source="*{{ TLA }}*{{ environment }}*" {{ messageId of the REWARD_AWARDED MKEL logs above, in this case "1af31e84-e8f6-47e4-a8c8-b89a784c32dc" }}
4. DEC receives a CPP activity when the customer opts-in to the promotion:
com.uki.platform.personalisation.mapper.MapToDomain [] - Processing CPPActivity [id:714695224, attemptId:1737712316350,
messsageId:1af31e84-e8f6-47e4-a8c8-b89a784c32dc, promoCode:CALLISTOTESTPAT3, optInExpiryDate:2025-01-24T10:18:52.694+0000,
awaitingConsent:false, cancelConsent:null, status: ONGOING, payout: null, criteriaProgress: [uki.ihd.event.activity.Criteria@3c36d983[id=CompoundCriteriaModel.CompoundCriteriaModel-1.CustomerPreferencesCriteriaModel-2,
fulfilmentRatio=0.0,tier=<null>]]. removedBy: null, rewardProgress: []]
5. DEC receives a REWARD_AWARDED CPP activity when customer places a qualifying bet:
com.uki.platform.personalisation.mapper.MapToDomain [] - Processing CPPActivity [id:714695224, attemptId:1737712316350,
messsageId:1af31e84-e8f6-47e4-a8c8-b89a784c32dc, promoCode:CALLISTOTESTPAT3, optInExpiryDate:2025-01-24T11:18:55.983+0000, awaitingConsent:false,
cancelConsent:null, status: REWARD_AWARDED, payout: uki.ihd.event.activity.Payout@7a95e7d[date=2025-01-24T10:18:56.086Z,status=COMPLETE],
criteriaProgress: [uki.ihd.event.activity.Criteria@156704eb[id=CompoundCriteriaModel.CompoundCriteriaModel-1.SportsbookTotalBetCriteriaModel-1,fulfilmentRatio=1.0,tier=<null>],
uki.ihd.event.activity.Criteria@7d64fc8d[id=CompoundCriteriaModel.CompoundCriteriaModel-1.CustomerPreferencesCriteriaModel-2,fulfilmentRatio=0.0,tier=<null>]]. removedBy: null,
rewardProgress: [uki.ihd.event.activity.RewardProgress@72845a6c[id=FREE_BET_BONUS_69303ea0-0ab0-4200-b11d-6fccf1dd182a,type=<null>,isUsed=<null>,products=[],expirationDate=<null>,
tier=<null>,params=uki.ihd.event.activity.Params@5f69488b[additionalProperties={walletId=22304290192, targetAmount=10.0, walletType=NON_WAGERING, initialAmount=10.0,
remaining=10.0, expirationDate=2025-01-24T11:18:55.983Z}]]]]
6. DEC calls PPH with the promoCode in order to get the necessary information to enrich the RewardProgress and CPPActivity (common to all flows and omitted from the rest of them):
index=ppb-personalisation sourcetype="kubernetes_logs" k8s.cluster.name="Ssk8sDEV" source="*dec*{{ environment }}* "Calling PPH"
com.uki.platform.personalisation.transformation.enrichment.PromotionDefinitionCache [] - Calling PPH for CALLISTOTESTPAT3
7. DEC maps the activity to a Cloud Event after enriching it to be sent to the Kafka topic:
com.uki.platform.personalisation.mapper.MapToCloudEvent [] - Collected CloudEvent [id:1af31e84-e8f6-47e4-a8c8-b89a784c32dc,
subject:714695224:CALLISTOTESTPAT3:1737712316350, source:/ihd/cpp/activity/sbg, type:uki.ihd.cpp.activity, time:2025-01-24T10:18:56.305339499Z,
ihdEntryTime:2025-01-24T10:18:56.305107516Z, decTime:2025-01-24T10:18:56.305339499Z]
8. TIM receives the CPP Activity from DEC:
com.uki.platform.personalisation.mapper.MapFromCloudEvent [] - uki.ihd.event.activity.CPPActivity@6ba6f7f3[accountId=714695224,
attemptId=1737712316350,promoCode=CALLISTOTESTPAT3,awaitingConsent=false,status=REWARD_AWARDED,messageId=1af31e84-e8f6-47e4-a8c8-b89a784c32dc,
promoName=CALLISTO_SBC_PAT_TEST,optInExpiryDate=Fri Jan 24 11:18:55 UTC 2025,tags=[sbc, sbc_test],promoUrl=https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3,payout=uki.ihd.event.activity.Payout@471dd155[date=2025-01-24T10:18:56.086Z,status=COMPLETE],removedBy=<null>,
criteriaProgress=[uki.ihd.event.activity.Criteria@7127ea65[id=CompoundCriteriaModel.CompoundCriteriaModel-1.SportsbookTotalBetCriteriaModel-1,
fulfilmentRatio=1.0,tier=<null>], uki.ihd.event.activity.Criteria@77f63072[id=CompoundCriteriaModel.CompoundCriteriaModel-1.CustomerPreferencesCriteriaModel-2,
fulfilmentRatio=0.0,tier=<null>]],rewardProgress=[uki.ihd.event.activity.RewardProgress@2bb35810[id=FREE_BET_BONUS_69303ea0-0ab0-4200-b11d-6fccf1dd182a,
type=FREE_BET,isUsed=<null>,products=[SPORTSBOOK],expirationDate=Fri Jan 24 11:18:55 UTC 2025,tier=uki.ihd.event.activity.Tier@28da34a[name=Bronze,
level=1.0],params=uki.ihd.event.activity.Params@4c3715bc[additionalProperties={walletId=22304290192, targetAmount=10.0, walletType=NON_WAGERING,
initialAmount=10.0, remaining=10.0, expirationDate=2025-01-24T11:18:55.983Z}]]]]
9. TIM maps the CPP Activity to Cloud Event:
com.uki.platform.personalisation.mapper.MapToCloudEvent [] - Mapping to CloudEvent : uki.ihd.event.activity.CPPActivity@1b63d95b[accountId=714695224,
attemptId=1737712316350,promoCode=CALLISTOTESTPAT3,awaitingConsent=false,status=REWARD_AWARDED,messageId=1af31e84-e8f6-47e4-a8c8-b89a784c32dc,
promoName=CALLISTO_SBC_PAT_TEST,optInExpiryDate=Fri Jan 24 11:18:55 UTC 2025,tags=[sbc, sbc_test],promoUrl=https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3,payout=uki.ihd.event.activity.Payout@585fb047[date=2025-01-24T10:18:56.086Z,status=COMPLETE],removedBy=<null>,
criteriaProgress=[uki.ihd.event.activity.Criteria@40e5b3b7[id=CompoundCriteriaModel.CompoundCriteriaModel-1.SportsbookTotalBetCriteriaModel-1,
fulfilmentRatio=1.0,tier=<null>], uki.ihd.event.activity.Criteria@62ba263a[id=CompoundCriteriaModel.CompoundCriteriaModel-1.CustomerPreferencesCriteriaModel-2,
fulfilmentRatio=0.0,tier=<null>]],rewardProgress=[uki.ihd.event.activity.RewardProgress@67168237[id=FREE_BET_BONUS_69303ea0-0ab0-4200-b11d-6fccf1dd182a,
type=FREE_BET,isUsed=false,products=[SPORTSBOOK],expirationDate=Fri Jan 24 11:18:55 UTC 2025,tier=uki.ihd.event.activity.Tier@42eedb1a[name=Bronze,level=1.0],
params=uki.ihd.event.activity.Params@2ffba0fb[additionalProperties={walletId=22304290192, targetAmount=10.0, walletType=NON_WAGERING,
initialAmount=10.0, remaining=10.0, expirationDate=2025-01-24T11:18:55.983Z}]]]]
10. FRED gets CloudEvent from TIM:
com.uki.platform.personalisation.fred.consumer.TIMCloudEventListener [pool-3-thread-51] INFO cid= - MsgId: 1af31e84-e8f6-47e4-a8c8-b89a784c32dc -
Timings { source: 2025-01-24T10:18:56.112Z, ihdEntry: 2025-01-24T10:18:56.305107516Z, dec: 2025-01-24T10:18:56.305339499Z,
tim: 2025-01-24T10:18:56.325968974Z, des: 2025-01-24T10:18:56.367183Z, fred: 2025-01-24T10:18:56.368146015Z
11. FRED sends CloudEvent to DES to get a decision:
com.uki.platform.personalisation.fred.client.des.DesService [pool-3-thread-51] INFO cid= - Sending TIM CloudEvent ID 1af31e84-e8f6-47e4-a8c8-b89a784c32dc with type uki.ihd.reward.sbc to DES endpoint http://sbc-decision-nxt.personalisation-sbc-decision-nxt.svc.cluster.local
12. DES returns the decision after being called by FRED:
[fun.SBCDecision] (executor-thread-1) Status: HasDecision for messageID 1af31e84-e8f6-47e4-a8c8-b89a784c32dc
13. FRED gets Decision from DES:
com.uki.platform.personalisation.fred.client.des.DesService [pool-3-thread-51] INFO cid= - DES returns decision for event 1af31e84-e8f6-47e4-a8c8-b89a784c32dc with type uki.ihd.decision.sbc.reward
14. FRED sends message to BCG:
com.uki.platform.personalisation.fred.client.bcg.BcgService [pool-3-thread-51] INFO cid= - Sending Message to BCG for cloudEvent ID 1af31e84-e8f6-47e4-a8c8-b89a784c32dc,
type uki.ihd.decision.sbc.reward with payload {"accountId":714695224,"programme":"NA","initiative":"NA","messages":[{"messageId":"1af31e84-e8f6-47e4-a8c8-b89a784c32dc",
"expiryDate":"2025-01-24T11:18:55.983Z","payload":{"urn":"flutter:messaging:promoSBC","params":{"attemptId":"1737712316350","optInState":"REWARD_AWARDED",
"promoUrl":"https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3","promoCode":"CALLISTOTESTPAT3"}},
"preferences":[{"channels":[{"channel":"ON_SITE","displayType":"TOAST"}]},{"channels":[{"channel":"MESSAGE_QUEUE","displayType":"FULL_SCREEN"}]}],
"priority":1}],"context":{"decisionModelName":"sbcDecisionModel","decisionModelVariantName":"sbc"}}
15. BCG receives the event and sends it to OSG to deliver it to the client, but client is not online, so the retry flow is started:
{ [-]
accountId: 714695224
context: { [+]
}
date: 2025-01-24T10:18:56.452542204Z
expiryDate: 2025-01-24T11:18:55.983Z
messageId: 1af31e84-e8f6-47e4-a8c8-b89a784c32dc
overallStatus: ATTEMPTED
params: { [+]
}
preferences: [ [+]
]
urn: flutter:messaging:promoSBC
}
16. Event is added to the queue by MSQ:
MSQ logs in Grafana cloudwatch
[com.ppb.pla.per.msq.dao.MessageDao] (Lambda Thread (NORMAL)) Message Message(messageId=1af31e84-e8f6-47e4-a8c8-b89a784c32dc, urn=flutter:messaging:promoSBC,
params={attemptId=1737712316350, optInState=REWARD_AWARDED, promoUrl=https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3,
promoCode=CALLISTOTESTPAT3}, context={decisionModelName=sbcDecisionModel, decisionModelVariantName=sbc}, expiryDate=2025-01-24T11:18:55.983Z,
programme=NA, initiative=NA, accountId=714695224, brand=null, priority=1, preferredDisplayType=FULL_SCREEN, retriedCount=0)
17. For retry flow, we'd see the following message on DEC:
com.uki.platform.personalisation.mapper.MapToRetryDomain [] - Received message [{"messageId":"c51c6532-7cab-45c0-be52-78588f23b966",
"urn":"flutter:messaging:promoSBC","params":{"attemptId":"1737980793975","optInState":"REWARD_AWARDED","promoUrl":"https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=RETRIEDCOUNT1","promoCode":"RETRIEDCOUNT1"},
"context":{"decisionModelName":"sbcDecisionModel","decisionModelVariantName":"sbc"},"expiryDate":"2025-01-28T13:55:01Z","programme":"NA","initiative":"NA","accountId":715239024,"brand":"SBG","priority":1,"preferredDisplayType":"FULL_SCREEN","retriedCount":1}]
18. TIM is skipped from retry part of the flow
19. FRED sends event to DES:
com.uki.platform.personalisation.fred.client.des.DesService [pool-3-thread-51] INFO cid= - Sending TIM CloudEvent ID 1af31e84-e8f6-47e4-a8c8-b89a784c32dc with type uki.ihd.reward.sbc to DES endpoint http://sbc-decision-nxt.personalisation-sbc-decision-nxt.svc.cluster.local
20. DES returns decision to FRED:
com.uki.platform.personalisation.fred.client.des.DesService [pool-3-thread-51] INFO cid= - DES returns decision for event 1af31e84-e8f6-47e4-a8c8-b89a784c32dc with type uki.ihd.decision.sbc.reward
21. FRED sends event to BCG:
com.uki.platform.personalisation.fred.client.bcg.BcgService [pool-3-thread-51] INFO cid= - Sending Message to BCG for cloudEvent ID 1af31e84-e8f6-47e4-a8c8-b89a784c32dc,
type uki.ihd.decision.sbc.reward with payload {"accountId":714695224,"programme":"NA","initiative":"NA","messages":[{"messageId":"1af31e84-e8f6-47e4-a8c8-b89a784c32dc",
"expiryDate":"2025-01-24T11:18:55.983Z","payload":{"urn":"flutter:messaging:promoSBC","params":{"attemptId":"1737712316350","optInState":"REWARD_AWARDED",
"promoUrl":"https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3","promoCode":"CALLISTOTESTPAT3"}},"preferences":[{"channels":[{"channel":"ON_SITE","displayType":"TOAST"}]},{"channels":[{"channel":"MESSAGE_QUEUE","displayType":"FULL_SCREEN"}]}],"priority":1}],"context":{"decisionModelName":"sbcDecisionModel","decisionModelVariantName":"sbc"}}
com.uki.platform.personalisation.fred.consumer.TIMCloudEventListener [pool-3-thread-51] INFO cid= - MsgId: 1af31e84-e8f6-47e4-a8c8-b89a784c32dc - Timings { source: 2025-01-24T10:18:56.112Z,
ihdEntry: 2025-01-24T10:18:56.305107516Z, dec: 2025-01-24T10:18:56.305339499Z, tim: 2025-01-24T10:18:56.325968974Z, des: 2025-01-24T10:18:56.367183Z, fred: 2025-01-24T10:18:56.368146015Z
22. BCG, note the retriedCount section contains the number of times the message delivery has been attempted:
2025-01-24 10:18:56,441 INFO [com.ppb.pla.per.msq.dao.MessageDao] (Lambda Thread (NORMAL)) Message Message(messageId=1af31e84-e8f6-47e4-a8c8-b89a784c32dc, urn=flutter:messaging:promoSBC,
params={attemptId=1737712316350, optInState=REWARD_AWARDED, promoUrl=https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3, promoCode=CALLISTOTESTPAT3},
context={decisionModelName=sbcDecisionModel, decisionModelVariantName=sbc}, expiryDate=2025-01-24T11:18:55.983Z, programme=NA, initiative=NA, accountId=714695224, brand=null, priority=1, preferredDisplayType=FULL_SCREEN, retriedCount=1)
Scenario 2: Reward is granted and user spends it before seeing the message
Logs as in the previous section up to step 16, plus the following MSQ log.
Message is deleted from the queue in MSQ after DeleteMessageInstruction is produced in TIM:
[com.ppb.pla.per.msq.DeleteMessage] (Lambda Thread (NORMAL)) Successfully deleted message with messageId:1af31e84-e8f6-47e4-a8c8-b89a784c32dc and accountId :714695224
Scenario 3: First Week Unqualification
- Customer opts into the promotion
- Customer doesn't place qualifying bet/bets for the first cycle
MKEL logs:[kafka-consumer-1] [rid=ie1-eppm01b-nxt-01261341-000000aa52] [accountId=714840633] [flow=SbcReportFirstWeekNonQualificationFlow] c.f.p.c.e.j.CouchbaseJobRepository - Getting job with id [SBG:sbc:SbcReportFirstWeekNonQualificationFlow:714840633]
- DEC received opt-in logs as in the first scenario, then a week one unqualification activity (we use the messageId from that activity to search in the other application logs as per the first scenario):
com.uki.platform.personalisation.mapper.MapToDomain [] - Mapped event {"accountId": 714695224, "promoCode": "CALLISTOTESTPAT3", "customerPromotionStatus": "NOT_QUALIFIED"} to domain: DisqualificationEvent[messageId=d627b268-c374-40bd-9323-e341e36403ef, accountId=714695224, promoCode=CALLISTOTESTPAT3, inactivityPeriod=WEEK1]
com.uki.platform.personalisation.mapper.MapToCloudEvent [] - Collected CloudEvent [id:d627b268-c374-40bd-9323-e341e36403ef, subject:714695224:CALLISTOTESTPAT3, source:/ihd/eppm/activity/sbg, type:uki.ihd.unqualification, time:2025-01-24T11:18:57.765827252Z, ihdEntryTime:2025-01-24T11:18:57.765794021Z, decTime:2025-01-24T11:18:57.765827252Z]
- Week one unqualification skips TIM and goes directly to FRED.
- FRED receives the CloudEvent directly from DEC:
com.uki.platform.personalisation.fred.consumer.TIMCloudEventListener [pool-3-thread-78] INFO cid= - MsgId: d627b268-c374-40bd-9323-e341e36403ef - Timings { source: 2025-01-24T11:18:57.765817952Z, ihdEntry: 2025-01-24T11:18:57.765794021Z, dec: 2025-01-24T11:18:57.765827252Z, tim: null, des: 2025-01-24T11:18:57.777629Z, fred: 2025-01-24T11:18:57.778153318Z
- FRED sends the CloudEvent to DES:
com.uki.platform.personalisation.fred.client.des.DesService [pool-3-thread-78] INFO cid= - Sending TIM CloudEvent ID d627b268-c374-40bd-9323-e341e36403ef with type uki.ihd.unqualification to DES endpoint http://sbc-unqualification-nxt.personalisation-sbc-unqualification-nxt.svc.cluster.local
- DES returns a decision to FRED for the CloudEvent:
com.uki.platform.personalisation.fred.client.des.DesService [pool-3-thread-78] INFO cid= - DES returns decision for event d627b268-c374-40bd-9323-e341e36403ef with type uki.ihd.decision.unqualification
- FRED sends CloudEvent to BCG:
com.uki.platform.personalisation.fred.client.bcg.BcgService [pool-3-thread-78] INFO cid= - Sending Message to BCG for cloudEvent ID d627b268-c374-40bd-9323-e341e36403ef, type uki.ihd.decision.unqualification with payload {"accountId":714695224,"programme":"NA","initiative":"NA","messages":[{"messageId":"d627b268-c374-40bd-9323-e341e36403ef","expiryDate":"2025-01-26T23:59:59.777565Z","payload":{"urn":"flutter:messaging:nonQualifyWeekOneSBC","params":{"inactivityPeriod":"WEEK1","promoCode":"CALLISTOTESTPAT3"}},"preferences":[{"channels":[{"channel":"ON_SITE","displayType":"TOAST"}]},{"channels":[{"channel":"MESSAGE_QUEUE","displayType":"TOAST"}]}],"priority":0}],"context":{}}
- BCG receives the message and tries to send to OSG:
com.ppb.platform.personalisation.service.onsite.OnSiteService [pool-2-thread-20] INFO cid= - Going to send messageId d627b268-c374-40bd-9323-e341e36403ef
- Customer is not online, so OSG can't deliver message:
com.ppb.platform.personalisation.messaging.client.osg.impl.OnSiteGatewayClientImpl [pool-2-thread-20] ERROR cid= - Not found onsite customer for request with message id: d627b268-c374-40bd-9323-e341e36403ef
- Message goes back to BCG to be sent to MSQ:
{ [-] accountId: 714695224 context: { [+] } date: 2025-01-24T11:18:57.889707931Z expiryDate: 2025-01-26T23:59:59.777565Z messageId: d627b268-c374-40bd-9323-e341e36403ef overallStatus: ATTEMPTED params: { [+] } preferences: [ [+] ] urn: flutter:messaging:nonQualifyWeekOneSBC }90dce522-66f5-4b41-9397-9f246159986e, POST /BroadcastGateway/v2/send, client=10.174.160.100, headers=[ce-fredtime:"2025-01-24T11:18:57.778153318Z", Accept:"application/json, application/*+json", ce-subject:"714695224:CALLISTOTESTPAT3", ce-specversion:"1.0", ce-id:"d627b268-c374-40bd-9323-e341e36403ef", Connection:"keep-alive", User-Agent:"Apache-HttpClient/5.3.1 (Java/21.0.2)", ce-sourcepublishedtime:"2025-01-24T11:18:57.765817952Z", ce-dectime:"2025-01-24T11:18:57.765827252Z", ce-time:"2025-01-24T11:18:57.777629Z", Host:"bcg-nxtsbg.bcg-nxtsbg.svc.cluster.local", Accept-Encoding:"gzip, x-gzip, deflate", ce-status:"DECISION", ce-source:"/ihd/decision/unqualification", ce-ihdentrytime:"2025-01-24T11:18:57.765794021Z", ce-brand:"SKYBET", ce-type:"uki.ihd.decision.unqualification", ce-destime:"2025-01-24T11:18:57.777629Z", Content-Length:"461", Content-Type:"application/json;charset=UTF-8"]
- MSQ receives the message and adds it to the queue:
2025-01-24 11:18:57,855 INFO [com.ppb.pla.per.msq.dao.MessageDao] (Lambda Thread (NORMAL)) Message Message(messageId=d627b268-c374-40bd-9323-e341e36403ef, urn=flutter:messaging:nonQualifyWeekOneSBC, params={inactivityPeriod=WEEK1, promoCode=CALLISTOTESTPAT3}, context={}, expiryDate=2025-01-26T23:59:59.777565Z, programme=NA, initiative=NA, accountId=714695224, brand=null, priority=0, preferredDisplayType=TOAST, retriedCount=0)
Scenario 4: Second Week Unqualification
- Customer opts into the promotion
- Customer doesn't do anything for the first week (see first week unqualification flow)
- DEC receives Unqualification CPP activity and processes it:
com.uki.platform.personalisation.mapper.MapToDomain [] - Processing CPPActivity [id:714695224, attemptId:1737721143624, messsageId:48eb8e70-b25f-4bb1-85de-bdbe2260ff2e, promoCode:CALLISTOTESTPAT3, optInExpiryDate:null, awaitingConsent:true, cancelConsent:uki.ihd.event.activity.CancelConsent@13889e06[userType=OPERATOR,additionalProperties={}], status: UNQUALIFIED, payout: null, criteriaProgress: []. removedBy: null, rewardProgress: []] com.uki.platform.personalisation.transformation.enrichment.EnrichmentFunction [] - CPPActivity post enrichment: uki.ihd.event.activity.CPPActivity@7e6013cd[accountId=714695224, attemptId=1737721143624,promoCode=CALLISTOTESTPAT3,awaitingConsent=true,cancelConsent=uki.ihd.event.activity.CancelConsent@46e4496a[userType=OPERATOR,additionalProperties={}], status=UNQUALIFIED,messageId=48eb8e70-b25f-4bb1-85de-bdbe2260ff2e,promoName=CALLISTO_SBC_PAT_TEST,optInExpiryDate=<null>,tags=[sbc, sbc_test], promoUrl=https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3,brand=SKYBET,payout=<null>,removedBy=<null>,criteriaProgress=[],rewardProgress=[]] com.uki.platform.personalisation.mapper.MapToCloudEvent [] - Collected CloudEvent [id:48eb8e70-b25f-4bb1-85de-bdbe2260ff2e, subject:714695224:CALLISTOTESTPAT3:1737721143624, source:/ihd/cpp/activity/sbg, type:uki.ihd.cpp.activity, time:2025-01-24T12:19:04.089652847Z, ihdEntryTime:2025-01-24T12:19:03.799572516Z, decTime:2025-01-24T12:19:04.089652847Z]
- TIM propagates Unqualification activity:
com.uki.platform.personalisation.mapper.MapFromCloudEvent [] - uki.ihd.event.activity.CPPActivity@4e84b9b[accountId=714695224, ttemptId=1737721143624,promoCode=CALLISTOTESTPAT3,awaitingConsent=true,status=UNQUALIFIED,messageId=48eb8e70-b25f-4bb1-85de-bdbe2260ff2e, promoName=CALLISTO_SBC_PAT_TEST,optInExpiryDate=<null>,tags=[sbc, sbc_test],promoUrl=https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3,payout=<null>, removedBy=<null>,criteriaProgress=[],rewardProgress=[]] com.uki.platform.personalisation.mapper.MapToCloudEvent [] - Mapping to CloudEvent : uki.ihd.event.activity.CPPActivity@33d93e6c[accountId=714695224,attemptId=1737721143624, promoCode=CALLISTOTESTPAT3,awaitingConsent=true,status=UNQUALIFIED,messageId=48eb8e70-b25f-4bb1-85de-bdbe2260ff2e,promoName=CALLISTO_SBC_PAT_TEST,optInExpiryDate=<null>, tags=[sbc, sbc_test],promoUrl=https://promos.skybet.com.nxt.ppbdev.com/promotion?promoCode=CALLISTOTESTPAT3,payout=<null>,removedBy=<null>,criteriaProgress=[],rewardProgress=[]]
- BCG sends message to OSG to attempt delivery to customer, but customer is not online:
{ [-] accountId: 714695224 context: { [+] } date: 2025-01-24T12:19:04.321763086Z expiryDate: 2025-01-26T23:59:59.221468Z messageId: 48eb8e70-b25f-4bb1-85de-bdbe2260ff2e overallStatus: ATTEMPTED params: { [+] } preferences: [ [+] ] urn: flutter:messaging:nonQualifyWeekTwoSBC } com.ppb.platform.personalisation.service.onsite.OnSiteService [pool-2-thread-4] INFO cid= - Going to send messageId 48eb8e70-b25f-4bb1-85de-bdbe2260ff2e com.ppb.platform.personalisation.messaging.client.osg.impl.OnSiteGatewayClientImpl [pool-2-thread-4] ERROR cid= - Not found onsite customer for request with message id: 48eb8e70-b25f-4bb1-85de-bdbe2260ff2e
- Message is sent to MSQ to be added to the queue:
[com.ppb.pla.per.msq.dao.MessageDao] (Lambda Thread (NORMAL)) Message Message(messageId=48eb8e70-b25f-4bb1-85de-bdbe2260ff2e, urn=flutter:messaging:nonQualifyWeekTwoSBC, params={inactivityPeriod=WEEK2, promoCode=CALLISTOTESTPAT3}, context={}, expiryDate=2025-01-26T23:59:59.221468Z, programme=NA, initiative=NA, accountId=714695224, brand=null, priority=0, preferredDisplayType=TOAST, retriedCount=0)