I was having same issue with a courier shipment imported via. Fedex.
Wherein the BOE (Bill of Entry) No. was:- CBE-XIII_DEL_2017-2018_0112_52512
I called fedex customer service on 1800-22-6161 and they informed me that the 7-digit bill of entry number is the last 7 digits of the bill of entry number (see numbers in bold). So, the 7-digit bill of entry number for GSTR-2 purpose will be 1252512.
Since BOEs are issued by customs, the last 7 characters of a BOE number (excluding special characters like space, "-", "_", "/", etc.) have to be numbers and not alphabets. If this is not true for shipments via other courier companies then, call the company to confirm correct BOE number.