Embedding the Extension App in SAP Sales Cloud and SAP Service Cloud Version 2

Objective

After completing this lesson, you will be able to create a mashup to display the extension app within the SAP Sales Cloud and SAP Service Cloud Version 2 user interface.

Embed the Extension App into SAP Sales Cloud and SAP Service Cloud Version 2

In this lesson, you’ll learn how to embed the extension app as a mashup in SAP Sales and Service Cloud Version 2. This consists of two steps:

  • Mashup Authoring
  • Displaying the Mashup

These steps will be demonstrated in the following video and explained in more detail in the subsequent chapters.

Mashup Authoring

Mashups are maintained under SettingsAll SettingsExtensibility AdministrationMashup Authoring. You can open the Settings from the User Menu in the upper right corner.

If you’ve visited this setting before, you’ll find it under Recently Visited within the settings Dashboard. Additionally, you can pin it to the Dashboard for quicker navigation in the future.

Hint

For users of SAP Sales Cloud or SAP Service Cloud Version 1 (formerly named SAP Cloud for Customer), the most noticeable change is the place where mashups are maintained. This is because there's no Administrator work center in SAP Sales and Service Cloud Version 2. Other steps are similar.

There are two methods for creating the mashup. The preferred method involves connecting SAP Sales and Service Cloud Version 2 with SAP Build Apps, as outlined in the first unit of this course. This method enables SAP Build Apps to create the mashup for you in the final step of the deployment process. Alternatively, if this step is missed or intentionally skipped, the mashup can also be created manually. Regardless of the creation method, you'll need to edit the mashup to include the parameter for passing the account ID to the extension app.

Screen capture of the Mashup Authoring setting in SAP Sales and Service Cloud Version 2 with the automatically created mashup and its URL highlighted.

Manual Mashup Creation

To create the mashup manually, navigate to Mashup Authoring and choose the + button to create a new mashup. Enter a name and the URL that points to the extension app. After that, you can continue reading in the Maintaining the Account ID Parameter​ section.

Hint

You can find the URL of the extension app in the SAP BTP CockpitHTML5 Applications. Refer to the image below.

Screen capture of the SAP BTP cockpit with the HTML5 Applications section and the deployed sample app highlighted.

Automatic Mashup Creation

During deployment within SAP Build Apps, the system automatically creates a plain mashup with the correct target URL. However, you'll need to add the account ID parameter. To do this, navigate to Mashup Authoring and search for your mashup. The name includes the term buildapps and the app ID, which you can find in the browser’s address bar when editing or previewing the app in SAP Build Apps. The next section describes how to add the account ID parameter.

Maintaining the Account ID Parameter

Regardless of how the mashup was created, you’ll need to add the parameter for passing the account ID to the extension app in the Mashup Authoring settings screen. Initially, the screen appears as follows.

Screen capture of the Mashup Authoring screen in SAP Sales and Service Cloud Version 2 showing the empty parameters list, with the Add Parameter button highlighted.

Use the button to add the parameter and make sure you type the name exactly as it’s defined in SAP Build Apps, as it’s case-sensitive. In this course demonstration, the name is accountId. Since displaying the extension app without a proper account ID doesn’t make sense, you can enable the Mandatory flag.

The following screen capture shows the defined parameter:

Screen capture of the Mashup Authoring screen in SAP Sales and Service Cloud Version 2 showing the final state of the mashup, with the maintained account ID parameter highlighted.

The SAP Help Portal provides further details about mashup authoring and other related topics, such as the content security policy.

Display the Mashup in the User Interface

In this lesson, I'll explain and demonstrate what to do with the mashup previously created. After you configure the mashup with the account ID parameter, you need to display it on the UI screen where users will use the extension app. You can do this using the adaptation mode in SAP Sales and Service Cloud Version 2. Depending on your mashup content, you can place it into an existing part of the screen, create a new section, or even create a separate tab for the mashup.

You can map the mashup parameter to a standard or extension field of the object associated with the current screen, which in this case is the Account object. Pay attention to the exact field name and object node, as there are several ID fields with different IDs and ID types, such as the human-readable Account ID, sometimes referred to as Display ID.

Remember that the extension app needs the account’s technical ID, which is a UUID from the data type’s perspective. You can find it under Other Details/Technical ID. If this node-field combination isn’t initially visible, search for it in the Add more fields menu.

Screen capture of the Account Details screen in SAP Sales and Service Cloud Version 2. The Adaptation mode is active and the Edit Properties window for the newly created mashup is visible with a dropdown for the account ID parameter binding is open. The entry Other Details/Technical ID is highlighted.

Once you’ve displayed the mashup with the correct parameter binding, you can exit the adaptation mode by selecting the End Session button at the top of the screen.

Lesson Summary:

This lesson demonstrated how to embed the extension app as a mashup in SAP Sales and Service Cloud Version 2. The next and final lesson of this course explains how to test the embedded extension app.

Log in to track your progress & complete quizzes