Platform Features
Goal-met auto-close and victory post creation
What happens at goal
- Cumulative Gifts (pending + completed) reach the goal.
- The trigger
trg_auto_close_on_goal_hitfires on the donations table. The post''sis_closedflips to true. - The trigger
release_funds_on_post_closefires on the post. Every completed Gift on the post withpending_until IS NULLis set topending_until = now() + 24h— releasing held funds onto the standard post-close schedule. - No overflow. If a Gift would push past the goal,
make_wallet_donationeither rejects it (over_goal_amount: <remaining_cents>) or clamps it (ifp_clamp_overflow=true). The clamped portion goes onto the post; the overflow returns to the Giver''s wallet and is then re-attempted with no post tag. - You see a prompt. "Write a victory post."
What happens at end date
The daily cron close-expired-posts-daily runs at 01:00 UTC. Any post whose end_date is past closes — even if the goal wasn''t hit. The same fund-release trigger fires. You still see the victory-post prompt.
Why this matters
The goal-met auto-close + victory post flow is the engine of compounding trust on Xerish. Every closed post is a chance to:
- Show every Giver who participated what happened.
- Bring them back to the app at the highest-trust moment they''ve had with you.
- Build the next ask on top of a fresh proof point.
See content/victory-posts for the writing guidance.
What happens if you don''t write the victory post
Nothing technical breaks. The post stays closed. But the loop is left open in your followers'' minds. The next post you publish lands on a less-trusting audience than it would have.
Reopening a closed post
Only Xerish admin can reopen a closed post, via admin_reopen_post(p_post_id, p_reason). The reason is required (≥4 chars) and audit-logged. Organizations cannot reopen on their own — this is a doctrinal call: closed means closed.