Testing your implementation
1. The connection, with the test page
The https://<Save2ERP server>/test page checks the OAuth2 connection and the test service, without Word:
- Choose the system in the list, then click "Sign in".
- Sign in to SAP (or the target system) and authorize access.
- Click "Run the test": the response of
GET /attachments/healthcheckis shown as is.
If it fails, the page shows the server's error code (see Error codes), and the details are in the Save2ERP server logs.
2. Sending, with a document
Use a document generated by the target system, or add the S2E_… properties by hand to a test document (see Preparing Word documents). Then check these cases:
| Case | How to trigger it | Expected result in the pane |
|---|---|---|
| First upload | A file name not yet in the object. | Success message (yours, or the pane's). |
| Duplicate | Send the same document again with the same name. | "Duplicate detected" view, with the actions allowed for this object type. |
| Replace | In the "Duplicate detected" view, "Replace the existing file". | Success; the object contains only one file with this name. |
| New version | "Create a new version". | Success; a new version of the file in the object. |
| No action allowed | An object type for which allowedActions is empty. | Only "Choose another name" is offered. |
| PDF format | Choose ".pdf format" before sending. | A .pdf file separate from the .docx. |
| Unknown object | Change S2E_ObjectKey in the document. | Your error message (422). |
| Insufficient permissions | A user without permission on the object. | Your error message (403). |
| Large document | A document of several tens of MB. | Success up to about 37 MB, "Document too large" beyond. |
3. Information on the existing file
If you return existingFile, the "Duplicate detected" view must show the version, the date (in the format of the user's language) and the name of the author of the last change.