Showing posts with label Dell Boomi. Show all posts
Showing posts with label Dell Boomi. Show all posts

Friday, 10 July 2020

Dell Boomi-Consume WSDL in Boomi to integrate system with Salesforce

WebService Soap Client Connector

In order to connect salesforce with some other system using wsdl, we have to use dell boomi webservice soap connector.

Use the Web Services SOAP Client connector (a generic connector) to integrate with any web-based or on-premise application that exposes a SOAP web services interface.

This connector enables developing integrations against various SOAP-enabled applications.

Configure Connector

You will have a wsdl link from your source system. In my case we will use a dynamic link which can get some parameters and return us results. This is a secure wsdl so we have to configure the security also.

Here is a test link

WDSL URL = https://demo.com/fni-bin/demotest.cfg/services/soap?wsdl
SOAP End point URL = https://demo.com/fni-bin/demotest.cfg/services/soap

Note: One thing to note is that while configuring connector do make sure that you do not add wsdl word in the soap end point url. as shown above. If your wsdl is secure then enter user name and passwords.Based on the security level you can set security type.




Setting Parameter

In the start shape connector when you are done with configuring connector click on parameter shape and set your parameters. As shown in picture.

Convert Data from WSDL into CSV

When wsdl sends us data its in the form of columns and rows and we have to convert it into a format that can be read by salesforce. In order to accomplish this we will use a map in boomi. In the source profile we will use the profile structure which we get from wsdl and in the destination we will create a dummy data holder flat file profile. This flat file profile will help us to distinguish between data and column headers. As shown below.

Convert Data from CSV format to XML for Salesforce

Now we will configure another map and put it right after our conversion map(the map we configure above). This new map will help us to convert flat file data into xml format which salesforce accept.
In the source side you will create a flat file with all the column names your wsdl provides. This will be a manual activity. You have to manually create all the column names.Make sure you use correct names and sequence.If name or sequence are misspelled or misplaced data of one field will enter into another field.
On the destination side use salesforce xml profile and do the mapping as per your requirements.Now add your salesforce connector and insert data into salesforce.

Add try and catch to make sure all the errors you encounter are logged somewhere.

Dell Boomi API Management-Configure Rest Based API for form Based Jason Response

Dell Boomi API Management
Most of you are familiar with Dell Boomi API management feature. APIs are implemented as deployable API components. There are two types: API Service and API Proxy. Using API components enables you to consolidate API design into a single, explicit location.
In API Service, we can define an endpoint using a Rest or Soap.

Configure API:
First we have to configure an API.Give your API a title and then a base path.As Shown in screen shot below.


Then go on Rest Tab and it will automatically configure path for you then click on Add End Point button.Configure you end point. Configure your input type and output type and create a process that will handle your request.As shown in screen shot.



Create Listener Process
Now create a process that will listen all the request send to API. In my example i am configuring a process that will get two inputs as API parameter and on the bases of those inputs insert data into salesforce.
Starting connector will be WebService Server Connector with Listen action. Create its operation with 
Operation Type = Get
Object= will be your resource path you configure during end point creation
Expected Input Type = Single Data
Response Output Type = Single Data
Result Content Type = text/plain


Then you have to use this groovy script so parameter values can be assigned to your variables.Below groovy script will be used.

import java.util.Properties;
import java.io.InputStream;

import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
import java.nio.charset.StandardCharsets;

for( int i = 0; i < dataContext.getDataCount(); i++ ) {
    InputStream is = dataContext.getStream(i);
    Properties props = dataContext.getProperties(i);

    def input = is.text;
    def data = URLEncodedUtils.parse(input, StandardCharsets.UTF_8) as List<NameValuePair>;
    
    for ( NameValuePair arg: data ) {
        props.setProperty("document.dynamic.userdefined." + arg.name, arg.value);
    }
    
    dataContext.storeStream(is, props);
}

Now we have to use dynamic properties to get values from endpoints. Will create two dynamic process properties to get Account Id and Account Key. Dynamic process property name = AccountId and AccountKey. It will get value from our endpoint. Our endpoint is 

Http:Demo//ws/rest/Test/Lim?AID=123456&Key=444 

Dynamic Process Property Name = AccountId
Parameter = Dynamic document property with name = AID

Dynamic Process Property Name = AccountKey
Parameter = Dynamic document property with name = Key

Note: One thing to note here is that my dynamic process property names are same as my url parameter name. This is the key point to set variables. The bold words in my url are my parameters placeholder i have given the same name to my dynamic process property. This is how you can set values.

In my case we will use another dynamic process property to check that the account id and key combination is in salesforce or not.In the decision box will check if salesforce do not have this combination we will send an email alert if this combination exists we will insert data in salesforce.

Salesforce Connector

Configuring salesforce connector or mapping data is easy tasks and can be found in below links.












Thursday, 6 September 2018

Dell Boomi: How to query data from MYSQL using stored Procedure

 How to query data from MYSQL using stored Procedure

When I normally integrate database with Salesforce using Dell Boomi i use views to query data from database, but due to some complex query structure not supported by MYSQL we ended by changing our approach and start querying data from a stored procedure.

Dell Boomi support querying data via a stored procedure, but there is a well known error you may face when try this feature.Before going towards error i first let you know how to get data using a stored procedure.

We have to create a "Get" database operation then create a database profile.In the "Type" fields select "Stored Procedure" rather than query.

Then import profile using stored procedure name from your database.When import profiles completed you wont be able to see any child elements in profile. You have to manually create all elements in profiles and then map.

This is it....

Now come to error part when you will try to run this process you might face an error saying "stored procedure not found". This is Dell Boomi known error. What happen is that when you import stored procedure from your database boomi automaically append database name with stored procedure name and when try to run it gives error.

Please remove the schema-Name from the Stored Procedure name in the Database profile after Importing. For example, after you import the Stored Procedure, please change the name from 'OLTP_Symitar.IRA_ScoreCard' to 'IRA_ScoreCard' and Save the profile.


Error Solved :)

Thursday, 15 March 2018

Dell Boomi: How to connect CloudSQL from Dell Boomi

How to connect CloudSQL from Dell Boomi

Recently I got a requirements from client that we have to connect CloudSQL via Dell Boomi, so the exact requirement was to query data from Salesforce and push it to CloudSQL's specific project which is using MYSQL as a database.

Dell Boomi do not have any dedicated connector for cloudSql connection. As you all know that cloudSql is on cloud so first thought we have to connect such system is to use HTTP connector of dell Boomi. Just to give you a little overview of Dell Boomi HTTP connector, It is used to conect any system via API.Get more information from here.

Now issue is CloudSql even being on cloud does not support connecting it via API and doing DML operations. Surely you can connect it via API but this API will only allow you to do some Admin work. Get from Information here.

So the option we are left with is use Database connector of Dell Boomi and use cloud atom to connect CloudSQL database.

Process

Connection

Note:
Use cloud atom to run this integration.
In creating database profile if you select dynamic insert this will allow you to import database structure from SQL using your connection, creating profile manually in dell boomi can cause diffrent error like 404 and other.