Skip to main content

#Messaging Session4 personnes en discutent

Wanatat Chanjaem a posé une question dans #Messaging

I've set up an Enhanced Messaging LINE channel in a Sandbox (UAT) org following the official setup guide (service.messaging_line_create) step by step, but inbound LINE messages never create a Messaging Session in Salesforce, and I've exhausted every troubleshooting avenue I can find. 

 

Setup: 

 

Enhanced Messaging LINE channel, Omni-Channel routing to a Queue that supports Messaging Session 

Webhook URL correctly configured in LINE Developers Console → clicked Verify → Success 

"Use webhook" = On, Auto-reply and Greeting messages disabled in LINE 

Channel Activated in Salesforce, Omni-Channel status = Online/Available 

Refreshed the channel connection (re-authenticated Channel Secret/Access Token) — no change 

 

What I've checked, all clean: 

 

LINE Developers Console → Webhook errors: 0 errors (with Error statistics aggregation on) 

LINE Verify: consistently returns Success 

Salesforce webhook endpoint (…/commongateway/line/ucom-message/{platformKey}) reachable externally, returns HTTP 405 on GET as expected for a POST-only endpoint 

MessagingSession and MessagingEndUser: 0 records, ever 

Debug Logs (trace flag on the "Automated Process" user, SFDC_DevConsole level, active during every test): 0 log entries generated, even right after sending fresh test messages 

Tried to check the "Enhanced Messaging Log" mentioned in some docs, but couldn't find it anywhere in Setup Quick Find in this org — does this require a specific permission, license, or release version to appear? 

 

Since LINE reports successful delivery (implying it got a 2xx response) but Salesforce shows literally zero trace of receiving or processing anything — not even an Apex debug log — I suspect either a silent signature-verification failure on the inbound webhook, or a platform-level issue with this specific channel that isn't surfaced in any UI I have access to. 

 

Has anyone run into this exact symptom (webhook verified + zero errors both sides, but zero MessagingSession/debug log activity) with Enhanced Messaging? Any pointers on where else to look, or whether "Enhanced Messaging Log" requires something specific to enable? 

 

Org type: Sandbox (UAT). Channel type: LINE, Enhanced platform. 

 

#Messaging  #Messaging Session

1 réponse
  1. 27 sept., 13:07

    Hi Wanatat,

    Since the LINE webhook verification succeeds and there are no webhook errors, but Salesforce is not creating any MessagingSession or MessagingEndUser records, I’d focus on the Salesforce channel connection and inbound message processing rather than Omni-Channel routing. 

     

    I’d verify that the LINE channel is connected to the correct Messaging/Enhanced Messaging configuration and that the Channel Secret and Access Token belong to the same LINE Messaging API channel whose webhook is being tested. It’s also worth confirming that the test message is being sent from a LINE user who can actually interact with that channel. 

     

    The fact that there are no Automated Process debug logs is particularly useful, because it suggests the request may not be reaching Salesforce’s messaging processing layer at all.

    If everything is configured correctly and you still get zero MessagingSession records, I’d recommend opening a Salesforce Support case and providing the channel configuration, LINE webhook verification result, timestamps of test messages, and the fact that no Salesforce-side processing/log activity is generated. That should allow Salesforce to check the backend messaging logs for the channel. 

0/9000

Hello! 

I'm looking for a workaround to be able to create a blank Messaging Session in an enhanced SMS channel. I know officially Salesforce does not provide a way to do so but for various business reasons, this is the solution that is needed. High level - based on a record trigger, we need to route a blank Messaging Session to a user via Omni Channel. The scenario covers existing customers with whom we had prior sms conversations as well as new customers with whom we've never communicated via sms. 

Has anyone figured out any ways around this limitation? 

 

#Service Cloud  #Digital Engagement  #Messaging Session

