Grab Bag: Wix CRM Edition

Hi Wix CRM team

I’ve got a question regarding your API getContactById :
How are we supposed to know the ID of a given contact (with UI or code)? I’ve been looking around but I didn’t find a way to retrieve a given contact Id.

Most of the time, the info we have for a given customer is its email. So how can I retrieve the contactID from its email (in code this time)?

When we have to deal with CRM contact we have to do this:

function getContactFromEmail(email) {
   return wixCrm.createContact({"emails":[email]})
      .then(getContactById);
}

The issue with that technics is that we need to create a contact to know if he exists. In other words: I don’t know if the returned contact is a new one or if it was updated.

Is this the correct way or is there a better/simpler way to achieve the same result?