First, your input length of 10 looks like you don't expect (or accept) negative values. The low bound for int is -2147483648, which would be represented by an 11-character string.
Building on DJ's code from above, I suggest you put the ISNUMERIC() call before the CONVERT/compare.
IF ISNUMERIC(@Criteria) = 1
AND CONVERT(bigint, @Criteria) <= 2147483647
SET @Id = CONVERT(int, @Criteria)
This converts to a bigint first and then compares. Here are a few test cases:
DECLARE @Id int
DECLARE @Criteria varchar(10)
PRINT 'Expect failure (NULL)'
SET @Criteria = '2147483648'
SET @Id = NULL
IF ISNUMERIC(@Criteria) = 1
AND CONVERT(bigint, @Criteria) <= 2147483647
SET @Id = CONVERT(int, @Criteria)
SELECT @Id AS '@Id', @Criteria AS '@Criteria', CONVERT(bigint, @Criteria) AS 'Converted to bigint'
PRINT 'Expect success'
SET @Criteria = '2147483647'
SET @Id = NULL
IF ISNUMERIC(@Criteria) = 1
AND CONVERT(bigint, @Criteria) <= 2147483647
SET @Id = CONVERT(int, @Criteria)
SELECT @Id AS '@Id', @Criteria AS '@Criteria', CONVERT(bigint, @Criteria) AS 'Converted to bigint'
PRINT 'Expect failure but get success because @Criteria is truncated to 10 characters'
SET @Criteria = '11111111111111111111'
SET @Id = NULL
IF ISNUMERIC(@Criteria) = 1
AND CONVERT(bigint, @Criteria) <= 2147483647
SET @Id = CONVERT(int, @Criteria)
SELECT @Id AS '@Id', @Criteria AS '@Criteria', CONVERT(bigint, @Criteria) AS 'Converted to bigint'
and results:
Expect failure (NULL)
@Id @Criteria Converted to bigint
----------- ---------- --------------------
NULL 2147483648 2147483648
Expect success
@Id @Criteria Converted to bigint
----------- ---------- --------------------
2147483647 2147483647 2147483647
Expect failure but get success because @Criteria is truncated to 10 characters
@Id @Criteria Converted to bigint
----------- ---------- --------------------
1111111111 1111111111 1111111111
Note that passing '11111111111111111111' actually works since the input is truncated.