if hostid:
        usermacro_exists = __salt__['zabbix.usermacro_get'](name, hostids=hostid, **connection_args)
    else:
        usermacro_exists = __salt__['zabbix.usermacro_get'](name, globalmacro=True, **connection_args)