automatically generate location credit based on location afterInsert hook