Welcome to Zuora Labs
Zuora Labs is the environment where developers can get an early look of the latest Zuora platform features such as Custom Data Models and Data Query APIs. Try out these early features and give us feedback on the Zuora Labs community group to help shape the future direction of the platform!
With this initial launch, you'll be able to play with the:
Zuora Labs will also include real customer use cases to demonstrate the power of these latest technologies.
In this ‘Getting Started' guide, we will focus on the Vehicle Fleet Management example.
The Vehicle Fleet Management scenario shows how workflows and custom objects can automate the processes in the back end to enable a smoother subscription management for the business. We've set up Zuora Labs with custom objects and workflows to simulate this experience. This scenario is from a Fleet Management Billing Supervisor's perspective. The billing supervisor uses Zuora to manage:
|
This scenario uses a Zuora custom object to track the VIN of the vehicle with its associated Fleet Owner. Each fleet owner will have an inventory of vehicles with varying number services purchased and usage charges. This simulation will include usage charges for SiriusXM, Vehicle Tracker and Navigation.
|
Let's now take a look at how Workflow can automate the processes in the back end to enable a smoother subscription management for the business. We've set up Zuora Labs with custom objects and workflows to simulate this experience. |
Zuora Labs has predefined custom object, workflow, products and usage charges to simulate the Vehicle Fleet Management scenario.
The image below shows how the customer's experience and the business tasks can be automated using the Workflow app.

Now, let's see how this workflow is set up in Zuora.
Custom ObjectsNavigate to the left-hand menu and click the Data Models menu item to view the custom objects.
| |
Custom Object ‘fleetprovisioning_#' has the following fields:
(Note: The # on the fleet provisioning table will increment each time the workflow is run). Also this workflow includes a task to create a new custom object each time. While you wouldn't do this often in reality, this does provide an example of how to build a simple custom object using our API. In reality you'll want to leverage other custom object features such as multiple data types, cross referenced objects and much more.
| |
Product Rate Plans and Usage ChargesProduct, Product Rate Plan and Usage Charges for "Fleet Management" have been defined. You can view this product, CloudStream Vehicle Fleet Management, in the Product Catalog.
Usage charges for
| |
WorkflowsNext, let's see a list of Workflows to choose from.
| |
Zuora Labs has a pre-defined ‘Vehicle Fleet Management Set Up' workflow that can simulate the tasks in this scenario. |
Let's now execute the workflows and walk through the simulation.
The workflow called ‘Vehicle Fleet Management Set Up' completes the following tasks:

After executing the workflow (by clicking the play button), you can view the new subscription that gets created as well as generate an invoice to preview charges for feet owners.
You can view the new account by going to Customer Accounts, and look for the recently created billing account with the name beginning ‘Advised' (followed by a number).
You can compare the VINs between the custom object ‘fleet_provisioning' and its associated usage records.
Use the Data Model, under Platform, to view the records in the custom object, fleet_provisioning.
You are now ready to do a bill run and generate the new invoice. Click on ‘Customers', ‘Customer Accounts', look for a customer name beginning, ‘Avised - #', where ‘#' is a number like ‘2', click on the account name, scroll down to the ‘Transactions' panel, click on the ‘Invoices' tab and select ‘create bill run'. You can let all the values default, just change the last two fields to ‘06/01/2019' and click on ‘create bill run'. After a minute the bill run will have completed and you should be able to find a new invoice with all the May usage, like this one.Take a look!

The task that generates the usage records, ‘Gen Usage Records' (bottom right task), contains a significant chunk of Liquid code that you can review in the ‘Body' tab of the task. Click on the little pen icon on the task to bring up the task details. In this scenario Liquid is generating content for the payload of the REST action/create call. Each record in the custom table, fleetprovisioning_#, is iterated through and values for the standard usage fields such as account number, UOM, start date and quantity are determined based on the values found in the fleetprovisioning_# record.
In Liquid {% ... %} statements are basically code, anything in double curly braces, {{ v_uom }} is an instruction to display the variable contents, v_uom being the variable in this example. The last few lines of this Body, starting at line 62, actually render the JSON payload for the usage record. You will see that:
For extra credit you could try modifying the Liquid so future dated service start dates are ignored entirely by NOT generating any usage record at all got that vehicle service. For extra extra extra credit add code to verify that the service end date isn't in the previous month, but if it is, then adjust the quantity to reflect the days in service up until the end date!