Last modified by Admin User on 2026/07/30 19:10

From version 4.1
edited by Admin User
on 2026/07/30 19:03
Change comment: There is no comment for this version
To version 7.1
edited by Admin User
on 2026/07/30 19:10
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -1. Overview
1 +How-To: Revenue Recognition & Export
Content
... ... @@ -1,22 +1,5 @@
1 +
1 1  
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 -
20 20  = 1. Overview =
21 21  
22 22  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.).
... ... @@ -24,7 +24,7 @@
24 24  The revenue recognition system has three layers:
25 25  
26 26  * 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.
27 -* Visualize — Superset dashboards showing deferred revenue waterfall, earned revenue trend, and payment analysis.
10 +* Visualize — ONEcount BI dashboards showing deferred revenue waterfall, earned revenue trend, and payment analysis.
28 28  * Export — GL-mapped journal entries in CSV or JSON format, deliverable via download, REST API, or SFTP.
29 29  
30 30  = 2. Revenue Recognition Models =
... ... @@ -58,28 +58,6 @@
58 58  
59 59  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).
60 60  
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 -
83 83  = 4. GL Account Mapping =
84 84  
85 85  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.
... ... @@ -159,25 +159,17 @@
159 159  * reference — publication identifier + period (e.g., AVIATORSGUIDE-202607).
160 160  * description — human-readable description of the entry.
161 161  
162 -= 6. Superset Dashboards =
123 += 6. ONEcount BI Dashboards =
163 163  
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:
125 +ONEcount synchronizes its payment events and revenue summary data continuously, and it is available as ONEcount BI datasets. There are two collections:
165 165  
166 166  * payment_events — one document per payment event (charge, refund, renewal, failure). Includes amount in both cents and dollars, event type, publication, subscriber, and timestamps.
167 167  * revenue_summary — one document per publication per month. Includes earned, deferred, refunded, and new orders in both cents and dollars.
168 168  
169 -== 6.1 Running the sync ==
130 +== 6.2 Existing charts ==
170 170  
171 -Run after the revenue compute job:
132 +In ONEcount BI under "Audience Revenue" tab of the main dashboard you will see the following charts:
172 172  
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 -
181 181  * Deferred revenue waterfall — monthly bars showing opening balance, new orders added, revenue earned (reducing the liability), refunds, and closing balance.
182 182  * Earned revenue trend — line chart of monthly earned revenue per publication, with prior-year comparison.
183 183  * Payment method distribution — pie chart of card brand breakdown (Visa, Mastercard, Amex) from payment_events.
... ... @@ -194,18 +194,8 @@
194 194  
195 195  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.
196 196  
197 -== MongoDB sync fails with connection error ==
150 +== ONEcount BI shows stale data ==
198 198  
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.
152 +ONEcount BI reads from a summarized data set, which is populated by a continuous sync job. If the sync job has not run since the last revenue compute, the ONEcount BI data will be stale. If you encounter stale data for more than 24 hours, please contact your ONEcount account manager.
200 200  
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
154 +
fulfillment-revenue-export-howto_40366f7770be3c6d.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.admin
Size
... ... @@ -1,0 +1,1 @@
1 +102.1 KB
Content
fulfillment-revenue-export-howto_71339635f9a45a56.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.admin
Size
... ... @@ -1,0 +1,1 @@
1 +51.9 KB
Content