Configuring SAP BTP, Cloud Foundry Environment

Objective

After completing this lesson, you will be able to configure the SAP BTP, Cloud Foundry environment in a subaccount.

SAP BTP, Cloud Foundry Environment

SAP BTP, Cloud Foundry environment provides developers with a flexible, cloud-native environment for building, deploying, and scaling applications using open-source technologies and industry standards. It simplifies application lifecycle management and supports multiple programming languages, making it well-suited for modern enterprise development.

In this lesson, you’ll learn what the SAP BTP, Cloud Foundry environment is, why it’s important for SAP Sales Cloud and SAP Service Cloud Version 2 extensibility, and the main concepts you’ll need to start creating your own enhancements.

Note

The Cloud Foundry runtime and Cloud Foundry environment are available as part of the SAP Business Technology Platform (SAP BTP). These are formally referred to as SAP BTP, Cloud Foundry environment and SAP BTP, Cloud Foundry runtime. However, for simplicity and consistency throughout this course, we will use the short names "Cloud Foundry environment" and "Cloud Foundry runtime".

Imagine your service team needs to implement a custom logic that automatically creates a sub-case for specific customer tickets to simplify internal tracking. Alternatively, your team may want to enhance the Account detail page in SAP Sales Cloud and SAP Service Cloud Version 2 by incorporating key metrics from a third-party CRM system.

In the past, delivering these scenarios required building and managing additional infrastructure, which could be time-consuming and risky. However, SAP BTP Cloud Foundry is transforming the landscape.

The SAP BTP, Cloud Foundry environment is a managed platform for developing, deploying, and operating cloud-native applications and microservices that extend SAP solutions, such as SAP Sales Cloud and SAP Service Cloud Version 2. It handles infrastructure concerns—provisioning, scaling, and security—so you can focus on implementing sales-specific logic.

SAP BTP, Cloud Foundry environment supports rapid development and deployment, enabling you to deliver new functionality in minutes through the SAP BTP cockpit. It also provides language flexibility, supporting Java, Node.js, Python, and other runtimes. This enables the integration of SAP solutions, such as SAP Sales Cloud Version 2, with external SaaS providers or custom business logic.

Platform-managed security updates and automatic scaling ensure critical sales processes remain secure and available. The runtime also enables seamless connections to SAP services, such as SAP Identity Authentication, Document Management, and SAP HANA Cloud databases, to support your extensions.

Example: Imagine you want to create an extension that automatically validates new sales opportunities in SAP Sales Cloud Version 2 by checking customer credit scores through an external API. The Cloud Foundry environment allows you to develop this validation logic in any supported programming language (Node.js, Java, or Python) and deploy it to Cloud Foundry. It also enables you to securely integrate the logic with SAP Sales Cloud Version 2, eliminating the need to manage servers or update operating systems.

Key Concepts of Cloud Foundry Environment

Let’s explore the key concepts you’ll use to extend SAP Sales Cloud and SAP Service Cloud Version 2 with the Cloud Foundry environment.

Applications

An application is the custom code, such as a workflow extension, data integration microservice, or REST API, that addresses a specific business requirement in your business process.

How to Deploy Services

After developing a service (such as a Node.js service that enhances SAP Sales Cloud Version 2 leads with updated company information from a third-party provider), you need to push your code to the Cloud Foundry environment. It packages your application and runs it securely in the cloud.

Scaling and Management

If your lead enhancement service is heavily used by multiple sales representatives during a campaign, Cloud Foundry automatically starts additional instances to maintain high scalability and performance.

How Buildpacks Work

Buildpacks automate the setup and packaging of applications, eliminating the need for manual installation of runtimes, frameworks, or dependencies.

When pushing an application to the Cloud Foundry environment, the appropriate buildpack (e.g., Node.js or Java) prepares your application to build and run in the cloud. Most SAP Sales Cloud Version 2 extensions use system buildpacks for languages such as Node.js (used for integration APIs or webhooks) or Java (used for business rules engines).

For example, if you build a Java service for advanced opportunity scoring in SAP Sales Cloud Version 2, the Java buildpack automatically installs JDK and your Java libraries, compiles your code, and prepares it for deployment.

Services

Services are the building blocks that enable the addition of key capabilities to the SAP Sales Cloud and SAP Service Cloud Version 2 extensions. These capabilities include persistent data storage, user authentication, and document management.

Finding and Using Services

In the SAP BTP cockpit, open the Service Marketplace to find all the services entitled to your account. For an SAP Sales Cloud Version 2 extension, you might choose SAP HANA Cloud for storing custom analytics data or SAP Document Management to store signed contracts. To find more BTP services, visit: Service Catalog in SAP Discovery Center.

Displays the Service Marketplace screen of SAP BTP cockpit for a subaccount. Lists available services categorized under Development and Automation, and Foundation/Cross Services.

Service Binding

When binding a service—such as a database—to your extension, Cloud Foundry automatically injects the connection details into your application as environment variables. This allows your extension to securely read or write sales data or connect to SAP Sales Cloud Version 2 APIs.

Typical SAP Sales Cloud Version 2 Extension Scenario

Here is a typical end-to-end example of using SAP BTP Cloud Foundry to develop, deploy, and run a microservice extension. You want to create a side-by-side extension that automates follow-up tasks after a deal closes in SAP Sales Cloud Version 2.

  1. Develop

    Implement a Node.js microservice that responds to SAP Sales Cloud Version 2 webhook events (like opportunity closure) and creates follow-up tasks in an external project management tool.

  2. Push / Deploy

    Deploy your service to the SAP BTP, Cloud Foundry environment using the SAP BTP cockpit, SAP Business Application Studio or the local Command Line Interface (CLI).

  3. Bind Services

    Bind your application to SAP Cloud Identity Services and the Destination Service to enable user authentication and secure API calls. Optionally, connect it to a database to track processed events.

  4. Integrate

    Register your extension’s endpoint in SAP Sales Cloud Version 2 so that it triggers on the specified events.

  5. Run and Scale

    Cloud Foundry ensures your application runs reliably and scales as the sales volume grows.

Enabling and Configuring Cloud Foundry in a Subaccount

Now, let's activate the Cloud Foundry environment where your applications will be deployed and run.

  • Choose your subaccount in the SAP BTP cockpit.Displays SAP BTP cockpit's Account Explorer for a global account showing a list of Subaccounts.
  • Navigate to the Cloud Foundry Environment section.
  • Choose Enable Cloud Foundry.Displays SAP BTP cockpit's Subaccount Overview screen showing the Cloud Foundry Environment, with the Enable Cloud Foundry button highlighted.
  • In the Enable Cloud Foundry pop-up:Displays the Enable Cloud Foundry pop-upwith fields for Environment, Plan, Landscape, Instance Name, and Org Name.
    • Select a Plan, such as standard or free. These are the service plans to which you are entitled.
    • Choose a Landscape, for example, cf-eu10. Some regions have more than one landscape.
    • Enter the Instance Name and ensure that it’s CLI-friendly.
    • Assign an Org Name; each Cloud Foundry environment has exactly one organization.
    • Select Create to close the pop-up.

Enabling Cloud Foundry in a subaccount creates a Cloud Foundry Org. Within this Org, you can create multiple spaces. Note that each subaccount can contain only one Cloud Foundry org, but there is no limit to the number of spaces within that org.

Displays SAP BTP cockpit's Subaccount Overview screen showing the Cloud Foundry Environment section with API Endpoint, Org Name, Org ID, and Memory Limit.

Once your Cloud Foundry org is created, the environment is ready, and you can view the API endpoint and organization details.

Note

Usually, when you run the Build Code booster, it automatically creates the Cloud Foundry environment and assigns the memory quota to your Cloud Foundry Org. If you see that the Org Memory Limit is 0MB, you can go to Entity Assignment from your Global Account and manually assign the memory quota by adding the service Cloud Foundry Runtime with the MEMORY service plan.Selection screen for services under Subaccount Sales Service Cloud V2 Extensibility shows Available Plans, like MEMORY service plan.

You can now copy and request the API Endpoint URL in a browser tab or simply choose the Open link in a new browser tab button. You will need it for the upcoming lessons.

A browser tab displaying JSON data from an API endpoint for hana.ondemand.com. The response includes links, metadata, and configurations for network policies, login portals, logging endpoints, app SSH, and cloud controllers.

Note that there are currently no Cloud Foundry "Spaces" available. You will need at least one space to deploy and run applications.

A space is a shared area within the Cloud Foundry environment where you can deploy and manage applications, as well as connect to services. It helps isolate different project environments. You can create unlimited spaces within a single organization—there's no limit. By default, each space uses the organization’s quota. To control resource usage for a specific space, you can set a space quota. For details, see Managing Space Quotas.

Choose Create Space on the top right of the Cloud Foundry Environment section.

Overview screen of the SAP BTP cockpit displaying details about a Subaccount for Sales Service Cloud V2 Extensibility, highlighting Create Space button.

In the Create Space pop-up, enter a name, such as dev, and choose the space roles to assign to the current user.

Create Space dialog for assigning roles, including Space Developer, Space Supporter, Space Manager, and Space Auditor. Users can input a name and select roles, with options to Create or Cancel action.

You can view all the spaces, deployed applications, and service instances in each space on the Subaccount overview screen.

Summary

  • The Cloud Foundry environment in SAP BTP offers a managed, cloud-native platform for building, deploying, and scaling applications. These applications extend SAP solutions, such as SAP Sales Cloud and SAP Service Cloud Version 2. Cloud Foundry environment supports multiple programming languages and automates infrastructure management.
  • Applications are custom microservices or APIs that meet business needs, developed in any supported programming language and deployed to Cloud Foundry for secure, scalable cloud execution.
  • Buildpacks automate the packaging and runtime setup of applications (such as Node.js or Java), ensuring dependencies are installed, and the code is ready for deployment.
  • Services like SAP HANA Cloud, authentication, and document management are easily integrated through service binding, which injects connection details directly into your applications.
  • Enabling Cloud Foundry in an SAP BTP Subaccount involves setting up an organization and one or more spaces, which act as isolated environments for deploying and managing your applications and services.