Skip to main content

I've created a Flow using Flow Builder that takes in FirstName, LastName, Email and some responses to a few survey questions. These will be stored in a custom object "Customer Survey", which has Lookup relationships with both the standard "Contact" object and another custom object "Event".

 

I've followed most steps on this site (except those to do with Email Alerts):

https://automationchampion.com/2020/12/02/survey-powered-by-salesforce-flow/

 

I created a Force.com Site used for unauthenticated access of the Visualforce page as outlined in the steps 5, 6 and 7.

 

In addition, I have gone into the Site's Public Access Settings to give Read access for Contact and Event objects, Read+Create access for "Customer Survey" object.

 

The first step in the Flow is to Get Record of a Contact using the input FirstName, LastName and Email to find a matching Contact. If no Contact is found, a "Contact was not found" page is displayed, otherwise, the Flow proceeds to Get Record of an Event object using an Event Name text field, followed by a similar "Event was not found" page if no such event was found.

 

Finally, if both Contact and Event records are found and assigned to record variables, the Flow then Creates a Customer Survey record along with all the responses.

 

Testing the Flow from Flow Builder works well as expected. However, it just does not work when the same exact data is entered into the form hosted on the Visualforce page (not managed). It seems to fail at the first step when trying to Get Record for a Contact and always displays the "Contact was not found" page.

 

There is also seemingly no log or debug function to see what is going on behind the scenes. How do I diagnose the actual problem and solve this issue?

 

What I hope to eventually achieve is to have the the survey form be automatically triggered 1 day after the event ends, with the Event name and Contact fields pre-filled using data in Salesforce.

 

The customer would just receive a link in an email or text and be able to just fill in their responses without bothering with entering Name, Email or Event name.

 

I would prefer not to have just simple text fields for users to fill in their Names, Emails and Event names and then have to do manual matching later (if that's even possible).

 

#Flow  #Visualforce Pages  #Force.com Sites  #Custom Object  #Contact  #Guest Users

1 Antwort
  1. 16. Juli 2021, 01:08
    Did you give the Guest User access to all the fields that are being accessed in your flow? Flows that are launched by a guest user will fail if the guest user doesn’t have access to all necessary fields (not just read access to the object).
0/9000