Skip to content

Commit

Permalink
feat: Salesforce accounts list id to meta in oauth (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
oberoi-gaurav authored Aug 1, 2024
1 parent 7b7e144 commit 8a4e779
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions integrationos-oauth/src/connections/salesforce/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ export const init = async ({ body }: DataObject): Promise<OAuthResponse> => {
const contactListView = `${listViewBaseUrl}/contact/listviews`;
const opportunityListView = `${listViewBaseUrl}/opportunity/listviews`;
const leadListView = `${listViewBaseUrl}/lead/listviews`;
const accountListView = `${listViewBaseUrl}/account/listviews`;

const contactListId = await getListAllId(accessToken, contactListView);
const opportunityListId = await getListAllId(
accessToken,
opportunityListView
);
const leadListId = await getListAllId(accessToken, leadListView);
const accountListId = await getListAllId(accessToken, accountListView);

return {
accessToken,
Expand All @@ -100,6 +102,7 @@ export const init = async ({ body }: DataObject): Promise<OAuthResponse> => {
contactListId,
opportunityListId,
leadListId,
accountListId,
},
};
} catch (error) {
Expand Down

0 comments on commit 8a4e779

Please sign in to comment.