9 April 2012
This article assumes the user has access to and can deploy to a web server such as Apache that is configured to run with PHP and MySQL. The user should also be familiar with creating and publishing content to Adobe Digital Publishing System applications and using Viewer Builder to create custom DPS viewer apps.
The reader should also be familiar with DPS Direct Entitlement and the Direct Entitlement Starter Kit.
Additional required other products
PHP
MySQL
Intermediate
Note: If you have questions about this article, use the comments feature at the bottom of the article. Please don’t contact technical support with questions about Adobe Developer Connection articles.
Publisher's tablet viewers tend to be free applications, but the content (folios) within them usually require subscription or purchase. To allow a new (potential) customer to sample a folio of their choice for free, publishers can use a technique called Promotional Entitlement. This can be achieved by leveraging the direct entitlement capabilities of Digital Publishing Suite, Enterprise Edition. Using direct entitlement, this system will make available a single retail folio in return for the successful registration of a confirmed email address.
This example is built using the Direct Entitlement Starter Kit.
As a means to promote a magazine's content, this system will enable a nonsubscriber to register an email address and, in return, receive the right to download any current or back issue. The example uses a simple direct entitlement system without any interaction with traditional fulfillment providers.
Upon installation of the application, the user is presented with an offer. The offer can be anything, but this example offers a single download in exchange for a confirmed email address. Once confirmed, the user is presented with a set of folios to choose from. In this example, this is the entire library of public and retail content. After the user chooses a single issue for download, the selection is noted in a database and then becomes the only folio to which the user has complimentary entitlement. All others revert to their previous "Buy" state.
While users will always be able to download their chosen folio, they will be prevented from choosing any other folio for download using the complimentary entitlement system. Only one per user is allowed.
The system uses a banner to present the offer and collect an email address from the user (see Figure 1).
The user's email address is sent to the entitlement system, which formats and sends an email to that address. This email contains a link that will first confirm the email and then direct the user back to the application (see Figure 2).
Users can confirm the email on an iPad or desktop. If they do so on an iPad, the link will be opened in Safari (see Figure 3):
After confirmation of the email, the user is directed back to the application where all public retail content has been enabled for download (see Figure 4).
Once the user chooses to download a folio, that folio is granted as the promotional folio and all other folios revert to Buy. In Figure 5, the user has chosen to download Folio 2.
Upon registering, the email address is associated with the device's UUID. This association is stored in a server-side database. The record then waits confirmation by email. Once confirmed, the record is updated and entitlements are provided to all the public retail content that is found in the publication's DPS fulfillment account (see Figure 6).
The download action invokes the verifyEntitlement method call which will update the record with the productId being requested. This becomes the promotional item and cannot be changed.
The email message contains a hyperlink that will confirm the email address when selected. The authToken is added as a HTTP GET parameter on this hyperlink and will be used to look up the account.
Example:
http://lighthouse.adobe.com/dps/getonefree/confirm.php?authToken=AUTH::436ea09d860b29dbffd0fd371006f3721582464d&confirmed=1
After confirmation, a hyperlink is provided that contains a URL scheme back to the application. It is of the form: urlscheme:ignored.html
Example:
getonefree:ignored.html
The promotional entitlement example will work with your existing DPS fulfillment account, provided that you can deploy the server portion somewhere you control. You will also need to create a new DPS viewer that can connect to it.
The following is a general guide to deployment. The kit has been developed and deployed on Apache running on both OSX (Lion) and Linux.
"confirmURL" to map to your deployment. It should be a URL to confirm.php in the root directory of the distribution."emailSender" address. This should be a real email account."fulfillment_account" to point to an account you own. (See the Custom Storefront article on how to find this information.)The application should be running now. The next step is to create a database. To ease some of the details here, a PHP script to create the database is provided in the code sample. Run it now by navigating in a browser to:
http://yourservername[:port]/contextroot/initdb.phpWhere:
http://lighthouse.adobe.com/dps/getonefree/initdb.php.If successful, the page will return the message:
"Successfully created table: getonefree"
You will need an entitlement-enabled application to use the starter kit. The starter kit comes with an entitlement banner that you can use. Within Viewer Builder, use these settings:
| Property | Value |
Viewer Type |
Multi-issue with Entitlement (and Apple subscriptions) Technically, the Apple subscriptions are not required, but the whole point is to drive conversions and you want to convert them to Apple subscriptions. |
Service URL |
http://yourservername[:port]/contextroot/entitlement/(example: |
Service Auth URL |
Same as above |
Integrator ID |
You will need to get this from your Adobe representative. For now, use "promotion". The Integrator ID is used to call the |
Create Account URL |
Leave blank |
Forgot Password URL |
http://yourservername[:port]/contextroot/forms/forgotPassword.php |
Banner Page URL |
http://yourservername[:port]/contextroot/banner |
| Offline Banner Assets | Use the file chooser to select the Archive.zip contained within the banner directory of the distribution. |
As mentioned above, the starter kit will attempt to access your DPS fulfillment account to entitle content, so it needs to know the account number. Set the variable "$fulfillment_account" in settings.php to this value. (see the Custom Storefront article on how to find this information).
Our example makes ALL public retail content available as a selection in return for an email address. Other possibilities:
Rather than offer the current issue, or even the first few issues, the system can be adapted to offer only back issues exclusive of the most recent n issues. For instance, you could allow complimentary entitlement only to 2011 or older content.
While the example collects only an email address, you could require the user to formally register a name, address and phone number.
You could sell a subscription with a deferred payment option. This would collect credit card information up front and provide free access for a predetermined time, after which the credit card is automatically charged.
By leveraging an existing database of users, you could provide limited access to customers of another property or service.
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.