-
Notifications
You must be signed in to change notification settings - Fork 1
[NEW] Add Support for Salesforce URL Site Switching #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@Shailesh351 I've tested this against both, our sf_emulator and the sf url mentioned in the description. They seem to behave differently and I'm not yet sure what to make of it.
I guess I'm not sure what mechanism that url above uses and if it represents what we will see in production? |
|
@ear-dev The salesforce URL I shared above seems region/instance specific. It's routing my SF instance to a new URL but for pre-prod it's sending availability payload. Can you use Here's the curl for the same. As per the design, It will log an error for the SwitchServer and will still escalate the chat with a new URL. You can find other salesforce URLs here https://help.salesforce.com/s/articleView?id=000387161&type=1, one of them should work I guess. |
|
Nice, thanks @Shailesh351 I will test. But like I said, with our emulator it worked great...... so looking good. Thanks. |
|
@bhardwajaditya I've tested this PR and it works great. Can you please take a look at the code, do a review, and approve if it looks good to you? Thanks! |
| await sendLCMessage(this.read, this.modify, this.data.room, technicalDifficultyMessage, this.data.agent); | ||
| await sendDebugLCMessage(this.read, this.modify, this.data.room, ErrorLogs.SALESFORCE_CHAT_API_NOT_FOUND, this.data.agent); | ||
| console.error(ErrorLogs.SALESFORCE_CHAT_API_NOT_FOUND, error); | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not sending technical difficulty message anymore post this change. Is this expected behaviour?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are not sending technicalDifficultyMessage. It's redundant. In the try-catch we are only doing string replacement. Also, we are not having access to all the parameters of sendMessage fn everywhere.
bhardwajaditya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's by design then no issues. Rest all looks good to me
Closes WideChat/Rocket.Chat#1302
For testing, use
https://la3-c1cs-chi.salesforceliveagent.com/chat/restas salesforce chat API in the SF App Setting