To prevent spam and unwanted messages some platforms provide a method to block specific users and messages from coming in. Unfortuantly not all platforms provide such features, please see the Channel Support page for a complete overview of which platforms offer a native block functionality.
This article describes how you can block a conversation if a platform provides native functionality to do so but also how you can block a conversation using Social25 conversation states.
Platforms that have support for blocking users natively can do so using the Block User endpoint in the Social25 API. For an up-to-date list of platforms that support this please check out the Channel Support page.
Blocking Conversations using conversation state
On platforms that don’t have native support for blocking users, you can prevent messages from being synced to Salesforce using the conversation state. To start off make sure to request the Social25 team to disable the BLOCKED state from pushing messages to Salesforce. You can do this by contacting firstname.lastname@example.org and requesting the BLOCKED state to be excluded. Please make sure to include the organization id of the Salesforce environment where you want this enabled.
Once that has been added by the Social25 team you can use the Update Conversation Details endpoint to place a conversation in the state blocked. Once a conversation has been placed in this state all messages received for this customer will not be synced to Salesforce. They will still show up in the chat window but won’t trigger the creation of a Heroku Message record. The API call to perform this operation might look something like this: