chatwoot / chatwoot

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬
https://www.chatwoot.com/help-center
Other
21.24k stars 3.58k forks source link

Add custom attributes to conversation (not contact) through SDK #4210

Closed Deddy-SMSP closed 1 month ago

Deddy-SMSP commented 2 years ago

Is your feature request related to a problem? Please describe. I want to save utm data etc to the conversation not the contact - because it can change per conversation

Describe the solution you'd like Just like adding custom attribute to contact using SDK -> window.$chatwoot.setCustomAttributes(newUtm); I want something like -> window.$chatwoot.conversation.setCustomAttributes(newUtm);

Describe alternatives you've considered Maybe to simplify -> window.$chatwoot.setCustomAttributes(newUtm, "conversation");

Additional context Please pardon me, I don't really understand about this section, my english is not very good because it's not my native language.

Thanks

sojan-official commented 2 years ago

@Deddy-SMSP thanks for reporting. we will look into this.

danghung-dev commented 2 years ago

Do we have any update on this issue? We can create a Conversation attribute, but we cannot set custom attribute to Conversation.

zachstence commented 2 years ago

Agreed, I'm looking for this feature too

SteffeyDev commented 1 month ago

I'd like this feature as well

softcam-claiton commented 1 month ago

Da seguinte forma funcionou para mim:

window.$chatwoot.setConversationCustomAttributes({ key: value });

Espero que ajude.

sojan-official commented 1 month ago

resolved in https://github.com/chatwoot/chatwoot/pull/6782

gvargas9 commented 2 weeks ago

How to do it via API? I have tried: api/v1/accounts/8/conversations/9 end point

with body

{ "custom_attributes": { "test": "1234" } }

without success

gvargas9 commented 2 weeks ago

Solution: /api/v1/accounts/8/conversations/9/custom_attributes