Onboarding Third-Party Prediction Services

Objective

After completing this lesson, you will be able to integrate a Third-Party Prediction Service with SAP Intelligent Agriculture

Third-Party Prediction Service with SAP Intelligent Agriculture

Farming Intelligence

As mentioned in module 1, Farming Intelligence supports agribusinesses in implementing strategies for farming decision support into farming processes and services. SAP Intelligent Agriculture provides multiple tools to achieve that goal. Key elements of the solution are standardized predictions and recommendations that can be used to inject information into the farming process, tailor-made for farmers.

Based on captured data, like sensor data, weather data, field scouting data, and so on, combined with historical data from field and farm, statistical techniques like machine learning, data mining, and others can be used to do predictive analysis.

SAP Intelligent Agriculture provides the data source for any analysis around field and farm by storing farming data in a structured, domain-driven data model. To use that data for analytics, there are multiple possibilities.

Extracting that data and enriching it with additional insights from third parties or your own decision-support models to feed back the results in a standardized way is one alternative. There are two options to feed those results back into the solution.

Predictions

A prediction is a statement or an indication about future events or data. Within SAP Intelligent Agriculture, predictions are used to define and quantify key indicators needed by the operating roles to understand the performance of farming processes on crop zone, field or farm level (as examples) and gain insights on where there is potential for optimization.

Recommendations

A recommendation is a plan on when and how to best execute certain farming operations, based on experience, common standards and/or data analytics.

A part of Farming Intelligence includes applications to onboard and manage external services, such as yield prediction, and use these services to request and receive results that can guide your operational planning.

Services App Overview

The Services app, available on the SAP Intelligent Agriculture homepage, allows users to onboard external services to optimize their farming processes and easily manage external services that can be used for requesting and persisting data within SAP Intelligent Agriculture.

The solution follows a metadata-driven approach that requires the external service to provide a proper description of its capabilities. Refer to this End-to-End Flow for more information.

Note

Prerequisites

There are important prerequisites before using the Services app:

  • The commercial contract to use an external service offered by a partner must already exist. This process is managed outside of SAP Intelligent Agriculture.
  • The users must have the Administrator role assigned to them.
  • The required master data must be created beforehand, using the master data apps or APIs. Refer to Concepts for more information.
  • You must have all the service information available, including the Service URL and the authentication credentials.

Onboard an External Service

After entering the Service app, the user will see the list of existing services and related information. To onboard an external service, the user can select Create.

SAP Services interface with filters for Search, Editing Status, Provider, Status, and Connectivity at the top. The status filter is set to Active. Below is a table listing two services: 1. Beet/Wheat Yield Prediction Service, Service Name: Yield Prediction Service, Service Version: 1.0.1, Provider: Vista GmbH - Remote Sensing in Geosciences, Type: Crop related Predictions, Status: Active, Connectivity: Connected, Last checked: July 3, 2024, 5:44:19 AM.2. Sugar Beet Yield Prediction Service, Service Version: 1.0.0, Provider: Vista GmbH - Remote Sensing in Geosciences, Type: Crop related Predictions, Status: Active, Connectivity: Connected, Last checked: March 7, 2024, 4:11:47 AM. The Create button is highlighted in red and is located above the table, to the right.

As a first step, the user must maintain the required information in the Create Service dialog box. Enter the Name of the service, a short description (optional), the Service URL, and the authentication details.

The Service URL can either be the URL for the external service that you want to onboard, or the URL from SAP Integration Suite, if it is used as middleware. It is important that the external service provides the /metadata,/ request, and /unsubscribe endpoints. Use the following link to learn more about Endpoint Details in SAP Help Portal

The supported authentication types are Basic and OAuth. The input criteria differ based on the authentication type.

Note

If there are any errors while onboarding the service, you will receive a popup message with the error description.
Two Create Service dialog boxes are shown. The left dialog box includes fields for: - Name (required) - Description - Service URL (required) - Authentication (required) with Basic Authentication selected - Username (required) - Password (required) At the bottom are Create and Cancel buttons. The right dialog box includes fields for: - Name (required) - Description - Service URL (required) - Authentication (required) with OAuth 2.0 Client Credentials selected - Client Id (required) - Client Secret (required) - Token Service URL (required) At the bottom are Create and Cancel buttons.

