sn_connect send message is not working in the business rule. can run it in background script fine

b__BenjieB
Tera Contributor
            var conversationId = sn_connect.Conversation.get('sys id of the conversation);
            conversationId.sendMessage({
                body: "Please don't leave the chat some agent will take over your conversation",
                field: 'comment'
            });
 
 
the error I found is this 
 
Root cause of JavaScriptException: graphql.GraphQLException
: graphql.GraphQLException: User can not send message: com.glide.cs.domain.UnifiedMessageSender.sendMessage(UnifiedMessageSender.java:818)
com.glide.cs.domain.UnifiedMessageSender.sendMessage(UnifiedMessageSender.java:675)
com.glide.cs.domain.UnifiedConversation.sendMessage(UnifiedConversation.java:138)
0 REPLIES 0