This is a common issue with custom loyalty dashboard implementations in AEC 2022. The problem involves three interconnected configuration areas that all need to be properly set up:
1. Custom Component Asset Mapping
The UI SDK’s createBadge method requires explicit asset mapping configuration. Your current code is missing the asset resolver configuration:
const tierBadge = await loyaltySDK.components.createBadge({
tier: member.currentTier,
assetResolver: 'tier.metadata.badgeAssets.medium'
});
The assetResolver property tells the SDK where to find the badge URL in your tier object structure. The default path is tier.badge.url, but if your API returns a different structure, you need to specify the exact property path.
2. API Response Parsing
Log your actual API response to verify the structure. The tier object should contain badge assets in this format:
{
id: 'gold-tier',
name: 'Gold',
metadata: {
badgeAssets: {
small: 'https://cdn.adobe.com/badges/gold-small.png',
medium: 'https://cdn.adobe.com/badges/gold-medium.png',
large: 'https://cdn.adobe.com/badges/gold-large.png'
}
}
}
If your API returns badge URLs in a different structure, you have two options:
- Transform the response before passing it to the component
- Configure a custom asset resolver function that handles your specific structure
3. CDN/CORS Configuration
This is often the root cause when asset URLs are valid but images don’t load. AEC 2022’s asset CDN has strict CORS policies:
Step 1: Whitelist your domain
- Admin Console → Asset Management → CDN Settings
- Add your domain to ‘Allowed Origins’ (include both production and development domains)
- For local development, add
http://localhost:* as a wildcard
Step 2: Verify asset response headers
Open browser DevTools → Network tab and check the badge image request. The response should include:
Access-Control-Allow-Origin: your-domain.com
Access-Control-Allow-Methods: GET, OPTIONS
If these headers are missing, your domain isn’t properly whitelisted.
Step 3: Configure asset loading policy
In your UI SDK initialization, set the asset loading policy:
await loyaltySDK.init({
assetLoadingPolicy: 'cors',
corsCredentials: false
});
Testing Checklist:
- Verify tier objects have badge assets in the expected structure
- Check browser console for CORS errors (look for red error messages)
- Test badge loading with a tier that definitely has assets configured
- Use the SDK debug mode:
loyaltySDK.setDebugLevel('verbose') to see detailed asset loading logs
- Verify the CDN whitelist includes your current domain (check for typos or protocol mismatches)
If badges still don’t render after these fixes, the issue might be with how the loyalty program tiers were originally configured. In that case, you’ll need to re-upload the badge assets through the Loyalty Program admin interface with proper metadata tags.
This draft is based on general Adobe Experience Cloud knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.