Before answering that question, let's check that you know how the past perfect is formed.
The past perfect is formed using the past tense of have (had) + past participle.
We had already seen the film.
Here are some of the times the past perfect is used:
To talk about the earlier past
Indirect speech (also called reported speech)
Talking hypothetically about the past, using the third conditional
With certain phrases such as 'that was the first time...'
1. Earlier past
Imagine that you are telling a story that starts at 8am. If you now want to say what happened before 8am you might want to use the past perfect.
I got up at 8am and made myself some a cup of tea. Unfortunately there was no milk left as someone had drunk it all.
2. Indirect speech
The past perfect is commonly used in indirect speech.
"I have never been to Spain." = direct speech
She told me that she had never been to Spain. = indirect speech
3. Speaking hypothetically
If you want to use the third conditional, you'll need the past perfect.
If I had known that she was claustrophobic, I wouldn't have driven through the tunnel
4. With certain phrases
We can also use the past perfect with certain phrases.
That was the first time that I had ever visited Seebodenalp in autumn.
A final word of warning!
In 'rule 4' I said that we can use the past perfect with certain phrases. This doesn't mean that we always have to use the past perfect with these phrases, rather that it is one of the choices we can make. It is also fine to use past simple instead of past perfect in the same sentence without any change of meaning.
That was the first time that I ever visited Seebodenalp in autumn.