Monday, February 26, 2018

How to conveniently transfer data to and from ftp servers using dbsync - Part 3


In this series of three articles we explain why it is advantageous to use DBSync to transfer data from an FTP server to Salesforce, and how to do it.
In the first part, we have seen how to create a connection between DBSynk and Salesforce, and between DBSync and an FTP server. In the second article, we saw how to create a process, a workflow, a trigger, a rule and a mapping, and how to configure the post processing. In this part 3, we will see how to run the process, and how to use the log.
Step 10: Run the process
A process can be run in two different ways: manually and using the scheduler. A manual run is useful in tests or sporadic use. The scheduler lets us manage repeated runs, or runs at a specific date and time.
A – Manually
In order to do a manual run, we simple need to press the Run Now button.

Figure 21 – Manual run.
B – Scheduler
The scheduler lets us to run a process at previously defined dates and times. It also lets us to repeat the execution periodically.
We can create more than one schedule. All defined schedules are shown on the screen, and listed in tabular manner.

Figure 22 – Create a schedule.
Additional Resource: Check the logs.
In case of problems, it can be useful to see the logs. There, we can find information on completed processes, errors, run times, and more. The log screen contains some useful filters, and an option to download the report. Figure 23 presents a typical log view.

Figure 23 – Typical log view.
Final Words
Throughout this series of three articles we have seen that DBSync presents a very convenient manner to transfer data from an FTP server to an application, and vice versa.
We have also seen an example using Salesforce that explains how a data transfer can be done in ten easy steps.

Similarly, DBSync lets us to transfer data to/from Salesforce from/to other apps. Thus, this tool gives us the capacity to integrate our different sources of data, creating synergies and new business opportunities.

Saturday, February 24, 2018

How to conveniently transfer data to and from ftp servers using dbsync - Part 2

In this series of three articles we explain why it is advantageous to use DBSync to transfer data from an FTP server to Salesforce, and how to do it.

In the first part, we have seen how to create a connection between DBSynk and Salesforce, and between DBSync and an FTP server. In this second article, we will see how to create a process, a workflow, a trigger, a rule and a mapping, and how to configure the post processing.

Step 4: Create a process
Once we are connected to the source and the destination, we need to create a process that defines the task we want to do. For this, we press the button Create New Process, and we input a name. In our example we use the name “MoveMyData”. We must remember that process names cannot contain spaces.

Figure 9 – Create a new process.
And we get a confirmation of the newly created process:

Figure 10 – Confirmation.
Step 5: Create a workflow.
A process contains one or more workflows. In order to create a new workflow, we must press the Create New Workflow button. The system will ask for a workflow name, which in our example is “SF_to_FTP” (figure 10). Once again, we must remember not to use empty spaces in our workflow name.

Figure 11 – Create new workflow.
After pressing the button Save, we will be prompted to a screen that shows the newly created workflow.

Figure 12 – Workflow information.
It is important to know that we can create more than one process. Those processes will run in sequence. In addition, each process has a status, which can be ON or OFF. If the status is OFF, the process will be ignored during the run.
For example, in figure 13, we have defined three process. Process number two has its status set to OFF. As a consequence, when we run the sequence, the order will be: process 1 followed by process 3. Process 2 will be ignored.

Figure 13 – Workflow sequence.
Step 6: Configure the trigger.
We need now to configure a trigger, which will contain a query to Salesforce. Figure 14 shows how to do this.

Figure 14 – Trigger configuration.
Once we have constructed our query, we can check the results by clicking on the Preview button. The results of the query will be displayed under the Query Result section.

Figure 15 – Query preview
We can also use the Advanced Query Builder. This option presents us with the possibility of directly working with the SQL query statement, manually making the necessary modifications. In order to do this, we must click on Switch to Advanced View.
Figure 16 – Advanced Query Builder


Furthermore, we can click on the Preview button and check if the result of the query is what we’re expecting. Once we are happy with our modification, we can Save and Close, or if we don’t want to change the original query, we can simply Close.

Figure 17 – Advanced View
Step 7: Create a rule.
In the Rules section we define the properties of the file(s) that will store the results of our query. In our case we leave Mode default’s value (passive), we need an ASCII file type to store our records, and we define the name of the file that will contain the records as “infile.csv”. The Batch field defines the number of records that will be processed at once. Finally, we write the name of the directory that will contain our file(s).
Note: A practical way to name the file(s) is by including the date. In this case, the name syntax is “infile_{0,date,dd-MM-yyyy-HHmmss}.csv”.

