Use > Plan > Service Catalog Management > Offerings and pricing > Business rules pricing example

Business rules pricing example

Your company wants to promote a VM infrastructure service. To encourage its use, there is to be a promotion featuring a 50% price reduction for requests submitted in October.

To do this you can configure the offering as follows:

Set up the basic user options

You should set up the user options to match whatever specification is appropriate for your company. In this simple example, the number of processors is added as an option.

  1. From the main menu, select Plan > Service Catalog > Offerings.

  2. Select the relevant offering, and click Details.

  3. In the User options tab, click New field, and complete the following:

    Property Action
    Name Type Processors
    Display name Type Processors
    Field type Select List
    Field size Select MEDIUM
    Required Ensure this is selected
    Visibility Select User
    List
    1. Click to add a new list

    2. Type Number as the name and display name

    3. Click OK

    List items
    1. Click to add the list items

    2. Type One as the name and 1 CPU as the display name

    3. Click Add another

    4. Type Two as the name and 2 CPUs as the display name

    5. Click Add another

    6. Type Four as the name and 4 CPUs as the display name

    7. Click OK

  4. Click Save.

Set up the promotion date fields in user options

Now you can set up the user options so there are fields that can be used to specify the start and end dates of the promotion.

  1. In the User options tab of the relevant offering, click New field, and complete the following:

    Property Action
    Name Type StartPromotion
    Display name Type Start promotion
    Field type Select Date
    Field size Select MEDIUM
    Visibility Select Agent
  2. Click New field, and complete the following:

    Property Action
    Name Type EndPromotion
    Display name Type End promotion
    Field type Select Date
    Field size Select MEDIUM
    Visibility Select Agent
  3. Click Save.

Set default values for promotion period and CPU

Now you set the default values for the offering, including specifying the start and end dates of the promotion, and the default of 1 CPU.

  1. In the Default values tab of the relevant offering, open the User options section, and complete the following:

    Property Action
    Processors Select 1 CPU
    Start promotion Select October 1, 2015
    End promotion Select October 31, 2015
  2. Click Save.

Set prices

Now you add the prices to the offering.

  1. If you want the prices to be visible to the Service Portal user, in the Price tab of the relevant offering, ensure Visible to Service Portal is selected.

  2. In the Price tab, of the relevant offering, open the Basic pricing section, and complete the following:

    Property Action
    Currency Select USD($)
    Price Type 100
    Recurring price Type 3
    Recurring period Select Monthly
  3. Open the Additional price added per user option section, and complete the following:

    Property Action
    1 CPU - Price Leave blank
    1 CPU - Recurring price Type 2
    2 CPUs - Price Leave blank
    2 CPUs - Recurring price Type 4
    4 CPUs - Price Leave blank
    4 CPUs - Recurring price Type 6
  4. Click Save.

Add rules for the price promotion

Finally, you add the rules that specify the discount (50%) and when it is to be applied.

  1. In the Rules tab of the relevant offering, open the After change section.

  2. Click Add a rule to run after request record rules, and:

    1. Select "If...Then" rule.

    2. Select the Set field template.

    3. Click OK and edit the rule to be:

      If

      ${(current_update.RequestedForPerson.IsChanged || current_update.UserOptions.IsChanged) && entity.CreateTime>=entity.UserOptions.StartPromotion_c && entity.CreateTime<=entity.UserOptions.EndPromotion_c}

      Set Price to ${entity.Cost/2}

    Note For help with action rules, see Action rule examples.

  3. Click Add a rule to run after request record rules, and:

    1. Select "If...Then" rule.

    2. Select the Set field template.

    3. Click OK and edit the rule to be:

      If

      ${(current_update.RequestedForPerson.IsChanged || current_update.UserOptions.IsChanged) && entity.CreateTime>=entity.UserOptions.StartPromotion_c && entity.CreateTime<=entity.UserOptions.EndPromotion_c}

      Set Recurring price to ${entity.RecurringCost/2}

  4. Open the Rendering forms section.

    Note The following rules disable the StartPromotion and EndPromotion fields. These fields should not be visible to the Service Portal user, and that is why their Visibility is set to Agent. The agent may only view these fields, and not edit them, as they are controlled by the Catalog Administrator. Therefore, the fields are disabled.

  5. Click Add a rule to run before request record rules, and:

    1. Select Simple rule.

    2. Select the Disable field template.

    3. Click OK and edit the rule to be:

      Disable UserOptions.StartPromotion_c

  6. Click Add a rule to run before request record rules, and:

    1. Select Simple rule.

    2. Select the Disable field template.

    3. Click OK and edit the rule to be:

      Disable UserOptions.EndPromotion_c

  7. Click Save.

Related topics