Promotions Based on Day or Time of Purchase

You can create promotions that reward purchases made on specific days, purchases that are made at specific times, or purchases that are made frequently. For example, promotions can reward:

  • Purchases made between 4 PM and 6 PM.

  • Purchases made on Mondays.

  • Purchases made during the first week of the year.

  • The third purchase made in a given week.

  • The second purchase made in the same day.

These promotions are generally used by retail stores that want to attract customers at specific times or that want to encourage customers to make frequent purchases.

Calendar Attributes

You use calendar attributes to keep track of the dates and times of customers' purchases in order to create promotions rewarding frequent customers. Calendar attributes must be created at the program level. They can be used by all promotions in the program.

The following table lists the methods available when you create calendar attributes, and their uses. When you create a calendar attribute, you select one of these methods, which returns the value of the attribute.

Method

Description

Usage

Day Name

Returns a string representing the name of the day of the date from the transaction's Date:Time stamp.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Day Name method returns Sunday.

Month Name

Returns a string representing the name of the month of the date from the transaction's Date:Time stamp.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Month Name method returns August.

Last Week of Month

Returns 0 for true or 1 for false to indicate whether the transaction occurred during the last week of the month.

The user just specifies the month in the criterion, and the attribute calculates the last week.

Last Week of Year

Returns 0 for true or 1 for false to indicate whether the transaction occurred during the last week of the year.

The user just specifies the year in the criterion, and the attribute calculates the last week.

First Week of Month

Returns 0 for true or 1 for false to indicate whether the transaction occurred during the first week of the month.

The user only specifies the month in the criterion, and the attribute calculates the last week.

First Week of Year

Returns 0 for true or 1 for false to indicate whether the transaction occurred during the first week of the year.

The user just specifies the year in the criterion, and the attribute calculates the first week.

Day of Week

Returns an integer representing the number of the day of the week.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Day of Week method returns 1, because this is a Sunday, the first day of the week.

Day of Month

Returns an integer representing the number of the day of the month.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Day of Month method returns 2, because this is the second day of the month.

Day of Year

Returns an integer representing the number of the day of the year.

If the transaction's Date:Time stamp is 12/31/2009 01:01:01 AM, then the Day of Year method returns 365, because this is the 365th day of the year.

Week of Year

Returns an integer representing the number of the week of the year.

If the transaction's Date:Time stamp is 1/9/2009 01:01:01 AM, then the Week of Year method returns 2 because this is the second week of the year.

Month of Year

Returns an integer representing the number of the month of the year.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Month of Year method returns 8.

Hour

Returns an integer representing the hour of the transaction.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Transaction Hour attribute method returns 23.

Year

Returns an integer representing the number of the year.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Year method returns 2009.

Date

Returns the date from the transaction's Date:Time stamp.

If the transaction's Date:Time stamp is 8/2/2009 11:28:39 PM, then the Date method returns is 8/ 2/2009.