SAP Subscription Billing Query

With the SAP Subscription Billing Query function, you can query subscriptions, customers, bills, and usage records to retrieve additional data from the SAP Subscription Billing platform for further enrichment. This enrichment can provide more context and details to the subscription billing data, enabling deeper insights, improved decision-making, and more efficient operations. Enriched data from the SAP Subscription Billing Query function can be passed down for further processing by the next function in the stream.

You open the function editor for the SAP Subscription Billing Query function by placing the function in a stream and double-clicking the function, or hovering the icon and clicking on the Edit button.

Settings

Feature editor configuration.png

In the Configuration tab of the function editor, you have the following settings:

Setting

Description

Setting

Description

Environment

Tenant

Enter the SAP Subscription Billing tenant name.

Region

Enter the SAP Subscription Billing region.

Authentication

Select from secrets wallet

Select a secret with the SAP Subscription Billing secret type.

SAP API query

Query option

Select the query option. The following query options are available:

Note!

See the respective API documentation of the query option for information on how to use the parameters according to SAP’s guidelines.

Customer number

Note!

This field only appears if you selected the GET_customers - customer number query option.

Enter the customer number of the customer in SAP Subscription Billing.

Identifier

Note!

This field only appears if you selected the GET_bills - specific identifier or GET_subscriptions- specific ID query options.

Enter the identifier of the bill or subscription in SAP Subscription Billing.

Query parameters

Add parameters

Note!

The Query parameters section only appears when you have selected a query option.

Click Add parameter to add a query parameter to the query filter. You can specify the query parameters by selecting a Key and specifying a Value. You can also add a new key in the Add key field.

Add key.png

Note!

The query parameter keys are different for different SAP API endpoints. See the respective API documentation of the query options for the parameters according to SAP’s guidelines.

Operational settings

Retry on fail

Select the Retry on fail check box to retry the operation if any 5xx error codes have been returned due to intermittent server issues.

You can specify the number of retries in the Number of retries field, where the retries will be attempted inside the dynamically adjusted period of retry time.

Retry on fail.png

Note!

The maximum number of allowed retries is 12 and all retries will be attempted in a total span of a maximum of 68 minutes.  

Action on error

You can select to either Ignore or Stop the stream if requests are still failing when the specified number of retries have been executed.

  • Ignore: Select to ignore the error and the stream will keep on running.

  • Stop the stream: Select to stop the stream.

The default value is Ignore.

Input/Output Data

Input Data

Incoming data from the previous function in the stream, and the query using parameters based on the SAP API guidelines for each query option.

Input data.png

Output Data

Subscriptions, customers, bills, or usage records data retrieved from SAP Subscription Billing according to the query option and configured parameters of the function.

Output data.png

The headers enforce security and caching policies, and the parameters may include the status code, several headers, the subscriptions, customers, bills, and usage records details, and the request URL with query parameters.

Below is a sample output data.

{ "SAPSBSQueryStatusCode": 200, "SAPSBQueryResponseHeaders": { "cache-control": "no-cache, no-store, max-age=0, must-revalidate", "content-type": "application/json", "date": "Wed, 16 Oct 2024 06:11:04 GMT", "expires": 0, "hybris-count": 192, "origin-trial": "AqsFcIseqUSkehWVG5P/4YrO6zG/R+XG626sjupdsi1SInyZd7e5Up11+UTOS6hTI7LgQSWmLDXaY7cG8BEXFwEAAABaeyJvcmlnaW4iOiJodHRwczovL2Nsb3VkLnNhcDo0NDMiLCJmZWF0dXJlIjoiVHBjZCIsImV4cGlyeSI6MTczNTM0Mzk5OSwiaXNTdWJkb21haW4iOnRydWV9,Avu6rn7emV5gK8gvyGHlX8TMqM9uo1FacP2j/RWTq+8j+yKnqcTO0TQh0bXJ/7QntxD4/JzXv8aXoqxxZQuqXgYAAABdeyJvcmlnaW4iOiJodHRwczovL29uZGVtYW5kLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHBjZCIsImV4cGlyeSI6MTczNTM0Mzk5OSwiaXNTdWJkb21haW4iOnRydWV9,ArvT4WSrF873NbSS+NAJKdPME9SKVCShrlP/AuMgZRPm1SZfARgf3U1XtrXWLAjRldodFhNwTZYh74Axpq2wOgEAAABYeyJvcmlnaW4iOiJodHRwczovL3NhcC5jb206NDQzIiwiZmVhdHVyZSI6IlRwY2QiLCJleHBpcnkiOjE3MzUzNDM5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==", "pragma": "no-cache", "referrer-policy": "same-origin", "x-content-type-options": "nosniff", "x-correlationid": "bb7a3a8c-4e09-454f-47c5-27abcd0f13b6", "x-count": 192, "x-dns-prefetch-control": "off", "x-download-options": "noopen", "x-frame-options": "SAMEORIGIN", "x-pagecount": 20, "x-vcap-request-id": "bb7a3a8c-4e09-454f-47c5-27abcd0f13b6", "x-xss-protection": 0, "transfer-encoding": "chunked", "strict-transport-security": "max-age=31536000; includeSubDomains; preload;" }, "SAPSBQueryResponse": [ { "customerNumber": "1705430264", "personalInfo": { "firstName": "A", "lastName": "Anthony" }, "corporateInfo": {}, "customerType": "INDIVIDUAL", "createdBy": "sb-revenue-cloud!b3726|revenue-cloud!b1532", "changedBy": "sb-revenue-cloud!b3726|revenue-cloud!b1532", "createdAt": "2019-02-27T11:05:41.732Z", "changedAt": "2019-02-27T11:05:41.732Z", "externalObjectReferences": [] } ], "SAPSBQueryRequest": { "url": "https://sap-hrc-eu10-cert70954.eu10.revenue.cloud.sap/api/business-partner/v3/customers", "params": {} } }

Related content