.. versionadded:: Fluorine

    Create service under service with id specified as parameter.

    .. note::
        https://www.zabbix.com/documentation/3.4/manual/api/reference/service/create

    :param service_rootid: Service id under which service should be added
    :param service_name: Name of new service
    :param triggerid: Optional - ID of trigger which should be watched in service

    :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
    :param _connection_password: Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
    :param _connection_url: Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

    :return: Service details, False if service could not be added or on failure.

    CLI Example:
    .. code-block:: bash

        salt '*' zabbix.service_add 11 'My service' 11111

def service_add(service_rootid=None, service_name=None, triggerid=None, **kwargs):
    '''
    .. versionadded:: Fluorine

    Create service under service with id specified as parameter.

    .. note::
        https://www.zabbix.com/documentation/3.4/manual/api/reference/service/create

    :param service_rootid: Service id under which service should be added
    :param service_name: Name of new service
    :param triggerid: Optional - ID of trigger which should be watched in service

    :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
    :param _connection_password: Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
    :param _connection_url: Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

    :return: Service details, False if service could not be added or on failure.

    CLI Example:
    .. code-block:: bash

        salt '*' zabbix.service_add 11 'My service' 11111
    '''
    conn_args = _login(**kwargs)
    ret = {}
    try:
        if conn_args:
            method = 'service.create'
            params = {'name': service_name}
            params = _params_extend(params, _ignore_name=True, **kwargs)
            # Ensure that we have required params.
            params.setdefault('algorithm', 1)
            params.setdefault('showsla', 1)
            params.setdefault('goodsla', 99.7)
            params.setdefault('sortorder', 1)
            if service_rootid:
                params.setdefault('parentid', service_rootid)
            if triggerid:
                params.setdefault('triggerid', triggerid)

            ret = _query(method, params, conn_args['url'], conn_args['auth'])
            return ret['result'] if ret['result'] else False
        else:
            raise KeyError
    except KeyError:
        return ret