title: How do you save the Slack modal view ID for future updates?
body: <p>I'm using Slack's modals + their new BlockKit interactive actions. I have a modal dialog with several section's that include select menu accessories. When one of those accessories changes (ex: user preference goes from Yes -> No), I want to update the modal's view to reflect the change in some contextual text.</p>
  
  <p><a href="https://api.slack.com/surfaces/modals/using#updating_views" rel="nofollow noreferrer">The docs outline two ways to update a model</a>. Because I'm not using the traditional modal inputs, I have to update the modal via the API and not via <code>response_action</code>. Proof: I don't even receive a <code>view_submission</code> payload at all... I receive a <code>blockkit_action</code> payload.</p>
  
  <p>The docs conflict a bit. In the above link they say that to update a view you must pass in the returned ID of the view when it was opened:</p>
  
  <blockquote>
    <p>Remember the view.id that was included in the success response when
    you used views.open earlier? We hope you kept it, because you can now
    use it to update that view.</p>
  </blockquote>
  
  <p>But when you look at the docs for the <a href="https://api.slack.com/methods/views.open" rel="nofollow noreferrer">views.open</a> and <a href="https://api.slack.com/methods/views.update" rel="nofollow noreferrer">views.update</a>, it appears there is a second option: <code>external_id</code>. The <code>views.update</code> docs say this:</p>
  
  <blockquote>
    <p>A unique identifier of the view set by the developer. Must be unique
    for all views on a team. Max length of 255 characters. Either view_id
    or external_id is required.</p>
  </blockquote>
  
  <p>Initially I got everything working really nicely by choosing an external ID of <code>myapp-mymodal-[userID]</code>. But as soon as I tried opening the modal simultaneously on my Desktop + Mobile client, I started getting <code>internal_error</code> responses and have been unable to open the modal since!</p>
  
  <p>So I started looking into saving the view ID, per the first quote. My problem is: that ID changes every time the modal opens. I don't understand how I am expected to possibly keep track of the 0-2 "active" view IDs that might be taking place across a user's Desktop + Mobile clients (or more than 2 if they have an iPad, a second laptop, etc).</p>
  
  <p>I tried to look for some sort of unique client ID that I could either use to include in the <code>external_id</code> or in my <code>view_id</code> persistence logic, but given that Slack's API appears to be sesssion-less I couldn't find any such thing.</p>
  
  <p>How do others solve this problem?</p>