Skip to content

Tools for working with Noble-shared Salesforce installation

License

Notifications You must be signed in to change notification settings

SummitPublicSchools/external-NSC

 
 

Repository files navigation

extern-NSC

Tools to process NSC reports

Processing NSC File

Note, to interact with Salesforce, you'll need to create a file in the main directory named 'salesforce_secrets.py' that has the following three lines defining string variables:

SF_LIVE_USERNAME = 'your_username'
SF_LIVE_PASSWORD = 'your_password'
SF_LIVE_TOKEN = 'your_token'

before processing, create a virtual environment and install libraries:

(Note, all of this assumes that you've installed Python and Git and are accessing these commands via a Git Bash shell)

python -m venv .env
source .env/Scripts/activate
pip install -r requirements.txt

If you need to refresh from the repository, type:

git pull https://github.com/NobleNetworkCharterSchools/external-NSC.git

If you want to leave this environment:

deactivate

To reenter the environment, type the "source .env/Scripts/activate" line above

Steps for processing:

  1. Stash the current files in the "stash_dir" directory by running "step_1_save_tables.py":
python step_1_save_tables.py
  1. Run import_nsc.py on the new NSC file (set the date for the effective date of the NSC file
python import_nsc.py -date 11/19/2019

(find the NSC file by clicking in the box in the upper right then hit OK. Make sure the NSC file is a CSV)

  1. When you run this process, it might warn about missing_degrees. Look at the instructions on the console message and add new rows to the inputs/degreelist.csv file per it's instructions.

  2. Similarly, there might be a warning about missing colleges. Add those per instructions as well.

  3. Once the above step is complete, you will have an output labelled "import_nsc_output.csv" Check that file for N/As in the Student__c and College__c columns; you'll resolve these either by deleting them or by adding records to Salesforce and replacing the N/A with that new ID (make sure the ID is 18 digits and not 15)

  4. Run merge_nsc.py:

python merge_nsc.py
  1. Take the 3 outputs of this file and load them to Salesforce with dataloader.io:
    • new_enr_.csv: create new enrollment records with this info
    • enr_update_.csv: update enrollments with this info
    • con_update_.csv: update contacts with this info

About

Tools for working with Noble-shared Salesforce installation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%