Skip to content

DEV-3438: Yodlee Soft-Refresh Async

FieldValue
KeyDEV-3438
SummaryPut Yodlee soft-refresh into async job
StatusTo Do
PriorityMedium
AssigneeHeli Yin
Parent EpicDEV-3901: Investigate and optimise nightly sync
Created2020-11-19

User (ID: 54618, Household: 226359) cannot see the manual refresh button on Profile > Net Worth page. The root cause is that Yodlee soft-refresh frequently times out during synchronous execution.

Put Yodlee soft-refresh into a scheduled nightly sync job.

Update (2026-01-19): Nightly sync is not suitable for Yodlee because:

  1. Yodlee’s refresh mechanism is passively triggered
  2. Data only refreshes when active advisors/households trigger API calls
  3. Unlike Morningstar/ByAllAccounts, Yodlee has no proactive scheduled sync API
  4. startProviderAccountRefresh can only be called within user session context
FilePurpose
retail-api/app/Http/Controllers/.../YodleeProviderAccountRefreshController.phpRefresh controller (initiate/poll)
retail-api/app/Integrations/Yodlee/Api.phpYodlee API wrapper
retail-api/app/Integrations/Yodlee/Integrator.phpBusiness logic, status mapping, rate limiting
retail-api/app/Models/YodleeProviderAccount.phpModel with lock mechanism
User triggers POST → Acquire Redis distributed lock (20 min)
→ Call Yodlee API: PUT providerAccounts?providerAccountIds={id}
→ Return 202 (in progress) or 200 (complete)
User polls GET → Call Yodlee API: GET providerAccounts/{id}
→ Return action_required based on status
→ Release lock when complete
AspectImplementation
ModeSynchronous polling (no background jobs)
LockRedis distributed lock, 20 min timeout
Rate LimitMax 9 status checks per 120 seconds
TokenJWT RS512, 25 min cache
  1. No async processing: All operations block request threads
  2. 20 min lock timeout: Too long, masks stuck processes
  3. Silent rate limiting: Errors suppressed when rate limit hit, user unaware
  4. User-activity dependent: Yodlee only refreshes on user activity

Move refresh operation into Laravel Queue, frontend continues polling for results.

Pros:

  • Does not block HTTP request threads
  • Leverages existing queue infrastructure

Cons:

  • Still requires frontend polling
  • Queue worker still synchronously waits for Yodlee

Use Yodlee’s webhook notification mechanism to avoid polling.

Pros:

  • Truly async, no polling needed
  • Yodlee proactively notifies on completion

Cons:

  • Need to configure webhook endpoint
  • Need to handle webhook verification
  • Frontend needs WebSocket/SSE for real-time updates
  1. Initial request goes to queue
  2. Short-term uses polling (first 30 seconds)
  3. Long-term waiting uses webhook notification
  • Research Yodlee webhook API documentation
  • Evaluate current queue infrastructure capabilities
  • Discuss real-time notification approach with frontend team
  • Create detailed technical proposal
KeySummaryStatus
ENGR-5746Manual refresh button does not appear on Net WorthDone
DEV-5001Duplicate entry constraint violation for yodleeDone