Repo/Dao/Account.php
public function getSystemCustomerId()
    {
        if (is_null($this->cachedSysCustId)) {
            $conn = $this->conn;
            /* there is no cached value for the customer ID, select data from DB */
            $where = Cfg::E_CUSTOMER_A_EMAIL . '=' . $conn->quote(Cfg::SYS_CUSTOMER_EMAIL);
            $data = $this->daoGeneric->getEntities(Cfg::ENTITY_MAGE_CUSTOMER, Cfg::E_CUSTOMER_A_ENTITY_ID,
                $where);
            if (count($data) == 0) {
                $bind = [
                    Cfg::E_CUSTOMER_A_WEBSITE_ID => Cfg::DEF_WEBSITE_ID_ADMIN,
                    Cfg::E_CUSTOMER_A_EMAIL => Cfg::SYS_CUSTOMER_EMAIL
                ];
                $id = $this->daoGeneric->addEntity(Cfg::ENTITY_MAGE_CUSTOMER, $bind);
                if ($id > 0) {
                    $this->cachedSysCustId = $id;
                }
            } else {
                $first = reset($data);
                $this->cachedSysCustId = $first[Cfg::E_CUSTOMER_A_ENTITY_ID];
            }
        }
        return $this->cachedSysCustId;
    }
public function getSystemCustomerId()
    {
        if (is_null($this->cachedSysCustId)) {
            $conn = $this->conn;
            /* there is no cached value for the customer ID, select data from DB */
            $where = Cfg::E_CUSTOMER_A_EMAIL . '=' . $conn->quote(Cfg::SYS_CUSTOMER_EMAIL);
            $data = $this->daoGeneric->getEntities(Cfg::ENTITY_MAGE_CUSTOMER, Cfg::E_CUSTOMER_A_ENTITY_ID,
                $where);
            if (count($data) == 0) {
                $bind = [
                    Cfg::E_CUSTOMER_A_WEBSITE_ID => Cfg::DEF_WEBSITE_ID_ADMIN,
                    Cfg::E_CUSTOMER_A_EMAIL => Cfg::SYS_CUSTOMER_EMAIL
                ];
                $id = $this->daoGeneric->addEntity(Cfg::ENTITY_MAGE_CUSTOMER, $bind);
                if ($id > 0) {
                    $this->cachedSysCustId = $id;
                }
            } else {
                $first = reset($data);
                $this->cachedSysCustId = $first[Cfg::E_CUSTOMER_A_ENTITY_ID];
            }
        }
        return $this->cachedSysCustId;
    }
Return MageID for customer that represents store owner in accounting. Create new system customer
if it is not exist yet.

@return int