When all the required details are maintained, choose Create. Your newly onboarded service will be displayed with some additional information that has been retrieved from the metadata file.

Under Service Information, you can find the information previously entered which can be further edited, plus additional support information relevant for the specific service.

Under Request Parameters, you can find the parameters that the external service expects as part of the service request.

  • Request Values list the data model entities that will impact the information required from the user during service request creation in the Service Requests app. If the service restricts an entity to specific values, only those values can be selected. If the service does not restrict the value list (indicated by a *), the user can select from all available values. In our example, a request can be created for any crop zone, but only for a Kiwi Crop.
  • Additional Parameters lists the information that the external service requires as additional input to ensure the user is allowed to submit the request. These parameters are displayed as input fields in the last step of the service request creation process. In our example, the Contract ID is required to submit a service request.
  • Under Result Parameters, you can find the entity in SAP Intelligent Agriculture where the service will send the results (for example KPI Values).

As a final step, under the Business Context section, the user needs to specify in which farm(s) this service can now be used.

Select Assign and then select the relevant farm(s) and select Ok.

Business Context screen displays a section named Farm Assignments with an empty list and an Assign button. When Assign is clicked, a pop-up window titled Select: Farm Assignments appears, showing a list of available farms. The list includes options such as Clewiston Hills, Grain Farm, Green Valley Farm, and Kiwi Farm. Grain Farm is selected. The pop-up also contains search functionality, a Go button, Show Filters option, and OK and Cancel buttons at the bottom.

When all the required information is maintained, select Create to complete the service onboarding process. The onboarded service status will be set as Connected after the initial onboarding completes successfully, but will be marked as Inactive.

SAP Service screen for Beet/Wheat Yield Prediction Service displaying prediction details for crop yield using remote sensing. The status shows Active or Inactive, and connectivity is Connected. Last checked date is Jul 3, 2024, at 5:44:19 AM. Various tabs are available: Service Information, Connectivity Information, Request Parameters, Result Parameters, and Business Context. Service details include name, version, provider, and support information. Connectivity information highlights Basic Authentication. Request parameters list entities such as CropZones and Crops. Result parameters include KPIValues. Business Context shows Farm Assignments with Grain Farm selected. Options to edit, delete, activate or deactivate the service, and test connectivity are present.

The user must activate the service by selecting Activate to enable business users to use the service and submit service requests within the Service Requests app.

When it is done, the service status will be set as Active. The user can choose to deactivate the service when it should no longer be available for request creation.

SAP Service screen for Beet/Wheat Yield Prediction Service with options to edit, delete, deactivate, and test connectivity. The service is active and connected, last checked on Jul 3, 2024, at 5:44:19 AM. Tabs include Service Information, Connectivity Information, Request Parameters, Result Parameters, and Business Context. Clicking the Edit button opens an editable view with General Information, including fields for name and description, service details like service name, version, provider, and support details. Connectivity information section and options to save or discard changes are available, along with an Edit Connectivity button.

By selecting Edit, the user can change the service details, such as service name, authentication, and farm assignments.

To make changes to the authentication details, the user must select Edit Connectivity within the Connectivity Information tab, and select Save after updating the details.

The user also has the option to delete individual services by selecting them in the services list and choosing Delete, or by selecting Delete within a specific service screen. A confirmation message is provided when the deletion is successful.

Caution

You cannot delete a service if it has already been used to create service requests.
The SAP Services screen shows a list of services with options to search and filter by editing status, provider, status, and connectivity. Two services are listed: Beet/Wheat Yield Prediction Service (version 1.0.1) and Sugar Beet Yield Prediction Service (version 1.0.0), both marked as active and connected. The Beet/Wheat Yield Prediction Service is selected. A Delete button is highlighted. Below, the detailed view of the Beet/Wheat Yield Prediction Service displays its status as active and connected, with the last check on Jul 3, 2024, at 5:44:19 AM. Tabs available include Service Information, Connectivity Information, Request Parameters, Result Parameters, and Business Context. The Delete button is highlighted here as well.

To verify if the connection is still valid and to identify the reasons causing connection issues, the user can select Test Connectivity.

Log in to track your progress & complete quizzes