Configuration Date Attributes

Overview

The Date type attribute lets you define and use dates in Search and Configuration flows. Date attributes can be created at all levels of the product hierarchy, just like other configuration attributes.

All date attribute properties can be defined as they would on a text field type configuration attribute, including Set Type, Auto Update, Hidden, Required, Hide in Transaction, and Status.

Another major feature is the ability to define a Range Check on dates.

Date Attribute example

The date attribute is displayed as a text box with a date selector tool. This gives the user the option to either enter a date manually or select one from the calendar. An automatic validation runs to ensure that the date complies with the application and user profile information.

Date attributes can be of array or non-array type. Date arrays cannot be displayed as menus.

Administration

ClosedAccessing the Date Attribute Editor Page

  1. ClosedNavigate to the Attributes Administration List page.

    1. Click Admin to go to the Admin Home Page.

    2. Click Catalog Definition in the Products section.

      The Supported Products page opens.

    3. In the Navigation column, select Attributes and then click List.

      The Attributes Administration List page opens.

  2. Click the name of an attribute with Date in the Attribute Type column, or create a new attribute.

    The Date Attribute Editor page opens.


ClosedUsing the Date Attribute Editor Page

The Date Attribute Editor page has the following sections under the General tab: Main Information, Properties, and Default Data.

Date Attribute Editor

ClosedMain Information Section

  1. Edit the Name of the attribute.
  2. Enter a Description.

    If Help Icon is checked for the attribute in the Configuration Flow Editor, the description appears when the user hovers over the help icon.

    For more information, see Configuration Flows.


ClosedProperties Section

Field Description
Set Type
  • None: The user can input any value without encountering an error message.
  • Set: A recommendation rule can change the value entered by the user unless the attribute is locked by the user.

    • Auto Lock - When Auto Lock is on, user selections made to an attribute after a Recommendation rule “Set” the attribute to a different value will be retained if the Recommendation Rule is fired again (such as upon an Update). ClosedAuto Lock Example

      • Recommendation rule 1 runs and sets Attribute X to A. The user then sets Attribute X to B. The user then clicks Update, and Attribute X retains its value of B. The recommendation message defined in Recommendation rule 1 for option A will appear.
      • Auto Lock is on by default for all Recommendation rules that have a set type of “Set.” The Admin can turn Auto Lock off within an attribute by selecting “Set” for the set type and by not selecting Auto Lock. If this were done to Attribute X, the user would experience the following:
      • Recommendation rule 1 runs and sets Attribute X to A. The user then sets Attribute X to B. The user then clicks Update, and Recommendation rule 1 runs and sets Attribute X to A.
  • Forced Set: A recommendation rule will change the value of the attributes regardless of what the user enters and if the attribute is locked or not.

Required

This will require the user to enter a value before proceeding to a commerce transaction.

Hidden

This attribute will not appear to the user. It can be used in rules.

Auto Update

This will by updated by the system without the user invoking an action.

Hide Transaction

This attribute is hidden within a commerce document.

Status

  • Active: An attribute that is active will appear to the buyer and/or be included in rules.

    All attributes are active by default.

  • Inactive: An inactive attribute cannot appear in a rule to the user.
  • Internal: An internal attribute will only appear to FullAccess users.
  • Show Start/End Dates: Click to specify how long the attribute will remain in the chosen status.

    If no duration is specified, the attribute maintains its status until the administrator changes it.

ClosedDefault Data Section

  1. In the Default field, enter a default date or select a date from the date picker (if necessary).
  2. Check Use Current Date if you always want to use the current date as the default data.
  3. Select a validation. 
    • None: A validation will not be run.
    • Range Check: Enter a date manually, select one from the calendar tool, or use the current date. This can be used to verify that a date falls within an appropriate range before proceeding.

Adding a Date Attribute Watch Video  Video icon
Editing a Date Attribute Watch Video  Video icon

Use Cases

ClosedUse in Configuration Rules

Users will be able to use Date Attributes as simple and advanced condition attributes within all Configuration rules. Dates can be used in the Condition, Action, Condition Input, and Action Input like other configuration attributes. In addition, Recommendations and Constraints defined on Date Attributes return Date objects.

The following operators are available when data attributes are used in simple conditions:


Date Attribute used with Constraint Rule


  1. Dates in Function to return a Result Set – In the function to evaluate result set, the Date attribute has to be passed in the db date format. (string format)

    //Snippet for passing dates into the Function to return a Result Set

    str = str + "<AttributeVariableName=\"simpleDate"\"> + (datetoStr(simpleDate, "yyyy-MM-dd hh:mm:ss"));
  2. Array Dates in Functions to return a Result Set - In the function to evaluate result set, the date array has to be passed into the getarrayattrstring function.

    //Snippet for passing date arrays in the Function to return a Result Set

    str = str + "<Attribute VariableName=\" arrayDateCurrentDateAsDefault\>'

    + getarrayattrstring(array DateCurrentDateAsDefault) + "<\Attribute>";

Notes

Dates in Configuration do not support time.

Note: Customers should not use any of the following names for Configuration attribute variable names. Using these values may cause issues with customer configurations and could possibly alter site functionality.

  • action_id
  • bm_cm_process_id
  • _bom_
  • bs_id
  • commerce_doc_url_params
  • commerce_list_id
  • document_id
  • document_number
  • folder_id
  • formaction
  • from_config
  • scrollTop
  • shopping_cart_id
  • step_id
  • token
  • version_id
  • NULL and blank Integer values are treated as separate values:
    • NULL= 0
    • Blank = ""
  • Using NULL as an attribute value is strongly discouraged.
  • If you use logic that tests for NULL values in rule conditions or BML, confirm that the logic takes this difference into account.

Date attributes are supported in Bulk Upload and Download.

Date attributes are supported in the Configuration SOAP API in the database format [yyyy-MM-dd 00:00:00].

However, a user cannot set a time component for dates through SOAP. All dates are set with the time component as 00:00:00.

Attribute range calculations are validated on the Value Punch-In.

Example: If the value was passed in the URL to the Configuration, it will be validated and an error message will appear.

This affects both Mobile and Desktop.

While reading values of date attributes, the FullAccess user performs an isnull check to avoid errors.
Have as few attributes "auto-update" as possible.

Related Topics

Related Topics Link IconSee Also