A Prototype to integrate SAP C4HANA and S4HANA as a Smart Service Solution
The original version of this article is written in Chinese for a local Partner workshop in China. Now I translate it into English so that more guys could read it š
This year SAP has announced the coming of new in-memory customer experience (CX) suite solution, C/4HANA, which consists of the five cloud solution below.

As many Chinese partners keep asking the details of these five cloud, I have made a little bit more explanation here.
(Sorry for Chinese, as I don’t have enough time to manually translate every article of mine into English).
More questions are asked from our partners: is there any concrete use case which demonstrates the integration scenario between C/4HANA and S/4HANA?
Here I can provide one example. This show case as a prototype is developed by SAP Chengdu Digital Innovation Space located in China. The appearance of the building could be found below:

Please kindly note that some features described in this blog are just developed for prototype only, which are not available in SAP standard product for the moment.
Let’s first have a look at the scenario of this show case. We choose SAP Cloud for Customer(C4C) which belongs to Service Cloud in C/4HANA and integrates it with SAP S/4HANA.
Two Personas in user storyļ¼
ę¾ęµ·ē – end userļ¼who would like to buy a Mechanical Arm. I will use āę¾ęµ·ē” to represent end user in the left part of this blog.

ę¾ęµ·ē will use Wechat app in his mobile phone to use all services provided by this prototype.
Wechat is a very popular mobile application in China, which has more than 1 BILLION active user per month.
ęęå – a service agent who works for the Mechanical Arm Manufacture, responsible for Arm installation as field service.

Here below is user story:
1. A customer named ę¾ęµ·ē has ordered a Mechanical Arm in the web and subscribed the official account(å
¬ä¼å·) of Mechanical Arm Company in Wechatć

( not latest data, only till 2016 Q3 )
Based on the information maintained by ę¾ęµ·ē in the order( such as name and mobile phone number), as long as he subscribed the Wechat account, the Wechat message server will receive this subscription event and then can trigger the account creation in SAP system.
A new account will be created for ę¾ęµ·ēćBased on the real situation, you could choose to create it in C4C or S/4HANA.
If you would like to trigger the account creation in C4C via Wechat subscribe event, you can refer to this blog Integration of WeChat and C4C Service Ticket on HTML5 Client for detail.
On the other hand, if you would like to have account creation in S/4HANA, you can expose the S/4HANA account creation API via SAP Cloud Connector plus SAP Cloud platform, so that the application in internet network can consume those services hosted in corporate network.
2. The worker of Mechanical Arm company has packaged the device into a big box, and paste a QR code as a label onto the box. The QR code contains the serial number of this very device. Every sold device has a corresponding equipment instance created in S/4HANA system created in tcode IE01, and the serial number is one field in equipment model.
Once the package is transported to ę¾ęµ·ē’s site, he scanned the QR code via Wechat.

Once the QR code is scanned, another event will be triggered in Wechat message server, which will then trigger a pre-configured function module in S/4HANA, which stores the serial number and ę¾ęµ·ē’s account information together. With this automatic step, the relationship between serial number of sold device and ę¾ęµ·ē is established, without any manual input of Mechanical Arm company’s service agents in S/4HANA.
3. Now ę¾ęµ·ē can schedule an installation date via self-service in Wechat. Open the schedule UI, the current location of ę¾ęµ·ē is automatically detected by GPS module of mobile phone and filled in UI.

The field service agents list is populated by C4C backend service which can automatically match the available agents based on the schedule date filled by ę¾ęµ·ē.
Finally ę¾ęµ·ē picked ęęå and confirm the schedule. Here below is employee data for ęęå maintained in C4C.

Once the on-site installation schedule is confirmed by ę¾ęµ·ēļ¼there is a message popped up in ęęå’s C4C application in his mobile phone to notify that a new task is coming for him.

The message text is: ä½ ęę°ēå·„åćēØę·é¢å®äŗäøéØå®č£
ęå”ļ¼čÆ·åę¶ę„ēå·„å详ę
ć
Translated in English: You have a new task. A customer has scheduled a on-site installation service, please check task detail in time.
ęęå taps the notification to enter the task detail view in C4C mobile application.

When it comes to the installation date, beforeęęåstarts to come to ę¾ęµ·ē’s site, he clicks the button highlighted above in C4C application toolbar to share his real position to ę¾ęµ·ēć
Now in ę¾ęµ·ē’s Wechat he can see the distance between him and ęęå in the map, which is refreshed every 5 seconds.

5. Now ęęå has reached ę¾ęµ·ē’s site and after some hard work, he has finished the device installation. Now ęęå opens his C4C mobile application, press button “push bill” to send the current bill which contains detail expense to ę¾ęµ·ēć
In S/4HANA there is some cross-selling condition records maintained for this installed arm device, for example the corresponding cleaner(å·å“å²ę“ęŖ) for the arm.

Those cross-selling parts are retrieved from S/4HANA and displayed in ęęå’s C4C application. ęęå persuades ę¾ęµ·ē to buy this cleaner as well.
So final bill pushed to ę¾ęµ·ē’s Wechat also includes this cleaner.

ę¾ęµ·ē receives bill in his Wechat, checks and pays the bill.

6. after ę¾ęµ·ē has payed the bill, he receives one survey regarding his satisfaction of current installation service.

For this scenario, we make use of survey model in S/4HANA, develop a function module which encapsulates S/4HANA survey API and expose it to Wechat via SAP Cloud Connector.

Once ę¾ęµ·ē has filled survey in Wechat, the survey result is written back to S/4HANA.
Regarding how to submit S/4HANA Survey result, please refer to my blog Use ABAP code to fill CRM Survey question and submit.
Prototype architecture

Legend explanation
1. The white block represents the developed content for this prototype, consisting of:
- new code, for example the C4C API endpoint and S/4HANA API endpoint in the graph points to the new function modules we created in ABAP Netweaver for this prototype.
- new configuration, for example some new destination configuration created in SAP Cloud Platform.
- new data model, for example new CDS view created in S/4HANA to store user survey result data. Then besides SAP standard survey display UI, we can develop our own analytics UI to render survey result using various open-source UI library consuming these new CDS view as data source. For one attempt please refer to my blog Develop your own Chart to visualize your CRM Survey result.
2. The light green block means the message server for Mechanical Arm company’s subscription account, which is deployed in Ali Cloud Platform.
3. The dark green block means the standard functionality in SAP product.
- Account Management: after ę¾ęµ·ē has subscribed Mechanical Arm company’s Wechat account, there is a new account generated in C4C, which consumes the OData service provided by C4C Account Management.
- Service Ticket: the task sent to ęęå and the bill received by ę¾ęµ·ē are also technically implemented via Service Ticket BO in C4C.
- Offline Pricing: For simplicity reason in this prototype we didn’t use the on-line pricing solution in C4C which integrates with S/4HANA.
- Product Master: Product Master used in C4C task and bill are replicated from S/4HANA via HANA Cloud Integration.
4. The grey block means the SAP products involved in this prototype:
- C4C
- S/4HANA
- SAP Cloud Connector
- SAP Cloud Platform
The four roles in this prototype, ę¾ęµ·ēļ¼ęęåļ¼C4C and S/4HANA have the following interactions demonstrated via sequence diagram:
Hope this prototype could give you some basic understanding about how S/4HANA and C/4HANA could be combined as an integrated solution for our users.
I will upload the video of this prototype into this blog soon.
Nice blog Jerry. Great business scenario solution which can be implemented vastly in service industry.