본문 바로가기

Infomatica/Application Intergration

[Process] OAuth + Excute SOQL

(Salesforce Rest API를 사용한) OAuth 인증방식으로 Get Access Token 한 값을 변수로 사용하여, 다음 액션을 진행할 때 사용합니다

'execSOQL' action은 SOQL 쿼리 결과를 반환하는 내용입니다.

 

Process 1 - SOQL 쿼리를 Process에 하드코딩

Process 2 - SOQL 쿼리를 입력받아 결과 반환


관련 글 : https://tina-dev-story.tistory.com/295

 

Salesforce REST API - OAuth

📌Service connector 에서 REST API 를 사용하여 Salesforce에 액세스하는 action을 생성, 테스트 및 publish 하는 작업을 진행하였습니다Informatica- 인포매티카에서 작업을 위해 필요한 정보를 postman, salesforce

tina-dev-story.tistory.com


Process  1


Process 1 작업


Start

Start

Input Fields -> 없음

 

Output Fields

 

Temp Fields


Service - OAuth Username Password

Service

 


Assignment  - Assgin to access token

- Assigned Using > Field 선택 

- From > OAuth Info > access_token 선택


Service execSOQL

Service

Input Fields


Assignment  Assgin to result

- Assigned Using > Field 선택 

- From > out_result_SOQL_root 선택


Process 1 결과(테스트)

Process 를 Save, Publish 한 후 Process의 Endpoint - Service URL을 포스트맨에 입력하여 테스트를 진행합니다


Process  2

위 프로세스는 SOQL 쿼리가 프로세스 내에 하드코딩으로 들어가 있습니다. 

위 프로세스를 토대로 SOQL 내용을 입력값으로 받아서 결과를 추출하는 작업을 진행해보았습니다.


Process 2 작업

Process 1 의 내용의 흐름과 동일하게 작업하였으며, SOQL을 입력값으로 받기 위해 아래 부분만 수정하였습니다.  

 


Start

SOQL 을 입력값으로 받기 위해 Start의 Input Field를 Text 타입으로 생성합니다.


Service execSOQL

q 값을 process 1 에서는 직접 입력하였다면, input 값으로 받도록 Start에서 생성한 Input Field 'SOQL' 을 매핑합니다.


Process 2 결과(테스트)

포스트맨에서 Param 탭에 input 값으로 지정한 SOQL 을 Key로 입력. Value 값에 쿼리 내용을 입력합니다.

결과가 잘 도출되는 것을 확인할 수 있습니다

 


Refrerences

https://developer.salesforce.com/docs/atlas.en-us.250.0.api_rest.meta/api_rest/dome_query.htm

 

Execute a SOQL Query | REST API Developer Guide | Salesforce Developers

Use the Query resource to execute a SOQL query that returns all the results in a single response, or if needed, returns part of the results and a locator used to retrieve the remaining results. The following query requests the value from name fields from a

developer.salesforce.com