Skip to main content A new Salesforce certification experience is coming July 21st. Discover how exams will be delivered in Pearson VUE, what it means for you, and ways to prepare. Learn more.

Feed

Connect with fellow Trailblazers. Ask and answer questions to build your skills and network.

What is the vs code extension do I need to install for make automatic indentation at my Apex code? Also what is the shortcut?

3 answers
0/9000

Hello , 

 

I am encountering an error when trying to send messages to an Einstein Bot session via the REST API. The bot works fine for simple text messages, but when the bot dialog contains a Question step with predefined options, I get the following error response: 

 

"status": 500, 

"error": "BotErrorException", 

"message": "Exception when calling worker service to send messages" 

 

Details: 

 

I am using the /v6.0.0/sessions/{sessionId}/messages endpoint to send user responses. 

 

The message payload uses the correct JSON structure: 

"message": { 

"sequenceId": 1715870993000, 

"type": "Text", 

"text": "OptionValue" 

}, 

"variables": [] 

The OptionValue is exactly one of the configured choice values in the bot’s question step. 

 

The session is active and was started successfully. 

 

Sending simple text messages without options works correctly. 

 

The bot dialog step expects the response as a Text type with predefined static choices. 

 

 

 

Questions: 

 

1.Is

there any known issue or additional configuration needed to properly send responses to bot questions with choice options via API? 

 

2.Are there specific requirements or formats for the message payload or variables when answering option questions? 

 

3.Can you provide guidance or examples for sending responses to Einstein Bot questions with options to avoid the 500 BotErrorException? 

 

#AI  #Einstein Bots  #Agentforce  #Salesforce Developer

1 answer
  1. Today, 11:43 AM

    The error message usually means the payload doesn’t match what the bot expects—most commonly the wrong message type, a missing inReplyToMessageId, or an unrecognized choiceId

    . You should also verify that your Connected App is properly linked to the bot and has the necessary OAuth scopes 

     

    https://medium.com/%40vicksjujarao/how-to-consume-salesforce-einstein-chatbot-service-through-apis-654ed35e54d8

     

     

    https://developer.salesforce.com/docs/service/einstein-bot-api/references/bot-api-v4/v4.0.0?meta=type%3AChoiceMessage

     

     

    https://help.salesforce.com/s/articleView?id=service.bots_service_events_log.htm&type=5

0/9000

Build a flex prompt  

getting the same error when i build a prompt template that i can't find the experience 

 

getting the same error when i build a prompt template that i can't find the experience

 

 

but it's added and i can see it.  ive done it twice now in two diff environments.  

 

TRAILBLAZER ERROR 2.png

 

 

 

#Trailhead Challenges  #Trailhead

0/9000

At first I used a code from google, which was using SessionID for authentication. It was working smooth when called from Anonymous window but when I used it in the LWC Controller class as a method, it was throwing Invalid Session ID error. After a little chatgpt and googling I found that's supposed to happen and I had to use the Named Credentials. To use the Named Credentials I needed to have the Auth. Provider and for that I needed to have the Connected App.  

 

There was one existing Auth. Provider which had my org's url in the auth and token provider but when I used it in my new named credentials, it throwed some error, I am guessing its because the Auth. Provider didn't had any callback url, so that's why the named credential could not authorize using it.  

 

Let me know if there's a way I can use that Auth. Provider directly in my Apex code for this.  

 

Currently, I am using the named credentials created by me, to create the reports.  

 

Please let me know if there's any workaround so I don't have to create all these. 

 

Any help is appreciated, Thanks! 

 

Here's how it looks right now

String endpoint = 'callout:MyOrgAPI/services/data/v64.0/analytics/reports';

HttpRequest req = new HttpRequest();

req.setEndpoint(endpoint);

req.setMethod('POST');

req.setTimeout(20000);

req.setHeader('Content-Type', 'application/json');

req.setBody(reqBody);

Http http = new Http();

HTTPResponse res = http.send(req);

#API  #Integration  #Reports

0/9000

Hey all! I’m a Salesforce Admin at a SaaS company, and we’re trying to make a decision on how to handle returning customers who were previously churned. It doesn’t happen super often, but we’ve had a few customers come back recently and it’s raising some questions. 

 

The main issue, is we integrate with other solutions (Intacct/Adaptive Planning) for financial and forecasting. A new Intacct ID is required when they return, which makes it cleaner

to create a brand new Account in Salesforce. On the other hand, I don’t love duplicating Accounts because we lose historical context in the CRM, and it can get messy for our Sales, CS, and Support teams. 

 

I’m wondering how others handle this — reopen or create new? 

 

Here’s the options we're considering:

Option 1: Reopen the old Account

  • Pros: Keeps CRM clean, retains full history, no confusion in reporting
  • Cons: Can cause confusion with financial/forecast planning integrations

Option 2: Create a new Account

  • Pros: Clean slate for integrations, financial and planning teams prefer this
  • Cons: Duplication in CRM, harder to trace lifecycle, need to relink Contacts/Cases/etc.

Possible Hybrid Approach:

  • New Account gets created
  • We link it back to the original via a custom lookup
  • Copy data onto the new account with apex/flows to ensure data cleanliness

Curious to hear how others handle this in integrated orgs. If you’ve dealt with this before, what worked for you? Any suggestions or best practices to share with this use case? Thanks in advance! #Salesforce Admin #Sales Cloud #Data Management

2 answers
  1. Today, 11:18 AM

    We use 1 Account record, also.  Our Finance Team can choose to use the existing Intacct ID (default) or create a new one.

0/9000

I am working on a screen flow and it has got some grids/templates/request type so that the users can click on that and then when they enter and submit case is created at the back end so I want to remove a couple of the template/grid/request type so I deactivated that from object>fiekds and relationships> deactivate that specific template its showing deactivated still visible in the screen flow. Would appreciate if you can suggest how to fix this error. 

 

 

#Trailhead Challenges

2 answers
  1. Today, 11:16 AM

    @Ashwini Garwandha Thank you for your response just one question to ask here if there are multiple flow versions of the above scenario so manually removing components of the active versions will work right or of all the versions active/inactive/deactivated? 

0/9000

Once I select a picklist field as option A for eg then another picklist field should not appear how can we achieve that. Thanks for your response in advance. 

 

#Trailhead Challenges

2 answers
  1. Today, 11:06 AM

    Will check this functionality though the changes are to be made in the screen flow template. Will let you know if this works. 

     

0/9000

Hi everyone! 

 

I've associated a Data Capture Flow with a Work Plan step, and when running the step from the Field Service mobile app, I get an error message saying, "Only Field Service mobile flow type is supported in the mobile app. Contact your Salesforce admin.". However, when running the same step from the web there's no problem; it runs correctly. 

 

The user has the necessary Field Service permissions to run the step, and even adding administrator permissions, the result remains the same. I've also simplified the flow to the maximum, down to just one assignment, and the same problem occurs. Even so, when associating the same flow with a Work Order record form, it was possible to run it from the mobile app, although, according to the release notes for the latest version, these flows should also be available for work steps (

https://help.salesforce.com/s/articleView?id=release-notes.rn_fieldservice_254_data_capture_flow.htm&release=254&type=5

). 

 

Has anyone encounter the same issue? Am I missing something? 

 

Thank you very much for your help!!

1 answer
  1. Today, 11:05 AM
    I have had same issue. Not sure if it's intended to work... but would be great!
0/9000