Offline Extensibility – 1608 What’s New
The 2 main features of KUT(Key User Tools) focused on 1608 was
- Model Property Conditions
- Default in Code List Restriction
- Rich Text in Formatted Fields
Model Property Conditions
Business Statement
Key users can now define conditions and control the field Properties like Mandatory, Read-only, Visibility. For example when condition like “Country is USA or Canada” then change the property of custom field “Social Security” as Mandatory.
How to enable this Functionality
Model Property Condition is Beta in 1608, Hence if you want to try it in your Test Tenant Please raise an Incident requesting SAP to enable this functionality.
How to achieve this Functionality
- Go to Adapt > Edit Master Layout
- Mouse Over the Custom Field “Social Security”.
- Click the Property Icon.
- Select the Property Mandatory. Click Rule.
- In the Model Condition Editor. Enter the Sudo Code given below. Press Apply
- End Layout Changes.
Pseudo-Code for this use case
IF(OR(Root.CurrentDefaultAddress.CountryCode == “US”, Root.CurrentDefaultAddress.CountryCode == “CA”) , true, false)
Once the Conditions gets created they seamlessly work Online and Offline
The Blog Introduction to SAP Hybris Cloud for Customer Rule Editor will in detail explain How to use the New Model Rule Editor in SAP Hybris Cloud for Customer.
How it works
-
The Model Rules are attached to the Master Layout.
-
Key User shall be able to define rules to change property of fields, sections, facets, action buttons.
-
Rule conditions shall be defined based on the available fields in the UI model.
-
Rules are executed only on client and not on server – No Backend Round Trips!.
-
Since it is a client side logic so user has to write the logic on each screen.
-
Rules run online and offline as well.
-
Rules are applied on Master Layout.
- During runtime the condition is parsed only once and then evaluated
Here are some more Business use cases for Reference.
|
Business Use Case |
Formula to be used |
Object |
1 |
Customer “XYZ” wants to enforce data quality for Address,If field House Number is left blank for Account or Contact or if it a non numeric value, then Street and State should be made mandatory along with Postal Code |
IF(NOT(ISBLANK(Root.CurrentDefaultAddress.HouseID)), IF(ISNUMBER(Root.CurrentDefaultAddress.HouseID),IF( LEN(Root.CurrentDefaultAddress.HouseID)<2,true,false),false),false) |
Account |
2 |
All “A” classified Customers should have mandatory address fields like Postal Code, street, City, Owner |
AND( Root.CustomerABCClassificationCode == “A”, Root.Role == “CRM000”) |
Account |
3 |
When a Customer’s Account is Active then it shouldnot be made as a prospect |
IF(Root.LifeCycleStatusCode == 2, true, false) |
Account |
4 |
Customers of United States of America or Canada needs to provide Social Security Number |
IF(OR(Root.CurrentDefaultAddress.CountryCode == “US”, Root.CurrentDefaultAddress.CountryCode == “CA”) , true, false) |
Account |
5 |
Add Reason if delta of Weighted Value and Negotiated Value of an Opportunity is more than 2500 USD |
IF(Root.ExpectedRevenueAmount.content – Root.WeightedExpectedNetAmount.content >2500,true,false) |
Opportunity |
6 |
If an Opportunity is Won then user needs to enter the Delivery Date |
IF(Root.LifeCycleStatusCode == 4, true, false) |
Opportunity |
7 |
For Opportunites with amount greater than 50,000 $, User should read the Terms and Conditions and Accept the Same. |
IF(Root.ExpectedRevenueAmount.content >= 50000,true,false) |
Opportunity |
8 |
High Priotiy and Above tickets should be assigned to a Technician. |
OR(Root.Status ==3,Root.Status ==4) |
Tickets |
9 |
For all Tickets to Hardware section (Tickets in Hardware section will have Subject starting as “HARD-“) Serial ID of the Product should be mandatorily filled |
CONTAINS(“HARD_”,Root.MessageName) |
Tickets |
10 |
For Quotatations created in EMEA Region with Chances of Success less than 80% maintain a Reason |
AND( Root.ChanceOfSuccess <= 80,IF(Root.SalesOrganisationID ==”MC42100″,true,IF(Root.SalesOrganisationID ==”MC42101″,true,IF(Root.SalesOrganisationID ==”MC42102″,true,false)))) |
Quotes |
11 |
All Visits for the Account “ABCD” containing a prefix “ServiceCheck_” in the subject should have mandatory Notes once “Sales Rep” check-in the visit. |
IF(AND( CONTAINS(“ServiceCheck_”, Root.Subject), Root.AccountPartyID == “MC9785”) ,IF( NOT( ISBLANK( Root.ActualStartDateTime ) ) ,true,false),false) |
Visits |
Now lets check a video on how we can achieve business use case 7 Using Model Rule Editor to create custom rules in SAP Hybris Cloud for Customer
Whats Next
The Conditions will soon be extended for Field Validations as well, wherein the user can create conditions to raise Custom Language dependent Error Messages using the Header Fields of an Object. The conditions can also be written for the list of child objects with capabilities like checking the count of Child Objects(e.g. Check if an Account has at-least one contact or the number of Involved Parties for Account should not exceed 10).
Default in Code List Restriction
CodeList Restrictions are modified to include Defaulting of Code Lists.
Business Statement
If an account is prospect then default the Classification as “C-Classified”.
With 1608 enhancement this use case can be achieved by Defaulting Account classification as “C-Classified” when the control field is Type of Account.
If you are new to Code List Restrictions then watch Using Code List Restrictions in SAP Hybris Cloud for Customer.Lets see how this can be achieved How to Default values using Code List Restriction
Support Rich Text format in Formatted Fields
With Cloud for Customer its now possible for customers to maintain Rich Text in Formatted Fields. User can add the Custom Formatted Text Fields using Adaptation Mode in KUT.
Great blog Bejoy ..!!
Good write up...!!
Interesting Blog! 🙂
Good Blog
Really helpful blog Bejoy !!
Good to know about this new feature, thank for sharing. Just to ask does these model property condition only apply to KUT fields or SDK fields as well ?
Hi Shobhit,
The Rule applies to all the fields in UI (standard + custom)
Regards,
Bejoy