first pass at adding the case where we get a relationIdenifier string in place of nested JSON. untested as of yet.