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
Carolyn CarolynCarolyn Carolyn 

Why user doesn't finds his data available when user goes to Physical store after placing Online details from App to Salesforce.com

Hi All,

I have a mobile app(not a salesforce app) which is connected to Salesforce.com and salesforce.com talks to an external website(fulfillment portal) using HTTP REST Request and Response method call out ,now problem is whenever user who wishes to buy a new phone enters his/her details like name,phone model name and his phone number from app and visits physical store outlet for fulfillment,the store representative unable to search the customer data in fulfillment portal..So the store has to manually re-enter customer details.

Integration apex class has been exposed as a WebService
 
public class HttpIntegration{

public String getCalloutResponseContents(String url){

Http h = new Http();

HttpRequest req = new HttpRequest();
req.setEndpoint(url);
req.setMethod('GET');

HttpResponse res = h.send(req);
return res.getBody();


}



 }

While manually testing from Salesforce ,we get a success response from external website(fulfillment portal) and Trigger is also created at Salesforce end to update the Token id at the Order custom object ,but still when the customer goes to store he is unable to find his details,

What can be the possible solution to fix this?

Thanks,
Carolyn
Best Answer chosen by Carolyn Carolyn
Shiva RajendranShiva Rajendran
i assume integration user has access to the object you insert.. the api which creates the record from your mobile app, you must also associate ownerid..
either set ownerid for those record you create in salesforce or have a manual sharing in place in the api or have a sharing rule..
ideally now the record is created but is not visible
Regards,
Shiva rv

All Answers

Shiva RajendranShiva Rajendran
Hi Carolyn,
Need few clarities :
If you enter details in your mobile app , data will be inserted into salesforce?
Salesforce talks to external system using trigger?

Could you elaborate on the technical side about the manual testing if you insert as system admin it is working?

Check when customer enters data in his app , if it's created in salesforce firstly. The integration code dont have anything here. I assume the code will hit the fullfilment portal and that api will return some id and you will add that to the orderdetails record.

Here you are saying the order details in salesforce are updated with id from fullfillment application but the record is not searchable in fullfilment application?

Thanks,
Shiva RV
Carolyn CarolynCarolyn Carolyn
Thats right ,record is not searchable in fullfilment application,mind you OWD is set to private
Shiva RajendranShiva Rajendran
Hey Carolyn, 
Is Fullfillment portal is also salesforce org which has owd private?

Possible the when you integrate between salesforce and the fullfilment application , you might have used integration user and you searched with some other user. So  the api at fullfilment portal must also share the record to the corresponding user.
Thanks,
Shiva RV
Carolyn CarolynCarolyn Carolyn
Thanks for your repy,no the fulfillment portal uses node js and angular ,i have exposed my apex method as REST https post and  sending my record as a part of trigger 
Carolyn CarolynCarolyn Carolyn
Thank you for your response,the fulfillment application is some other NodeJS /Angular application
Shiva RajendranShiva Rajendran
i assume integration user has access to the object you insert.. the api which creates the record from your mobile app, you must also associate ownerid..
either set ownerid for those record you create in salesforce or have a manual sharing in place in the api or have a sharing rule..
ideally now the record is created but is not visible
Regards,
Shiva rv
This was selected as the best answer