Skip to main content

#Messaging Session8 人がディスカッション中

I am testing my first attempt at agentforce/AI in a developer org and am looking to build a "chat summary" feature which summarises an ongoing enhanced chat/messaging session into a field on the messaging session record.  This summary is done at the point of transfer between either Bot->Agent or Agent-> agent (will save the agent time reading through the whole transcript when receiving chats) 

 

(I do undertand this feature is available via a paid add-on..... but this is a simple POC I am trying out to test the viability) 

 

Currently - I am triggering the whole piece via a record triggered flow which runs at the point a Messaging Session changes ownership.  At this time, my flow does the following: 

 1) Use the current MessagingSession ID to get the messaging session record 

2) Call a piece of apex code which gathers all conversation items relating to the messaging session, orders them from old to new, then outputs them as a single piece of text. 

3) Use this single piece of text as an input to Prompt Builder.  Ask the agent to summarise the text in a concise manner as to what has been spoken about so far in the conversation and offer the human agent suggested follow up questions.  Output this summary as another piece of long text 

4) Back in the flow, assign the output from the prompt builder to a field on the Messaging Session then update the messaging session 

 

The whole flow runs successfully, and when I manually debug the flow by entering a messaging session ID as a debug input, it works like a dream.  The conversation in the messaging session is summarized exactly as I would expect. 

 

However - when I run this "real time" - the flow runs successfully and I can see (by running a debug log) that the input to the prompt builder is exactly as I expect (ie a long text field of the whole conversation to date).  However, at this point, the output from the prompt builder seems to return a complete hallucination - providing an output which is a summary or something, but has no relationship at all to my inputs.  It consistently mentions fields like <ORDER_NO> and <CUSTOMER_ID> - even though these are items for which I have never referenced in any of my inputs, and which do not exist in my prompt builder prompt. 

It is like it is summarising messaging sessions from another org!? The thing is, I have also made an output to stick the current Messaging Session ID onto the messaging session after the output, so I know it is using this correct ID to lookup the converation.  

 

My Question:

 

Is there any way for me to "see" what is happening inside prompt builder during a real-time run. Because when I do this using the debug in the prompt builder UI - it works perfectly!  The issue seems to only happen during "production" end-to-end runs.

 

 

Example Input:

Custom AI conversation summary of enhanced chat - Prompt Builder hallucinations

 

OUTPUT provided using Debug Session: 

 

image.png

 

 

 

OUTPUT provided using real-time end to end flow: 

image.png

 

 

 

#Prompt Builder  #Messaging Session  #Agentforce  #Developer Edition Org  #Salesforce Developer

2 件の回答
  1. 10月13日 11:31

    Yes. Turn on the Einstein generative AI audit data. You can then see the exact prompt that was sent to the LLM, and the exact response, for every call, including the ones fired from your record-triggered flow.

     

    How to see it

    1. Setup > Einstein Setup: turn on Einstein Generative AI data collection and storage (audit and feedback data). Data Cloud must be provisioned in the org.
    2. Do one real end-to-end transfer again.
    3. In Data Cloud > Query Editor (or a Data Cloud report), look at GenAIGatewayRequest__dlm. The maskedPrompt__c field holds the fully resolved prompt that actually went to the model (after Trust Layer masking), and userId__c shows which user the call ran as. The model's answer is in GenAIGeneration__dlm.responseText__c. New records can take a little while to show up.

     

    What to look for

    • Compare the prompt from a debug run with the prompt from a live run. Placeholders like <ORDER_NO> and <CUSTOMER_ID> are a classic sign that the model received your instructions but not your transcript, so it wrote a generic sample summary. The audit record will show whether the transcript was really in the live prompt.
    • Check userId__c on the live request. When you debug, everything runs as you. In a live transfer, the ownership change is made by routing (the accepting agent, or an automated/system user), so the flow and the prompt template run as that user. Make sure that user has the Prompt Template User permission set and access to everything the template and your Apex read.
    • Check that the prompt action's input in the flow is mapped to your Apex output on the path that runs live, not to a variable that only gets populated when you debug.

     

    If you found this answer helpful, please mark it as helpful.

0/9000

Hi everyone, has anyone experienced Salesforce UI freezing or significant latency in Chrome or Edge?

We’re investigating a recurring issue where Salesforce becomes unresponsive for 10–20+ seconds. It happens during active chat sessions, particularly during peak traffic, but we’ve also observed similar behavior when users aren’t actively handling chats.

Has anyone encountered similar issues, and were you able to identify the root cause or find a resolution? Any insights into browser performance, memory usage, network conditions, or known Salesforce issues would be greatly appreciated.

Thanks in advance! 

 

#Salesforce Developer  #Messaging Session  #Service Cloud  #Salesforce  #TrailblazerCommunity  #Chrome Browser  #Network

4 件の回答
0/9000
Wanatat Chanjaem が「#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 件の回答
  1. 9月27日 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 件の回答
  1. 9月18日 6: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 件の回答
  1. 7月15日 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 が「#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 件の回答
0/9000

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 件の回答
  1. 2023年11月15日 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 件の回答
  1. 2025年5月14日 16:20

    @Fazleabbas Jafry

     

    I had to create a new embedded service deployment. The got fixed after this. 

    Please share if you have any other approach for this.

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 件の回答
  1. 2025年5月4日 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 件の回答
  1. 2025年4月23日 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