Skip to main content

Challenge Progress Bar

Use this guide when an app needs to display challenge progress for a customer, such as "buy 5 times this month" or "spend EUR100 before Sunday".

Core endpoints​

EndpointUse it for
GET /challengesList active challenge campaigns.
GET /challenges/{id}Read challenge configuration.
POST /challenges/{id}/enrollEnroll the customer when the challenge requires opt-in.
GET /customers/{value}/challengesRead all challenge progress for a customer.
GET /customers/{value}/challenges/{id}Read progress for one challenge.

Rendering flow​

Progress calculation for UI​

Render the progress bar from the API values:

progress_percent = min(current_value / target_value * 100, 100)

Always handle these states:

StateUI behavior
Not enrolledShow opt-in CTA if the challenge requires enrollment.
In progressShow current value, target value, and remaining amount.
CompletedShow completed state and reward/voucher messaging if applicable.
ExpiredHide action CTA or show expired state.
Not availableDo not show the challenge if it is outside availability or not visible to the customer.

Challenge dates and targeted delivery​

Challenges can combine several date concepts:

  • Availability dates: when the challenge can be visible/playable/enrollable.
  • Expiration date: when progress can no longer complete.
  • Targeted delivery send dates: when the campaign communication or voucher assignment is sent to customers.
  • Recurrence: targeted deliveries can be sent repeatedly, but the challenge must still be active for the whole period where customers are expected to progress.

If a challenge is promoted through recurring targeted deliveries, keep the challenge active for the full recurrence period, not only for the send day.

Freshness and recalculation​

Challenge progress may depend on calculated attributes or cart events. If a customer just made a purchase and the progress did not update immediately, check the configured recalculation frequency and whether the relevant cart/custom event has been processed.

Troubleshooting​

SymptomWhat to check
Progress stays at zeroCustomer ID, challenge enrollment, calculated attribute freshness, event ingestion, and whether the challenge condition matches the cart data.
Progress reaches target but no voucher appearsChallenge completion action, targeted delivery/voucher generation, reward configuration, and customer voucher list.
Challenge appears after it should endAvailability, expiration, recurrence, and app-side cache.
App shows a challenge the customer cannot joinAudience, enrollment requirement, customer status, and challenge visibility conditions.