To add an attachment to a sales order in Oracle Order Management Cloud, you can follow these steps:
Table of Contents
Adding attachment to Sales order from UI
- Navigate to the Sales Order page for the order you want to attach a file to.
- Edit the Sales Order and click on Actions > Manage Attachments
- The Attachments popup screen will show up.
- In the “Add Attachment” dialog box, select the file you want to attach from your local computer or network. You can also enter a description for the attachment.
- The file type can be URL , FILE or TEXT
- Once you have selected the file and entered a description, click the “Upload” button to attach the file to the sales order.
- The attachment will now be displayed in the manage Attachments window, along with the date and time it was added, and the name of the user who added it.
Adding Sales Order attachment Via Rest API
To add an attachment to an already existing order you need to query the order first and get the order key. This order key will be passed to the Attachment Api
1. Get the order key
Query the sales order number using the rest api
Example
https://{fadomain}/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub?q=OrderNumber= 97486
2. Call Sales order Attachment Rest Api
Use the order key to pass it in url paramter to create attachment
https://FADOMAIN/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS:300000258612754/child/attachments
{
"AttachedDocumentId": 3000002586124343,
"DatatypeCode": "WEB_PAGE",
"Url": "https://www.oracle.com/webfolder/technetwork/tutorials/tutorial/cloud/spotlights/spotlight-20c-otm-gtm.pdf",
"CategoryName": "MISC",
"UploadedFileContentType": "pdf",
"ContentRepositoryFileShared": "false",
"Title": "OTM WhitePaper",
"Description": "OTM WhitePaper"
}
To attach a File
You can also attache a File using the rest api
Sample Payload to attach file
{
"AttachedDocumentId": 3000002586127921,
"DatatypeCode": "TEXT",
"FileName": "Integratin Doc",
"DmFolderPath": null,
"DmDocumentId": "UCMFA04084592",
"DmVersionNumber": "4133395",
"Url": null,
"CategoryName": "MISC",
"UserName": "Miscellaneous",
"Uri": null,
"FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID:4133395?download&XFND_SCHEME_ID=1&XFND_CERT_FP=EA6AFF46C3AE16153E2E9FA378FD48D1305FF1B0&XFND_RANDOM=5642166711626153233&XFND_EXPIRES=1675945907985&XFND_SIGNATURE=QOziXnoXrSlI~lbI~dbIjg0dxRLKh7WZpAbPaIMZzSD5QWJo1o~Prosdm~ozL1NSz0VgTd4uUfjis9xHt~YRtKYS6ZxCeZnguOp770R4oUjDJzyGfBx9ZYdL0aAckTZ0dImfgfnn8WzcT-MwS592CvYuyr7gFG5yOr5CLuEiigWE53626~58ORE9utJhbMWRT-9ZFYqKIBJ8RU6nxgv4ug6f0bdKTzL6nRnu1eXQ2iQlnX3u1h7xdE05HoFc6svG6-VNzQ3ZYqYnUm0gtjwWGqtS-mTBuw8gHK~mHlPLlJrH0T9xTHghTqkROkkZHWVD9uLjPWxIt~8aQZXUGytA__&Id=4133395",
"UploadedText": null,
"UploadedFileContentType": "text/plain",
"UploadedFileLength": 17,
"UploadedFileName": null,
"ContentRepositoryFileShared": "false",
"Title": "test",
"Description": "test",
"ErrorStatusCode": null,
"ErrorStatusMessage": null,
"ExpirationDate": null,
"AsyncTrackerId": null
}
The challenge would be frame the File url which should be in the UCM server to make the hyperlink to the attached file.
See how url can be built from a document uploaded in UCM