create(CustomerInterface::class); $customer->setWebsiteId($websiteId) ->setEmail('customer.web@example.com') ->setGroupId(1) ->setStoreId($store->getId()) ->setFirstname('John') ->setLastname('Doe') ->setGender(1); /** @var $repository CustomerRepositoryInterface */ $repository = $objectManager->get(CustomerRepositoryInterface::class); $customer = $repository->save($customer);