With a chat platform API custom app, you can set up a workflow that lets your agents attach files during a chat session.
Agent file attachment workflow
Here's the workflow for an agent attaching a file during a chat session.
- An agent attaches a file during a chat session.
- Your webhook endpoint receives a
message_receivedevent, which includes themedia_idvalue for the attached file. For more information, see Webhooks for the chat API platform. Send a
GETrequest to the following endpoint to get the attachment file, specifying themedia_idvalue from the previous step. Authenticate using basic authentication.https://YOUR_CCAAS_HOST/apps/api/v1/chats/CHAT_ID/media?media_id=MEDIA_ID&media_type=MEDIA_TYPEReplace the following:
YOUR_CCAAS_HOST: your Contact Center AI Platform (CCAI Platform) hostCHAT_ID: the chat IDMEDIA_ID: the ID of the file that you want to download. Get this from themessage_receivedwebhook event.MEDIA_TYPE: the type of the file that you want to download. One ofphoto,video,audio, ordocument.
A successful request returns the attachment file. For more information, see Chat platform API Guide.