Figure 18 – Target Properties
Step 8: Define a mapping
A mapping describes the relationship between the fields in the FTP server and the fields in the application. In our case, need to link the fields in Salesforce to the fields in our target file. Figure 20 shows how to do this.

Figure 19 – Mapping
Step 9: Configure the Post Processing.
Post processing allows us to configure actions to be taken after the process has been completed. The action can be any operating system command, or an executable file. The command may include the name of a file, which is defined by a regular expression. If the File Has Header field is set to True, then the operation includes header details in the result. The fields Directory and Trigger Name must be left blank. In our example we won’t include any post-processing instruction.

Figure 20 – Post processing
Wrapping up Part 2
In this part 2 of this series of three articles, we have shown how to create a process, a workflow, a trigger, a rule, and a mapping, and to configure the post processing.
In the next article, we will run this project and see the results.


Friday, February 23, 2018

How to conveniently transfer data to and from ftp servers using dbsync


The File transfer protocol is a standard network protocol used to transfer computer files from one to another host over a TCP network, such as the internet. The standard is widely used due to its convenient characteristics.
Sometimes we need to transfer the data stored in an FTP server to an application, such as Salesforce, MySQL, or vice versa.
There are several tools that can help us to perform this task. However, not all of them have the same capacities. Among them, DBSync stands out by its task automation ability.

Automating your data transfer
Different from other apps, the DBSync lets us transfer file data from an ftp server to any other source available in DBSync, such as Salesforce, and to move and delete files stored in an ftp server in an automated manner.
In order to do this, DBSync uses the FTP Connector, which implements a file transport channel that lets you transfer files between DBSync and an external FTP server. This can be done in two modes:  Trigger (from where a file is read) or Rule (writes a file to an FTP server).
The DBSync Connector allows you to do this with multiple files, and has the ability to select them by using regular expressions. In addition, it provides you with the option to do post-processing operations. This rich capacity gives the DBSync connector an unparalleled advantage, as it frees up your time and reduces your probability of making mistakes.

How to use the FTP connector
Example: transferring data from a file stored in an FTP server to a Salesforce custom object. In this example we will transfer data from Salesforce to an FTP server and vice versa. Let’s solve this problem with DBSync in ten easy steps.

Step 1: Create a new project.
When it comes to defining a project, we have two options: importing an existing one, or defining a new project. In this example, we will define a new project.
For this, we need to press the button Create New Project. As a result, we will get a dialog box asking for the name of our project. We input MoveData, and then press the Save button.
Figure 1 – Create a new project




Step 2: Create an FTP connector.

An FTP connector links DBSync to our FTP server. In order to create it, we need to press the Create New Connector button, and to define two parameters: the connector’s name and the type of connector.
Thus, we first write our connector’s name. In our example: MyFTPConnector. Note that the connector’s name cannot include any spaces.
Then, we define the connector’s type. Here the program presents us with a drop down menu, from where we select the option FTP connector.

Figure 2 – Create a new FTP connector
Once we have created our connector, we have to define its parameters. The most important aspect to understand here, is that there are two verification options: password and private key.
If we have choose a password, we just need to enter its value. (figure 3)

Figure 3 – Set up the connector (Password)
If we prefer to use a private key, we need to check the Use SSH Key for Authentication option and input the private key (figure 4).

Figure 4 – Set up the connector (Private Authentication Key)
Optionally, we can also add a public key and a pass phrase (figure 5).

Figure 5 – Set up the connector (Private Authentication Key)

Step 3: Create a Salesforce connection.
We need now to create a link to Salesforce. For this, we create a new connector of type Salesforce Connector, which we name MySalesforce. Once again, we must remember that the name cannot have any empty spaces.

Figure 6 – Create a Salesforce connector.
After pressing the Save button, the app shows a Salesforce login screen. Here we need to input our Salesforce login credentials.



Figure 7 – Salesforce login.
Once the credentials have been accepted, we see a screen confirming the successful connection.

Figure 8 – Salesforce connection confirmation.

Wrapping up Part 1
We have seen that DBSync has the advantage of automating the data transfer between Salesforce and an FTP server. In this first part of a series of three articles, we have also seen an example on how to connect DBSync to Salesforce and to an FTP server.
In part two, we will see how to create a process, a workflow, a trigger, a rule, and a mapping, and to configure the post processing.


Thursday, February 22, 2018

Speed up connectors’ turnaround with swagger specification

What is Swagger
Swagger is the world’s most popular and largest framework of API’s developer tools for the open API specification, enabling development across the entire API lifecycle, from design and documentation to test and deployment.

