Sales Rule Formula—Exercises

Basic Data Setup

Configuration Characteristics

Windows:
Configuration Characteristics

BDR Exercise for Creating Configuration Characteristics

Create a Configuration Family

Purpose: The purpose of this exercise is to set up the basic data required for running this particular functionality.

Windows:
Configuration Family

  1. Open the Configuration Family window.
  2. Create a new configuration family.
  3. For this exercise, the EASYFLEX family already exists.

Connect Characteristics to Configuration Family 

Purpose: The purpose of this exercise is to set up the basic data required to make characteristics available in the formula. 

Windows:
Configuration Family

  1. Open the Configuration Family window and query for the correct family.
  2. In the Config Family Characteristic tab, enter the appropriate characteristics.
  3. For this exercise, characteristics are already connected to the EASYFLEX family.

General exercise for Creating Configuration Family and Attaching Characteristics

Main Exercise

Purpose: The purpose of this exercise is to create and release four sales rule configuration formulas and try some different elements. The first formula will calculate the height for the garagedoor based on the width value from the configuration. The second formula will round the calculated height value to the nearest 50 value. The third formula will calculate the number of sections to be configured based on the height and hidden characteristic. The fourth formula will call for another formula within the new formula, instead of calling the height value that is calculated in formula 1 & 2 again.

Note: Replace the XX in the exercise below with your initials. This ensures uniqueness and makes it easier to locate your data. For example, John Smith would prefix his data with the letters JS: JSGDCOLOR.

Create Configuration Formula to calculate height

  1. Open the Sales Rule Formula window.
  2. Create a new record. In the Config Family ID field, select configuration family EASYFLEX from the List of Values. This also sets the configuration family ID description, which defines the set of configuration characteristics that can be used within this formula.
  3. In the Formula ID field, enter an alphanumeric code XXHEIGHTCALC to identify this formula, and then enter a description in the Description field.
  4. Save.
  5. Create the following formula in the table: 

    GDWIDTH * 1.4 + 130

    <Char Value * Value + Value >
  6. Save.
  7. Enter the test values (GDWIDTH=3000) and test the formula. The result should be 4330,25.
  8. Perform any possible changes.
  9. Release the formula. Note the status.
  10. Now you will understand that you have to change the formula. This can be done directly even if the formula is released. If you have a part configuration revision connected to the formula, you will be prompted with a question whether you want to proceed,  since the change will take effect on all connected configurable parts.
  11. Another way to create the formula is to add the formula string GDWIDTH * 1.4 + 130 in the Formula field.
  12. Save. The formula elements will be automatically added to the table once saved.

Create sales rule configuration formula to round calculated value for height

  1. Open the Sales Rule Formula window.
  2. Create a new record. In the Config Family ID field, select configuration family EASYFLEX from the List of Values.
  3. In the Formula ID field, enter an alphanumeric code XXHEIGHTCHECKROUND to identify this formula, and then enter a description in the Description field.
  4. Save.
  5. Create the following formula in the table: 

    ROUND(GDHEIGHT / 50) * 50

    <FunctionROUND
    'Operator ('
    Char Value
    'Operator /'
    Value
    'Operator )'
    'Operator *
    Value >
  6. Save.
  7. Enter the test values (GDHEIGHT=4330) and test the formula. The result should be 4350.
  8. Perform any possible changes.
  9. Release the formula. Note the status.
  10. Another way to create the formula is to add the formula string ROUND(GDHEIGHT / 50) * 50 in the Formula field.
  11. Save. The formula elements will be automatically added to the table once saved.

Create sales rule configuration formula to calculate number of sections

  1. Open the Sales Rule Formula window.
  2. Create a new record. In the Config Family ID field, select configuration family EASYFLEX from the List of Values.
  3. In the Formula ID field, enter an alphanumeric code XXSECTIONCOUNT to identify this formula, and then enter a description in the Description field.
  4. Save.
  5. Create the following formula in the table:

    TRUNC((GDHEIGHT + GDSECTIONHEIGHT - 1) / GDSECTIONHEIGHT)

    <FunctionTRUNC
    'Operator ('
    'Operator ('
    Char Value
    'Operator +'
    Char Value
    'Operator -'
    Value
    'Operator )'
    'Operator /'
    Char Value

    'Operator )' >
  6. Save.
  7. Enter the test values (GDHEIGHT=3520, GDSECTIONHEIGHT=500) and test the formula. The result should be 8.
  8. Perform any possible changes.
  9. Release the formula. Note the status.
  10. Another way to create the formula is to add the formula string TRUNC((GDHEIGHT + GDSECTIONHEIGHT - 1) / GDSECTIONHEIGHT) in the Formula field.
  11. Save. The formula elements will be automatically added to the table once saved.

Round the calculated value for height using a formula within a formula

  1. Open the Sales Rule Formula window.
  2. Create a new record. In the Config Family ID field, select configuration family EASYFLEX from the List of Values.
  3. In the Formula ID field, enter an alphanumeric code XXROUNDHEIGHT to identify this formula, and then enter a description in the Description field.
  4. Save.
  5. Create the following formula in the table:

    ROUND(Formula[HEIGHTCALC] / 50) * 50

    <FunctionROUND
    'Operator ('
    Formula
    'Operator /'
    Value
    'Operator )'
    'Operator *'
    Value >
  6. Save.
  7. Enter the test values for GDWIDTH (3000) in the formula HEIGHTCALC, you can test the new formula ROUNDHEIGHT. The result should be 4350.
  8. Perform any possible changes.
  9. Release the formula. Note the status.
  10. Another way to create the formula is to add the formula string ROUND(Formula[HEIGHTCALC] / 50) * 50 in the Formula field.
  11. Save. The formula elements will be automatically added to the table once saved.