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:

Labs Scenarios

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 Gamer Referral example.

What you'll learn

What you'll need

The Gamer Referral scenario shows a use case when a gamer signs up to monthly subscription for access to a library of games.

The Gamer can also refer a friend. To encourage referrals, the subscription company offers gamers a $10 credit on their next bill upon referring a friend.

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

Zuora Labs has set up pre-defined custom objects and workflows to walk you through the Gamer Referral scenario.

The image below shows how a customer's experience and associated business tasks can be automated using the Workflow app.

Now, let's see how this workflow is set up in Zuora.

Custom Objects

Navigate to the left panel menu and click Data Models to view custom objects.

A custom object named ‘game_slots' has been created to track the games used by each gamer. This custom object has the following fields:

  • Account Number
  • Added Date
  • Game Name

A second custom object, ‘gamer_activity' has been created that acts as a record of all gamer activity related to the account such as sign ups and referrals. This object contains the following fields:

  • Account Number
  • Account Name
  • Activity Date
  • Activity

Workflows

Next, let's see a list of Workflows to choose from.

Let's now execute the workflows and walk through the simulation.

The first workflow is called ‘Gamer Sign Up'. The User's name and Email are taken from the online registration that the gamer enters and these are the input parameters. Upon execution (click the play button on the workflow), the workflow first checks if the email address is a valid one. If it is, it completes the following tasks:

You can run the workflow multiple times to create more gamers.

The next workflow simulates a gamer referral process.

This workflow "Gamer Referral Emulation" does the following tasks:

Please note that if you run ‘Gamer Set Up' multiple times without running this Referral workflow you'll see a cloning effect as the friend account is created for each gamer account that doesn't already have a friend! Conversely if you run this workflow without first running Set Up it'll silently quit since there is nothing for the workflow to do. In a production environment you might want an email to go out, or some recorded in a log table that you monitor.

In the example above, we've used custom objects to enable some of the workflows. More custom objects may be needed based on a business's requirements. With Data Query, now it's possible to view information related to any custom objects that are created.

Let's see how in the next section.

Run the following data query to view the list of all the games and the number of people playing them:

select game_name__c, count(*)

from com_zlabs__game_slots

group by game_name__c

Be aware that the query results will not be displayed on screen. At this time, we're in Beta, so remember you have to download the query results as a csv file. You can also achieve the same by using APIs to submit queries and retrieve results independent of this UI.

While this scenario is quite simple, it attempts to introduce some likely new Zuora features, custom objects, and workflow, in a context that might be applicable to any business.

Workflow is a very powerful automation engine that is tightly integrated with Zuora. As you may be aware, almost all Zuora features, such as order capture, billing, payments, revenue, and reporting, can be invoked using our APIs. Further, Workflow provides an environment where you can orchestrate a repeatable set of actions and API calls that can be invoked again and again.

Today, you are running all the provided workflows by manually, but in a normal production environment, most workflows are either scheduled to run on a recurring basis or are invoked using their own unique API calls.

These sample workflows can be repeated and have minimal side effects, so they are atypical to what you might want to develop. Real Workflows set up for businesses often begin with a query before proceeding to take on more actions based on each record returned by that query. But in the sample Workflows we've set up, we are instead starting most use cases with a workflow that creates a billing account and subscription before a second workflow takes some actions based on that billing account and subscription. So the second workflow in these scenarios is often close to what you might want to design and implement.

In the above example, the first workflow is simple and creates a new billing account and subscription before continuing to record that activity in the two custom tables. The first workflow also prepares, but does not send, a ‘Welcome' email based on a template created using Liquid (a safe, customer-facing template language). Using Liquid with notifications is more flexible than the traditional event based notification email templates that Zuora's billing and payments has traditionally used.

Note that Liquid combined with access to any Zuora data object, including custom objects, is a very powerful combination and can enable much more complex workflows and tasks.

The second workflow, Gamer Referral, is more sophisticated. After some basic data validation and collection, the friend's billing account is created and the referrer receives a $10 credit memo. We also introduce the idea of different actions being taken by a workflow when something unexpected occurs.

If you are already familiar with SQL, you might want to go back to the Data Query page and try creating a SQL statement that joins the two custom tables together, they are called, ‘com_zlabs__game_slots' and ‘com_zlabs__game_activity'. Both share an account number field that will also join to the billing account object, ‘account'.

You can also try the following:

While both workflows have examples of populating an existing custom object using our API, a couple of the later use cases will include example calls of creating custom objects.