How Swagger Specifications Have Revolutionized API Ecosystem
In the developer community, with the growing popularity of RESTFUL web services over SOAP there’s a need to have one common standard for designing, developing and documenting APIs. The Swagger specifications come very handy in connecting engineers through their API’s to communicate with each other in a semantic fashion irrespective of the language used to design an API.
Swagger is an framework for describing a common language that everyone can understand. The OpenAPI (Swagger) Specification is a standard, language-agnostic interface to RESTful APIs that allows humans and computers to discover and understand the capabilities of a service without having to access the source code, documentation or through network traffic inspection.
Even though there are few other frameworks like RAML, API Blueprint which have gained some popularity, Swagger is still most popular framework in documenting APIs due to the following factors.

  • Open source. Swagger being the first Open Source API framework is great and it’s simple to get started with the OpenAPI Specification. It’s clean, efficient, armed with number of powerful features and helps you to design and document your RESTful interfaces straight out of the box.
  • Smart feedback. You can validate your Syntax for Swagger Compliance as you write it with concise error feedback and error handling capabilities. You can also render your API specification visually and interact with your API while you are still defining it.

  • Fully customisable. Easy to configure and customize anything, from line-spacing to themes. You can also generate server stubs and client libraries for your API in any popular language.

The above benefits not only make developer’s life easier but also provide users with smoothly consumable APIs. Any API that adheres to the Swagger Specification are easy to read, iterate and readily consumed. Recently the Swagger Specifications has been moved to Linux Foundation under the name the Open API Initiative, as well as backed by IT giants like Microsoft, Google, Intuiti, Atlassian that focus on creating, evolving and promoting a vendor neutral description format.
In the following section of the article I outline one such use-case in building custom connector, JIRA Service Desk.

Use Case
DBSync uses Swagger Specification through its API connector to build JIRA Service Desk connector that has considerably reduced the whole build cycle in releasing a new connector to the market.
The DBSync’s API connector can effectively integrate with any external system such as JIRA Service Desk by implementing the necessary Swagger Specifications and ApiCode interface. API connector is the fastest way to build any application connector which readily exposes its APIs to the public that may or may not adhere to Swagger or any other API specifications.

Integration is done by documenting all the JIRA Service Desk APIs in JSON object adhering to the Swagger Specifications.
Developing Jira Service Desk connector is as simple as creating a new Swagger JSON object that contains all the endpoints along with the parameters and return types that you would like to expose through the connector (this would fetch all the API metadata that will help in establishing the connection). This JSON object is internally consumed by API connector to expose JIRA Service Desk as an individual connector that can be used in Integration life cycle within the iPaaS.

Leveraging DBSync iPaaS for making API calls with JIRA Service Desk
DBSync’s JIRA Service Desk connector uses JIRA Service Desk APIs along with JIRA Core API’s to move data in and out of the application. This integration consists of REST calls using a JSON request/response made over an HTTPS connection. Therefore all of HTTP methods like, get, post, put and delete are supported as a part of the implementation.
Trigger section is used to fetch data from the source application within the platform. Using JIRA Service Desk connector we expose GET endpoints of the APIs that will equip the user to read data in a controlled way.
Rule section within platform is used to define the manner in a way the user want to write data to the target application which can be either a single data source or multiple data sources. In this section of the platform we expose, post, put API endpoints to pass the data to the desired API. The endpoint names alone are not enough to manage the entire integration life cycle in the iPaaS. Additionally the platform should also know the parameters that need to be passed to an API endpoint and return type parameters that are required for field mappings in transformation process.


Likewise, one can leverage the DBSync iPaaS for connecting with JIRA Service Desk and any other application to facilitate the data flow between them. By including API connector to its catalogue, DBSync has made process of building, publishing and deploying new connectors easier, within just a few days by following Swagger Specification. The platform has the ability to connect with legacy application or SaaS based application that have their API exposed.

Wednesday, February 21, 2018

How to download attachments outside salesforce

Many times we were asked from various social media platform including Linkedin, Twitter, Pinterest but not limited to tech forums like Salesforce Stack ExchangeStack Overflow for a Salesforce app to download attachments. I remember one question from a user where he posted asking: “Is there a possibility of getting associated attachments of opportunities, quotes to other teams that are outside Salesforce?” In other words, for the teams who are not the users of Salesforce, but are working for the same company.
The answer is yes. Recently DBSync has released an app which, when installed on a specific user instance of Salesforce, can download the attachment of any standard or custom object of Salesforce to a designated folder of  FTP or SFTP or FTPS server.

In this article, I would be demonstrating how to download the file to a designated file path of an FTP server using DBSync Salesforce package for downloading attachments.  To do so, you must have the latest package of the app installed on your Salesforce instance and follow these three steps.

