Create New Fields in the AskNicely Response Object in Salesforce
Create “support_comment” Field
How AskNicely Matches Responses to Salesforce Contacts
Match Salesforce Fields to AskNicely Fields
Add AskNicely Responses to Contact, Account, Case, or Lead Layouts
🧩 Introduction
This guide explains how to sync additional question responses and custom data fields from AskNicely back into Salesforce. By creating new fields and mapping them to AskNicely survey data, you can ensure richer insights are passed into Salesforce for each contact, lead, account, or case.
🛠 Step-by-Step Instructions
Create New Fields in the AskNicely Response Object in Salesforce
In the example below, two additional survey questions are used:
support_CSAT
support_comment
These question keys (in gray text inside AskNicely) will become new fields in Salesforce.
🔹 Create “support_csat” Field:
Navigate to Setup > Object Manager > AskNicely Response
Click Fields and Relationships
Click New → Choose Text
Set Field Label to
support_csatChoose appropriate Length
Set Field-Level Security as needed
Confirm AskNicely Layout is selected and click Save
🔹 Create “support_comment” Field:
Still in Fields and Relationships, click New
Choose Text Area or Text Area (Long) for open-text input
Set Field Label to
support_commentModify Visible Lines and Length appropriately
Configure Field-Level Security
Ensure AskNicely Layout is selected and click Save
🔁 How AskNicely Matches Responses to Salesforce Contacts
When a survey response is received in AskNicely, how that data syncs to Salesforce depends on the selections you make in the Sync Responses section of the Updates tab in the Salesforce Integration settings.
📨 When a Survey Response is Received in AskNicely
You’ll first need to decide whether AskNicely should send the response to Salesforce at all:
✔️ Sent the response to Salesforce
This option must be selected for AskNicely to trigger and push Response data to Salesforce.🚫 Do NOT send the response to Salesforce
Selecting this option will prevent AskNicely from sending any Response data back to Salesforce.
👤 Save the Most Recent Response on the Salesforce Contact
Next, you’ll choose how AskNicely should identify which Salesforce Contact the Response belongs to:
-
🔗 Only if AskNicely has the Contact ID
AskNicely will check the Contact associated with the Response for a valid Salesforce Contact ID.✅ Best if your contacts were originally synced from Salesforce and include the Contact ID in their AskNicely data.
📧 Search for the contact by email
AskNicely will search for a Salesforce contact using the email address and apply the response to the matching record. This will work regardless of the original import method of the Contact.🧩 Search and update all contacts matching the email
If more than one Salesforce contact record shares the same email address, AskNicely will sync the response to all matching contacts, not just one. This option is not recommended unless under specific circumstances.
Match Salesforce Fields to AskNicely Fields
In AskNicely, go to App Store > Installed Apps > Salesforce
Click the Configure tab, then the Updates tab
Scroll to the Custom Field Updates section
Submit a test response to populate new fields
Match each Salesforce field with its AskNicely field
Click Add for each field you wish to sync
🔔 You must have an AskNicely response containing the field to make it available for mapping.
Add AskNicely Responses to Contact, Account, Case, or Lead Layouts
To display AskNicely responses directly on Salesforce record pages:
Example: Add to Contact Layout
In Salesforce, go to Setup > Object Manager > Contact
Select the Layout you want to edit
From the side menu, drag Related List onto the layout
Choose AskNicely Responses and place it in the desired location
Click the Wrench icon to select visible fields (e.g., Responded, Comment)
Click OK, then Save Layout
💡 Zoom out (Cmd - or Ctrl -) if the OK button isn’t visible during layout configuration.
📥 Result
You’ve now synced custom AskNicely fields with Salesforce and displayed them on your Contact, Account, Lead, or Case records. This allows your team to view NPS scores, comments, and other survey data directly inside Salesforce.
🔄 Response Object Field Mappings
This section outlines all default fields automatically populated in the Salesforce Response Object when it is first created in your SFDC account.
📂 Field Definitions
These are the fields that are created from our "AskNicely Response" object in our managed package. Additional fields will have to be created in SFDC before mapping in the AskNicely Salesforce app (Updates tab)
Note: AI Question 1 is a little different. It takes the place of "comment" if the survey doesn't have an open question with a key of "comment". So, AI Question/Answer 1 do not need to be mapped.
All the other AI questions need to be assigned to the SFDC Page Layout and mapped in AN to the corresponding Salesforce fields.
| Field Label | Field Name | Description | Data Type |
| Account | asknicely__account__c | Associates the response with an Account in Salesforce using the Account ID from the contact. | Lookup(Account) |
| Case | asknicely__case__c | Links the response to a specific case when the survey was triggered from a Case. | Lookup(Case) |
| comment | asknicely__comment__c | Stores the main open-ended comment response from the survey. | Long Text Area(32768) |
| Contact | asknicely__contact__c | Lookup (Contact) Validates and links the response to an existing Salesforce Contact. | Lookup(Contact) |
| Created By | CreatedById | Associates the response with a user if UserID was passed from the contact. | Lookup(User) |
| Do not contact | asknicely__dontcontact__c | Populates based on the answer to a “Do Not Contact” question in the survey. | Checkbox |
| Last Modified By | LastModifiedById | Tracks the last user who modified the response record. | Lookup(User) |
| Lead | asknicely__lead__c | Links the response to a Salesforce Lead when the LeadID is included. | Lookup(Lead) |
| NPS calc | asknicely__npscalc__c | Internal field used to calculate NPS values: 1 (Promoter), 0 (Passive), -1 (Detractor). | Number(1, 0) |
| Owner | OwnerId | Associates the response with the owner of the record if OwnerID is passed. | Lookup(User,Group) |
| Question Type | asknicely__question_type__c | Displays the response metric: NPS, CSAT, or 5-Star. | Text(50) |
| questioncontactid | asknicely__questioncontactid__c | Identifies the specific contact record related to the survey question. | Number(18, 0) (External ID) (Unique) |
| questionid | asknicely__questionid__c | Identifier for the specific survey question answered. | Number(18, 0) (External ID) |
| Response Record | Name | The unique Salesforce response record ID. | Auto Number |
| score | asknicely__score__c | Captures the main score (e.g., NPS or CSAT value) from the survey’s primary scoring question. | Number(2, 0) |
| Segment | asknicely__segment__c | A customizable field to report on customer segment—often passed from AskNicely. | Text(255) |
| Survey Responded | asknicely__surveyresponded__c | The timestamp of when the customer submitted the survey response. | Date/Time |
| Survey Sent | asknicely__surveysent__c | The timestamp of when the survey was triggered from AskNicely to the recipient. | Date/Time |
| Tag | asknicely__Tag__c | Captures the answer to any list-style question with the keyword “topic”. | Text(255) |
| User | asknicely__user__c | Maps to a user record if UserID is passed from the contact record. | Lookup(User) |
| AI Question 1 | asknicely__ai_question_1_q__c | Long Text Area(32768) | |
| AI Question 1 (Answer) | asknicely__ai_question_1__c | Long Text Area(32768) | |
| AI Question 2 | asknicely__ai_question_2_q__c | Long Text Area(32768) | |
| AI Question 2 (Answer) | asknicely__ai_question_2__c | Long Text Area(32768) | |
| AI Question 3 | asknicely__ai_question_3_q__c | Long Text Area(32768) | |
| AI Question 3 (Answer) | asknicely__ai_question_3__c | Long Text Area(32768) | |
| AI Question 4 | asknicely__ai_question_4_q__c | Long Text Area(32768) | |
| AI Question 4 (Answer) | asknicely__ai_question_4__c | Long Text Area(32768) | |
| AI Question 5 | asknicely__ai_question_5_q__c | Long Text Area(32768) | |
| AI Question 5 (Answer) | asknicely__ai_question_5__c | Long Text Area(32768) |
🙋 Need Help?
If you have any questions or run into trouble, please reach out to support@asknice.ly. We're happy to help!







