added script to get externalIds