An insurer changes the deadline for filing a service request. A customer Mini App, a staff workbench and a partner entry all call the same submission service. A customer opens a draft before the change and submits it afterwards. Which rule should the backend apply, and what should the customer see before the request goes through?

Use one explicit policy for that transition. This example uses server receipt time to choose the policy for each first submission. A policy evaluation that was already accepted is retained with the request, and a draft is evaluated afresh when it is submitted. These are example business decisions. A real transition may preserve earlier terms for a defined class of open drafts, which requires its own backend evidence and tests.

Define the decision and the time boundary

Assume that one class of service request has a deadline 30 days after its triggering event. The new policy allows 20 days and takes effect on 1 February 2027 at 00:00 UTC. For this illustrative rule, “days” means exact 24-hour periods and the deadline itself is inclusive. If your business uses local calendar days or business-day rules, implement that definition explicitly and test local clock boundaries.

Resolve the triggering event from an authorised business record. Use a trusted server timestamp captured according to your definition of receipt. A client clock and a timestamp supplied in a request payload should not choose the policy version. Give each revision a stable identifier that can be stored with an accepted decision.

The following evaluator is pure JavaScript. Its input dates are already validated milliseconds. The submission service supplies them after authentication, authorisation and lookup.

const DAY_MS = 86_400_000 const CUTOVER = Date.parse("2027-02-01T00:00:00Z") function evaluateDeadline({ eventAt, receivedAt }) { if (!Number.isSafeInteger(eventAt) || !Number.isSafeInteger(receivedAt) || eventAt > receivedAt) { throw new RangeError("Invalid decision timestamps") } const newRule = receivedAt >= CUTOVER const deadlineAt = eventAt + (newRule ? 20 : 30) * DAY_MS return { ruleVersion: newRule ? "deadline-v2" : "deadline-v1", deadlineAt: new Date(deadlineAt).toISOString(), eligible: receivedAt <= deadlineAt, } } 

Keep the role of the evaluator narrow. It answers the deadline question for valid input. The business service checks that the caller can act on the identified request, then applies any other policy and records the combined decision. The actual implementation needs a durable store and its own transaction boundary.

Give the UI a preview and the server the final decision

A preview endpoint can return an authoritative calculation for the time it was performed. A typical response might look like this.

{ "requestType": "example-service-request", "ruleVersion": "deadline-v1", "evaluatedAt": "2027-01-31T23:50:00Z", "deadlineAt": "2027-02-04T12:00:00.000Z", "status": "eligible" } 

A Mini App can present that result while the customer is preparing the request. On submit, the backend resolves the record again and calculates the final decision using its receipt time. If the deadline has changed and the submission is now ineligible, return a stable business status, the relevant explanation and a next step the channel can display. A timeout or an unavailable rules service is a separate outcome with a retry path.

Preview text should help the person understand when the result can change. When the service cannot refresh a preview, the UI can retain draft inputs and show that the deadline has yet to be confirmed.

Preserve accepted decisions and make retries predictable

On success, store the accepted request reference, rule version, receipt time and resulting deadline. Preserve the original result when the customer views the record after cutover. A later change to an accepted request belongs to a separate business process.

Define an idempotency key for submission if the service supports retries. Scope it to the authorised actor and operation, and associate it with the request payload or an equivalent intent. If the same intent succeeds and the reply is lost, a matching retry should return the established result. A reused key with a different intent needs a conflict response. Keep duplicate detection and the write of the accepted decision in the same consistency boundary.

Exercise the transition from each supported entry

Use predictable fixtures and run the same contract checks against the customer, staff and partner paths with the applicable permissions. The first three rows assume the triggering event was 5 January at 12:00 UTC.

Case Expected result
First receipt at 31 Jan 23:59:59 UTC The 30-day rule applies and the request is eligible.
First receipt at 1 Feb 00:00:00 UTC The 20-day rule applies and the request is past deadline.
Preview before cutover, first receipt after The submission result uses the new rule and the UI explains the change.
Accepted submission replayed with the matching key The service returns the original accepted decision without creating a second record.
Draft resumed after cutover The screen requests a fresh preview and preserves the user’s inputs.
Backend preview unavailable The screen shows it cannot confirm the deadline and offers a recovery path.

Include an exact-deadline fixture, an older supported client that has never seen the new policy revision, and a negative authorisation case for the partner. Verify that each channel can handle the response categories the endpoint may return. Where the interface must change, release a compatible reader before relying on the new response.

FinClip provides a runtime SDK, development tools and a management platform for Mini Apps. Its version management documentation describes experience, review and online versions that can be part of your test and rollout process. The example API, decision records and cutover policy are part of the insurer’s implementation. Test the backend rule and the Mini App display together, and record their release decisions separately.