Using Subscription Notifications to Operate a Service
A common subscription offering is the services subscription model. In this model, a provider offers access to a digital service, such as connecting to the internet or streaming media content.
With SAP Subscription Billing, you can now not only create subscriptions for such services, but also trigger the activation or deactivation of the subscribed service for the user in an integrated system.
Example Use Case: Software-as-a-Service
A provider of different IT and software services offers a flexible subscription model. Users get access to the services from the day on which the subscription begins. On this day, the users enable their first-time access with a license key that they receive per email.
The subscriptions are annual and don’t have an expiration date, but users can cancel them at any time or pause them until further notice. Consequently, access to the services is disabled during a pause.
The provider configures notifications in SAP Subscription Billing so that the enablement and disablement of the software service for the subscriber is triggered automatically. The provider uses then the following notification triggers:
- Product Effective: To activate the service on the day that the subscription to the service starts.
- Pause: To deactivate the service on the day that the subscription is paused.
- Resume: To reactivate the service on the day that the subscription is resumed.
- Expiration: To deactivate the service on the day that the subscription expires.
Note: This trigger is needed if the subscriptions are cancelled, in which case they expire 30 days after the users submit their cancellation notice.
As the provider wants all subscriptions to have the same notification settings, they configure the notifications in the product. Thus, the notification settings are automatically applied to all subscriptions that are created for that product.
Accordingly, the provider creates a product for each software service in the Products app. Then, in the Subscription Notifications tab of the product, the provider creates four notifications, one for each trigger. Here you see the settings for the Product Effective notification:
Provisioning Subscriptions with License Keys
The provider adds the license key to a subscription as a technical resource in the item for the product or service. Usually, they already prepare the rest of the subscription data before a subscription starts, provision the license key once available and then let the subscription begin.
The exact steps for this look as follows:
- In SAP Subscription Billing, the provider creates the subscription in status Pending.
As it’s pending, the subscription doesn’t start (in other words, isn’t billed) until the missing data is provisioned.
- In a technical system, the license key is generated.
- In SAP Subscription Billing, the provider enters the license key into the subscription as a technical resource. Then, they complete the subscription.
The completion removes the pending status and activates the subscription as of the start date.
- When the subscription starts, this triggers an email to the subscriber with the license key.
For more information about these processes of SAP Subscription Billing, see Pending Subscriptions and Technical Resources on the SAP Help Portal.
Setting Up an Integration Process with Events
We mentioned before that the users need the license key when they access the services for the first time. The provider sends them their license key by email on the day of the service activation, which is the day on which the product becomes effective (usually, this day matches the start date of the subscription).
The provider uses the notification from SAP Subscription Billing with the trigger Product Effective to automate their activation emails. This automation is possible by enabling the distribution and consumption of the notification in their integration process, which the provider sets up following these steps:
- Registering the notification in SAP Event Mesh.
- Configuring an integration flow in SAP Cloud Integration.
Registering the Notification in SAP Event Mesh
Notifications for events are registered in SAP Event Mesh as queues. Other applications can then subscribe to these queues and trigger follow-up processes derived from the events they receive. In our example, such a process would be dispatching the activation email with the license key.
You register notification events in Event Mesh by creating a queue and assigning the corresponding topics for the events.
- See Manage Queues in the Event Mesh documentation for detailed instructions.
- See the Subscription Events package in the SAP API Business Hub for the topic names of the notifications.
To enable the dispatch of the email, the provider creates a queue for the notification with the trigger Product Effective and assigns the corresponding topic:
Configuring an Integration Flow in SAP Cloud Integration
To trigger the activation email to the subscriber, the provider sets up an appropriate integration flow. SAP Cloud Integration offers adapters to consume messages from an Event Mesh queue, like the AMQP adapter.
All the provider needs to do is to enter the connection details, the credentials, and the name of the inbound queue that contains the Product Effective notifications.
- Processes the event payload.
- Reads the customer data to get the name and email address of the subscriber.
- Sends the email.
This blog post was drafted with the assistance of Annette Klute. The use case and setup screenshots were provided by Frank Lange.