• Felipe Prado
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 2
    Replies
I'm on the Quick Start: Einstein Prediction Builder module and have followed the steps and created an account to get the Einstein Prediction Builder Developer Edition, however after verifying my email and loggin on, I can't find the prediction builder tool in setup as it says you would on Trailhead. Where can I use a version and play around with the tool?
 
I'm trying to using the Salesforcde Live Agent REST API from a webpage using angular and ajax requests.
When I first try to obtain the SessionId, performing an ajax request to <server>/chat/rest/System/SessionId, the browser first submits an OPTIONS preflight request.

Salesforce returns a 400 error response because the request doesn't include the headers X-LIVEAGENT-API-VERSION nor X-LIVEAGENT-AFFINITY. To verify if that was really the problem, I tried to add those headers and submit the request again using Postman. That time I got an 405 method not allowed error. That means that Salesforce can't service an OPTIONS request for that endpoint.

For what it looks like, Salesforce Live Agent doesn't support CORS. Is that correct? I would like to access the API directly from the client, without having to submit a request to my server and then a request to Salesforce Live Agent Api. Is this possible? Is there some way to have the Live Agent REST API servicing Ajax requests?
I'm trying to using the Salesforcde Live Agent REST API from a webpage using angular and ajax requests.
When I first try to obtain the SessionId, performing an ajax request to <server>/chat/rest/System/SessionId, the browser first submits an OPTIONS preflight request.

Salesforce returns a 400 error response because the request doesn't include the headers X-LIVEAGENT-API-VERSION nor X-LIVEAGENT-AFFINITY. To verify if that was really the problem, I tried to add those headers and submit the request again using Postman. That time I got an 405 method not allowed error. That means that Salesforce can't service an OPTIONS request for that endpoint.

For what it looks like, Salesforce Live Agent doesn't support CORS. Is that correct? I would like to access the API directly from the client, without having to submit a request to my server and then a request to Salesforce Live Agent Api. Is this possible? Is there some way to have the Live Agent REST API servicing Ajax requests?