Query

Learn more about querying a workflow automation

Introduction

A query lets you select a target according to criteria. You can associate a segment code to the query result and insert additional data into it. You can customize the search parameters and obtain query results for a specific criteria. for work items by creating queries. A query consists of various conditions that baseline your search and it brings results in accordance with the set parameters.

Tutorial

To create a sample query and debug the results using Salesforce Account as an example, refer the tutorial below:

Query Creation Process

Process

In order to understand the process of writing a query let us consider the following example:

Query: Get Salesforce Accounts and print using 'Debug'

  • Login to DBSync Cloud Workflow by navigating to the DBSync website.

  • Click on 'Login' and choose 'Cloud Workflow' as shown in the image below:

Login to Cloud Workflow
  • Provide your 'User Name' and 'Password' setup during signup and click 'Login'.

Enter Login Credentials
  • You will be redirected to DBSync Cloud Workflow Home Screen as shown below:

Home Screen
  • Click 'Create' and name the project 'Query'.

  • Add a task and provide the task name as 'Query Salesforce Accounts'.

  • Assign to 'Bot' click 'Configure'.

You will be redirected to the task screen.

The query is created as an example below for reference. The query will pull all salesforce accounts and print them upon debugging.

  • Drag and drop a 'Flow' action. Click 'Configure' and provide a description for the flow. For eg: Get SF Accounts Information. Refer image below:

Flow Description
  • Drag and drop a 'Query' action. Click 'Configure' . Select the 'Source' as 'Salesforce' and 'Object' as 'Account'. In the configure query section, you can select 'All fields' or choose individual Salesforce Objects. Select 'All Fields'. Refer image below:

Query Configuration
  • Click 'Preview' from the 'Configure Query' section and all the Salesforce Objects are displayed 'Rows' in the 'Result' section.

Preview Result
  • Drag and drop a 'Debug' action. Click 'Configure' and define the variable. Click 'fx' icon to get the list of schema, drag and drop the "name" schema on to the debug panel.

The custom fields are displayed first. Select the correct 'Name' field to pull SF account names as debug result.

Debug Result
  • Click the 'Close' icon and 'Save'.

  • Click the 'Run' icon to run the integration.

  • The console will display the query executed and it will print the Salesforce Account Names as shown below:

Console

To utilize the 'Transform and Write' action, Query is a pre-requisite.