How to pass logged in user info to Intercom

<script>
    if(window['Intercom'] && window['logged_in_user'] && window['logged_in_user']['softr_user_email']) {
      window['Intercom']('update', {
        'email': window['logged_in_user']['softr_user_email'],
        'name': window['logged_in_user']['softr_user_full_name'],
        'user_id': window['logged_in_user']['airtable_record_id']
      });
    }
</script>