"Custom" Rule

IT Asset Management (Cloud)

The Custom rule gives you the flexibility to define exactly the rule criteria that you require.

The Custom rule is provided for advanced users with a knowledge of C# and .NET. It is based on the Windows Workflow Foundation Rules Engine by Microsoft. For information about the Windows Workflow Foundation Rules Engine, see http://msdn.microsoft.com/en-us/library/aa480193.aspx.

Syntax

The Custom rule must be authored in C#, with the following extensions:

  • Operator logical-AND: Use && (usually used in .NET) or AND to create a rule where all properties should be matched.

    Example: UserName == “JSmith” AND EmailAddress == “JSmith@mycompany.com”

  • Operator logical-OR: Use || (usually used in .NET) or OR to create a rule where either of the properties should be matched.

    Example: UserName == “JSmith” OR UserName == “JShoemaker”

  • Operator logical-NOT: Use ! (usually used in .NET) or NOT to create a rule where a property should not be matched.

    Example: NOT(UserName == “JSmith”)

  • Comparing two values: Use == or = to create a rule that compares two values.

    Example: UserName = "JSmith" OR UserName = "JShoemaker"

Properties and Methods

See Appendix 1: Properties and Methods for a list of properties and methods that can be used to define a Custom rule.

Creating a Custom Rule

Refer to Creating a License Rule Set and Adding Rules to a License Rule Set for information on creating a rule set and adding rules to it.

To create your rule, specify the following information:

  • Name—Enter the name of the rule.
  • Rule Set—The rule set that contains your rule. This information is non-editable.
  • Condition—Enter the conditions for the rule.
  • Recommended License Type - Select the license type that should be recommended if the rule condition is met.

    Note that this license type set will be recommended for users within Classic Business Suite, S/4HANA and Non-SAP systems when the "Recommended License Type for S/4HANA" is set to "Same as above" (default).

  • Recommended License Type for S/4HANA - Select the license type that should be recommended for S/4HANA users if the rule condition is met.

    Specify a license type other than "Same as above" for cases where matching S/4HANA users should be recommended a different license type from Classic Business Suite users.

When you have provided all necessary information, click Create. The rule will be run, and you can examine the results immediately by clicking Show license recommendations in the Preview Results section.

Custom Rule Usage Scenarios

Usage Scenario 1

The following custom rule condition assigns a specific license type to all professional users in the Finance role:

HasRoleMatch("Finance") AND GetTransactionProfilePercentage("Professional Profile") > 0.9

Usage Scenario 2

The following custom rule condition assigns a specific license type to all users who are assigned a specific combination of roles:

HasRoleMatch("Admin") AND HasRoleMatch("Accounting")

IT Asset Management (Cloud)

Current