This section outlines the steps for replicating subscriptions from SAP Subscription Billing to SAP Entitlement Management using SAP Event Mesh.
Prerequisites
Create a Service Key
- In SAP BTP, create a service instance of SAP Entitlement Management OAuth service.
- Generate a service key.
- Note down the client ID, client secret, and OAuth token URL.
Activate Outbound Events
- In SAP Subscription Billing, navigate to Business Configuration.
- Select Integration Settings.
- Toggle Activate Outbound Events.
Define Queue and Subscribe to Events
- In SAP BTP, go to your subaccount.
- Open the Enterprise Messaging tile.
- Create a queue subscription for the topic: sap/billing/sb/ce/sap/billing/sb/subscription/.
Integration Steps
Add SAP Event Mesh Credentials
- In SAP Cloud Integration, go to Security Material.
- Add an OAuth2 credential using the details from the SAP Event Mesh service key.
Add SAP Entitlement Management Credentials
- Add an OAuth2 credential for SAP Entitlement Management.
- Use the details from the service key created earlier.
Add SAP Subscription Billing Credentials
- Add an OAuth2 credential for SAP Subscription Billing.
- Use the service key details from SAP Subscription Billing.
Configure SAP Entitlement Management
- In SAP Entitlement Management, define a status model with the necessary status codes and transitions.
- Configure the entitlement generation rule: Query for Existence Before Creation.
- Set up background jobs for status changes.
Configure Value Mapping
- In SAP Cloud Integration, navigate to the SAP Entitlement Management with SAP Subscription Billing package.
- Configure value mapping between subscription parameters and entitlement attributes.
Replicate Subscription
- When a subscription is created or modified in SAP Subscription Billing, it triggers an event. This event is processed through SAP Event Mesh and forwarded to SAP Cloud Integration.
- SAP Cloud Integration then generates an entitlement for each subscription item in SAP Entitlement Management.
- The entitlement number is updated back to the subscription item in SAP Subscription Billing.
Considerations
- Ensure that the integration flow is designed to handle multiple entitlements for a single subscription item if required by the business model.
- Regularly monitor and maintain the integration to ensure data consistency and accuracy between SAP Subscription Billing and SAP Entitlement Management.
- Test the integration thoroughly to handle various scenarios, including subscription creation, modification, renewal, and expiration.
Summary
Subscribes to subscription events in SAP Subscription Billing and replicates each subscription item as a separate entitlement through SAP Event Mesh and Cloud Integration.