Step 1: Add a Connector tab within Salesforce
Once after you login to your Salesforce Instance, you should click on the “All Tabs” icon located on the Menu Bar, which will open the below screen. Follow the below listed steps to add the Connectors Tab to your view in Salesforce. By doing so will ensure quick access of the configuration screen for FTP connector from Salesforce menu.
  • Click on “Customize My Tabs” button located on top right corner of the All Tabs page.
  • Choose the App from the Custom App drop down to add to the selected app.
  • From the Available Tabs combo box , select the Connector Tab and Click Add as shown in the image #1.
  • This action will move the Connectors to Selected Tabs combo box
  • Now Hit the “Save” button that will show up connector tab on the Menu of your Salesforce instance.



Image #1

Step 2: Setup the FTP connection parameters from DBSync Connector tab
The Connectors tab is the functionality from where you can set up your desired FTP \ SFTP \ FTPS connection so that the attachments get downloaded. To set up the FTP parameters, click on Connectors tab will open up the FTP\FTPS connector settings page as shown in the following image #2.



Image #2

  • Click on Icon  adjacent to FTP label from Connector combo box, which will show up it’s connection parameters.
  • Click on the Edit button from the FTP Connection combo box as shown in the image i.e. on the right hand section which will make the fields editable.
  • Now Input Field FTP Host, FTP Port, FTP Username , FTP Password which are indicated by red * (Mandatory fields to save the connection parameters) and hit Save to save the connection parameters.
  • If you would like to change the FTP to FTPS, you can do so by choosing the FTPS value from the field “FTP Type” and Save the connection parameters.
Similarly, you can connect to any FTPS or SFTP host server so as to download the attachments directly to the saved host from the connectors screen of the package.

Step 3: Direct API
Alternatively if you want to use the API method to access the file, and download it to the designated FTP server, you can use this sftofilesytem API call to connect with an Salesforce instance and an FTP server, and pass a query to download the file. Try the API using the following link: http://api.mydbsync.com/api/api-docs/v1/sftofilesystem
The below is the sample call from the endpoint. This would make the API call more predictable for the reader.

curl -X POST –header ‘Content-Type: application/json’ –header ‘Accept: text/html’ -d ‘
{
“sfConfig”:{
“username”:”john@avankia.com”,
“password”:”@test123″,
“securityToken”:”fbEw74CxeC8kcxLK2zUnAlcp3″,
“endpointURL”:”string”},
“targets”:[{
“host”:”account.avankia.com”,”port”:”21″,
“filesystemType”:”ftp”,
“username”:”anil.b@avankia.com”,
“password”:”123456″,
“folder”:”testFiles”,
“bucket”:””,
“targetFileName”:””,
“region”:””
}],
“queryToTheAttachment”:”select Name,Body from attachment where id = ’00P2800000lT3mq”

}’

Conclusion
As explained in this article, I have saved the connection parameters to an FTP server containing the ip 107.180.12.272 so whenever a file is attached in the Salesforce, the same file gets downloaded to the FTP host. Upon which any team outside Salesforce can access the file just by logging to FTP server. Moreover, you also have the ability to define the directory structures and pass them from FTP File Location for all the files to download to defined path.



Tuesday, February 20, 2018

How to integrate salesforce with jira service desk: custom solution tailored for your integration needs

