{"id":40790,"date":"2021-10-06T13:21:23","date_gmt":"2021-10-06T13:21:23","guid":{"rendered":"https:\/\/www.123formbuilder.com\/docs\/?p=40790"},"modified":"2022-03-04T12:16:59","modified_gmt":"2022-03-04T12:16:59","slug":"appexchange-123-form-builder-salesforce-queries","status":"publish","type":"post","link":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/","title":{"rendered":"[AppExchange \u2013 123FormBuilder] Salesforce Queries"},"content":{"rendered":"\n<p>You can add queries to your online forms to search in your organization\u2019s Salesforce data for specific information. Queries are more advanced lookups to pull data from Salesforce and are useful if you need to establish multiple filters. When creating queries, you can use the operators <b>OR<\/b> and <b>AND<\/b>.<\/p>\n\n\n\n<p>Queries are triggered only after the form is submitted, so they can\u2019t be used to prefill form fields, but they can be used in the <b>Object Mapping<\/b> section for mapping or as a condition for updating an existing record.<\/p>\n\n\n\n<p>1. Use the query result as a <b>Data Source<\/b> in the <b>Object Mapping<\/b> section.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2.png\" alt=\"Salesforce query result\" class=\"wp-image-40792\" width=\"691\" height=\"319\" srcset=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2.png 918w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2-300x139.png 300w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2-768x356.png 768w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>2. Use the query result as a condition for updating an existing record:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFUpdateRecordsQuery.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFUpdateRecordsQuery.png\" alt=\"Update records query result\" class=\"wp-image-40793\" width=\"695\" height=\"321\" srcset=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFUpdateRecordsQuery.png 930w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFUpdateRecordsQuery-300x139.png 300w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFUpdateRecordsQuery-768x355.png 768w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><\/a><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-create-queries\">How to create Queries:<\/h2>\n\n\n\n<p>Under the <b>Salesforce Integration \u2192 Query<\/b> tab, specify a <b>Query name<\/b> to easily identify it. Start typing SOQL queries in the box below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryName.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryName.png\" alt=\"Salesforce query\" class=\"wp-image-40794\" width=\"598\" height=\"416\" srcset=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryName.png 852w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryName-300x209.png 300w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryName-768x535.png 768w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Here are some query examples:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT Name FROM Lead WHERE Company = '[{company(5427369)}]'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT Id, Name, BillingCity FROM Account WHERE Email = '[{email(5783943)}]'<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT Id FROM Contact WHERE Name = \u2018[{name{6457284)}]' AND MailingState='[{state(643784)}]' OR Email = '[{email{698345}]\u2019<\/pre>\n\n\n\n<p>You can use the <b>Validate<\/b> button to check if your query is correct.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFValidateQuery.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFValidateQuery.png\" alt=\"Validate query\" class=\"wp-image-40795\" width=\"703\" height=\"329\" srcset=\"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFValidateQuery.png 906w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFValidateQuery-300x140.png 300w, https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFValidateQuery-768x359.png 768w\" sizes=\"auto, (max-width: 703px) 100vw, 703px\" \/><\/a><\/figure><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<p><b>Related articles<\/b><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.123formbuilder.com\/docs\/lookup-fields\/\">Lookup fields<\/a><\/li><li><a href=\"https:\/\/www.123formbuilder.com\/docs\/appexchange-123formbuilder-prefill-dropdown-with-picklist-values\/\">Prefill dropdown with picklist values<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>You can add queries to your online forms to search in your organization\u2019s Salesforce data for specific information. Queries are more advanced lookups to pull data from Salesforce and are useful if you need to establish multiple filters. When creating queries, you can use the operators OR and AND. Queries are triggered only after the [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":-1,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[134],"tags":[],"class_list":["post-40790","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-123formbuilder-appexchange"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Salesforce Queries | 123FormBuilder - AppExchange<\/title>\n<meta name=\"description\" content=\"Queries are more advanced lookups to pull data from Salesforce. They are especially useful if you need to establish multiple filters.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[AppExchange \u2013 123FormBuilder] Salesforce Queries\" \/>\n<meta property=\"og:description\" content=\"Queries are more advanced lookups to pull data from Salesforce. They are especially useful if you need to establish multiple filters.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/\" \/>\n<meta property=\"og:site_name\" content=\"123FormBuilder Knowledge Base\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-06T13:21:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-04T12:16:59+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Salesforce Queries | 123FormBuilder - AppExchange","description":"Queries are more advanced lookups to pull data from Salesforce. They are especially useful if you need to establish multiple filters.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/","og_locale":"en_US","og_type":"article","og_title":"[AppExchange \u2013 123FormBuilder] Salesforce Queries","og_description":"Queries are more advanced lookups to pull data from Salesforce. They are especially useful if you need to establish multiple filters.","og_url":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/","og_site_name":"123FormBuilder Knowledge Base","article_published_time":"2021-10-06T13:21:23+00:00","article_modified_time":"2022-03-04T12:16:59+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#article","isPartOf":{"@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/"},"author":{"name":"admin","@id":"https:\/\/www.123formbuilder.com\/docs\/#\/schema\/person\/ac765b93d6689ec0f4ee6f6e040d66ea"},"headline":"[AppExchange \u2013 123FormBuilder] Salesforce Queries","datePublished":"2021-10-06T13:21:23+00:00","dateModified":"2022-03-04T12:16:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/"},"wordCount":172,"commentCount":0,"image":{"@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2.png","articleSection":["AppExchange"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/","url":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/","name":"Salesforce Queries | 123FormBuilder - AppExchange","isPartOf":{"@id":"https:\/\/www.123formbuilder.com\/docs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#primaryimage"},"image":{"@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2.png","datePublished":"2021-10-06T13:21:23+00:00","dateModified":"2022-03-04T12:16:59+00:00","author":{"@id":"https:\/\/www.123formbuilder.com\/docs\/#\/schema\/person\/ac765b93d6689ec0f4ee6f6e040d66ea"},"description":"Queries are more advanced lookups to pull data from Salesforce. They are especially useful if you need to establish multiple filters.","breadcrumb":{"@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#primaryimage","url":"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2.png","contentUrl":"https:\/\/cdn.marketing123.123formbuilder.com\/wp-content\/uploads\/sites\/3\/2021\/10\/SFQueryResult2.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.123formbuilder.com\/docs\/appexchange-123-form-builder-salesforce-queries\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.123formbuilder.com\/docs\/"},{"@type":"ListItem","position":2,"name":"[AppExchange \u2013 123FormBuilder] Salesforce Queries"}]},{"@type":"WebSite","@id":"https:\/\/www.123formbuilder.com\/docs\/#website","url":"https:\/\/www.123formbuilder.com\/docs\/","name":"123FormBuilder Knowledge Base","description":"Search our documentation platform for answers, service specifications and 3rd-party integrations.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.123formbuilder.com\/docs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.123formbuilder.com\/docs\/#\/schema\/person\/ac765b93d6689ec0f4ee6f6e040d66ea","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/41383a571ede8f1257b128aa53a410cc1ea4c1901ac8cea3776cba5438d24843?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2Fadmin%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/41383a571ede8f1257b128aa53a410cc1ea4c1901ac8cea3776cba5438d24843?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2Fadmin%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/41383a571ede8f1257b128aa53a410cc1ea4c1901ac8cea3776cba5438d24843?s=96&d=https%3A%2F%2Fui-avatars.com%2Fapi%2Fadmin%2F96%2Ff3f3f3%2Faaa%2F1%2F0.5%2Ffalse%2Ftrue&r=g","caption":"admin"},"url":"https:\/\/www.123formbuilder.com\/docs\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts\/40790","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/comments?post=40790"}],"version-history":[{"count":3,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts\/40790\/revisions"}],"predecessor-version":[{"id":42722,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/posts\/40790\/revisions\/42722"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/media?parent=40790"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/categories?post=40790"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.123formbuilder.com\/docs\/wp-json\/wp\/v2\/tags?post=40790"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}