Set Up a Self-Service Marketing Trial
Note
This article describes functions exposed by CloudShare's REST API. For API documentation, see http://docs.cloudshare.com/rest-api/v3/overview/.
With just one call to CloudShare's REST API you can build a simple flow into your website that serves visitors a controlled product trial.
CloudShare takes all the grunt work out of setting up a controlled and monitored trial on the cloud while minimizing your resource costs. You'll also be able to easily monitor and follow up on the trial usage.
A CloudShare sponsored link generates and opens an environment of your design and logs the user into the environment. The user does not need to log into CloudShare or use the CloudShare's web UI.
With a simple request to the CloudShare REST API, your website can generate a sponsored link based on a prototype environment that you prepared and serve the environment to your prospective customer.
The link works within a defined time period and the environment lasts as long as you decide. You can choose to suspend the environment automatically after any period of inactivity. As always with CloudShare, you only pay for the resources you actually use.
A typical flow for a web based controlled trial looks like this:

As you can see in the flow, a simple call to our API returns a token that lets you redirect trial users to their own personal product trials.
The first thing you need to do is to prepare a prototype trial environment. Create a CloudShare environment and set it up to run your product exactly as you want your trial users to experience your product. When the environment is ready to use as a prototype, take a snapshot. The blueprint that contains the snapshot you took will serve as the prototype for the trial environments.
You also need to make sure you have an environment policy defined as you want for the trial environments. The policy controls the total runtime and storage time for each environment, and what happens to each environment after a period of inactivity.
You'll need the ID of your blueprint, policy and the region the blueprint is stored on.
You might like to stay logged into CloudShare and simply append some of our REST API's GET functions to the URL.
For the project ID:
-
Invoke
GET /api/v3/projects
to return project data. In the response, find the project by name and make note of the id of that project.
Using the project ID, invoke the following functions to get the remaining IDs you need:
-
The blueprint ID:
GET /api/v3/projects/<projectId>/blueprints
-
The policy ID:
GET /api/v3/projects/<projectId>/policies
-
The region ID (the region the blueprint is stored on, or the one you want to serve the environments from if it's on multiple regions):
GET /api/v3/regions
If you want the environments served to be owned by a specific project member, you'll also need the project member's ID. If you don't specify this, the request caller ID is used automatically. You can retrieve project member IDs (and all of the above IDs too) by calling the OPTIONS /api/v3/sponsoredlinks
API function. Project members are returned under owningProjectMembers
in the response.
Call POST /api/v3/sponsoredlinks
to generate the sponsored link.
For example:
POST /api/v3/sponsoredlinks { "email": "Wain45@spam.me", "FirstName": "Wain", "LastName": "Smith", "JobTitle": "manager", "PhoneNumber": "012-345678", "Company": "Wain's Company", "PolicyId": "POLs3J1NEAESn7ipYMwYq20Q2", "BlueprintId": "BPitsTtiUS27hEsHcVZcZsxw2", "UseLatestSnapshot": false, "ExpirationMinutes": 15, "regionId": "REKolD1-ab84YIxODeMGob9A2", "allowMultipleUsages": false }
Once your trial is underway, you can take a look at the engagement level through the CloudShare WebUI.
-
Go the Environments list, search for End Users Environments and filter by the blueprint:
Here you can see the status of the end user environments you've generated and a few more details.
-
Click the Name to drill down to the Environment Details page and see more information.
-
Take a look at the end user page to see, for example, how much time each user spent engaged in your environment:
Comments
0 comments
Article is closed for comments.