Trialforce : Create Trials for your app-exchange application using SingupRequest API

by - 9:22 PM

Trialforce offer a service to provision free trials for your app-exchange customers. If you have an app-exchange application want to deliver 30 days trial for your app, Trialforce is product for you. With Trialforce you can bundle up all your application and deliver to customer for a limited time with expiry date through the salesforce web-store (app-exchange). 

You can host a webpage on any platform for customer to signup for free trials and using SignupRequest API, you can spin orgs and deliver trials

Some other pleasant features that Trialforce offer are 

  • Power to customize app-exchange app, improve branding quality and design experience.
  • Control, monitor customers and trials for applications
  • Manage version, multiple trials for multiple applications, editions
I recommend reading ISVForce guide here to have complete understanding of the product, detailed explanation of the product is beyond scope of this post. My focus here to explain, how you can use SignupRequest to leverage trials to your customers.

SingupRequest API exposes a new standard object called SignupRequest, which can be enabled by contacting Partner Community at Salesforce through support. With SignupRequest object,  you an spin up free-trials.

Before moving further, we need to understand the basic model of Trialforce. Broadly, Trialforce have two prime segments

TMO org - Open a case with Partner Community to log case and receive your org. This is one central management place for all your activity, you can create more than one Trialforce Source Org (TSO) from a management org, one for each app, if you have more than one application to serve. You can create all custom branding in TMO like email on signup, email of password recovering, support emails and more.

You can manipulate email template here, this is the email user receive when they signup for your app. You can customize all sorts of emails (see picture below)

TSO org - you can install your application, packages, custom object whatever you want to deliver to customer, when they signup for trials. Once you are ready to serve your application, you can create a template of this org, this template have an ID called TemplateID and through SignupRequestAPI you can pass on this template ID, which in turn replicate your organization (exact replica) and spin a brand new salesforce account (org) and deliver to customer.

After configuring TMO and TSO, you can use SignupRequestObject (dedicated standard object designed for spinning custom trials), you have to reach Partner Community, request them to enable 'SignupRequest Object' on the org that you want to use to spin trials and once you are approved, you can login and locate SignupRequest object in your our setup window as shown below

Which org should I get SignupRequest Object enabled for ?

You can get SignupRequest object enabled on any org it need not have to be TMO/TSO, you have pass templateID and SignupRequest recognize your TSO and template with this unique Id and serve new trial account to customer.

Remember SignupRequest object do not work in 'sandbox' and do no spin trial account in any sandbox org.

Trialforce Source Org : Template
Templates are snapshot of salesforce trial account, that you wish deliver to your clients. Go to your Trialforce Source Org (TSO) bundle all components of your application (workflow/apex/visualforce) and create a template of it as shown in picture below

How do I spin Trials for my app ? 
Design a webform on visualforce and insert a new record on SignupRequest object to spin trial account org (expires in 30 days) and you require templateId for inserting a new record SignupRequest

Can I host my web-form for my application Trials outside of Visualforce ? 
Yes, can you use SignupAPI instead, to insert a new record to SignupRequest Object and which in-turn send custom branded email for your application.

JSON body for posting through SignupRequest API looks like the gist shown below

Below is the code sample, explaining how send a post request to create free trials using SignupAPI (covered from docs) here

Read the next post here, to learn, how to use RESTForce Gem for Rails application, to create SignupRequest Records using custom built API, and as well some of the good practices on writing custom-api in Apex.

Also read an interesting post on Using Signup API to manage your Leads by ISV team and my friend/colleague William Yeh (Evangelist ISVForce).

You May Also Like