You can add queries to your online forms to search in your organization’s 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 form is submitted, so they can’t be used to prefill form fields, but they can be used in the Object Mapping section for mapping or as a condition for updating an existing record.
1. Use the query result as a Data Source in the Object Mapping section.
2. Use the query result as a condition for updating an existing record:
Under the Salesforce Integration → Query tab, specify a Query name to easily identify it. Start typing SOQL queries in the box below.
Here are some query examples:
SELECT Name FROM Lead WHERE Company = '[{company(5427369)}]'
SELECT Id, Name, BillingCity FROM Account WHERE Email = '[{email(5783943)}]'
SELECT Id FROM Contact WHERE Name = ‘[{name{6457284)}]' AND MailingState='[{state(643784)}]' OR Email = '[{email{698345}]’
You can use the Validate button to check if your query is correct.
Related articles
Here is a list of the most frequently asked questions. For more FAQs, please browse through the FAQs page.