Gateway upsert