2 réponses
  1. 18 sept., 06:44

    Hi Svetlana,

     

    The short answer is that you cannot manually construct a valid ConversationId via standard Apex/Flow DML because in Messaging for In-App and Web (MIAW) and Enhanced Channels, the Conversation record is managed by Salesforce's backend Service Cloud Real-Time (SCRT2) fabric, not core Salesforce DML. Inserting a raw MessagingSession record without an underlying SCRT conversation context leaves it orphaned and unusable in Omni-Channel.

     

    However, depending on whether you want an automated greeting sent or a completely silent assignment, here are two tested patterns for this use case:

     

    Solution 1: Outbound Messaging Template (Recommended)

    Instead of generating an artificial "blank" session, trigger an outbound template message to initiate a real session.

     

    • How it works:
      1. Trigger an Auto-Response / Outbound Messaging Flow from your record trigger using an approved Messaging Template (e.g., "Hi [Name], an agent is reviewing your account and will connect shortly.").
      2. Because the message is sent via the standard messaging engine, Salesforce automatically creates the Conversation, provisions the ConversationId, and initiates an active MessagingSession.
      3. Route this newly initiated session through your Omni-Channel Flow to the agent queue.

     

    • Why it works: The agent receives an active session in their Omni-Channel widget, the conversation thread links seamlessly (for both new and existing customers), and the SCRT2 backbone recognizes the session.

     

    Solution 2: Agent-Initiated "Start Conversation" Quick Action

    If your business requirement strictly forbids sending an automated outbound text to the customer before the agent connects:

     

    • Use the Standard Enhanced Outbound Capability:
      • Route a custom Task, Case, or Work Order to the agent via Omni-Channel when the trigger condition is met.
      • Embed the "Send SMS" / "Start Conversation" Quick Action on the record page layout.
      • When the agent accepts the work item from Omni-Channel, they click the action to send their first custom message. Salesforce immediately opens the active MessagingSession console tab for the agent.

     

    Solution 3: SCRT2 / Connect REST API Outbound Trigger

    If you have developer resources and need complete headless automation:

     

    • Use the Connect REST API for Outbound Messaging (/connect/conversation/messages / Enhanced Channel API).

     

    • By calling the internal service endpoint rather than attempting an insert new MessagingSession(), the platform spins up the actual conversation payload and routes the resulting session to Omni-Channel as designed.
0/9000

I have created a custom button to launch MIAW Chat on Community page and have hidden the standard button by setting visibility as always hidden. But after starting a chat , unless the user clicks on 'End Conversation' and closes the chat window , the standard button will always be visible. Even if agent ends the session , the user can still send new messages or just minimize the chat window. The conversation does not end. If user logs out with keeping the chat window and again logs in after sometime , chat window is still open on that page. Basically the custom button is of no use if user starts a chat and  doesn't end conversation and closes window.

 

Is there any APIs or any other way to close complete conversation when Agent ends the session?

 

#Messaging Session #Service Cloud #Messaging

9 réponses
  1. 15 juil., 22:09

    @Don Schueler How to programmatically determine if a MessagingSession was ended by the new "End Session Based on Inactivity" automation vs. manually by an agent?

0/9000
Vikrant Goswami a posé une question dans #Flow

Hi all, I have a flow routing the incoming messaging requests to a queue for messaging for web implementation. But I see the routing is failing for some messaging requests and flow is failing at Route Work action with this error 'The queue must be an Omni-Channel queue This Route Work invocable action did not create a valid Pending Service Routing.' Now my question is that since it works just fine for most of the messaging requests then how can there be an issue with the queue. I am not able to figure out the issue here. I have also checked the data of incoming messaging requests for both failing and passing cases and I can't see any relevant issue in the data as well. 

Has anyone faced this before? Is there something I should look at which I may be missing here? 

Let me know please, thanks!! 

 Edit - Adding image of the error in flow.

#Messaging Session  #Service Cloud

 

Messaging Sessions going to Fallback Queue

 

 

 

#Flow

6 réponses
0/9000
Ariel Gencianeo (N/A) a posé une question dans * Service Cloud *

Hello Everyone,

 

Just want to ask if it is possible to end both Conversation and messaging session  when agent click End Chat button in messaging session page so that it will also end the conversation in customer's prechat form?

 

#Service Cloud

8 réponses
  1. 15 nov. 2023, 20:27

    Ariel,

     

    As of now, there is no configuration for this. But, the end visitor will see a message that the agent left the conversation.

0/9000

I was successfully able to setup Messaging for In App and Web in my sandbox and it's working fine. Now I have deployed the complete MIAW setup to higher orgs via VS Code , I was able to deploy all the sites, networks, Messaging Channel, EmbeddedServiceConfig, VF Page etc. successfully.

But I'm facing error while publishing the embedded service. I'm getting a success mail saying that the site is successfully published but I'm getting below error just after clicking "Publish" :

