function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
clettebouclettebou 

CreatedById

Hi all,

I have created my own SelfServiceUser portal where our customers can create and manage their requests.
But in Salesforce the requests' comments create by our customers in our own portal don't appear correctly.
Indeed the author of the comment is not the customer but the user I use to access API.
Can I do something for this ?
Thanks

CletteBou
sfdcfoxsfdcfox
You can log in as a SelfServiceUser in the latest version of the API. If you do so, then all comments added will work just like the self-service portal-- the SelfServiceUser will be the one to create the case and/or comments. Take a look at the LoginScopeHeader.

~ sfdcfox ~
clettebouclettebou
Hi,

I try to use the LoginScopeHeader but I have the following error: INVALID_SESSION_ID: Self Service User Sessions are not valid for use with the API ...

CletteBou
SuperfellSuperfell
Self Service Users can only call Login and getServerTimestamp (in order to verify credentials or existing sessions), they don't have general API access.
clettebouclettebou
OK, so I repeat my question.
How could I do with the API to create a request comment (or an attachment) that is associated to a SelfServiceUser ?

And if I cannot, does Salesforce plan to develop this feature in a future version of the api ?


Thanks

CletteBou
SuperfellSuperfell
1. You can't.

2. CSP Users for the new portal have API access, and would be able to do this just like a regular user can via the API. (I believe the new CSP portal is currently in pilot)
clettebouclettebou
Ok thanks you for your reply.
beaugordonbeaugordon
Simon,
 
I'm hoping I can just do a sanity check here:
 
I want to write a custom Salesforce portal.  I don't want to use the Customer Portal or the free Self Service Portal.
 
I can only interact with the API in the context of a User.  I can't use the SelfServiceUser because they can't interact with the API.
 
Any object I create (Case, CaseComment, Attachment) will have a CreatedBy attribute of the User, and I cannot change the CreatedBy attribute of these objects to the SelfServiceUser.
 
I think this is right based on other information I have found, but want to confirm. Thanks for your help.
 
Beau
 
 
SuperfellSuperfell
Correct.