Skip to main content

Zuora Revenue data object model

Zuora

Zuora Revenue data object model

Workflow data model bundles all the revenue data, which can be extracted as the revenue-only data or the billing and revenue integrated data in a fast and optimal method. These data models can help you to build use case reports. For example, you can create views over the data model for features such as analytical dashboards and data queries. It is recommended for the user to have data model and SQL technical expertise before creating views and writing queries.

Revenue object data model

The following diagram is a high-level view of how key data objects are related to one another within Zuora Revenue.

Secure Share - Revenue Data Model_Diagram.png

Revenue objects and descriptions

The following objects are present in the data model. Click the name of each object for more details.

RevenueContracts: Contains the details of distinct revenue contracts (RC) based on the defined RC grouping template.

RevenueCalendar: Contains the details of the accounting calendar that are configured in Zuora Revenue.

RevenuePeriods: Contains the open period details.

RevenueContractLinesDimensions: Contains the sales order transaction dimensional details.

RevenueContractLinesFacts: Contains the sales order transaction fact details.

RevenueContractBillsDimensions: Contains the billing transaction dimensional details, which include transaction types such as INV, CM, CM-R, CM-C, CM-RO, and RORD.

RevenueContractBillsFacts: Contains the billing transaction fact, which includes transaction types such as INV, CM, CM-R, CM-C, CM-RO, and RORD.

RevenueContractCostDimensions: Contains the cost transaction dimensional details of both standard standard and user-defined cost.

RevenueContractCostFacts: Contains the cost transaction fact, which includes both standard and user-defined costs.

RevenueContractMJEntriesDimensions: Contains the manual journal transaction dimensional details.

RevenueContractMJEntriesFacts: Contains the Manual journal transaction fact details.

RevenueContractVCDimensions: Contains the variable consideration (VC) transaction dimensional details of both standard and user-defined costs.

RevenueContractVCFacts: Contains the variable consideration transaction fact, which includes both standard and user-defined VC.

RevenueContractAccountingType: Contains the accounting type details of every Accounting entries.

RevenueContractAccountingSegments: Contains the Accounting segments details for deferring and releasing segments of every accounting entry.

RevenueContractHolds: Contains the details of revenue contract hold at all the line level, POB level, and Revenue Contract level.

RevenueContractApprovals: Contains the details of revenue contract approvals and their history.

RevenueContractAccountingEntries: Contains the accounting entries / journal entries of every transaction based on its performance obligation template.

RevenueContractActions: Contains the details of every revenue contract POB's release and deferral actions thats are taken by both the system and manual operation.

RevenueContractAccountingEntrySummary: Contains the report level data such as additions, releases, beginning balance, ending balance, and so on.

 

To learn about the data dictionary for Revenue objects, see Data entry details.

Creating views based on the data model

The following sample queries show how to create the views that are required for building any use case-specific reports or analytical dashboards.

RC Rollforward report sample query

The following sample query shows how to get the RC Rollforward report with limited fields. You can customize the query to add any number of attributes to the RC Rollforward report.

SELECT  CustomerName
,sum(ReportingAddition) TotalReportingAddition
,sum(ReportingRelease) TotalReportingRelease
,sum(ReportingBeginBalance) TotalReportingBeginBalance
,sum(ReportingEndingBalance) TotalReportingEndingBalance
FROM REVENUECONTRACTACCOUNTINGENTRYSUMMARY schd,REVENUECONTRACTLINESDIMENSIONS line, REVENUECONTRACTACCOUNTINGTYPE acct
WHERE schd.RevenueContractLineID = line.RevenueContractLineID
  AND schd.accountingtypeid = acct.revenueaccounttypeid
  AND acct.BALANCE_SHEET_ACCT_FLAG = 'Y'
  AND schd.schd_type_flag in ('R','A')
  AND schd.revenueclientid = line.revenueclientid
  AND schd.revenueorganizationcode = line.revenueorganizationcode
  AND schd.revenuebookid = line.revenuebookid
GROUP BY CustomerName;

Line level transactional report sample query

The following sample query shows how to get the line-level transactional report with limited fields including the booking, billing, and accounting details. You can customize the query to add any number of attributes to the line level transaction report.

SELECT 
  rcld.revenuecontractlineid, 
  rcld.revenueorganizationname, 
  rcld.revenuebookname, 
  rcld.revenuecontractid, 
  rcld.salesordernumber, 
  rcld.salesorderlinenumber, 
  rcld.itemnumber, 
  rcld.customernumber, 
  rcld.productcategory, 
  rcld.productfamily, 
  rcld.businessunit, 
  SUM(rclf.extendedsellprice) extendedsellprice, 
  SUM(rclf.carveadjustment) carveadjustment, 
  SUM(rclf.allocatedextendedprice) allocatedextendedprice, 
  SUM(rclf.unreleasedrevenue) unreleasedrevenue,
  SUM(rclf.releasedrevenue) releasedrevenue,
  SUM(rcbf.billingextendedsellprice) billingextendedseliprice, 
  SUM(rcbf.billingdeferedamount) billingunreleasedrevenue, 
  SUM(rcbf.billingrecognizedamount) billingreleasedrevenue, 
  SUM(rcae.transactioncreditamount) transactionalnetrevenue, 
  SUM(rcae.transactionbilledcreditamount) transactionalbilledrevenue, 
  SUM(rcae.transactionunbilledcreditamount) transactionalunbilledrevenue, 
  SUM(rcae.transactioncarveadjustmentamount) transactionaladjustmentrevenue 
