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.
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
Accessing the Date Attribute Editor Page
-
Navigate to the Attributes Administration List page.
-
Click Admin to go to the Admin Home Page.
-
Click Catalog Definition in the Products section.
The Supported Products page opens.
-
In the Navigation column, select Attributes and then click List.
The Attributes Administration List page opens.
-
Click the name of an attribute with Date in the Attribute Type column, or create a new attribute.
The Date Attribute Editor page opens.
Using the Date Attribute Editor Page
The Date Attribute Editor page has the following sections under the General tab: Main Information, Properties, and Default Data.
Main Information Section
- Edit the Name of the attribute.
-
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.
Properties Section
Set Type |
|
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.
|
Default Data Section
- In the Default field, enter a default date or select a date from the date picker (if necessary).
- Check Use Current Date if you always want to use the current date as the default data.
- 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
Editing a Date Attribute Watch Video
Use Cases
Use 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:
- =(equal)
- Not=
- Before
- On or Before
- After
- On or After
Recommendation Rules
Recommendations rules are used to recommend values for non-array and array dates. Set type for recommendations work the same way for dates as they do for all other configuration attributes. User can use date attributes within Recommendation rules which can be used to set the value of date attributes. Uses can do this by either entering date values or using BML. If using BML, the return data type would be: date.
Constraint Rules
If a date is constrained, it will be shown as grayed-out in the date picker and Oracle CPQ will throw a constraint message. To create a simple constraint on a date attribute, enter a single date or a date range to constrain.
To constrain multiple dates, define a BML function and return an array with a new data type: Date[]. When doing this, every date within the array will be constrained on the user side.
Configuration and Search Flows
In Configuration and/or Search flows, dates can be displayed in the default and advanced templates.
-
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"));
-
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:
- 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
See Also