Something went wrong, Gack ID: 1839136551-31169 (1553746173)

 

Also, the "Test Messaging" is disabled. The VF page which was created in the previous org , I have deployed that as well and updated all the urls in the page to new sandbox but still it doesn't help. Since it's mentioned that they will create a new vf page , I tried deleting the deployed vf page but still same issue.

 

 

Any help would be appreciated. Although I can create a new embedded service manually in the new sandbox but it would be good to fix this. As I have deployed all components , just need to publish it.

 

#Service Cloud #Messaging Session #Messaging

4 réponses
0/9000

 I’m working on migrating from LiveChat to Messaging for In-App and Web and need to apply custom CSS to the Einstein Bot within the customer chat window. Specifically, I want to:

  • Increase the font size for better readability
  • Make focus states clearly visible for accessibility
  • Avoid keyboard traps to ensure smooth tab navigation

 While inspecting the implementation, I looked into the minified .js asset files to find styling hooks or class names, but modifying those directly doesn’t seem safe or maintainable.

I’m looking for guidance or examples on how to safely apply these styles, ideally without breaking Salesforce updates. What’s the recommended approach for customizing the chat window UI in this context? Is there official support or documentation for this kind of styling? 

@Enhanced Chat (Messaging In-App/Web) #Service Cloud  #Salesforce Developer #Omni Channel #Messaging Session

 

 

1 réponse
  1. 4 mai 2025, 15:54

    Faced similar limitation when migrating, unfortunately, the customizations are pretty limited. Here is some documentation to modify the styling for CSS of the text message bubble - https://developer.salesforce.com/docs/service/messaging-web/guide/customize-text-message-bubble.html?_ga=2.187649192.100907895.1738079703-1605979368.1737756652

     

    Modifying the css classes that you see when inspecting the UI on the browser is not recommended as those can change over time. The CSS/styling is primarily controlled using the branding section in the embedded service deployment.

0/9000

In legacy Live Chat, we used to show all chat transcript record for a particular Case on our community case detail page in a related list. It seems we cannot do the same in MIAW because we can only fetch the conversation via Connect API. Just came across this MIAW feature that it allows end users to see old conversation if they are verified. Can anyone please help with how to verify users for this. I have seen multiple documents but they all seem to be about external Websites and android apps. I need this only for Community.

 

Not sure , if it will serve our purpose because we display chat button on Case Detail page and would ideally like to see conversation for that particular case only but one end user can have multiple cases.

 

#Messaging Users #Messaging Session #Service Cloud #Messaging

15 réponses
  1. 23 avr. 2025, 17:44

    We spent about 2 hours on the phone with our IT person and the SF support team to get it set up in our sandbox. I could not tell you what they ended up having to do at the end of all that. BUT also, we were told after all of that we really did not need User Verification since all of our users will be authenticating in from Experience Cloud not an external platform. I am sure that may have changed by now. We had to abandon that project for others.

0/9000

I have configured MIAW on community and pass the case ID and User ID as hidden pre-chat fields. In the omni-channel flow , I'm linking the case and contact to messaging session and messaging user object and then the routing takes place. 

The pre-chat frequency is set to Every Session , so I get caseId and user Id whenever a new session starts. But there is a scenario that session is inactive and customer again sends a message.  

I'm sure here the pre-chat fields will not be sent again but since the Messaging Session was already linked to a Case , it should route properly. 

Instead , even the related case record is removed from the Messaging Session. I'm  updating the messaging session only when a caseId is received  , then how it is becoming blank ? Also , the chat is now routed to Fallback Queue. When exactly does this omni-channel flow gets invoked ? 

 

#Messaging Session #Omni Channel

1 réponse
  1. 6 févr. 2025, 16:19

    Hello, 

    Maybe try to add a decision in your Omni flow to check if the caseId is populated of not... If a Case existe then do not create a new one.

0/9000
Ariel Gencianeo (N/A) a posé une question dans * Service Cloud *

Hello Everyone,

 

Just want to ask why in messaging session from inactive to waiting to active status, change the related record case subject field gets updated from being populated to blank? why this happens?

 

#Omni Channel #Messaging Session #Case

4 réponses
  1. 13 nov. 2023, 06:26

    thanks for responding to my question, but this is now solved i just add a decision element to check if case already exist in messaging session and if exist just do nothing, to answer the question its a messaging for web only and I'm not observing the case

0/9000