FROM RevenueContractLinesDimensions rcld, 
     RevenueContractLinesFacts rclf, 
     (SELECT /* Billings details */
      rcbf.revenuecontractlineid, 
      rcbf.revenueorganizationcode, 
      rcbf.revenueclientid, 
      rcbf.revenuebookid, 
      SUM(rcbf.billingextendedsellprice) billingextendedsellprice, 
      SUM(rcbf.deferedamount) billingdeferedamount, 
      SUM(rcbf.recognizedamount) billingrecognizedamount 
      FROM RevenueContractBillsFacts rcbf 
      GROUP BY 
      rcbf.revenuecontractlineid, 
      rcbf.revenueorganizationcode, 
      rcbf.revenueclientid, 
      rcbf.revenuebookid) rcbf, 
     (SELECT /* Revenue Accounting details */
      revenuecontractlineid, 
      revenueorganizationcode, 
      revenueclientid, 
      revenuebookid, 
      SUM(transactioncreditamount) transactioncreditamount,
      SUM(CASE WHEN accountingtypeid = 'R' AND unbilled_flag = 'N' THEN transactioncreditamount ELSE 0 END) transactionbilledcreditamount,
      SUM(CASE WHEN accountingtypeid = 'R' AND unbilled_flag = 'Y' THEN transactioncreditamount ELSE 0 END) transactionunbilledcreditamount,
      SUM(CASE WHEN accountingtypeid = 'X' THEN transactioncreditamount ELSE 0 END) transactioncarveadjustmentamount
      FROM RevenueContractAccountingEntries 
      WHERE accountingtypeid IN (SELECT revenueaccounttypeid 
                                 FROM RevenueContractAccountingType 
                                 WHERE wf_summ_type = 'Net Revenue') 
      GROUP BY 
      revenuecontractlineid, 
      revenueorganizationcode, 
      revenueclientid, 
      revenuebookid) rcae 
WHERE 
  rcld.revenuecontractlineid = rclf.revenuecontractlineid 
  AND rcld.revenueorganizationcode = rclf.revenueorganizationcode 
  AND rcld.revenueclientid = rclf.revenueclientid 
  AND rcld.revenuebookid = rclf.revenuebookid 
  AND rcld.revenuecontractlineid = rcbf.revenuecontractlineid (+) 
  AND rcld.revenueorganizationcode = rcbf.revenueorganizationcode (+) 
  AND rcld.revenueclientid = rcbf.revenueclientid (+) 
  AND rcld.revenuebookid = rcbf.revenuebookid (+) 
  AND rcae.revenuecontractlineid (+) = rcld.revenuecontractlineid 
  AND rcae.revenueorganizationcode (+) = rcld.revenueorganizationcode 
  AND rcae.revenueclientid (+) = rcld.revenueclientid 
  AND rcae.revenuebookid (+) = rcld.revenuebookid 
GROUP BY 
  rcld.revenuecontractlineid, 
  rcld.revenueorganizationname, 
  rcld.revenuebookname, 
  rcld.revenuecontractid, 
  rcld.salesordernumber, 
  rcld.salesorderlinenumber, 
  rcld.itemnumber, 
  rcld.customernumber, 
  rcld.productcategory, 
  rcld.productfamily, 
  rcld.businessunit;

Waterfall sample query

The following sample query shows how to get the waterfall report.

SELECT S.TENANT_ID,
       S.BILLING_TENANT_ID,
       C.ID AS ASOFPERIODID,
       S.REVENUESCHEDULEID ,
       S.REVENUECONTRACTLINEID,
       S.ROOTREVENUECONTRACTLINEID,
       S.SCHEDULEDPERIODID,
       S.POSTINGPERIODID,
       S.REVENUEORGANIZATIONCODE,
       S.REVENUEBOOKID,
       S.REVENUECLIENTID,
       S.ACCOUNTINGSEGMENT,
       S.ACCOUNTINGTYPEID,
       S.NETTING_ENTRY_FLAG,
       S.SCHD_TYPE_FLAG,
       (S.TRANSACTIONDEBITAMOUNT + S.TRANSACTIONCREDITAMOUNT) AS TACTIVITY,
       (S.FUNCTIONALDEBITAMOUNT + S.FUNCTIONALCREDITAMOUNT) AS FACTIVITY,
       (S.REPORTINGDEBITAMOUNT + S.REPORTINGCREDITAMOUNT) AS RACTIVITY,
       S.CREATEDACCOUNTINGPERIOD,
       S.CREATEDDATE,
       S.CREATEDBY,
       S.UPDATEDDATE,
       S.UPDATEBY,
       S.UPDATEDDATE AS INCREMENTALREFESHDATE
  FROM REVENUECONTRACTACCOUNTINGENTRIES S,
       CALENDAR_DIM C,
       REVENUECONTRACTACCOUNTINGTYPE A
 WHERE S.TENANT_ID = C.TENANT_ID
   AND S.TENANT_ID = A.TENANT_ID
   AND S.BILLING_TENANT_ID = C.BILLING_TENANT_ID
   AND S.BILLING_TENANT_ID = A.BILLING_TENANT_ID
   AND S.CREATEDACCOUNTINGPERIOD <= C.ID 
   AND S.SCHEDULEDPERIODID >= C.ID
   AND S.ACCOUNTINGTYPEID = A.REVENUEACCOUNTTYPEID
   AND A.WATERFALL_FLAG = 'Y'