def METHOD_NAME(domain, user, app_id, build_id, sync_date, latest_build_date, device_id,
                      device_app_meta, commcare_version=None, build_profile_id=None, fcm_token=None,
                      fcm_token_timestamp=None, save_user=True):
    version = None
    if build_id:
        version = get_version_from_build_id(domain, build_id)
    local_save = False
    if sync_date:
        # sync_date could be null if this is called from a heartbeat request
        local_save |= update_last_sync(user, app_id, sync_date, version)
    if version:
        local_save |= update_latest_builds(user, app_id, latest_build_date, version,
                                           build_profile_id=build_profile_id)
    if device_id:
        local_save |= update_device_meta(user, device_id, commcare_version=commcare_version,
                                         device_app_meta=device_app_meta, fcm_token=fcm_token,
                                         fcm_token_timestamp=fcm_token_timestamp, save=False)
    if local_save and save_user:
        user.save(fire_signals=False)
    return local_save