Can we link eDocBuilder to our Database via the API?

EDOCBUILDER > eDocBuilder FAQs
Question: 
We want to link some variable data to our template from a database. Is this possible via an API? For example, we have a product template and our locations in different regions have different pricing for the items displayed on the template. We want to pass a variable into eDoc builder to let it know what Price Bucket to pull the pricing from based on location that is ordering.
 
Answer:
There's no way to pull text data for the template from a database in the way you seem to be saying, no.
 
There are a few options that may get you close though.
 
1) You can define all the fields in the template as VDP. Your user could then upload a spreadsheet of pricing information. All pricing would have to be on a single row -- it would not be a very pretty spreadsheet.
 
or
 
2) You can define a really long text field that contains all the pricing data. It would expect something like this:
 
coffee=1.25;tea=1.30;hamburger=5.00;cheesburger=5.50;.....
all concatenated into one long string.  You would then use vbscript for each actual field:
txtPricingData.Split(";").GetAt(3).Split("=").GetAt(2)  -- this would return "5.00"
 
Finally you'd set this monster variable by passing it in the querystring:
 
http://client.edocbuilder.com/iframeclient.aspx?doccode=...&docpwd=...&txtPricingData=coffee=1.25;tea=1.30;hamburger=5.00;cheesburger=5.50;.....
 
This monster string would be generated from your pricing database and stored somewhere in your storefront as data that should be passed.
 
3) You can use the API to set up the edoc session, then fill fields with values from your database. You'd have to write a lot of code to get this done.
 
This assumes that only the pricing is changing otherwsie there really isn't any way to generalize it.