Enterprise Wallet Upgradation
- Purpose: Upgrade local merchant wallets to enterprise wallets with enhanced identification
- Key Mechanism: Uses
enterpriseResponseSearchPathwith JSONPath to extract identifiers - Process Flow: Customer identification → Enterprise search → Extract values → Update wallet metadata
- Configuration: Set appropriate
merchantMetadataKeyandprecedencevalues for reliable matching - Upgrade Paths: Standard (direct MCID match) and Advanced (via enterpriseResponseSearchPath)
- Key Benefit: Seamless experience across merchants without customer needing to create new wallets
Overview
Enterprise Wallet Upgradation is a critical feature that allows local merchant-specific wallets to be enhanced with enterprise-level information. This capability creates a seamless customer experience by automatically upgrading existing local wallets to enterprise wallets when additional identification becomes available, without requiring any customer action.
By automatically upgrading local wallets to enterprise wallets, CCG can offer a consistent experience across different merchants while preserving customer payment history. This increases customer satisfaction and reduces friction during subsequent visits.
How Wallet Upgradation Works
When a customer interacts with a merchant system through the wallet service, the system can upgrade a local merchant-specific wallet to include enterprise-level information. This process involves:
- Identifying the customer using configured search criteria
- Finding the customer in enterprise identity systems
- Extracting additional identifiers from the enterprise response
- Using these identifiers to enhance the local wallet
The upgrade happens without any disruption to the customer experience, preserving all payment methods and transaction history.
Complete Configuration Example
{
"customerSearchCriteria": [
{
"value": {
"sourceCode": "CSP_Facets",
"dependentCode": "xxxx"
},
"merchantSearchKey": "$.metadata.dependentCode",
"enterpriseSearchKey": "identifiers.payer_memberId",
"enterpriseValueKey": "dependentCode",
"merchantMetadataKey": "dependentCode",
"enterpriseResponseSearchPath": "$.[*].identifiers.payer_memberId[*]['dependentCode']",
"precedence": 1,
"required": true
}
]
}
In this example:
- merchantSearchKey: Extracts dependentCode from customer request
- enterpriseSearchKey/enterpriseValueKey: Used for initial identity search
- enterpriseResponseSearchPath: Used to extract dependentCode from all payer_memberId entries in the response
- The
enterpriseResponseSearchPathfield is a JSONPath expression that defines where to look for specific values in the enterprise identity response. UnlikeenterpriseSearchKey(which uses dot notation),enterpriseResponseSearchPathuses full JSONPath syntax for more powerful querying capabilities.
- The
- merchantMetadataKey: Specifies where to store the extracted value in merchant metadata
Wallet Upgrade Process
Upgrade Process Flow
- Customer is identified in enterprise systems using configured search criteria
- System retrieves all
CustomerSearchCriteriawith configuredenterpriseResponseSearchPath - For each criterion, values are extracted from the enterprise response using
enterpriseResponseSearchPathbased on precedence - Values are stored in metadata using the keys specified in
merchantMetadataKey - If a local wallet is found in CCG, it's upgraded to an enterprise wallet, preserving all payment methods and history
Detailed Wallet Upgrade Sequence
Upgrade Paths
Understanding the Two Wallet Upgrade Paths
The wallet upgrade process supports two distinct paths for upgrading local wallets to enterprise wallets:
-
Standard Upgrade Path (
StandardUpgradeLocalWallet):- Triggered when a customer returns with the same MCID they used before
- The MCID in the customer identification request directly matches an existing local wallet
- Since the previous visit, this MCID has been associated with an enterprise record in EIMP
- Example: Customer returns to merchant with same patientID, which now has a matching enterprise record
-
Advanced Upgrade Path (
UpgradeLocalWallet):- Triggered through the more complex search criteria processing
- Uses
enterpriseResponseSearchPathto extract additional identifiers from enterprise responses - Handles more complex matching scenarios where direct MCID matching isn't sufficient
- Example: Customer identified via one MCID type but matched through a different identifier extracted from the enterprise response
Multiple Fallback Scenarios
The system supports multiple fallback sets through the precedence field at the CustomerSearchCriteria level:
- The system first tries to identify customers using the criteria set with the lowest precedence value
- If identification fails, it falls back to the next set based on precedence
- Within each set, the system extracts values using
enterpriseResponseSearchPathif configured
Example: A merchant might configure one set for dependentCode+subscriberId, and a fallback set for healthInsuranceExchangeId.
Use Cases
PatientID Wallet Evolution
When a customer initially interacts with a merchant using only patientID, a local wallet is created. On subsequent visits, if new enterprise information becomes available in EIMP for that patientID, the local wallet is automatically upgraded to an enterprise wallet, preserving all payment methods and transaction history while enabling enterprise-wide capabilities.
PatientID Wallet Evolution Example
Initial Visit (Local Wallet Creation):
- Customer visits a healthcare provider and is identified only by patientID
- CCG attempts to find an enterprise match using patientID but no match is found in EIMP
- CCG creates a local wallet for the customer using patientID
- Customer adds payment methods and completes transactions
Subsequent Visit (Wallet Upgrade):
- Same customer returns to the healthcare provider and is identified by the same patientID
- In the meantime, the customer's enterprise record has been created or updated in EIMP with this patientID
- During identification:
- CCG finds the existing local wallet using patientID
- CCG also now finds a match in EIMP using the same patientID
- CCG extracts additional enterprise identifiers (enterpriseId, subscriberId, etc.)
- CCG upgrades the local wallet to an enterprise wallet by:
- Associating it with the enterpriseId
- Adding extracted identifiers to merchant_customer_metadata
- Maintaining all existing payment methods and transaction history
- Customer now has an enterprise wallet that can be used across all merchants
This upgrade happens automatically during the customer identification process, requiring no additional action from the merchant or customer.
Healthcare Exchange ID Recognition
Customers initially identified with healthInsuranceExchangeId can have additional identifiers like subscriberId extracted and stored in their wallet.
Exchange ID Recognition Example
Scenario:
- Customer is initially identified by healthInsuranceExchangeId
- CCG searches EIMP with this identifier
- EIMP response contains additional identifiers (subscriberId, groupId, etc.)
- CCG extracts these identifiers using enterpriseResponseSearchPath
- These additional identifiers are stored in the wallet metadata
- On subsequent visits, the customer can be identified by any of these identifiers
Configuration Example:
{
"value": {
"sourceCode": "Exchange",
"healthInsuranceExchangeId": "HIX12345"
},
"merchantSearchKey": "$.metadata.healthInsuranceExchangeId",
"enterpriseSearchKey": "identifiers.payer_memberId",
"enterpriseValueKey": "healthInsuranceExchangeId",
"merchantMetadataKey": "healthInsuranceExchangeId",
"enterpriseResponseSearchPath": "$.[*].identifiers.payer_memberId[*]['healthInsuranceExchangeId', 'subscriberId', 'groupId']",
"precedence": 2,
"required": true
}
This configuration extracts not just the healthInsuranceExchangeId but also the associated subscriberId and groupId, enhancing the wallet's identification capabilities.
Multi-Identification Support
When a customer might be identified through multiple methods (e.g., either payer_memberId or surrogateId), the system can extract all relevant identifiers for future interactions.
Implementation Best Practices
-
⚠️ Configure precedence strategically: Set the
precedencefield inCustomerSearchCriteriabased on data volume considerations. Lower precedence (higher priority) should be assigned to criteria that query smaller, more specific datasets to optimize performance. Avoid assigning high priority to criteria that would query hundreds of thousands of records. -
Balance specificity and coverage: When configuring search criteria, find the optimal balance between highly specific identification (fewer false positives) and sufficient coverage (fewer false negatives).
-
Optimize JSONPath expressions: Keep
enterpriseResponseSearchPathexpressions as specific as possible to improve performance while ensuring they're robust enough to handle variations in the response structure. -
Test with representative data: Validate your configuration with a variety of real-world data scenarios, including edge cases like partial matches or missing fields.
Error Handling and Observability
The wallet upgrade process includes robust error handling:
- If
enterpriseResponseSearchPathdoesn't match any data, the system falls back to the next search criteria set - If enterprise identity lookup fails, the local wallet remains unchanged
- Validation errors are logged for debugging and monitoring purposes
Troubleshooting
When troubleshooting wallet upgrade issues, follow these steps:
- Verify that both
enterpriseResponseSearchPathandmerchantMetadataKeyare correctly configured - Check JSONPath syntax for errors using a JSONPath validator
- Validate that the response structure matches the expected path using sample responses
- Ensure proper precedence configuration for fallback behavior
- Verify that wallet metadata is being correctly updated in the database
Related Documentation
- Customer Creation - Explains the initial customer creation process
- Enterprise Settings Logic - Details on customer lookup using enterprise settings