[go: up one dir, main page]

0% found this document useful (0 votes)
32 views2 pages

Salesforce Interview QA Partial

The document provides a series of Salesforce interview questions and answers focused on integration topics. Key topics include creating JSON data in Apex, sending JSON through callouts, managing object-level access in connected apps, and understanding Named Credentials. It also covers the requirements for third-party callouts to Salesforce and the concept of Single Sign-On (SSO).

Uploaded by

sai Lokesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views2 pages

Salesforce Interview QA Partial

The document provides a series of Salesforce interview questions and answers focused on integration topics. Key topics include creating JSON data in Apex, sending JSON through callouts, managing object-level access in connected apps, and understanding Named Credentials. It also covers the requirements for third-party callouts to Salesforce and the concept of Single Sign-On (SSO).

Uploaded by

sai Lokesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Salesforce Interview Questions &

Answers
Integration

Q: How do you create JSON data in Apex?


A: You can use the JSON.serialize() method.

Example:
Map<String, Object> jsonMap = new Map<String, Object>{'Name' => 'Test', 'Industry' =>
'IT'};
String jsonBody = JSON.serialize(jsonMap);

Q: How do you send JSON data through a callout in Apex?


A: Use HttpRequest and set the body as JSON.

Example:
HttpRequest req = new HttpRequest();
req.setEndpoint('https://example.com/api');
req.setMethod('POST');
req.setHeader('Content-Type', 'application/json');
req.setBody(JSON.serialize(yourMap));
Http http = new Http();
HttpResponse res = http.send(req);

Q: How do you give object-level access (Account, Contact, etc.) in a connected


app?
A: Through OAuth Scopes and Profiles/Permission Sets. Assign appropriate scopes (like api,
refresh_token) and grant object access via permission sets assigned to the user of the
connected app.

Q: What info is needed to make a callout from a third-party to Salesforce?


A: Client ID, Client Secret, Username, Password (+ security token if IP not whitelisted), and
the Token endpoint to get the access token.

Q: Does REST support XML format? How to do it?


A: Yes, Salesforce REST API supports XML. Use Accept: application/xml in the headers and
send the body in XML format.
Q: What are Named Credentials? How to call them in Apex?
A: Named Credentials store endpoint URLs and authentication. In Apex:
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:MyNamedCredential/someEndpoint');

Q: Before Named Credentials, how was data stored for external endpoints?
A: Using Custom Settings, Custom Metadata, or hardcoding endpoint URLs and tokens in the
Apex code (which is not secure).

Q: How to create an Account without using web services from a third-party


system?
A: You can use Salesforce APIs (REST/SOAP) from the third-party system to insert Account
records directly via HTTP POST to /services/data/vXX.X/sobjects/Account.

Q: What is Single Sign-On (SSO)?


A: SSO allows users to log in once and access multiple systems. Salesforce supports SSO
using SAML, OAuth, and OpenID Connect. It enhances security and improves user
experience.

You might also like