title: How to create events for a visitor that is already an intercom user?
body: <p>We use both intercom web library and <code>intercom-java</code> sdk to send events as some events can be sent from client side, but some need to be sent from server side. Here is how we send server side events:</p>
  
  <ul>
  <li>When the visitor triggers some action, say a failed login attempt, we grab <code>visitorId</code> from web library <code>window.Intercom("getVisitorId")</code> and send it to the server</li>
  <li>On the server side, we first try to find the visitor <code>Visitor.findByUserID(visitorId)</code>, if it returns <code>NotFoundException</code>, then we try to find the lead <code>Contact.findByUserID(visitorId)</code>, if it returns <code>NotFoundException</code>, then we try to find currently logged in user from server session(I know, old technology), if no logged in user found, we can't create the event because we don't know who the user is. If any of the steps above succeeds, we can create the event with the returned user's userId</li>
  </ul>
  
  <p>The flow above usually works, however it doesn't work when the visitor has already logged in, and remains in the same intercom session while the server session is cleared out - say we restarted the server after the visitor logged in. In this case, the <code>visitorId</code> doesn't represent any visitor/lead anymore, and the user is no longer logged in to be found in the server session. So we don't know how to identify the user on the server side to send the event.</p>
  
  <p>This is not a problem for client side events. So my question is, is there a way to workaround this on the <code>intercom-java</code> sdk side?</p>