...
This workflow is designed to update feedback on Feedier with key attributes from the respondant’s Salesforce record.
Note |
---|
Before triggering the integration |
...
Tip |
---|
After triggering the integration |
...
Steps to establish the integration
Add a Segment
Info |
---|
Feedier → Actions → Segments → New Segment |
...
Create a segment that will identify all feedback that needs to be enriched by Salesforce data. If you need all of feedback, just set a filter with time period is greater than beginning of the year.
Connect the Segment to an Automation
Info |
---|
Feedier → Actions → Automations → Add Segment |
Select the segment you just created.
Select Salesforce Fields Sync from the dropdown.
App Client ID | Refer to step 1, you get this from the Connected App in Salesforce. |
App Client Secret | Refer to step 1, you get this from the Connected App in Salesforce. |
Salesforce SOQLFeedier supports custom SOQL to be as performant as possible. So, as long as there is an ID and a relationship, you can get any kind of Salesforce field using SOQL. Please refer to Salesforce doc | Next section |
Attribute Name | This is the Feedier attribute name (not label) that contains the Salesforce object ID used for the matching. It can be an Account ID, a Custom ID, a Contact ID, etc. For example, feedback.feedier.com/survey-url?sf_id=123 will create an attribute sf_id with the value 123. In this option set sf_id. Please don't hesitate to contact your Feedier Account manager for help. |
Info |
---|
How to Create Your SOQL |
To effectively query data in Salesforce using SOQL (Salesforce Object Query Language), you can follow the steps below. SOQL allows you to retrieve data from Salesforce objects like Contact
and Account
. In this section, we will walk you through how to access the Salesforce Developer Console and create your own SOQL queries. You can also refer to Salesforce documentation for the structure: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm
Important notes
Feedier will attach as attributes all the selected fields to the Feedback.
Feedier will only read the first record from the query. So you can order if several records might be matched.
The query must contain "{attribute_value}" as this attribute value will always change and be replaced automatically. It can be an ID or a value for a LIKE query/matching.
Here are 2 examples:
Query 1: SELECT Contact_P__r.Id, Ticket_Type_Number__c, St__c, Produit__c, SourceSystem__c, Type__c, EffectiveDate__c, Category__c FROM TransactionDetail__c WHERE Contact_P__r.Id = '{attribute_value}' ORDER BY EffectiveDate__c DESC
Explanation: Find a Contact record in Salesforce by its ID, join several custom objects, and order by date descending. All the selected fields will be attached to Salesforce.
Query 2: SELECT Name FROM Account WHERE http://Account.Id = '{attribute_value}'
Explanation: Find an Account record in Salesforce by its ID and attach the Name field value to Feedier as attributes.
...
Attribute Name
...
This is the Feedier attribute name (not label) that contains the Salesforce object ID used for the matching. It can be an Account ID, a Custom ID, a Contact ID, etc.
For example, feedback.feedier.com/survey-url?sf_id=123 will create an attribute sf_id with the value 123. In this option set sf_id.
Please don't hesitate to contact your Feedier Account manager for help.
...
Info |
---|
All the retrieved attributes will be added as metadata to the received feedback, with every column returned from the SOQL query attached as an attribute. |
To start writing SOQL queries, you need to access the Salesforce Developer Console. Once open, navigate to the Query Editor to begin writing SOQL queries.
Example 1: Retrieving Contact Data
Once in the Query Editor, you can run the following query to retrieve data related to a specific contact:
Code Block |
---|
SELECT Id, FirstName, LastName, Email, Phone, AccountId FROM Contact WHERE Id = 'contact_id' |
This query retrieves the contact’s ID, first name, last name, email, phone number, and associated account ID. Below is an example of the query and its results in the Developer Console:
Example 2: Retrieving Account Data
To retrieve details related to a specific account, use the following query:
Code Block |
---|
SELECT Id, Name, Industry, BillingCity, BillingState, BillingCountry FROM Account WHERE Id = 'Account_id' |
This query fetches the account's ID, name, industry, and billing address details (city, state, and country). Below is an example of this query and its output:
...
Example 3: Retrieving Contact and Account Data Based on Contact ID
Finally, you can query both Contact
and its associated Account
data using the following SOQL:
SELECT Id, FirstName, LastName, Email, Phone, Account.Name, Account.Website FROM Contact WHERE Id = 'contact_id'
This query retrieves the contact’s details along with the associated account’s name and website. Below is an example of how this query looks and its result:
Final Step: Dynamic Configuration of SOQL Queries
In the final step of integrating your SOQL queries into the dynamic environment, you will replace the hardcoded ID values used for testing in the Query Editor with a dynamic configuration. This allows the SOQL query to take a parameter from the attribute name you set in the integration field, ensuring it matches the correct Salesforce object ID.
For example, the static query:
Code Block | ||
---|---|---|
| ||
SELECT Id, FirstName, LastName, Email, Phone, AccountId
FROM Contact
WHERE Id = '001J7000007VpctIAC' |
should be replaced in the SOQL field by :
Code Block | ||
---|---|---|
| ||
SELECT Id, FirstName, LastName, Email, Phone, AccountId
FROM Contact
WHERE Id = '{attribute_value}' |
In this dynamic query, the placeholder {attribute_value} will automatically be replaced by the value of the attribute name you define in the integration.
If you set sf_id in the Attribute Name field, the query executed will become:
Code Block | ||
---|---|---|
| ||
SELECT Id, FirstName, LastName, Email, Phone, AccountId
FROM Contact
WHERE Id = 'sf_id' |
This dynamic approach allows you to map various Salesforce object IDs (such as Account ID, Custom ID, Contact ID, etc.) with the Feedier attribute name. The attribute name (not label) should match the Salesforce object ID used for matching purposes, ensuring seamless integration and accurate querying.
...
Feel free to modify or expand this as needed for your documentation.
Note |
---|
Important Notes |
Feedier will only read the first record from the query. So you can order if several records might be matched.
The query must contain "{attribute_value}" as this attribute value will always change and be replaced automatically. It can be an ID or a value for a LIKE query/matching.
Workflow 2: Connect to Salesforce to update a ‘Salesforce Object’ post-feedback
...