How to upload files to an existing incident as part of ODA, using WCFS?
In certain use cases, customers are required to upload files to an existing incident as part of an Oracle Digital Assistant (ODA) flow, using Web Chat for Service (WCFS) as the user interface.
However, when files are uploaded via WCFS, the Oracle B2C Service Chat API captures the attachments and temporarily stores them in the server's /tmp directory. This location is internal and not accessible externally.
As a result, WCFS only returns the file's metadata to the ODA flow—without the actual file content. This limitation prevents customers from retrieving and attaching the uploaded file to the corresponding incident, thereby hindering the intended functionality.
Resolution
Since WCFS sends only metadata (and not the file content) to the Oracle Digital Assistant (ODA), this metadata can be leveraged to programmatically attach the file to an existing incident.
The proposed solution involves the following steps:
- Create a custom Endpoint:
Develop a custom script as a file manager custom script or a Customer Portal (CP) controller script. Ensure that a suitable authentication mechanism is implemented to protect the endpoint. - Invoke the Endpoint from ODA:
Once the endpoint is in place, it can be invoked from a custom component within the ODA flow. - Pass Metadata to the Endpoint:
The custom component should extract the file metadata—originally sent from Web Chat for Service (WCFS) to the ODA flow—and forward it to the endpoint. - Attach the File to the Incident:
Using the received metadata, the custom script end point can locate and associate the uploaded file with the relevant existing incident in Oracle B2C Service.
For additional details regarding the proposed solution, please see this Blog post: Attach file to incident In ODA flow using WebChat For Service.