extracting externalId