function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to relate a timba survey to a specific record

Can anyone help to solve this


How to relate a timba survey to a specific record. I am getting all the responses when I relate a survey to a oppurtunity record but I need only the response that got for that particular Summary , Tell me how to relate the timba survey record to a specific opprtunity record?


I am running into the same issue.


The Opportunity object is not supported directly by Timba Survey and the implementation would be just like any other custom object.


In order to do this, you would have to do some custom work to both send out the survey link as well as the landing page when the customer clicks the link...


I have not laid this out yet but my thought would be to:


**The problem I have not thought out yet is a single contact being surveyed for multiple opportunities - More custom work ***


1. Custom button / object to be able to select who the recipients are.

2. Add a Lookup field on the Recipient record for the Opportunity ID

3, When sending the email for the survey, (custom code with email template) create the url for the landing page with the survey parameters and add an additional paramater ?oppID=xxxxxxxxx

4. Create a landing redirect page on the site for the survey that looksup/creates the recipient record and puts the oppID parameter in the Opportunity ID field on the recipient record, then redirects to the survey.


A couple of issues:


1. Does not account for multiple opportunitys for the same recipient

2. This only displays the recipient record and the associated fields on the opportunity

3. If you want a list of the responses, more custom work will need to be done.


In the next few months I need to tackle this. Essentially the same thing:


1. A survey related to a specific Event (not salesforce event, company event like Install)

2. Once the event is completed, send survey to people at the account

3. Related the results to the event

4. Allow for future events using same survey and same recipient to complete again without affecting the original responses and properly relating the results to the event

5. Ability to aggregate all responses


There are a lot of survey tools out there. I find Timba has the best UI for building surveys. Nont fo the options for surveys allow for associating with custom objects and specific contacts with multiple invites/events.





Hi Starz26,


Thanks for your ideas.  I'm kind of in the same boat as the OP.  I have a client who wants a survey sent automatically from the opportunity in a workflow and attached back on the opportunity once filled out.  One peculuar thing I've noticed however is that there's an object called "Survey Summaries" that seems to be a junction object between a specific users survey result and any kind of object lookup you want to create.  This object seems to link the completed survey with the contact automatically based on the URL that's generated by salesforce and placed in the email that gets sent to the contact in the lookup on the opportunity (or the contact record itself if sent from there).


What I find odd however is that Timba created the "Survey Summaries" junction object to lookup to more objects than just users, contacts, cases, and campaigns.  They also designed it to look up to opportunities as well, but for some reason they hid it from the layout of the opportunities section when Timba gets installed.  The lookup to RelatedOpportunity.ID(Opportunity) field on the "Survey Summaries" junction object is also hidden.


It seems odd to me that Timba would create such a useful lookup for a standard object in the default package, and then hide it from use by anyone.  I'm guessing that the page where you fill out the survey on has a formula field that dissects the URL and copies the contact ID in to a field on the page that, when submitted, associates that survey with the "RelatedContact.ID" lookup on the Survey Summaries object record, which is what allows it to be visible in that users Contact record related list.  I also have this strange feeling like there's another formula field on that page that captures the opportunity ID (if present) and can associate the "RelatedOpportunity.ID" lookup that Timba created on the Survey Summaries object with the opportunity ID in the URL if it's present, but didn't make its functionality a part of the standard package for one reason or another  I mean, why else would Timba have put that in there if it's not to be used?  It doesn't make any sense to me.  When I look at the objects and how they're hidden, it almost seems like they were trying to program something and then kind of gave up and left it.


Do you know of a way to look at or edit the page that generates the survey for a contact to fill out?  I'm wondering if it's possible to somehow find out if there is a hidden formula field on there that does capture the opportunity ID, and exactly how the opportunity ID identifier in the URL needs to be formatted for it to be automatically associated with the opportunity.  If not, do you know of a way to edit the visualforce page where you fill out the survey and create a formula field that would dissect the opportunity ID in the URL so that it can be submitted along with the contact id?  Is that visualforce page editable? Or is that locked down by Timba?


Any ideas would be much appreciated.

You can associate a survey to an opportunity using this format in your email template: ID goes here&cId=contact ID merge field goes here&oppty={!Opportunity.Id}&wf=yes

For more information see:
I am trying to associate the survey to a custom object I have created - Rep Handoff - and it is related to a lead object. I created an email template and added the link to the survey using the above format. The email is sent from the custom Rep Handoff object, and the response is recorded on the Lead. However, it does not capture the custom rep handoff related information in the survey response related list.

With the above format, I see where they have associated it to the opportunity: oppty={!Opportunity.Id}

My question is, how does it know to look for 'Oppty' in the url? And if I want to relate the response to my custom object, what should the value be instead of 'oppty'?

Jon BillingsJon Billings
I've spent far too many hours on this. There was a time (just last week) where everything worked fine but now all of a sudden all the links are broken and I look like an idiot to our customers. 

How can I get this to link to an account or contact if I use my own email template? when i use the code with contact id it comes up with "not authorized", without the code it works fine but registers it as annonymous. 

Any suggestions other than those mentioned above? 
(and getting repsonse from Timba or Almeric is impossible)
Hey Y'all,

I have been working on getting a survey invite done for an opportunity,but it will not attach to the opportunity only the contact associated. Additionally, when we complete the survey we get an error on the first submit and it completes when we resubmit. Of course the survey is still only attached to the contact. I followed the direction on their site that is described above, but still no luck. Has anyone been able to get the survey to attach to an opportunity?

Brian WestbrookBrian Westbrook

I know this is late, but the "Not Authorized" has something to do with the site user access permissions.  You may see it just fine when you are logged into Salesforce, but try logging out and then using the URL.  I had to check several boxes in the permissions before I found the right one that would make that error go away.  Good luck.