Skip to content

feat (outputmanagement): added output management integration#161

Open
Venkatakrishnan774 wants to merge 32 commits into
SAP:mainfrom
Venkatakrishnan774:sap_om_poc
Open

feat (outputmanagement): added output management integration#161
Venkatakrishnan774 wants to merge 32 commits into
SAP:mainfrom
Venkatakrishnan774:sap_om_poc

Conversation

@Venkatakrishnan774

@Venkatakrishnan774 Venkatakrishnan774 commented Jun 14, 2026

Copy link
Copy Markdown

Disclaimer: Do not include SAP-internal or customer-specific information in this PR (e.g. internal system URLs, customer names, tenant IDs, or confidential configurations). This is a public repository.

Description

Output Management is a BTP shared service which has features like sending documents to external system in various channels like EDI/EMAIL/Print. As part of this, we are mainly concentrating on the email use case where one can send email via our framework along with attachments if necessary.

We are exposing capabilities via util methods of sending email as BTP destination based and via integrated MCP hub. When using the MCP Hub way, we are giving the capability to construct the required payload and invoke the util functions. When using the BTP destination way, we are giving the options to input the destination details and the payloads.

Related Issue

Closes #<issue_number>

(Link to the GitHub issue this PR addresses)

Type of Change

Please check the relevant option:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

Describe how reviewers can test your changes:

  1. Step 1
  2. Step 2
  3. Expected result

Checklist

Before submitting your PR, please review and check the following:

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

If this PR introduces breaking changes, please describe:

  • What breaks
  • Migration path for users
  • Alternative approaches considered

Additional Notes

Add any additional context, screenshots, or information that would help reviewers.

@Venkatakrishnan774 Venkatakrishnan774 requested a review from a team as a code owner June 14, 2026 12:21
@cla-assistant

cla-assistant Bot commented Jun 14, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ Venkatakrishnan774
❌ lokeshkumarkuntal
You have signed the CLA already but the status is still pending? Let us recheck it.

@betinacosta

Copy link
Copy Markdown
Member

Hi. Could you give a more detailed description of this new feature for future reference? Also, is necessary that the title follows commit convention, for exemple: feat: added output management integration.

Comment thread tests/outputmanagement/unit/__init__.py
Comment thread src/sap_cloud_sdk/outputmanagement/clients/output_requests_client_impl.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/clients/output_requests_client_impl.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/clients/output_requests_client_impl.py Outdated
@Venkatakrishnan774 Venkatakrishnan774 changed the title Added output management integration feat: added output management integration Jun 18, 2026
Comment thread src/sap_cloud_sdk/outputmanagement/clients/output_requests_client_impl.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/client_provider.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/clients/email_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/clients/email_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/clients/output_requests_client_impl.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/clients/output_requests_client_impl.py Outdated
Updating Local Branch
@betinacosta betinacosta changed the title feat: added output management integration feat (outputmanagement): added output management integration Jun 25, 2026
Comment thread src/sap_cloud_sdk/outputmanagement/client.py Outdated
)
"""

def __init__(self, service_client):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing type annotation for service_client

return error_mapping.get(status_code)

@staticmethod
def _create_output_error_response(error_type, message) -> OutputResponse:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing type annotation for error_type and message

def validate_email_parameters(
notification_template_key: str,
to: List[str],
business_document: dict,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

business_document: Dict[str, Any]

to=to_emails,
business_document=business_document,
cc=[cc_email] if cc_email else None,
template_language="en",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template_language will always be en? Or is something that we should ask for and have a default if not pass?

Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
Comment thread src/sap_cloud_sdk/outputmanagement/_service_client.py Outdated
logger = logging.getLogger(__name__)


def create_client(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this receive a DestinationCredentialConfig as well? And then, if this object is not passed, validate the other params? You can take a look in other modules, such as auditlog_ng, for an example and see if this can be applied here.

frozen = True
str_strip_whitespace = True

def get_destination(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing return type annotation

# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
# SPDX-License-Identifier: Apache-2.0

"""Integration-style unit tests for output management module."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integration tests should be in a different folder, and be proper integration test, if possible, and if not possible, a justification must be given. You can look destination module integration tests to see an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants