/
Connect Salesforce to Feedier

Connect Salesforce to Feedier

Requirements:

  • Salesforce account with access to Setup App

  • Feedier account with Admin role

  • A Feedier attribute that contains a Salesforce object ID (sf_id, account_name, etc.), as this is used to link the data from Feedier to Salesforce. 

1st Step for all connections: Create a Connected App in Salesforce

It’s necessary to create an app in order to allow Feedier to make API calls with your Salesforce instance securely.

Add a New Connected App

Salesforce's Setup App → Platform Tools → Apps → App Manager → New Connected App

In the fields of the connected App, set the following:

Connected App Name

Feedier 

API Name

Feedier

Contact Email 

help@feedier.com (or your email)

API (Enable OAuth Settings)
Enable OAuth Settings

TICKED

— Callback URL

https://dashboard.feedier.com/integration/callback/salesforceObject
https://dashboard.feedier.com/integration/callback/salesforce

https://connect.feedier.com/rest/oauth2-credential/callback

— Selected OAuth Scopes

(api)
(refresh_token,offline_access)

(full)
(lightning)

 

Setting up the Feedier App

Collect App Client ID and App Client Secret for connection on Feedier

After adding your details, save and go back to the app, then click ‘Manage Consumer Details’ to collect the App client ID and App Client Secret. You will use this whenever connecting to an action on Feedier.

  • Untick Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows

  • Change permitted users to ‘All users may self-authorize’ and IP Relaxation to ‘Relax IP restrictions’

Workflow 1: Enrich Feedback data with attributes from one or several Salesforce objects

Steps to establish the integration

Add a Segment

First we need to setup a segment on Feedier. Segments are saved searches that allow you to create automisations based on your selected feedback.

  • 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

  • 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 SOQL

Refer to next section

Attribute Name

The attribute name we receive in the feedback (for example, "sf_id") is used to match Salesforce records. This could be an Account ID, Custom ID, or Contact ID. For instance, if the feedback link looks like this: feedback.feedier.com/survey-url?sf_id=123, we will use "sf_id" as the attribute name and its value, 123, in the Salesforce query to find the correct record.

