How Rewards Programs Work (Capricorn, AMS)
Source: capricorn_controller.rb, ams_rewards_controller.rb
- Capricorn CSV download creates a temporary file on disk, sends it to the user, then deletes the file; date values are normalized to YYYY-MM-DD format
- AMS activation requires a username, partner name, and default auto club to be specified
- The AMS activation email is sent to AMS support (not to the customer or workshop); it includes the server's IP addresses for whitelisting purposes
- The first_setup flag, once completed, cannot be re-triggered through the UI — it requires a direct database change to reset
- Frequency codes use single-letter abbreviations: D (Daily), W (Weekly), F (Fortnightly), M (Monthly), Y (Yearly) — note the code displays "Fornightly" which is a typo for "Fortnightly"
Support scenarios
- "AMS activation isn't working" → Activation requires username, partner name, and default auto club to all be filled in. Also, the activation email goes to AMS support (not the workshop), so the workshop may need to follow up with AMS to complete the whitelisting of their server IPs.
- "We need to re-run the AMS first-time setup" → The first_setup flag cannot be re-triggered through the UI once it has been completed. A database change is required to reset this flag.
- "Capricorn CSV has wrong date format" → Dates are normalized to YYYY-MM-DD in the export. If the workshop's accounting software expects a different format, they need to convert it after download.
- "Frequency shows as 'Fornightly'" → This is a known typo in the code — it should read "Fortnightly." The functionality is correct; only the display label is misspelled.