From bdc4d3df1980e67aa68fd1469e73dd00a10effbf Mon Sep 17 00:00:00 2001 From: kossevv Date: Fri, 11 Apr 2025 16:41:31 +0300 Subject: [PATCH 1/6] Create intro.md --- .../Finance Agents SAP BTP Connector/intro.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md b/independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md new file mode 100644 index 0000000000..5b929efe5a --- /dev/null +++ b/independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md @@ -0,0 +1,35 @@ +# Proposal - Finance Agents SAP BTP Connector + +The Finance Agents SAP BTP Connector enables integration between the Microsoft Copilot for Finance Outlook Add-in and any SAP ERP system, using the SAP Business Technology Platform (BTP) as a middleware layer. The connector exposes a REST API on BTP, which in turn communicates with the underlying ERP system via its native APIs. This setup allows the Copilot for Finance add-in to securely access and interact with ERP data through a Power Platform custom connector, using OAuth 2.0 authentication. + +## Prerequisites +You will need the following to proceed: +- A Microsoft Power Apps or Power Automate plan with custom connector feature +- The Finance Agents SAP BTP Connector MTAR package to deploy on SAP BTP +- An SAP ERP system: S/4HANA (On-premise / Private / Public Cloud) or SAP ECC 6.0 + +## Supported Operations +The connector supports the following operations. + +### Contacts +- List contacts: Retrieves ERP contacts based on email or phone number +- Create contact: Creates a new contact in the ERP system +- Update contact: Updates an existing contact in the ERP system + +### Customers +- List customers: Retrieves a list of customers from the ERP system +- Account statement: Provides a customer's account statement in PDF format +- Activities: Retrieves a list of customer-related activities +- Aged balances: Returns aging balance reports for a customer +- Invoice documents: Downloads invoice documents in PDF or ZIP format +- Outstanding invoices: Lists outstanding invoices for a customer + +### Invoices +- Invoice statuses: Returns possible statuses for customer invoices +- Update invoice status: Allows updating the status and promise-to-pay date of an invoiceProvides a list of customers. + +## Obtaining Credentials +Custom connector needs to use OAuth2.0 authentication. + +## Known Issues and Limitations +None. From 431d4da7057d8a7fa2268afb1e4de8a11be81258 Mon Sep 17 00:00:00 2001 From: kossevv Date: Mon, 28 Apr 2025 14:47:17 +0300 Subject: [PATCH 2/6] Add files via upload --- .../Readme.md | 64 + .../apiDefinition.swagger.json | 1376 +++++++++++++++++ .../apiProperties.json | 16 + 3 files changed, 1456 insertions(+) create mode 100644 independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md create mode 100644 independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json create mode 100644 independent-publisher-connectors/Finance Agents SAP BTP Connector/apiProperties.json diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md b/independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md new file mode 100644 index 0000000000..c96fc369d0 --- /dev/null +++ b/independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md @@ -0,0 +1,64 @@ + +### NOTE +> This is a *sample* connector. The connector is provided here with the intent to illustrate requirements to the connectors created to link your ERP system with Copilot for Finance application. + +# Title +Copilot for Finance provides the ability for customers to integrate the Microsoft Outlook-addin with any backend systems that supports OAuth by using the integration of Power Platform Custom Connectors. Copilot for Finance connector should provide a REST API of your ERP system. Using this API, Copilot for Finance Outlook-addin will be able to read and use data from your ERP system. + +## Publisher +Microsoft Corporation ​ + +## Prerequisites +You will need the following to proceed: +- A Microsoft Power Apps or Power Automate plan with custom connector feature +- Rest API service implemented with Copilot for finance API endpoints + +## Supported Operations +The connector supports the following operations. +### Contacts +Provides list of ERP contacts based on the emails or phone numbers. + +### Create contact +Provides an opportunity to create a new contact in the ERP. + +### Update contact +Provides an opportunity to update the contact in the ERP. + +### Customers +Provides a list of customers. + +### Customer's account statement +Provides a customer account statement in pdf. + +### Customer's activities +Provides a list of customer activities. + +### Customer's aged balances +Provides an information about customer's aged balance reports. + +### Customer's invoice documents +Provides customer's invoice document/s in pdf/zip format. + +### Customer invoices +Provides list of outstanding invoices for the customer. + +### List of invoice statuses +Provides a list of possible invoice statuses for the backend ERP. + +### Update invoice status +Provides an opportunity to status and promised to pay date for an invoice. + +### Supported version +Returns the latest supported version of the API. + +## Obtaining Credentials +Custom connector needs to use OAuth2.0 authentication. More details could be found in the [documentation](https://learn.microsoft.com/en-us/copilot/finance/get-started/custom%20connectors/define-openapi-definition#review-authentication-type) + +## Known Issues and Limitations +None. + +## Deployment Instructions +Follow those [instructions](https://learn.microsoft.com/en-us/copilot/finance/get-started/custom%20connectors/define-openapi-definition). + +## Documentation +More details could be found in the [documentation](https://learn.microsoft.com/en-us/copilot/finance/get-started/custom%20connectors/overview-custom-connectors). diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json new file mode 100644 index 0000000000..7e3adbaa75 --- /dev/null +++ b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json @@ -0,0 +1,1376 @@ +{ + "swagger": "2.0", + "info": { + "title": "Copilot for Finance / Customer communications", + "version": "2024.06.20" + }, + "host": "test.com", + "basePath": "/", + "schemes": [ + "https" + ], + "consumes": [], + "produces": [], + "paths": { + "/contacts": { + "post": { + "tags": [ + "Contacts" + ], + "summary": "List of contacts", + "description": "One of the parameters email or/and phone number must be provided. Parameters work together as 'OR' condition. For example: emails=['email1', 'email2'] phoneNumbers=['phone1','phone2'] retrieves all contacts with rather email1 or email2 or phone1 or phone2.", + "operationId": "Contacts_list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ContactInfoRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Contact" + } + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/contacts/create": { + "post": { + "tags": [ + "Contacts" + ], + "summary": "Creates contact", + "description": "Creates contact.", + "operationId": "Contacts_create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ContactForUpdate" + } + } + ], + "responses": { + "201": { + "description": "Creates the contact and returns the contact object.", + "schema": { + "$ref": "#/definitions/ContactForUpdateResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/contacts/{contactId}": { + "put": { + "tags": [ + "Contacts" + ], + "summary": "Updates contact", + "description": "Updates contact.", + "operationId": "Contacts_update", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "contactId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ContactForUpdate" + } + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/customers": { + "post": { + "tags": [ + "Customers." + ], + "summary": "List of customers", + "description": "The 'Customers' endpoint without customers ids specified returns list of all customers.", + "operationId": "Customers_list", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "organizationCode", + "type": "string" + }, + { + "in": "query", + "name": "accountNumber", + "type": "string" + }, + { + "in": "query", + "name": "name", + "type": "string" + }, + { + "in": "query", + "name": "industryName", + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "query", + "name": "top", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "skip", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "filter", + "description": "Format for using the 'filter' is as follows: filter=contains(fieldName,'substring') or contains(fieldName2,'substring2) etc. Applicable fields: name, organizationCode, accountNumber, industryName.", + "type": "string" + }, + { + "in": "query", + "name": "orderby", + "description": "Format: orderby=fieldName:asc or orderby=fieldName:desc. Applicable for all fields.", + "type": "string" + }, + { + "in": "query", + "name": "select", + "description": "The 'select' parameter is used to retrieve only the specified fields from the collection. Format: select=id,name,accountNumber.", + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/CustomerIds" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Customer" + } + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/customers/{customerId}/accountstatement": { + "get": { + "tags": [ + "Customers." + ], + "summary": "Returns the account statement for a given customer", + "description": "Returns the account statement for a given customer. You could provide a custom file name for the document by setting the 'Content-Disposition' header. If there is no file name is provided, default file name would be assigned. The 'Content-Type' header should be set to 'application/pdf'.", + "operationId": "Customers_accountStatement", + "produces": [ + "application/pdf", + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "customerId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "format": "binary", + "type": "string" + }, + "headers": { + "Content-Type": { + "type": "string", + "enum": [ + "application/pdf" + ] + }, + "Content-Disposition": { + "type": "string" + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/customers/{customerId}/activities": { + "get": { + "tags": [ + "Customers." + ], + "summary": "Customer related activities", + "description": "Returns customer related activities.", + "operationId": "Customers_activities", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "customerId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "id", + "type": "string" + }, + { + "in": "query", + "name": "title", + "type": "string" + }, + { + "in": "query", + "name": "type", + "type": "string" + }, + { + "in": "query", + "name": "text", + "type": "string" + }, + { + "in": "query", + "name": "timeStamp", + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "query", + "name": "top", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "skip", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "filter", + "description": "Format for using the 'filter' is as follows: filter=contains(fieldName,'substring') or contains(fieldName2,'substring2) or filter=contains(fieldName,'substring') and contains(fieldName2,'substring2). Applicable for all fields.", + "type": "string" + }, + { + "in": "query", + "name": "range", + "description": "Format: range=fieldName:'value_min':'value_max' Dates are in UTC.\nApplicable to fields of type date or amount.", + "type": "string" + }, + { + "in": "query", + "name": "orderby", + "description": "Format: orderby=fieldName:asc or orderby=fieldName:desc. Applicable for all fields.", + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/CustomerActivity" + } + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/customers/{customerId}/agedbalances": { + "get": { + "tags": [ + "Customers." + ], + "summary": "Returns aged balances for a given customer", + "description": "Returns aged balances for a given customer.", + "operationId": "Customers_agedBalances", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "customerId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/AgedBalance" + } + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/customers/{customerId}/invoicedocuments": { + "post": { + "tags": [ + "Customers." + ], + "summary": "Returns invoice documents", + "description": "Get invoice documents. If Request body is empty, it will return all the documents for the customer in zip archive. If Request body contains invoiceIds, it will return the documents for the specified customer and invoice ids in zip archive for multiple invoices and in pdf for a single invoice. The 'Content-Type' header should be set to 'application/pdf' or 'application/zip'. You could provide a custom file name for the document by setting the 'Content-Disposition' header. If there is no file name is provided, default file name would be assigned.", + "operationId": "Customers_invoiceDocument", + "consumes": [ + "application/json" + ], + "produces": [ + "application/pdf", + "application/zip", + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "customerId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/InvoiceDocumentRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "format": "binary", + "type": "string" + }, + "headers": { + "Content-Type": { + "type": "string", + "enum": [ + "application/pdf", + "application/zip" + ] + }, + "Content-Disposition": { + "type": "string" + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/customers/{customerId}/invoices": { + "get": { + "tags": [ + "Customers." + ], + "summary": "Returns list of invoices for a given customer", + "description": "Returns invoices that are relevant for a collections coordinator: open, unpaid, and outstanding invoices.", + "operationId": "Customers_invoices", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "customerId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "id", + "type": "string" + }, + { + "in": "query", + "name": "status", + "type": "string" + }, + { + "in": "query", + "name": "transactionType", + "type": "string" + }, + { + "in": "query", + "name": "voucher", + "type": "string" + }, + { + "in": "query", + "name": "invoiceNumber", + "type": "string" + }, + { + "in": "query", + "name": "organizationCode", + "type": "string" + }, + { + "in": "query", + "name": "dueDate", + "type": "string" + }, + { + "in": "query", + "name": "transactionDate", + "type": "string" + }, + { + "in": "query", + "name": "transactionAmount", + "type": "string" + }, + { + "in": "query", + "name": "currency", + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "query", + "name": "top", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "skip", + "type": "integer", + "format": "int32" + }, + { + "in": "query", + "name": "filter", + "description": "Format for using the 'filter' is as follows: filter=contains(fieldName,'substring') or contains(fieldName2,'substring2) or filter=contains(fieldName,'substring') and contains(fieldName2,'substring2). Applicable for all fields except the id.", + "type": "string" + }, + { + "in": "query", + "name": "range", + "description": "Format: range=fieldName:'value_min':'value_max' Dates are in UTC.\nApplicable to fields of type date or amount.", + "type": "string" + }, + { + "in": "query", + "name": "orderby", + "description": "Format: orderby=fieldName:asc or orderby=fieldName:desc. Applicable for all fields.", + "type": "string" + }, + { + "in": "query", + "name": "select", + "description": "Format: select=fieldName1,fieldName2,fieldName3.", + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Invoice" + } + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/invoices/statuses": { + "get": { + "tags": [ + "Outstanding invoices." + ], + "summary": "Returns list of statuses", + "description": "List of all possible statuses for an invoice.", + "operationId": "Invoices_listOfStatuses", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/StatusDefinition" + } + } + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/invoices/{invoiceId}/status": { + "put": { + "tags": [ + "Outstanding invoices." + ], + "summary": "Updates invoice status and promised to pay date", + "description": "Updates invoice status and promised to pay date.", + "operationId": "Invoices_updateStatus", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "header", + "name": "x-copilotforfinace-api-version", + "description": "Specifies the API version.", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "invoiceId", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "language", + "description": "The language code is in BCP 47 format.", + "type": "string" + }, + { + "in": "body", + "name": "body", + "required": true, + "schema": { + "$ref": "#/definitions/InvoiceStatus" + } + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/version": { + "get": { + "tags": [ + "API version" + ], + "summary": "API version", + "description": "Returns the latest supported version of the API. This value will be used in the x-copilotforfinance-api-version header for subsequent requests to ensure Copilot for Finance calls a supported version of your API. The version value can be find on the top of OpenAPI specification file. For example, 2024.06.20", + "operationId": "Version_supportedVersion", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "type": "string" + } + } + } + } + } + }, + "definitions": { + "AdditionalParameters": { + "type": "object", + "properties": { + "Pagination": { + "$ref": "#/definitions/PaginationParameters" + }, + "Filter": { + "$ref": "#/definitions/Filter" + }, + "Range": { + "$ref": "#/definitions/Range" + }, + "OrderBy": { + "$ref": "#/definitions/OrderBy" + } + } + }, + "Address": { + "required": [ + "street", + "city", + "country" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "type": "string" + } + } + }, + "AgedBalance": { + "description": "The dates are in UTC format. Example: 2021-01-01T00:00:00Z. The amounts are in decimal format and are converted into user locale formats automatically on the frontend side.", + "required": [ + "id", + "name", + "totalAmountDue", + "agingDate", + "agingPeriods" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "isDefault": { + "type": "boolean" + }, + "totalAmountDue": { + "format": "decimal", + "type": "number" + }, + "agingDate": { + "format": "date-time", + "type": "string" + }, + "currency": { + "type": "string" + }, + "totalOverdueInvoices": { + "type": "integer" + }, + "agingPeriods": { + "type": "array", + "items": { + "$ref": "#/definitions/AgingPeriod" + } + } + } + }, + "AgingPeriod": { + "required": [ + "label", + "amount" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "amount": { + "format": "decimal", + "type": "number" + } + } + }, + "Contact": { + "required": [ + "id", + "email", + "firstName", + "lastName", + "customerId", + "customerName" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "professionalTitle": { + "type": "string" + }, + "organizationCode": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "customerName": { + "type": "string" + }, + "primaryPhoneNumber": { + "type": "string" + } + } + }, + "ContactForUpdate": { + "required": [ + "email", + "firstName", + "lastName", + "customerId" + ], + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "professionalTitle": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "primaryPhoneNumber": { + "type": "string" + } + } + }, + "ContactForUpdateResponse": { + "required": [ + "id", + "email", + "firstName", + "lastName", + "customerId" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "professionalTitle": { + "type": "string" + }, + "customerId": { + "type": "string" + }, + "primaryPhoneNumber": { + "type": "string" + } + } + }, + "ContactInfoRequest": { + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + } + }, + "phoneNumbers": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Customer": { + "required": [ + "id", + "name", + "accountNumber" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "organizationCode": { + "type": "string" + }, + "accountNumber": { + "type": "string" + }, + "industryName": { + "type": "string" + }, + "address": { + "$ref": "#/definitions/Address" + } + } + }, + "CustomerActivity": { + "description": "The dates are in UTC format. Example: 2021-01-01T00:00:00Z. The amounts are in decimal format and are converted into user locale formats automatically on the frontend side.", + "required": [ + "id", + "title", + "text" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "text": { + "type": "string" + }, + "type": { + "type": "string" + }, + "timeStamp": { + "format": "date-time", + "type": "string" + } + } + }, + "CustomerIds": { + "required": [ + "customerIds" + ], + "type": "object", + "properties": { + "customerIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Error": { + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "format": "int32", + "type": "integer" + }, + "message": { + "type": "string" + } + } + }, + "Filter": { + "description": "The 'filter' is designed to fetch records where a specified field contains a particular substring. The filter supports either 'or' or 'and' logical operators, but not both in the same filter. \n The format for using the 'filter' is as follows: filter=contains(fieldName,'substring') or contains(fieldName2,'substring2) or filter=contains(fieldName,'substring') and contains(fieldName2,'substring2). \n For example: \n 1. /customers?filter=contains(name,'Contoso') and contains(organizationcode,'US') retrieves all records where the customer name contains the 'Contoso' substring ans organization code contains 'US. \n 2. /customers?filter=contains(name,'Contoso') or contains(organizationcode,'contoso') retrieves all records where the customer name contains the 'Contoso' substring or organization code contains 'Contoso'.", + "type": "object", + "properties": { + "filter": { + "type": "string" + } + } + }, + "Invoice": { + "description": "The dates are in UTC format. Example: 2021-01-01T00:00:00Z. The amounts are in decimal format and are converted into user locale formats automatically on the frontend side.", + "required": [ + "id", + "voucher", + "transactionDate", + "transactionAmount", + "invoiceNumber", + "dueDate", + "currency", + "transactionType", + "hasDocument" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "voucher": { + "type": "string" + }, + "transactionDate": { + "format": "date-time", + "type": "string" + }, + "transactionAmount": { + "format": "decimal", + "type": "number" + }, + "invoiceNumber": { + "type": "string" + }, + "dueDate": { + "format": "date-time", + "type": "string" + }, + "currency": { + "type": "string" + }, + "transactionType": { + "type": "string" + }, + "hasDocument": { + "type": "boolean" + }, + "statusId": { + "type": "string" + }, + "statusName": { + "type": "string" + }, + "promiseToPayDate": { + "format": "date-time", + "type": "string" + }, + "statusReason": { + "type": "string" + }, + "statusComment": { + "type": "string" + } + } + }, + "InvoiceDocumentRequest": { + "required": [ + "invoiceIds" + ], + "type": "object", + "properties": { + "invoiceIds": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "InvoiceStatus": { + "description": "The dates are in UTC format. Example: 2021-01-01T00:00:00Z. The amounts are in decimal format and are converted into user locale formats automatically on the frontend side.", + "required": [ + "statusId", + "statusName" + ], + "type": "object", + "properties": { + "statusId": { + "type": "string" + }, + "statusName": { + "type": "string" + }, + "promiseToPayDate": { + "format": "date-time", + "type": "string" + }, + "statusReason": { + "type": "string" + }, + "statusComment": { + "type": "string" + } + } + }, + "OrderBy": { + "description": "The orderby parameter is used to sort the results based on the specified field and sorting direction. The format for using the 'orderby' parameter is as follows: orderby=fieldName:asc or orderby=fieldName:desc. For example: /customers?orderby=transactionDate:asc sorts the results based on the transaction date field in ascending order.", + "type": "object", + "properties": { + "orderby": { + "type": "string" + } + } + }, + "PaginationParameters": { + "description": "The parameter 'top' defines the maximum number of resources to be retrieved from the collection. \nThe parameter 'skip' indicates the offset within the collection of the first resource to be returned.", + "type": "object", + "properties": { + "top": { + "format": "int32", + "type": "integer" + }, + "skip": { + "format": "int32", + "type": "integer" + } + } + }, + "Range": { + "description": "The 'range' filter is expected to retrieve records where the specified field is within the specified range. The format for using the 'range' filter is as follows: range=fieldName:'value_min':'value_max'. Applicable for all dates and amounts related fields. For example: /customers?range=totalOverdueInvoices:1:5 retrieves all records where the total overdue invoices field is more than 1 and less than 5.", + "type": "object", + "properties": { + "range": { + "type": "string" + } + } + }, + "Select": { + "description": "The 'select' parameter is used to retrieve only the specified fields from the collection. The format for using the 'select' parameter is as follows: select=fieldName1,fieldName2,fieldName3. For example: /customers?select=name,organizationCode retrieves only the name and organization code fields from the collection.", + "type": "object", + "properties": { + "select": { + "type": "string" + } + } + }, + "StatusDefinition": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "Versions": { + "enum": [ + "2024.06.20" + ], + "type": "string" + } + }, + "parameters": {}, + "responses": {}, + "securityDefinitions": {}, + "security": [], + "tags": [ + { + "name": "API version" + }, + { + "name": "Contacts" + }, + { + "name": "Customers." + }, + { + "name": "Outstanding invoices." + } + ] +} \ No newline at end of file diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiProperties.json b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiProperties.json new file mode 100644 index 0000000000..8478929640 --- /dev/null +++ b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiProperties.json @@ -0,0 +1,16 @@ +{ + "properties": { + "connectionParameters": { + "token": { + "type": "oauthSetting", + "oAuthSettings": { + "identityProvider": "oauth2" + } + } + }, + "iconBrandColor": "#339933", + "capabilities": [], + "publisher": "Microsoft", + "stackOwner": "Microsoft" + } +} From e9aba77f19e95d2fc86bda50b0f4dbeac4bc396b Mon Sep 17 00:00:00 2001 From: kossevv Date: Mon, 28 Apr 2025 14:51:43 +0300 Subject: [PATCH 3/6] Update Readme.md --- .../Readme.md | 59 ++++++------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md b/independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md index c96fc369d0..0eeacace0f 100644 --- a/independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md +++ b/independent-publisher-connectors/Finance Agents SAP BTP Connector/Readme.md @@ -1,55 +1,32 @@ +# Finance Agents SAP BTP Connector -### NOTE -> This is a *sample* connector. The connector is provided here with the intent to illustrate requirements to the connectors created to link your ERP system with Copilot for Finance application. - -# Title -Copilot for Finance provides the ability for customers to integrate the Microsoft Outlook-addin with any backend systems that supports OAuth by using the integration of Power Platform Custom Connectors. Copilot for Finance connector should provide a REST API of your ERP system. Using this API, Copilot for Finance Outlook-addin will be able to read and use data from your ERP system. - -## Publisher -Microsoft Corporation ​ +The Finance Agents SAP BTP Connector enables integration between the Microsoft Copilot for Finance Outlook Add-in and any SAP ERP system, using the SAP Business Technology Platform (BTP) as a middleware layer. The connector exposes a REST API on BTP, which in turn communicates with the underlying ERP system via its native APIs. This setup allows the Copilot for Finance add-in to securely access and interact with ERP data through a Power Platform custom connector, using OAuth 2.0 authentication. ## Prerequisites You will need the following to proceed: - A Microsoft Power Apps or Power Automate plan with custom connector feature -- Rest API service implemented with Copilot for finance API endpoints +- The Finance Agents SAP BTP Connector MTAR package to deploy on SAP BTP +- An SAP ERP system: S/4HANA (On-premise / Private / Public Cloud) or SAP ECC 6.0 ## Supported Operations The connector supports the following operations. -### Contacts -Provides list of ERP contacts based on the emails or phone numbers. - -### Create contact -Provides an opportunity to create a new contact in the ERP. -### Update contact -Provides an opportunity to update the contact in the ERP. +### Contacts +- List contacts: Retrieves ERP contacts based on email or phone number +- Create contact: Creates a new contact in the ERP system +- Update contact: Updates an existing contact in the ERP system ### Customers -Provides a list of customers. - -### Customer's account statement -Provides a customer account statement in pdf. - -### Customer's activities -Provides a list of customer activities. - -### Customer's aged balances -Provides an information about customer's aged balance reports. - -### Customer's invoice documents -Provides customer's invoice document/s in pdf/zip format. - -### Customer invoices -Provides list of outstanding invoices for the customer. - -### List of invoice statuses -Provides a list of possible invoice statuses for the backend ERP. - -### Update invoice status -Provides an opportunity to status and promised to pay date for an invoice. - -### Supported version -Returns the latest supported version of the API. +- List customers: Retrieves a list of customers from the ERP system +- Account statement: Provides a customer's account statement in PDF format +- Activities: Retrieves a list of customer-related activities +- Aged balances: Returns aging balance reports for a customer +- Invoice documents: Downloads invoice documents in PDF or ZIP format +- Outstanding invoices: Lists outstanding invoices for a customer + +### Invoices +- Invoice statuses: Returns possible statuses for customer invoices +- Update invoice status: Allows updating the status and promise-to-pay date of an invoiceProvides a list of customers. ## Obtaining Credentials Custom connector needs to use OAuth2.0 authentication. More details could be found in the [documentation](https://learn.microsoft.com/en-us/copilot/finance/get-started/custom%20connectors/define-openapi-definition#review-authentication-type) From 6ff09cc6b1b48ca0a0706945fe15dce5d6bb62de Mon Sep 17 00:00:00 2001 From: kossevv Date: Mon, 28 Apr 2025 14:52:54 +0300 Subject: [PATCH 4/6] Delete independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md --- .../Finance Agents SAP BTP Connector/intro.md | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100644 independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md b/independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md deleted file mode 100644 index 5b929efe5a..0000000000 --- a/independent-publisher-connectors/Finance Agents SAP BTP Connector/intro.md +++ /dev/null @@ -1,35 +0,0 @@ -# Proposal - Finance Agents SAP BTP Connector - -The Finance Agents SAP BTP Connector enables integration between the Microsoft Copilot for Finance Outlook Add-in and any SAP ERP system, using the SAP Business Technology Platform (BTP) as a middleware layer. The connector exposes a REST API on BTP, which in turn communicates with the underlying ERP system via its native APIs. This setup allows the Copilot for Finance add-in to securely access and interact with ERP data through a Power Platform custom connector, using OAuth 2.0 authentication. - -## Prerequisites -You will need the following to proceed: -- A Microsoft Power Apps or Power Automate plan with custom connector feature -- The Finance Agents SAP BTP Connector MTAR package to deploy on SAP BTP -- An SAP ERP system: S/4HANA (On-premise / Private / Public Cloud) or SAP ECC 6.0 - -## Supported Operations -The connector supports the following operations. - -### Contacts -- List contacts: Retrieves ERP contacts based on email or phone number -- Create contact: Creates a new contact in the ERP system -- Update contact: Updates an existing contact in the ERP system - -### Customers -- List customers: Retrieves a list of customers from the ERP system -- Account statement: Provides a customer's account statement in PDF format -- Activities: Retrieves a list of customer-related activities -- Aged balances: Returns aging balance reports for a customer -- Invoice documents: Downloads invoice documents in PDF or ZIP format -- Outstanding invoices: Lists outstanding invoices for a customer - -### Invoices -- Invoice statuses: Returns possible statuses for customer invoices -- Update invoice status: Allows updating the status and promise-to-pay date of an invoiceProvides a list of customers. - -## Obtaining Credentials -Custom connector needs to use OAuth2.0 authentication. - -## Known Issues and Limitations -None. From a2ef28e04e995f36886f0c375a215b5fc6be0b16 Mon Sep 17 00:00:00 2001 From: kossevv Date: Thu, 8 May 2025 09:55:50 +0300 Subject: [PATCH 5/6] Correction of apiDefinition.swagger.json --- .../apiDefinition.swagger.json | 253 +++++++++++++----- 1 file changed, 181 insertions(+), 72 deletions(-) diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json index 7e3adbaa75..86be9b14d1 100644 --- a/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json +++ b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json @@ -1,7 +1,8 @@ { "swagger": "2.0", "info": { - "title": "Copilot for Finance / Customer communications", + "title": "Copilot for Finance for SAP", + "description": "Copilot for Finance connector for SAP S/4HANA On Prem/Private/Public and SAP ECC 6.0", "version": "2024.06.20" }, "host": "test.com", @@ -32,13 +33,15 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "body", @@ -46,7 +49,9 @@ "required": true, "schema": { "$ref": "#/definitions/ContactInfoRequest" - } + }, + "description": "Body parameter of the request providing arrays with the emails and phone numbers to search", + "x-ms-summary": "Body param" } ], "responses": { @@ -96,13 +101,15 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "body", @@ -110,7 +117,9 @@ "required": true, "schema": { "$ref": "#/definitions/ContactForUpdate" - } + }, + "description": "Body parameter of the request providing the data required to create a contact", + "x-ms-summary": "Body param" } ], "responses": { @@ -149,19 +158,23 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "path", "name": "contactId", "required": true, - "type": "string" + "type": "string", + "description": "ID of the contact for update", + "x-ms-summary": "Contactid param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "body", @@ -169,7 +182,9 @@ "required": true, "schema": { "$ref": "#/definitions/ContactForUpdate" - } + }, + "description": "Body parameter of the request providing the data required to update the contact", + "x-ms-summary": "Body param" } ], "responses": { @@ -205,70 +220,89 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "query", "name": "organizationCode", - "type": "string" + "type": "string", + "description": "Company Code", + "x-ms-summary": "Organizationcode param" }, { "in": "query", "name": "accountNumber", - "type": "string" + "type": "string", + "description": "Account Number. Same as Business Partner ID", + "x-ms-summary": "Accountnumber param" }, { "in": "query", "name": "name", - "type": "string" + "type": "string", + "description": "Business Parner Full Name", + "x-ms-summary": "Name param" }, { "in": "query", "name": "industryName", - "type": "string" + "type": "string", + "description": "Industry Description", + "x-ms-summary": "Industryname param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "query", "name": "top", "type": "integer", - "format": "int32" + "format": "int32", + "description": "Pagination top paramater", + "x-ms-summary": "Top param" }, { "in": "query", "name": "skip", "type": "integer", - "format": "int32" + "format": "int32", + "description": "Pagination skip paramater", + "x-ms-summary": "Skip param" }, { "in": "query", "name": "filter", "description": "Format for using the 'filter' is as follows: filter=contains(fieldName,'substring') or contains(fieldName2,'substring2) etc. Applicable fields: name, organizationCode, accountNumber, industryName.", - "type": "string" + "type": "string", + "x-ms-summary": "Filter param" }, { "in": "query", "name": "orderby", "description": "Format: orderby=fieldName:asc or orderby=fieldName:desc. Applicable for all fields.", - "type": "string" + "type": "string", + "x-ms-summary": "Orderby param" }, { "in": "query", "name": "select", "description": "The 'select' parameter is used to retrieve only the specified fields from the collection. Format: select=id,name,accountNumber.", - "type": "string" + "type": "string", + "x-ms-summary": "Select param" }, { "in": "body", "name": "body", "schema": { "$ref": "#/definitions/CustomerIds" - } + }, + "description": "Body parameter of the request providing an array with the customer IDs to search", + "x-ms-summary": "Body param" } ], "responses": { @@ -316,19 +350,23 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "path", "name": "customerId", "required": true, - "type": "string" + "type": "string", + "description": "ID of the customer", + "x-ms-summary": "Customerid param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" } ], "responses": { @@ -376,74 +414,95 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "path", "name": "customerId", "required": true, - "type": "string" + "type": "string", + "description": "ID of the customer", + "x-ms-summary": "Customerid param" }, { "in": "query", "name": "id", - "type": "string" + "type": "string", + "description": "ID of the business object", + "x-ms-summary": "Id param" }, { "in": "query", "name": "title", - "type": "string" + "type": "string", + "description": "Title", + "x-ms-summary": "Title param" }, { "in": "query", "name": "type", - "type": "string" + "type": "string", + "description": "Type of the business objects", + "x-ms-summary": "Type param" }, { "in": "query", "name": "text", - "type": "string" + "type": "string", + "description": "Activity description", + "x-ms-summary": "Text param" }, { "in": "query", "name": "timeStamp", - "type": "string" + "type": "string", + "description": "Timestamp", + "x-ms-summary": "Timestamp param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "query", "name": "top", "type": "integer", - "format": "int32" + "format": "int32", + "description": "Pagination top paramater", + "x-ms-summary": "Top param" }, { "in": "query", "name": "skip", "type": "integer", - "format": "int32" + "format": "int32", + "description": "Pagination skip paramater", + "x-ms-summary": "Skip param" }, { "in": "query", "name": "filter", "description": "Format for using the 'filter' is as follows: filter=contains(fieldName,'substring') or contains(fieldName2,'substring2) or filter=contains(fieldName,'substring') and contains(fieldName2,'substring2). Applicable for all fields.", - "type": "string" + "type": "string", + "x-ms-summary": "Filter param" }, { "in": "query", "name": "range", "description": "Format: range=fieldName:'value_min':'value_max' Dates are in UTC.\nApplicable to fields of type date or amount.", - "type": "string" + "type": "string", + "x-ms-summary": "Range param" }, { "in": "query", "name": "orderby", "description": "Format: orderby=fieldName:asc or orderby=fieldName:desc. Applicable for all fields.", - "type": "string" + "type": "string", + "x-ms-summary": "Orderby param" } ], "responses": { @@ -490,19 +549,23 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "path", "name": "customerId", "required": true, - "type": "string" + "type": "string", + "description": "ID of the customer", + "x-ms-summary": "Customerid param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" } ], "responses": { @@ -554,26 +617,32 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "path", "name": "customerId", "required": true, - "type": "string" + "type": "string", + "description": "ID of the customer", + "x-ms-summary": "Customerid param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "body", "name": "body", "schema": { "$ref": "#/definitions/InvoiceDocumentRequest" - } + }, + "description": "Body parameter of the request providing an array with the invoice IDs to provide", + "x-ms-summary": "Body param" } ], "responses": { @@ -622,105 +691,137 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "path", "name": "customerId", "required": true, - "type": "string" + "type": "string", + "description": "ID of the customer", + "x-ms-summary": "Customerid param" }, { "in": "query", "name": "id", - "type": "string" + "type": "string", + "description": "Invoice ID", + "x-ms-summary": "Id param" }, { "in": "query", "name": "status", - "type": "string" + "type": "string", + "description": "Collection Status", + "x-ms-summary": "Status param" }, { "in": "query", "name": "transactionType", - "type": "string" + "type": "string", + "description": "Invoice Type", + "x-ms-summary": "Transactiontype param" }, { "in": "query", "name": "voucher", - "type": "string" + "type": "string", + "description": "Accounting Document ID", + "x-ms-summary": "Voucher param" }, { "in": "query", "name": "invoiceNumber", - "type": "string" + "type": "string", + "description": "Invoice ID. Same as id", + "x-ms-summary": "Invoicenumber param" }, { "in": "query", "name": "organizationCode", - "type": "string" + "type": "string", + "description": "Company Code", + "x-ms-summary": "Organizationcode param" }, { "in": "query", "name": "dueDate", - "type": "string" + "type": "string", + "description": "Net Due Date of the invoice", + "x-ms-summary": "Duedate param" }, { "in": "query", "name": "transactionDate", - "type": "string" + "type": "string", + "description": "Posting Date", + "x-ms-summary": "Transactiondate param" }, { "in": "query", "name": "transactionAmount", - "type": "string" + "type": "string", + "description": "Amount of the invoice", + "x-ms-summary": "Transactionamount param" }, { "in": "query", "name": "currency", - "type": "string" + "type": "string", + "description": "Currency", + "x-ms-summary": "Currency param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "query", "name": "top", "type": "integer", - "format": "int32" + "format": "int32", + "description": "Pagination top paramater", + "x-ms-summary": "Top param" }, { "in": "query", "name": "skip", "type": "integer", - "format": "int32" + "format": "int32", + "description": "Pagination skip paramater", + "x-ms-summary": "Skip param" }, { "in": "query", "name": "filter", "description": "Format for using the 'filter' is as follows: filter=contains(fieldName,'substring') or contains(fieldName2,'substring2) or filter=contains(fieldName,'substring') and contains(fieldName2,'substring2). Applicable for all fields except the id.", - "type": "string" + "type": "string", + "x-ms-summary": "Filter param" }, { "in": "query", "name": "range", "description": "Format: range=fieldName:'value_min':'value_max' Dates are in UTC.\nApplicable to fields of type date or amount.", - "type": "string" + "type": "string", + "x-ms-summary": "Range param" }, { "in": "query", "name": "orderby", "description": "Format: orderby=fieldName:asc or orderby=fieldName:desc. Applicable for all fields.", - "type": "string" + "type": "string", + "x-ms-summary": "Orderby param" }, { "in": "query", "name": "select", "description": "Format: select=fieldName1,fieldName2,fieldName3.", - "type": "string" + "type": "string", + "x-ms-summary": "Select param" } ], "responses": { @@ -767,13 +868,15 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" } ], "responses": { @@ -823,19 +926,23 @@ "name": "x-copilotforfinace-api-version", "description": "Specifies the API version.", "required": true, - "type": "string" + "type": "string", + "x-ms-summary": "API Version param" }, { "in": "path", "name": "invoiceId", "required": true, - "type": "string" + "type": "string", + "description": "ID of the invoice", + "x-ms-summary": "Invoiceid param" }, { "in": "query", "name": "language", "description": "The language code is in BCP 47 format.", - "type": "string" + "type": "string", + "x-ms-summary": "Language param" }, { "in": "body", @@ -843,7 +950,9 @@ "required": true, "schema": { "$ref": "#/definitions/InvoiceStatus" - } + }, + "description": "body parameter", + "x-ms-summary": "Body param" } ], "responses": { @@ -1373,4 +1482,4 @@ "name": "Outstanding invoices." } ] -} \ No newline at end of file +} From c736fba92c2235da0ec700ff57e8d75fa8e52934 Mon Sep 17 00:00:00 2001 From: kossevv Date: Thu, 15 May 2025 08:47:13 +0300 Subject: [PATCH 6/6] Update apiDefinition.swagger.json Fixing Swagger validation errors --- .../apiDefinition.swagger.json | 67 ++++++------------- 1 file changed, 22 insertions(+), 45 deletions(-) diff --git a/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json index 86be9b14d1..d69edeae38 100644 --- a/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json +++ b/independent-publisher-connectors/Finance Agents SAP BTP Connector/apiDefinition.swagger.json @@ -3,7 +3,17 @@ "info": { "title": "Copilot for Finance for SAP", "description": "Copilot for Finance connector for SAP S/4HANA On Prem/Private/Public and SAP ECC 6.0", - "version": "2024.06.20" + "version": "2024.06.20", + "contact": { + "name": "Copilot for Finance Team", + "email": "fincopiloteng@microsoft.com", + "url": "https://learn.microsoft.com/en-us/copilot/finance/welcome" + }, + "x-ms-connector-metadata": { + "platform": "SAP BTP", + "source": "Microsoft", + "publisher": "Microsoft" + } }, "host": "test.com", "basePath": "/", @@ -73,10 +83,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -130,10 +137,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -192,10 +196,7 @@ "description": "The request has succeeded and a new resource has been created as a result." }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -324,10 +325,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -389,10 +387,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -524,10 +519,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -587,10 +579,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -666,10 +655,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -843,10 +829,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -898,10 +881,7 @@ } }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } } @@ -960,10 +940,7 @@ "description": "The request has succeeded and a new resource has been created as a result." }, "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/Error" - } + "description": "An unexpected error response." } } }