how to send additional information with file in amazon connect chat api's sendAttachment method

0

Success Case: I am using amazon-connect-chatjs sendAttachment method to send attachments . It is working fine.

await controller.sendAttachment({ attachment: file})

I have to send some additional information with a file to my backend, which I wrote using Amazon Connect Chat APIs. I have different types of channels (whatsapp) communicating with my frontend using that backend. I have to make a decision on the additional information to whom I have to send the attachment. Is there any way to add my additional information with a send attachment and get this information on the WebSocket onMessage event? Please guide me on how I can achieve that approach.

i want something like this:

await controller.sendAttachment({ attachment: file}, {additional information}) or await controller.sendAttachment({ attachment: file, additional information})

I've tried the above approach but got same attachment response on WebSocket as previous, all the information got ignored or removed.

1 Antwort
0

Hello,

Greetings!

Based on your query, Unfortunately there’s not a way to add metadata currently on the attachment upload itself.

However, in order to support on all the best possible way, I would suggest trying the below Ideas and see if that helps.

Some ideas might be:-

  1. Set contact attributes on the contact
  2. Right before sending that attachment, send a message with application/json type, to provide metadata (this content type isn’t rendered, and is intended for metadata)

[+] SendMessage https://docs.aws.amazon.com/connect-participant/latest/APIReference/API_SendMessage.html

[+] Flow block: Set contact attributes https://docs.aws.amazon.com/connect/latest/adminguide/set-contact-attributes.html

[+] UpdateContactAttributes https://docs.aws.amazon.com/connect/latest/APIReference/API_UpdateContactAttributes.html

I hope the above information is helpful.

Thanks again for reaching out to us! Looking forward to hearing from you.

AWS
SUPPORT-TECHNIKER
Ankur_V
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen