When users are using Visual flow, if they accidentally close the window or page refreshed, the flow getting restarted when they are in middle of the conversation. The values that they have collected till block is getting wiped out. I know that PAUSE button will work if they manually PAUSE the flow. So is there any feature or work around that we can preserve or retain the values collected so far. Also, How to resume the session where they missed.

Can anybody suggest how to overcome the issue.

  • Any pointers for this issue are appreciated. – UKK Jan 3 '17 at 6:21

You could write the data to a custom object in between each screen.

To restart, you could direct them to a page to review their incomplete flows (or even use a flow screen w a dynamic choice to show their incomplete flows), and a link to restart.

You could then pass in all the stored values from the custom object to the restarted flow, and use a decision element to route them to the correct place in the flow.

Once flow is complete, you can delete the temporary custom object record.

I've never tried this but seems feasible, if cumbersome. An auto pause option at each screen would certainly be better, if it exists, but I don't believe it does.

I suppose one advantage of this is that you could get a lot of data about how long each flow takes, or even how long each step takes, if you wanted to track that.

| improve this answer | |
  • Out of curiosity, how would you suggest implementing the restoration of the flow from the custom object? With a cookie it would seem simple, but as that's not an option, it doesn't seem quite as obvious to me how to create this functionality to store the records in the custom object for easy retrieval at a later time. Also, what impact would the DML have on the flow? – crmprogdev Jan 11 '17 at 20:42
  • The custom object would have to store each of the flow's variables in a separate field. I could imagine a field to store which 'step' the user last completed, and some decision elements at the beginning of the flow that would route the user back to the screen they left off at, w an assignment element to set the variable values. Each flow input screen would need a default value to a variable. Not pretty, and still requires the user to click 'next' to save the previous screen values - wont help w/ a mid-screen issue. I think feasible if really necessary, but VF and Apex maybe better? – gorav Jan 11 '17 at 20:54
  • My question was more one of would you be querying to return records based on userId and flowId? Obviously each Custom Record would get a recordId, so how would you retrieve each instance of a flow per userId is the essence of my question? – crmprogdev Jan 11 '17 at 21:35
  • One record per flow interview per user. With a simple list view each user could see their open interviews. Presumably there is a customer name field or something to distinguish each interview. Then a link on each record would reopen floe, passing in the id of the custom obj record, and one query is all. Does that make sense or am i missing your question? – gorav Jan 12 '17 at 2:42
  • 1
    Then I think we're in sync and that answers my question. I agree there would be no value in using multiple records to track save points. The last issue you'd need to handle would be deletion on save which presumably would be fairly straightforward. Thanks for the clarification. – crmprogdev Jan 12 '17 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.