We are here trying to show an example of how to add custom fields and additional logic to the guided move-in process. The logic added will include evaluation of fields added by the KUT (Key User Tools), so we will also see how to use those fields in the SDK.
Any coding or configuration examples provided in this document are only examples and are NOT intended for use in a productive system. The example is only done to better explain and visualize the topic.
With the 1702 release of Utility industry extension of C4C the guided process for move-in, move-out and transfer was introduced. While still being a web service call to IS-U, this is implemented using a business object (BO) in C4C as the ‘reference’. The name of the business objects is: UtilitiesActionBO. It is the same BO used for all of the processes and no data is materialized in C4C.
The technical benefit of using a BO, is that several of the standard SDK options becomes available, even though it still ends up as a web service call to IS-U.
In the following the examples will be based on the move-in.
Below is a short visual of the process. In short the 4 steps are:
- Selecting the premise, customer for and move-in date.
- Selecting what services that should be activated for the customer
- Selecting security deposit and possible mailing address if different from move-in address
- Review of all information entered for the prior steps
2 fields have already been added using the KUT:
- A field for credit check required
- Field to enter Social Security Number when creating a new customer
If you would like to see how this was performed – have a look at this blog: REFERENCE TO KUT BLOG
Below is the end result we are looking for – the ‘Credit Check Required’ is flagged.
We achieve this in 3 easy steps:
- Create a solution in PDI
- Make fields created by the KUT available for the PDI
- Write logic to control the field created by the KUT
1. Creating a solution in PDI
1.1. Login to the C4C system as PDI developer in the SDK studio. Create a new solution
1.2 Add new item to the solution “GAF Custom1”
2. Make fields created by the KUT available for the PDI
2.1. Right Click on the solution GAFCustom1 and Add New Item to include CustomerObjectReferences.
( Hint: CustomerObjectReferences is essential to access key user extension fields in the PDI custom logic )
2.2 Select Extension –> Reference to Customer Specific Fields and add CustomerObjectReference to the solution
2.3. Select key user fields which needs to be referenced in the SDK implementation.
In this example: Four fields in the Business Object UtilitiesActionBO is selected. We are only using one of the fields in this example, but these four are the ones created by the KUT.
Hint: Look at the node name – when we add this to the BO, we need to know where it belongs. In this case where we are adding the ‘Credit Check Required’ this needs to be added to the ‘Contract’ node. We will see this later.
2.4. Save and Activate the CustomerObjectReference in the solution.
3. Write logic to control the field created by the KUT
3.1 Add a new Item to the solution –> Business Object Extension ( ActionBOExtension.xbo)
3.2. Select namespace http://sap.com/xi/AP/CRM/Global and BO UtilitiesActionBO to extend the Business Object for Move In/MoveOut/Transfer GAF
3.3. Save and Activate the BO extension.
In this BO specific for Move In /MoveOut/Transfer Guided Process, the following nodes are extensible ( Contracts, Contract Account Details, Installation and Customer ) . New PDI extension fields, custom Bo action can be defined here.
3.4. Right Click on the ActionBOExtension.xbo and Create Script Files
3.5. Selecting Trigger Points
There are different trigger points to write the SDK logic. In this example , we will use the Event “After Modify” for Contracts Node to set the Credit Check Required field to true.
( Hint: Please note to uncheck the mass enable check box for flat structure . If mass enable is checked then the input to the script files is a table and get row and get count needs to be used for accessing the data of every row. This can be avoided for flat data structures )
3.6 Add code to the event
In the Event After Modify , Please insert the code to default Credit Check to true.
this.CreditCheckRequired = true;
One can access KUT field thru this.CreditCheckRequired as shown in the screenshot. This wouldn’t be possible if the Customer Object References is not created.
3.7. Launch the Move In Floorplan to see the results. Credit Check Required will be defaulted on Launch