logo

NJP

Exposing Customer Central to Incidents in CSM Configurable Workspace

Import · Aug 05, 2024 · article

ServiceNow enables agents to create Incidents [incident] based on Cases [sn_customerservice_case], typically for internal break-fix situations. In these scenarios, the case’s Contact is assigned as the incident Caller, and the case’s Account is assigned as the incident Company.

In the CSM configurable workspace, we can access the ‘Customer Information’ and ‘Customer Activity’ tabs on case records. This article will guide us on how to extend the Customer Central functionality to Incident records and potentially to any record that references Contacts or Accounts.

Existing functionality

OOB record page for Case

Below is how the screen layout looks for a record from the out-of-box Case [sn_customerservice_case] table. Notice the two 'Customer Central' tabs after the 'Details' tab.

oob_customer_tabs.png

OOB Customer Information tab

Below is how the screen looks on selecting the 'Customer Information' tab. We get a handful of pre-defined widgets displaying the data related to the Contact who has opened the case.

oob_customer_information_tab.png

OOB Customer Activity tab

Below is how the screen looks on selecting the 'Customer Activity' tab. We get a holistic timeline view for the activity of the Contact who has opened the case.

oob_customer_activity_tab.png

Default screen layout for an Incident

When an Incident is created from a Case using the 'Create Incident' button, below is how the Incident record looks like in the CSM workspace.

create_incident_from_case_default layout.png

Configuration steps

Follow the steps listed below to make the 'Customer Central' tabs available for Incidents that are created from a Case.

Modify UX Screen Condition

ui_builder_customer_page_collection.png

4. Under the 'Pages and variants' list, look for and open the 'Customer Information default' record. Notice that the page is read-only.

ui_builder_customer_information_page.png

5. From the hamburger menu at the top left, under 'Developer' click on 'Open variant record', it will take us to the UX Screen record in the backend.

ui_builder_open_variant.pngux_screen_customer_information.png

6. In the Macroponent Configuration field, look for the object that sets the value for 'contextResolutionFieldMap'.

ux_screen_macrocomponent.png

7. We need to change this part to handle Incident records. Modify the component as below, save the record and remain on the form.

customer_information_variant_incident_context.png

8. Next, scroll to the bottom and open the record present under the 'UX Screen Conditions' related list.

ux_screen_related_list.png

ux_screen_condition_record.png

9. In the script part of the screen condition record, look for the code snippet that checks for the table and sets the 'contextResolutionFieldMap' object. It would be something like the below.

ux_screen_condition_script.png

10. We need to change this part of the code to accommodate the incident table and validate if the incident caller is a customer contact. Modify the script like below and save the record.

ux_screen_condition_for_incident.png

Modify Data Broker Server Script

11. Set the application scope to 'Customer Central'.

12. Navigate to the table 'sys_ux_data_broker_transform'.

13. Search for and open the record named 'Customer central - get context instance details'.

14_._ https://instance.service-now.com/nav_to.do?uri=sys_ux_data_broker_transform.do?sys_id=7cbe4be63b1710...

customer_central_data_broker_script.png

15. In the script section,

- add a code snippet to handle incident records.

- save the record.

Before -

customer_central_broker_script_unmodified.png

After -

customer_central_broker_script_modified.png

- Copyable version of the custom code snippet can be found here.

16. Clean the cache with 'cache.do'.

Verify the configuration

If all the 16 steps have been followed accurately, the 'Customer Information' tab will successfully render on the incident records that are linked to cases.

customer_information_tab_incident.png

If the tab is still not visible, backtrack on the mentioned steps and verify whether all of them were executed correctly.

Next steps

  • We still need to enable the 'Customer Activity' tab - repeat the configuration steps 1 to 10, except for Step 3, open the 'Customer Activity default' record in UI builder.
  • Need to add/modify/remove reports? Create duplicate variants of the pages and set a lower value to its order.
View original source

https://www.servicenow.com/community/next-experience-articles/exposing-customer-central-to-incidents-in-csm-configurable/ta-p/3008775