In this article we will see how to integrate Salesforce with JIRA Service Desk along with the benefits derived from connecting these two applications, how DBSync is leveraged in connecting them and, of course, its best practices.
Salesforce.com often referred to as salesforce is a global web-based software and cloud computing company. Of its cloud platforms and applications, the company is best known for its Salesforce customer relationship management (CRM) product, which is composed of Sales Cloud, Service Cloud, Marketing Cloud, Commerce Cloud, Analytics Cloud, IoT Cloud, App Cloud, Health Cloud, Financial Services Cloud, Force.com, and Chatter.
The sales team uses Salesforce.com to manage their entire sales cycle right from customer account creation and opportunities associated with an Individual Account at various stages (i.e from proposal stage to closed won/lost). Similarly Service teams use Salesforce to track entire project lifecycle through in terms of resource allocation, project budgeting, managing change requests of an individual customer’s.
While one the other hand JIRA family of applications are used for  software development, feature implementation, bug tracking, agile project management (with JIRA Agile) which are the part of JIRA Platform. The JIRA software is often used by software development teams to manage entire development cycle. The JIRA Service desk is an support ticketing system used by support teams which takes incoming customer requests and automatically generates an Issue in it from where it gets queued up and assigned by a support resource who works with the customer towards the issue resolution.
All these systems work just great for each individual teams but become a big part of a problem when they are disconnected. Sales team software doesn’t integrate with the developments team software, Service team software doesn’t get integrated with the support team which often result in scattered data. The same information get entered repeatedly in multiple systems, not always accurately and no one knows what’s going on, often resulting in confusion while communicating with one single customer.
Any internal processes and softwares that are getting in the way of delivering top notch customer experience have to be fixed. Most of the companies are entrusting DBSync iPaaS to deliver first class customer experience which are internally using different software systems like Salesforce, JIRA Service Desk. So we at DBSync understood the importance of getting Salesforce to talk with JIRA system seamlessly which would help in tracking customer issues better through Salesforce only.
As a result,  We have built an standard template for Salesforce and JIRA Service Desk that provides out of box integration solution. This solution serves as plug and play to connect with both Salesforce and JIRA Service Desk to facilitate the seamless flow of data between two systems. The team involved in addressing the customer requests will have first hand information about the customer, project details, status of the issue and resolution steps that would make the issue resolution very faster. Hence, By providing better support you will have happier customers which will not only result in customer retention but also significantly improves your brand image.
Standard Solution Setup
The below are the steps to setup standard solution for Salesforce and JIRA Service Desk
  1. Once after you login to DBSync iPaaS with your valid credentials, Navigate to the Template Library from the left side navigation which shall open the Template Library.
  2. Search for Jira Service Desk & Salesforce Uni-directional template as shown in the following image.


3. Click on the View More hyperlink and import this solution to your workspace, On importing this solution will land you on the connector listing page.
      4.Now configure the Salesforce and JIRA Service Desk connectors with the respective user instances of Salesforce and JIRA Service Desk.
You can follow the step by step articles from our knowledge base to set up respective connector configurations.
Integrating Service Desk Issues To SF Cases
This section outlines the workflow rules within the standard solution of SF and JIRA Service Desk. This created workflow will serve as governing rule in updating the existing service desk to SF case.
In order to do that, I would leverage the JIRA jql in DBSync trigger section to search and filter the Issues from JIRA Service desk. As depicted in the below screen, I am calling Search API of the JIRA service desk and filtering the records basing on the update field which would fetch all the records basing on the passed condition.  
Now, Add a rule to map all the fields of Issues with the cases of Salesforce so that the DBSync can parse those fields and update the cases object in SF. I have mapped all the fields as depicted in the below table.

Salesforce Cases
JIRA Service Desk Issues
Project
Project
Summary
Subject
Type
Type
Priority
Priority
Description
Description
Case Owner
Assignee
Contact Name
Reporter
Internal Comments
Comments

Whenever you choose to run the “Run-Now” button from the platform or a scheduler job is triggered through set time interval, This setup would read all the last updated cases and upsert them to Salesforce as cases. It is now easier to visualize and track Jira cases directly in Salesforce almost in near real time including syncing many custom and standard fields. 
The former sections showcase a working model of business case for integrating Jira Desk and Salesforce. Likewise you can leverage the standard solution and build many customization around it. These are few of use-cases that can be delivered without much effort and time.
  • New requests in JSD will create new cases in SF and vice versa.
  • Update the existing requests in JSD will update the cases in SF, If doesn’t exist will create a new case.
  • New Cases in SF will create new requests in JSD.
  • Update the existing cases in SF will update the existing requests in JSD.
  • Migrating data from Jira cloud to Jira server
  • Migrating data from Salesforce to Jira Service Desk and vice versa.
  • Integrating various objects between Salesforce and JIRA like service desk , organizations, customers, users, Issues and much more objects.
These are the few such use-cases which can be achieved using the standard solution for JIRA Service Desk and Salesforce but however you can do built many workflow to achieve an business case. You can leverage JIRA Core, JIRA Service Desk connectors of DBSync to connect with Accounting applications like Quickbooks, Dynamics GP, SAP Business one, ERP solutions like NetSuite, Dynamics AX, Dynamics NAV, Dynamics 365 and other application like JIRA software, JIRA Service Desk as Salesforce is the primary tool for tracking customers and their detailed information.

Do you have any specific needs of Integrating Salesforce & JIRA Service Desk? We have an standard solution and our dynamic platform which would help you to integrated both of Salesforce and JIRA Service Desk almost in real time. If you any specific needs we can tailor  the custom solution just by leveraging the DBSync iPaaS and JIRA set of connector without much time and effort. Do reach out to us through an email sales@mydbsync.com or via telephone 1-877-739-2818 to help you build the custom solution for SF and JIRA Service Desk.