Changes for page How-To: Revenue Recognition & Export
Last modified by Admin User on 2026/07/30 19:10
From version 7.1
edited by Admin User
on 2026/07/30 19:10
on 2026/07/30 19:10
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 4 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -How-To: Revenue Recognition & Export - Content
-
... ... @@ -1,5 +2,22 @@ 1 - 2 2 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 +ONEcount Fulfillment 14 + Revenue Recognition & 15 + Financial Export 16 + 17 +Earned vs. deferred revenue, GL mapping, 18 + automated journal entries, and Superset dashboards 19 + 3 3 = 1. Overview = 4 4 5 5 ONEcount computes subscription revenue recognition (earned vs. deferred revenue) and produces GL-mapped financial exports that your accounting team can import into their ERP system (NetSuite, QuickBooks, Sage, etc.). ... ... @@ -7,7 +7,7 @@ 7 7 The revenue recognition system has three layers: 8 8 9 9 * Compute — a scheduled job that reads payment events and subscription data, computes how much revenue was earned in each period, and how much remains deferred. 10 -* Visualize — ONEcountBIdashboards showing deferred revenue waterfall, earned revenue trend, and payment analysis.27 +* Visualize — Superset dashboards showing deferred revenue waterfall, earned revenue trend, and payment analysis. 11 11 * Export — GL-mapped journal entries in CSV or JSON format, deliverable via download, REST API, or SFTP. 12 12 13 13 = 2. Revenue Recognition Models = ... ... @@ -41,6 +41,28 @@ 41 41 42 42 This model is appropriate for publications where the delivery of each issue is the performance obligation (the event that triggers revenue recognition under ASC 606). 43 43 61 += 3. Running the Revenue Compute Job = 62 + 63 +Revenue recognition is computed by a scheduled job that runs nightly (or on demand). The job processes all active paid subscriptions for each publication and writes the earned/deferred allocation to Cassandra. 64 + 65 +== 3.1 Command == 66 + 67 +Run from the command line: 68 + 69 +* All publications for current month: php scripts/compute_revenue_schedule.php ~-~-silo=yoursilo 70 +* Specific publication: php scripts/compute_revenue_schedule.php ~-~-silo=yoursilo ~-~-pub=1 71 +* Specific month: php scripts/compute_revenue_schedule.php ~-~-silo=yoursilo ~-~-month=202607 72 + 73 +== 3.2 Cron schedule == 74 + 75 +Recommended cron entry (run nightly at 2 AM): 76 + 77 +**0 2 * * * php /pub/cust/scripts/compute_revenue_schedule.php ~-~-silo=yoursilo** 78 + 79 +== 3.3 Output == 80 + 81 +The job prints a summary to stdout showing subscriptions processed, earned revenue, deferred revenue, and refunds for each publication. The detailed per-subscriber schedule is written to Cassandra (revenue_schedule_by_subscriber) and the aggregates are written to revenue_summary_by_month. 82 + 44 44 = 4. GL Account Mapping = 45 45 46 46 Before you can export financial data, you need to map each event type to your chart of accounts. This tells the export system which GL account code to use for each type of journal entry. ... ... @@ -120,17 +120,25 @@ 120 120 * reference — publication identifier + period (e.g., AVIATORSGUIDE-202607). 121 121 * description — human-readable description of the entry. 122 122 123 -= 6. ONEcountBIDashboards =162 += 6. Superset Dashboards = 124 124 125 - ONEcountsynchronizesitspayment events and revenue summary datacontinuously,andit isavailable asONEcountBIdatasets. Thereare two collections:164 +After the MongoDB sync job runs, payment events and revenue summary data are available as Superset datasets. The sync job creates two MongoDB collections: 126 126 127 127 * payment_events — one document per payment event (charge, refund, renewal, failure). Includes amount in both cents and dollars, event type, publication, subscriber, and timestamps. 128 128 * revenue_summary — one document per publication per month. Includes earned, deferred, refunded, and new orders in both cents and dollars. 129 129 130 -== 6. 2Existingcharts ==169 +== 6.1 Running the sync == 131 131 132 - In ONEcountBI under"AudienceRevenue"tabof themain dashboard youwill seethefollowing charts:171 +Run after the revenue compute job: 133 133 173 +**php scripts/sync_payments_to_mongo.php ~-~-silo=yoursilo ~-~-month=202607** 174 + 175 +Recommended cron: run at 3 AM, one hour after the revenue compute job. 176 + 177 +== 6.2 Suggested charts == 178 + 179 +With the data in Superset, you can build: 180 + 134 134 * Deferred revenue waterfall — monthly bars showing opening balance, new orders added, revenue earned (reducing the liability), refunds, and closing balance. 135 135 * Earned revenue trend — line chart of monthly earned revenue per publication, with prior-year comparison. 136 136 * Payment method distribution — pie chart of card brand breakdown (Visa, Mastercard, Amex) from payment_events. ... ... @@ -147,8 +147,18 @@ 147 147 148 148 You must configure GL account codes before exports work. Go to Fulfillment, then Setup, then GL Account Mapping. Select the publication and enter your chart of accounts. 149 149 150 -== ONEcountBIshowsstaledata==197 +== MongoDB sync fails with connection error == 151 151 152 - ONEcountBIreadsfromasummarizeddata set,which ispopulatedby a continuous syncjob.If thesync jobhas not runsincethelastrevenuecompute, theONEcount BIdatawillbe stale.If you encounter staledata for more than 24 hours, pleasecontactyourONEcount account manager.199 +The sync script connects to MongoDB using the host configured in your silo's system-configs-ocdb.cnf. Verify the MongoDB host is reachable and the database name matches your silo. 153 153 154 - 201 +== Superset shows stale data == 202 + 203 +Superset reads from MongoDB, which is populated by the sync job. If the sync job has not run since the last revenue compute, the Superset data will be stale. Run the sync job and refresh the Superset dataset. 204 + 205 += 8. Where to Learn More = 206 + 207 +* ASC 606 revenue recognition standard overview: fasb.org/page/PageContent?pageId=/standards/606.html 208 +* Stripe Payments How-To: docs/fulfillment/howto-stripe-payments/ 209 +* Recurring Billing How-To: docs/fulfillment/howto-recurring-billing/ 210 +* CDS Global financial export format (industry reference): contact your CDS Global account representative for file specs. 211 +* Architecture Decision Record: docs/decisions/0005-stripe-payments-revenue-recognition.md
- fulfillment-revenue-export-howto_24be28444b4e62f9.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.admin - Size
-
... ... @@ -1,1 +1,0 @@ 1 -78.9 KB - Content
- fulfillment-revenue-export-howto_40366f7770be3c6d.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.admin - Size
-
... ... @@ -1,1 +1,0 @@ 1 -102.1 KB - Content
- fulfillment-revenue-export-howto_71339635f9a45a56.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.admin - Size
-
... ... @@ -1,1 +1,0 @@ 1 -51.9 KB - Content
- fulfillment-revenue-export-howto_73f401e66b5b1a8c.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.admin - Size
-
... ... @@ -1,1 +1,0 @@ 1 -78.5 KB - Content