Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Mission Impossible?

  • skavan
  • skavan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago - 4 years 4 months ago #192183 by skavan
Mission Impossible? was created by skavan
Hi,
Have setup LS3.x and am enjoying developing a survey with it.
Here's a slighly weird use case, and I'm stumped on how to do it:

1. I use ZohoCRM as my CRM. I can select multiple contacts and send a templated email to them, such as mydomain.com/index.php/933555?id=242&campaign_id=4500. Where the id value is inserted by the crm and is unique for each recipient, and campaign_id is unique for each campaign.

2. User received the email, clicks the link and the survey comes up. This all works.

3. I would like to prevent the user running the survey twice -- but the only things i have to play with are the "id" and "campaign_id" in the querystring and, I suppose, cookies. STUCK - DONT KNOW HOW TO DO THIS!

4. Then, when the response is submitted, I want to fire a webhook that passes me the id & campaign id. (Kinda working, with ZestPlugin - but not sure how to tell it to send me those two variables").

5. Using the id variable, I will query my CRM to get first name and last name from ZOHO CRM (working) and then,

6. I want to push these values (First Name, Last Name) back into the Survey in LimeSurvey, so they show up in the response detail (NOT A CLUE ON THIS).

7. Finally, I will update the CRM with a link to that users CRM record underneath the associated campaign (WORKING).

I'm a beginner at Limesurvey -- and would really appreciate some guidance on an approach to pull this off.
I suppose I could (via API) send the whole campaign contact list to LimeSurvey and use my id field as the token...but I'd rather not do that much data xfer in one go -- and in doing so, lock the survey to a single Zoho campaign.

I'm thinking this is possible -- given the huge flexibility of LS -- but need some good kicks in the right direction!

TIA.
Last edit: 4 years 4 months ago by skavan. Reason: formatting
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #192188 by DenisChenu
Replied by DenisChenu on topic Mission Impossible?
It's clearly an LimeSurvey API solution
manual.limesurvey.org/RemoteControl_2_API

You must create token inside your CRM

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • skavan
  • skavan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago #192189 by skavan
Replied by skavan on topic Mission Impossible?
thx -- have read those docs...but need a bit more to know how to implement a solution to the problem I have articulated.

s.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #192237 by DenisChenu
Replied by DenisChenu on topic Mission Impossible?
Remind : i am not a ZohoCRM dev …

But : action to do in CRM

1. Connect to LimeSurvey API : get_session_key
2. Find the token of the user for a survey : get_participant_properties
3. If find return a value, and completed is set : show 'all done' to user : stop.
3. If find didn,'t return a value (no participant with this email for example) add_participants
4 . Using the token : create the url to be shown to user.

It's the principle

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
More
4 years 4 months ago #192279 by Matadeleo
Replied by Matadeleo on topic Mission Impossible?
Potential out of the box solutions:

3. I would like to prevent the user running the survey twice -- but the only things i have to play with are the "id" and "campaign_id" in the querystring and, I suppose, cookies.

- Insert the campaign_id into the survey in a hidden text field, manually delete duplicates later?
- Set cookie to prevent duplicates in publication and access settings?
- Tokenise the survey, automatically generate as many tokens as needed and assign them to people in the CRM, perhaps by their CRM id as the token?


4. Then, when the response is submitted, I want to fire a webhook that passes me the id & campaign id. (Kinda working, with ZestPlugin - but not sure how to tell it to send me those two variables").

- Create a custom page on Zoho or a standalone php script perhaps, that you set limesurvey to automatically redirect to upon completion e.g. mywebsite.com/custom_pages/complete?id={...aign_id={SIDXGIDXQID } then use this page to update the CRM. Not sure what zest is, but may be able to use this method to pass the variables.

6. I want to push these values (First Name, Last Name) back into the Survey in LimeSurvey, so they show up in the response detail

When you send the participant to limesurvey, you can fill values via the URL. Create some hidden questions in a group at the start of the survey, seperate to the rest. Then mydomain.com/index.php/933555?123456X123X123=First%20Name&123456X123X123=Last%20Name

It may concern the user to see their name passed in a URL like this, if you really need this in your data then consider pulling it in via a Vlookup in excel after you finish the survey.
The topic has been locked.
  • skavan
  • skavan's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago #192285 by skavan
Replied by skavan on topic Mission Impossible?
Some great ideas above. Thanks everyone. Will try and implement after the hols and will report back on progress!

s.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose