ADDING ATTACHMENT TO SALESFORCE OBJECT USING WEB SERVICE TRANSFORMATION IN IICS

   

ADDING ATTACHMENT TO SALESFORCE OBJECT USING WEB SERVICE TRANSFORMATION

          This blog covers two types of scenarios:

1.Calling CAI in CDI

2.Attaching file to salesforce object using web service transformation.

CONNECTIONS REQUIRED:

v                      FILEIO CONNECTOR

v                      REST V2 CONNECTOR

v                      SALESFORCE CONNECTOR

CONNECTIONS:

1.FILEIO CONNECTOR:

Create an empty text file and save it as “.infaccess” and create a folder and place the files we want to attach, in that folder. Provide path of .infaccess file in Parent Directory of file IO connector. Test & Save the connection.

 

 

2.SALESFORCE CONNECTOR:

Create a salesforce connector with relevant username, password and security token.


 3.REST V2 CONNECTOR:

Click on VIEW SWAGGER FILE in the property details of process created. Copy & paste it in Text file and save it and give the path of the swagger file in connector.



PROCESS IN APPLICATION INTEGRATION:

1.Navigate to application integration & click on “New” and create a process. Drag & place create step (to create record in salesforce object) and assignment step (to capture “ID” generated for created record in salesforce)

2. As next step create input fields in which values are passing at run time.

 3. Now create an output field which will capture the ID generated for created record in salesforce.

4.Now drag & drop create step and select SALESFORCE connection and an object (e.g., CASE), for which we want to attach file and assign input fields of case object to input fields created.

5. Drag and drop Assignment step and assign created case ID to output field created.

6. Save & publish the process and click on “Run using” and provide input values to input fields as follows:





STEPS IN MAPPING:

SOURCE:-

            Navigate to Data integration and click on “New” and create a Mapping and select Source as File IO connector.



TRANSFORMATION:

Create a BUSINESS SERVICE step using REST V2 connector.


WEB SERVICE transformation in mapping:





.MAPPING TARGET:

Select target as Salesforce connection and object as Attachment.


Save & run the mapping.

When ever Mapping is succeed process also triggered as follows:


Process will trigger number of times based on number of files present in folder of file IO connector.

Now click on any process to see the generated ID for record created in salesforce object.


 And then LOGIN to “salesforce” and search with generated ID for record:

Scroll down to see the attached attachment for that created record.

    This will conclude that using WEB service transformation CAI is called in CAI and also file is attached to salesforce “CASE” object.

Comments

Post a Comment