getContact( )


Retrieves a contact.

The getContact() function returns a Promise that resolves when the contact is found.

Getting Merged Contacts

When a source contact is merged with a target contact, the source contact is deleted. When calling getContact() for a merged contact, you can use the source or target contact ID. In both cases, the target contact is returned.

This is supported only when calling getContact(), and only for merged contacts. Deleted source contact IDs are not supported on any other function.

Notes:

  • This function replaces the deprecated wixCrmBackend.getContactById(). The deprecated function will continue to work, but it will not receive updates. To keep any existing code compatible with future changes, see the migration instructions.
  • Only visitors with Manage Contacts permissions can retrieve contacts. You can override the permissions by setting the suppressAuth option to true.
Method Declaration
Copy
Method Parameters
contactIdstringRequired

ID of the contact to retrieve.


optionsAuthOptions

Authorization options.

Returns
Return Type:Promise<Contact>
Was this helpful?
Yes
No