Home / Featured Training / Stored Document Substitution Variables

Stored Document Substitution Variables

Stored document substitution variables allow users of AA to insert dynamic content into stored documents, which can be seen anywhere in SSA. This allows you to identify an SSA user by name, for example “Welcome, John Doe”, or include a single office phone number in multiple stored documents while only maintaining that number in one system parameter.

How It Is Configured

Find or Create a Substitution Variable

Navigate to “Admin” > “System” > “Templates, Stylesheets, and Stored Documents” > “Stored HTML Doc Substitution Variables”

Select “Add Record” to create a new substitution variable or speak with the project team to have one defined.

The values that can be filtered on within the where clause are called bind variables and are always prefixed by a colon. See below for bind variable availability.

Additional bind variables (argument/value pairs) from the stored document source can be created, which can then be used as any other bind variable in the SQL.

<!--include object="object ID" arg1name=arg1value arg2name=arg2value -->

Adding a Substitution Variable to a Stored Document

Navigate to “Admin” > “System” > “Templates, Stylesheets, and Stored Documents”> “Stored HTML Doc Substitution Variables”

Navigate to “Admin” > “System” > “Templates, Stylesheets, and Stored Documents”> “Stored HTML Document Listing”

Edit a stored document either in plain-text mode or using the HTML mode of the WYSIWYG.

  • Select the substitution variable to enter from the Substitution Variable dropdown.
  • Or enter the following (example is for the customer’s display name):
  • The value in quotes is the Object ID seen in the table above. When viewing that stored document as an authenticated SSA user, the display name should be visible in the appropriate location.

Other Requirements

Substitution variables that make use of a customer ID or shopping cart ID rely on a cookie named BREADCRUMB_SESSION_ID and will not function without it. While the base SSA authentication plugin will set this, it may need to be added by an integrator if a 3rd-party authentication page is in use.

Substitution variables that do not make use of a customer ID or a shopping cart ID (such as something that simply pulls a system parameter value) do not rely on any cookies and therefore can be used by systems with a 3rd-party authentication page without any changes.

It Is Not Working: What Do I Do?

If a stored document substitution variable has been added and is not visible self-service, there are a few things to check:

  • If the substitution variable is dependent on a customer ID, is the user logged in yet? If so and the base SSA authentication plugin is not in use, check that the BREADCRUMB_SESSION_ID cookie has been set by the integrator.
  • Verify the syntax both in the include statement that was added in the stored document and in the SQL for the substitution variable.
  • Check that the bind variable exists or is spelled correctly? Test by hard coding a string to replace the bind variable.

Bind Variable Availability

Global

  • :p_cust_id – the ID of the customer logged into SSA. available on every page after logging into SSA.

Customer Management

SSA customer document save errors (too big or too many)

  • :p_context – the context specified in the original link.
  • :p_doc_ty – the type of document being saved.

E-Commerce

Shopping Cart – View Cart and Order Status

  • :p_cart_id – the ID of the current shopping cart.

Membership

SSA join – secondary subgroup selection step in the CUSTTY_HDR section (precedes each list of subgroups of a specific type)

  • :memb_cust_id – the ID of the customer who the membership is being purchased for. This differs from :p_cust_id when it’s an individual purchasing on behalf of a company.
  • :subgroup_ty – the type of subgroup that the CUSTTY_HDR section is associated with

Referrals

SSA vendor photo too big error

  • :p_context – currently, the value will always be REFERRAL.
  • :p_doc_ty – currently, the value will always be VENDOR_PHOTO.

Submittals

 “My Submittals” SSA interface

  • :collection_id
  • :subcollection_id
  • :submittal_serno (can be used for custom navigation within a specific submittal in stored documents)

Scoring Status Report

  • :collection_id
  • :subcollection_id