Ch. 020b. Override Pressero DAM with a custom Asset URL

EDOCBUILDER > eDocBuilder Documentation Manual & Videos

Override Assets URL Feature

The intent of this feature is to provide a way for eDocBuilder users to override the Assets sent by Pressero to eDocBuilder. It is assumed that the person setting this up is a developer who knows how to create a URL that returns data using JSON. 

Technical Background

Pressero sends to eDocBuilder a list of images to be used by eDocBuilder Orders using an Asset URL. This URL is generated dynamically by Pressero and sent to eDocBuilder every time a new session is created or opened for editing.

Aleyant eDocBuilder Orders expects the Asset URL to be in a certain format in order to be able to read the image, thumbnail, name, description and category for each asset. The JSON format is described on the iFrame Interface document.
 
Here is a sample result of an URL generated by Aleyant Pressero extracted from that documentation.
 
{
 "assetImages" : [
   {
     "url":"http://blah.com/assetImages/aircraft/0001.jpg",
     "thumbUrl":"http://blah.com/assetImages/aircraft-thumb/0001-thumb.jpg",
     "name": "0001.jpg",
     "category": "aircraft",
     "description": "Velit leberkas ut, eu ball tip ad duis."
   },
   {
     "url":"http://blah.com/assetImages/aircraft/0002.jpg",
     "thumbUrl":"http://blah.com/assetImages/aircraft-thumb/0002-thumb.jpg",
     "name": "0002.jpg",
     "category": "aircraft-blue",
     "description": "Prosciutto tri-tip magna exercitation excepteur."
   }
 ],
 "categories" : [
   {
     "name":"aircraft",
     "parent":""
   },
   {
     "name":"aircraft-blue",
     "parent":"aircraft"
   }
 ]
}
 

Feature Description

The Override Assets URL feature aims to provide a way for eDocBuilder users to specify a URL that will be used for a specific template, other than the one sent by Pressero. This URL should be created, hosted and maintained by the eDocBuilder user and Aleyant is not responsible for the content provided by it.

The feature also provides a way to make the Assets URL searchable by allowing user to specify a template field that can be sent as a Query String value to the provided asset URL. For example, if the template has a field named Location, the value of this field can be sent along with the request to the provided URL.

How to Setup the Template

Anyone can benefit from this feature and override the assets URL that is sent from Pressero, even self hosted customers that do not integrate with Pressero. To setup the template, the user has to go to the Template Info page and look for the input for the Assets URL.

The Asset URL address

In most cases, a live application would be generating the JSON file that the template would read as a source for the assets, you would need to check what that address is with your database application. But it could also be just a JSON file, available in some location that is world-readable. The example JSON file at the address below is a working example of the type of data that is expected. There is an example template that uses this file available here.
 
http://admin.chi.v6.pressero.com/files/Subscribers/be686231-fbe3-4bea-9f91-e58ea1e60499/webfiles/dam-example.json