I am doing a Survey tool integration off my contact page. I’ve created a custom object “SurveyResults” to store the results that has a lookup back to my Contact object. My users will click a “New Survey” button on the Contact page to initiate the survey, which will 1) Create a new row in my SurveyResults model (sets the contact relationship but has an empty ‘score’ until the response is received from the customer) 2) Set a ‘Send Survey’ checkbox on the Contact model to TRUE - this triggers the workflow to send an email out with the survey url 3) Set a ‘SurveyID’ field on the Contact model to the id of the new SurveyResults, which I use as a merge field in my emailed url to give the customer the correct survey link 4) Set ‘Last Survey Date’ field on the contact object so I know the last time a customer was surveyed, so we can prevent a customer from being surveyed too often.
My button is set to run multiple actions:
1) Create a new row in the SurveyResults model
2) Update Field on a Row, ContactData model, to set ‘Send Survey’ checkbox to TRUE
3) Update Field on a Row, ContactData model, to set ‘Last Survey Date’ to TODAY
4) Save models - Survey Results, Contact Data
Only action for #1 above works - the new SurveyResults record gets created and Saved. The 2 Contact fields do not get updated.
** I have not attempted the SurveyID field on the ContactData model since I can’t get the others working.
Any idea what I am doing wrong here? Thanks!
Your listed actions doesn’t mention “3) Set a ‘SurveyID’ field on the Contact model to the id of the new SurveyResults”
Pat - thanks for responding. I’m not sure I understand your suggestion. The Survey record is a child of the Contact. Where would I need to set the Survey id on the contact? I’ve included a screen shot of the user side. The SurveyResults is a related list under the Contact.
Well you discussed that you set the surveyID on the ContactData model, but don’t have an action doing this.
Also, this workflow you’ve got. Does it clear these values?
- Send Survey
- Last Survey Date
Yes, I haven’t added the surveyID field set yet … that seems harder to get the new record ID passed over, so I wanted to get the easy stuff working first.
The workflow will clear the SendSurvey checkbox after a set period of time (maybe quarterly it will reset to False, and the contact will be eligible to re-survey.) I envision the Last Survey Date will not clear, it will be overridden each time a survey is sent out.
Just to make sure you have access to edit and save these fields, can you do so through inline editing and the save button?
I do… yes, I have been manually triggering the checkbox to test the survey integration side.
hmmmm… remove ContactData from the save action and look to see if the fields get changed. Those buttons on the field editor will be enabled if the row has en edit pending saving. That might be a clue.
Chandra. Would you mind granting login rights to Skuid? Here are some instructions:
Then send an email to Support@skuidify with your ORG ID and the page you are building.
We’ll take a closer look.
Rob - in giving you access rights, it dawned on me to check my version in this sandbox, and I was on an old version. Upgraded and presto - it is working!! That brings me to my next problem… passing the SurveyResults record id to a field on the Contact page so I can then merge it into my email template. I tried to use another Update field action on my button, but that field isn’t updating.
Email coming to you with access rights…
oh oh … the merge field syntax is wrong. It needs to be something like {{$Model.AFLSurvey.data.0.Id}}
And I’m not sure this would work until after the survey is saved.
Progress!! I tried your syntax, Pat, and it loaded ‘4’ for my id. Not a record id, but at least it is something. So then I added a model save action after survey creation in the button and tried again, and I got a ‘5’ in there this time. Still not the id… humph
Is the id in your survey model?
Yes
er … uh … the surveyid field on the contact increments by one. What kind of field is it?
hahaha… I put nothing past myself. But it is Text(25)
Ok. You create the row in the Survey model and save it, then have a field update on the contact model?
yes, exactly
Did Skuid folks get it working?
No… not yet. I provided access rights yesterday but haven’t heard anything back from them yet.
Sometimes I wish could get the same access.
Looks like you got this working, and I’m sorry for not getting back to you sooner. Here is what is going on.
When you create a row on the model, Skuid is just creating that client side - and does not yet have the true Salesforce Record Id. So we provide a protoId, usually a single digit number. This allows conditions that go acrross models to stay in synch.
When you save this row to the database. Salesforce assigns the record ID (long 18 char number) and then Skuid goes back and replaces the protoId with a real Id wherever it is needed.
So if you had the “Update field in row” action occuring before the model saved - you just passed ‘4’ or ‘5’ as you state above. But if you move it after the model save, you get the results you want.
Another note about your use of ID for the Emailed URL. You should look at the URL that is expected by your survey tool. It may be 15 or 18 characters. Skuid defaults to the use of the 18 character ID. But if your URL really should be the 15 char ID use ‘Id15’ in your merge syntax.
Hi Rob, thanks for responding. I do have a Save action in my multi actions before the field updates, but still not getting the record id. I’m only getting the single digit value. My multi actions are:
1) Create new record in AFLSurvey
2) Save model AFLSurvey
3) Update contact field - ‘SendSurvey’ checkbox (working)
4) Update contact field - ‘LastSurveyDate’ (working)
5) Update contact field - SurveyMerge - not working. Using merge syntax {{$Model.AFLSurvey.data.0.Id}} . Is this right?
6) Save models - ContactData, AFLSurvey
And my survey integration is using the 18 digit id, so I’m good there! I just need to get it on my Contact field so I can merge it into my email template!
Chandra
When I tested within your org I got the 18 digit value populated in the contact record fields below the survey table. Can you double check?
err… well, GREAT!! Feel free to take credit, Rob! ;) Thanks for looking, and sorry I am blind!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.