Siebel Interactive Selling Transact Server Interface Reference > The Shopping Cart > Accessing Header Data >

Example of Defaulting Address Info from LDAP

The Transact LDAP structure can contain account and address information accessed by Transact for display on the Shopping Cart or for inclusion in exported XML. For further explanation of Transact's usage of LDAP, refer to the sections on LDAP in this guide. Transact accesses LDAP information in a read-only manner. Yet, information provided by the LDAP system for default account billing and shipping information may need to be modified for use on an individual quote. If you are using LDAP default information on the Shopping Cart, display it only if there is no quote-specific information already stored. Quote-specific information is stored in a custom header field. An example of this technique is shown below:

<% if (bean.getQuoteHeader("SHIPPING_ADDR") != "") { %>
<td colspan=2><textarea rows=5 name="HEADER_SHIPPING_ADDR">
<%= bean.getQuoteHeader("SHIPPING_ADDR") %>
<% }else { %>
<td colspan=2><textarea rows=5 name="HEADER_SHIPPING_ADDR"><%= bean.getShippingName() %>
<%= bean.getShippingStreet() %>
<%= bean.getShippingCity() %>, <%= bean.getShippingState() %> <%= bean.getShippingZip() %>
<%= bean.getShippingCountry() %>
<% } %>

In the above example, we first check for the existence of user-entered data in the quote header field "SHIPPING_ADDR." If the user has entered data into this field on the quote, then we display this information in a textarea, using a call to the getQuoteHeader function to access the entered data. If no data has been entered into the "SHIPPING_ADDR" header field, we display formatted default information from LDAP using calls to getShippingName, getShippingStreet, getShippingCity, and so on to retrieve the information from the LDAP server.

 Siebel Interactive Selling Transact Server Interface Reference 
 Published: 18 April 2003