Offer Management

Compared with the Generic Services scenario, the APS application considered here will allow providers to offer the same service but in addition, accompany it with a set of various configurations. From the business perspective, a provider offers various service profiles. From the technical perspective, this approach requires you to use a resource model with a parameterized service or parameterized sub-service.

This document explains how an APS application can allow the provider to configure service profiles to offer them to customers. It also directs you through a demo project that logically follows the Generic Services demo project.

../../../_images/tracks-offers.png

Follow the sample instructions in this document if you want providers to offer various profiles of the application services to customers.

../../../_images/offer-step-model-b.png ../../../_images/offer-step-meta.png ../../../_images/offer-step-provision.png ../../../_images/offer-step-presentation.png ../../../_images/offer-step-deploy.png ../../../_images/offer-step-provisioning.png

Scenario

As introduced in the APS Resource Management section, an APS application may define an APS type to create reference resources that belong to the provider and shared with customers.

In this scenario, we will consider every reference resource as an offer containing a service profile for the VPS service. You will make an APS application that allows a provider to create the needed number of VPS offers. Every offer will contain a set of limits on the main VPS parameters, for example, those can be a free, basic, and premium offers. A customer can purchase any combination of those offers. For example, a subscription can allow its owner to create up to 10 VPSes with the free configuration, up to 5 VPSes with the basic configuration, and only 1 VPS with the premium configuration.

Resource Model

The APS application will contain four APS types. In addition to the APs types in the Generic Services project, you will add an APS type for managing VPS offers. The new resources (offers) created from that APS type must be bound with the application root resource called cloud and with customer VPSes. The offers will belong to the provider and consequently will be implemented in the platform through the Application Service Reference resource class.

GraphViz

Start Your Demo Project

Clone the package you have created in the Generic Services demo project to the new one by following these steps.

  1. Create a new project based on the input package by extracting the package to a new folder, for example, to the offer1p/ folder.

  2. Replace every occurrence of the application ID and type ID prefix with “http://aps-standard.org/samples/offer1p/” in APP-META.xml, PHP, JavaScript, and other files. This will replace the old application and types with the new ones.

  3. To verify if there are no typo in the new project, try to build the new package using the command line tools:

    $ aps build offer1p
    

If no errors detected and you have successfully built a new APS package, then proceed to the next step.