createContact( )


Deprecated. This function will continue to work, but a newer version is available at wix-crm-backend.contacts.createContact().

Creates a new contact or updates an existing contact.

Migration Instructions

If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to wix-crm-backend.contacts.createContact().

To migrate to the new function:

  1. Add the new import statement:

    Copy
    1
  2. If you plan to migrate all contact functions that use wixCrmBackend, remove the original import wixCrmBackend statement.

  3. Look for any code that uses wixCrmBackend.createContact(), and replace it with contacts.createContact(). Update your code to work with the new createContact() call and response properties.

  4. Test your changes to make sure your code behaves as expected.

The createContact() function returns a Promise that resolves to the newly created or updated contact's ID when the contact has been created or updated.

The passed ContactInfo object must contain at least one email address or phone number.

Method Declaration
Copy
Method Parameters
contactInfoContactInfoRequired

The information for the contact being created or updated.

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