In short, this attribute ("sf_id") will be used in the "WHERE" part of the Salesforce query (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: Salesforce Developers

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:

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:

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 tested in the editor:

SELECT Id, FirstName, LastName, Email, Phone, AccountId FROM Contact WHERE Id = '001J7000007VpctIAC'

should be replaced in the SOQL field by :

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:

This should be your final configuration :

How to test the integration ?

In order to test the integration, you need to go to the surveys, choose a survey that matches the segment you created, and simulate the reception of feedback with a Salesforce ID.

Take the link and then manually add the attribute (the name of the attribute you pass in the URL should match the one you put in the attribute name field in your integration). So, if the URL is: https://feedback.feedier.pre-prod.alkalab.com/DXoT9Z, you need to enter in your browser: https://feedback.feedier.pre-prod.alkalab.com/DXoT9Z?sf_id=001J7000007VpctIAC.

Complete the survey, and you should receive feedback with one attribute, which is sf_id.

Wait 5 minutes, and the integration should be triggered, and you should see all the attributes you included in your SOQL.

  1. Feedier will only read the first record from the query. So you can order if several records might be matched.

  2. 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

1. Create a Custom Object

  • Setup a custom object called FeedierFeedback

Add the label as FeedierFeedback, Object Name should populate automatically.

2. Add the Field and Relationships to FeedierFeedback object

Now go to Fields and Relationships for the FeedierFeedback object, and start adding the following custom fields. You must add all of the following:

Salesforce Label

Data Type

Explanation

Created By

Lookup(User)

Mandatory field on Salesforce, will display the user that setup the connector

FeedierFeedbackId

Text(80)

Feedback ID in Feedier

FeedierCreatedAt

Date

The date Feedback was created

FeedierFeedbackName



Text(80)

The Name of the object

FeedierSurveyName



Text (100)

Survey name in Feedier

FeedierFeedbackLink

Text (255)

The link to the feedback responses on Feedier

FeedierNPSScore

Number(18, 0)

The answer value to NPS question

FeedierSatisfactionRatio

Number(18, 0)

Satisfaction Ratio of the feedback

FeedierPushCreatedAt

Date

The push schedule creation time (if any)

FeedierPushStatus__c

Text (255)

The push status

LastModifiedById

Lookup(User)

Mandatory field on Salesforce

OwnerId

Lookup(User,Group)

Mandatory field on Salesforce

eg. Case

eg. Lookup(Case)

Relationship lookup:
The attribute from Feedier that connects to Salesforce

3. Add a lookup relationship value

 

4. Add a FeedierItem object

Similar to step 1 and 2, create a new Salesforce object FeedierItem__c and add the following fields:

Salesforce Label

Data Type

Explanation

CreatedById

Lookup(User)

Mandatory field on Salesforce, will display the user that setup the connector

Name

Text (80)

Mandatory field on Salesforce

FeedierItemFullName

Text (255)

The question name

FeedierItemFeedbackObjectId

Lookup(FeedierFeedback)

The related FeedierFeedback that was created in the integration.

FeedierItemFeedbackId

 

Text(80)

Feedback ID in Feedier

FeedierItemSurveyName

 

Text (255)

Survey name in Feedier

FeedierItemType

Text (255)

The type of response, for most use cases this will show as ‘question’

FeedierItemValue

Long Text Area(131072)

The answer value

FeedierItemCreatedAt

Date/Time

The answer creation time

LastModifiedById

Lookup(User)

Mandatory field on Salesforce

OwnerId

Lookup(User,Group)

Mandatory field on Salesforce

 

5. Add a Segment

Next we need to setup a segment on Feedier. Segments are saved searches that allow you to create automisations based on your selected feedback.

Create a segment that will identify all feedback that needs to be added to the Salesforce record.
If you need all of feedback, just set a filter with time period is greater than beginning of the year.

6. Connect the Segment to an Automation

  • Select the segment you just created.

  • Select Create Salesforce Object from the dropdown

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 Relationship Object Field

This is the lookup relationship value that links the relationship to the FeedierFeedback object you created. (Object Manager → Feedier Feedback → Fields and Relationship). Copy exactly the 'field name' you need. For example, if you added the relationship to a Salesforce Case, you would select  Case_id__c

Attribute Name

This is the Feedier attribute name (not label) that contains the Salesforce object ID used for the matching. You can name this however you want to see this on the Feedier dashboard eg. Account ID,  CustomID,  Contact_id, etc.

For example, feedback.feedier.com/survey-url?sf_id=123

7. See your feedback answers in Salesforce

When you start collecting feedback, if your relationship is linked, for example case_id or contact_id, you'll be able to see it attached to Salesforce history.

  • Once you’ve chosen the survey under FeedierFeedback, you can then click the Related tab and view the answers under the FeedierItems object.

Workflow 3: Trigger real-time & automated push emails based on Salesforce Outbound message

Setup an email campaign on Feedier as a template for sending emails

First, you will need to setup an Email Campaign. This will work as a template for whenever emails are triggered. You can just add your email page, and complete the campaign.

  • Select the Campaign ID from info in the cog dropdown of the campaign page.

Setup the outbound message

Setup the form as follows: 

 

  • User to send as: Choose what you like, this has no impact with the connector

  • Case fields to send: Choose all data you want to attach to the feedback in Feedier. ContactEmail is required.

  • Click Save

Create the Workflow Rule

  • You now need to trigger the outgoing message.

  • Create a trigger with your own rules (file status = closed, for example).

  • Attach the outgoing message you have created

  • Create a trigger with your own rules (Case status = Escalated for example)

Attach the outbound message to the workflow rule

  • Now, you need to attach the Outbound message to the workflow rule so when the rule is validated an outbound message will be sent to the Endpoint URL that we set up earlier.

  • Attach the outbound message you created in and you're all set. 

Test the outbound message

Trigger the workflow rule created and you should see a push created on the Pushes page on Feedier.

Related content

Connecter Salesforce à Feedier
Connecter Salesforce à Feedier
More like this
Importing your Google Reviews
Importing your Google Reviews
Read with this
Setup an SSO connection
Setup an SSO connection
More like this
Designing with CSS
Designing with CSS
Read with this
Version 2.0.7 - 19th December 2023
Version 2.0.7 - 19th December 2023
More like this
React Native Sdk Integration
React Native Sdk Integration
More like this