createContact( )


Creates a new contact.

The createContact() function returns a Promise that resolves to the new contact when it is created.

Note: This function replaces the deprecated wixCrmBackend.createContact(). 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.

The contactInfo parameter object must include a name, phone number, or email address. If all 3 of these parameters are missing, the contact won't be created.

By default, if the call contains an email already in use by another contact, the new contact won't be created. To override this behavior, set allowDuplicates in the options object to true.

Note: Only visitors with Manage Contacts permissions can create contacts. You can override the permissions by setting the suppressAuth option to true.

Method Declaration
Copy
Method Parameters
contactInfoContactInfoRequired

Contact info.


optionsOptions

Contact creation options.

Returns
Return Type:Promise<Contact>
Did this help?