@@ -97,21 +97,24 @@ export default {
9797 } ,
9898 async run ( { $ } ) {
9999 try {
100+ const data = {
101+ externalId : this . externalId ,
102+ name : this . name ,
103+ status : this . status ,
104+ priority : this . priority ,
105+ direction : this . direction ,
106+ tags : parseObject ( this . tags ) ,
107+ assignedUsers : parseObject ( this . assignedUsers ) ,
108+ assignedTeams : parseObject ( this . assignedTeams ) ,
109+ defaultLang : this . defaultLang ,
110+ } ;
111+
112+ if ( this . queue ) data . queue = this . queue ;
113+
100114 const response = await this . kustomer . updateConversation ( {
101115 $,
102116 conversationId : this . conversationId ,
103- data : {
104- externalId : this . externalId ,
105- name : this . name ,
106- status : this . status ,
107- priority : this . priority ,
108- direction : this . direction ,
109- tags : parseObject ( this . tags ) ,
110- assignedUsers : parseObject ( this . assignedUsers ) ,
111- assignedTeams : parseObject ( this . assignedTeams ) ,
112- defaultLang : this . defaultLang ,
113- queue : this . queueId ,
114- } ,
117+ data,
115118 } ) ;
116119
117120 $ . export ( "$summary" , `Conversation ${ this . conversationId } updated successfully` ) ;
0 commit comments