Migrating Decisions from TargetX to WebAdMIT
Overview
If you want to transfer decisions from TargetX to WebAdMIT, you can utilize the TargetX to WebAdMIT data migration process. This process involves the use of a Python script in conjunction with Informatica to facilitate the movement of decisions data from TargetX, with the purpose of updating decisions within WebAdMIT.
Here’s how it works:
- TargetX exports a CSV file via Informatica to a folder on the Informatica server.
- The Python script, running on the Informatica server, picks up the CSV file and loads the data updates the decisions in WebAdMIT.
- The script then archives the file for data retention and auditing.
Prerequisites
Before setting this up, make sure you have the following:
- A Windows-based Informatica server to host the Python script. To get this ready, you’ll need:
- An account with admin rights on the server.
- Python installed on the server to edit and run the script.
- Notepad++ or another text editor installed on the server.
- An existing CAS (WebAdMIT) to TargetX data integration.
- The field Program ID (For WebAdMIT API) should be included in your existing data integration from WebAdMIT > TargetX. If it’s not, you’ll need to adjust your current WebAdMIT > TargetX integration or create a new field in TargetX for this.
Setting up Decisions TargetX
Decisions in TargetX primarily occur within the Application Review Tool (ART). This tool is not standardized across institutions but instead configured to match each client’s unique business rules and review practices. For example, some clients begin the review process immediately after an application is submitted, while others wait until certain checklist items, transcripts, or other requirements are complete before starting review.
The review process itself is managed through Salesforce Flows, which create the necessary Application Review records. Depending on how the institution structures its process, there may be multiple review stages—such as an initial review, a committee review, and then a final review and decision. These Flows are tailored to each client and determine how and when Application Review records are created, updated, and advanced through the process.
Once the final review stage is reached, Salesforce Flows push the outcomes back to the Application object. At this point, several fields are typically updated, including the Application Decision, Show Reply to Offer, Enrollment Deposit, Decision Date, and Publish Decision Date/Time. In many implementations, additional updates also occur on the Contact record, such as moving the Student Stage forward to reflect the applicant’s new status.
Publishing the decision to the applicant depends on the Publish Decision Date/Time field. If this field contains a current date, the applicant’s Decision Letter (a Visualforce page) will display conditional content within their Applicant Portal or Dashboard. If a client has not configured App Configuration and Application Type values, however, applicants will not have a portal or Dashboard to view their decision information.
WebAdMIT User Identities
To use the WebAdMIT API, you’ll need a WebAdMIT user account that can access data for all departments and programs. This is usually an Institution Manager account in both prelaunch and production environments.
Here’s what to do:
- Log in to WebAdMIT with your Institution Manager account.
- Click Account at the top right to open Account Details.
- Click Edit My Account.
- Verify your account has the right organization and program assignments.
- In the API section, click Generate New Key to create a unique API key.
- Click Show Key and copy your API key—it will be needed for the script and to get your identity ID.
Retrieving Your User Identity ID
- Make the following API call to retrieve your User Identity ID.
- Use CURL or POSTMAN to make the below API calls:
- PRODUCTION
$ curl -n https://api.webadmit.org/api/v1/user_identities/:<ENTER USER_IDENTITY_ID>/decisions/ -H "x-api-key: <ENTER YOUR API KEY>"
- PRELAUNCH
$ curl -n https://api.webadmit.org/api/v1/user_identities/:<ENTER USER_IDENTITY_ID>/decisions/ -H "x-api-key: <ENTER YOUR API KEY>"
If successful, you’ll get a “200” status with a response containing an "id" number—this is your User Identity ID. If you get a “401” status, it means your user isn’t authorized. Double-check your WebAdMIT permissions and assignments.
Retrieving the Decision IDs in WebAdMIT
- Make the following API calls to retrieve decision IDs in WebAdMIT. The examples below are for production WebAdMIT. To use the below code for prelaunch, please use the following base URL:
https://prelaunch.webadmit.org
- Retrieve the Decision ID by making the following call:
$ curl -n https://api.webadmit.org/api/v1/user_identities/:<ENTER USER_IDENTITY_ID>/decisions/ -H "x-api-key: <ENTER YOUR API KEY
- A successful API call should generate a status code of “200” with the following example response body:
{ "href": "/api/v1/user_identities/1/decisions", "decisions": [ { "id": 42, "name": "Offer Accepted" } ] }
- Note all the IDs as they are listed one after the other. You will need the IDs to build the export in Informatica.
Data Mapping Document
We recommend creating a data mapping document that lists the TargetX Decisions and the corresponding decision Ids for Prelaunch and Production WebAdMIT. Create one for each admission cycle.
TargetX Decisions |
WebAdMIT Decision IDs (Prelaunch) |
WebAdMIT Decision IDs (Production) |
---|---|---|
Withdrew | 9128 | 106987 |
Offer Declined | 9129 | 978217 |
Rescinded | 9130 | 932148 |
Offer Accepted | 9131 | 982145 |
Configuring the TargetX Export
To get data from TargetX to WebAdMIT via Informatica, you need to set up Informatica export tasks.
Here’s a quick walkthrough:
- Import the attached zip [Decisions_Informatica_Stencils.zip] file into your Informatica.
- During import, make sure to choose your runtime environment.
- Set up connections for your flat file dropbox folder and TargetX Salesforce (sandbox or production).
- Test the import and then click Import.
- You’ll see 6 jobs created (3 mappings and 3 mapping tasks).
- Edit the ContactExport mapping:
- Set the source connection to your TargetX sandbox or production.
- Make sure you bring in only the fields Id and TargetX_Base__CAS_Applicant_ID__c.
- Add a filter to exclude rows where TargetX_Base__CAS_Applicant_ID__c is null.
- Set the target connection to your Informatica dropbox folder.
- Set the source connection to your TargetX sandbox or production.
- Save the Contact Export mapping and check the task’s connections.
- Edit the Application Export mapping:
- Point the source connection to TargetX(Sandbox or Production).
- Filter to only include application data for the CAS, cycle you want and only submitted applications.
- Limit fields to relevant IDs and filters.
- Set the unconnected lookup to point to the SFContactExport.csv in your dropbox.
- Set the target to your flat file dropbox.
- Point the source connection to TargetX(Sandbox or Production).
- Save and check the Application Export task.
- Edit the TargetX-WebAdMIT mapping:
- Point the source to TargetX.
- Filter application data by CAS and cycle.
- Include fields for Contact ID, Program ID, TargetX Decision field, and any filters.
- Set the unconnected lookup to your dropbox flat file.
- Add an expression fields to transform the incoming TargetX decisions to WebAdMIT decision Ids. Use a DECODE statement to achieve the same.
- Map target fields in order: CASID, Program Unique Identifier, then the transformed decision field.
- Save the mapping.
- Edit the TargetX-WebAdMIT mapping task:
- Go to Run Time Options > Advanced Options.
- Add this post-processing command (replace paths accordingly):
del PathToDropbox\SFContact* && del PathToDropbox\SfApplication* && move /Y " PathToDropbox\AACPMAS2526.csv" "PathToPythonScript\"
- Save your changes.
- Add the mapping tasks to your existing linear flow in this order:
-
- Contact Export
- Application Export
- TargetX-WebAdMIT Export
Python Installation
You'll need to install Python on the server that will be hosting the script. To do so:
- Download the software from https://www.python.org/downloads/.
- Download the latest release for Windows (based on whether the server is a32 bit or 64 bit).
- Once downloaded, run the Python install file as an administrator.
- This opens an installation window:
- Click Customize Installation to display Optional Features:
- Ensure that pip is selected.
- The next page displays advanced installation options:
- Select the path to install Python and click Install.
- Once Python is successfully installed, restart the server.
- Once restarted, navigate to your system environment variables to ensure Python is appended to the end of the PATH variable. If it is not, you will need to add it. The path should be the path to the Python executable, such as C:\Users\username\AppData\Local\Programs\Python\Python310
-
To test that your Python installation was successful and added successfully to your PATH variables, run Command Prompt as an administrator, type python, and hit enter:
- If the response is similar to “Python is not recognized as an internal or external command”, then it could mean that the PATH variable is not correctly set up or your Python was not correctly installed.
Editing the Python script
- Download the Python script and config.json file from Integration Help Center and place it on the Informatica server.
- On the server, create a folder called TargetXToWebAdMIT.
- Create a sub-folder called Archive.
- Place the Python script and the config.json file in the TargetXToWebAdMIT folder.
- The CSV file from Outcomes must also be dropped in the TargetXToWebAdMIT folder.
- Edit the config.json file in the TargetXToWebAdMIT folder using Notepad++ or Notepad and make the following changes:
- Change the Api_key value to your API key for prelaunch or production.
- Change the url_link value to prelaunch or production url.
- Change Working_dir to the full directory path of your TargetXToWebAdMIT folder. Note that the directory separations use "/".
- Set File_name to the name of the incoming CSV file from Outcomes.
- Set Cycle in the following format “2023 - 2024” depending on the cycle you are working with. Note that this value changes each cycle so will need to be updated regularly.
- Save the file.
Creating a Python executable
Next, you'll need to create a Python executable that will run the script. To do so:
- Open Command Prompt as an administrator.
- Run the following command: pip install pyinstaller
- If you get an error message that pip is not recognized as an internal or external command, this means your Python installation did not include the pip package.
- The article How to Install PIP on Windows provides guidance on installing pip.
- Once installed, type pip –version in Command Prompt to verify if the installation was successful.
-
If pip installation was successful, rerun the pyinstaller command: pip install pyinstaller
- Run the following command to ensure the requests module gets installed correctly: pip install requests
- If pyinstaller and requests installation was successful, in Command Prompt, navigate to the TargetXToWebAdMIT directory.
- Type the following command: pyinstaller --onefile decisions.py and press enter.
- This command converts the script into an executable.
- The executable is found in the \TargetXToWebAdMIT\dist\ folder.
- Copy the config.json file from the TargetXToWebAdMIT folder to \TargetXToWebAdMIT\dist\ folder.
Testing the executable
The following should be completed for prelaunch Outcomes to prelaunch WebAdMIT:
- Navigate to the \TargetXToWebAdMIT\dist\ folder in Windows Explorer and double-click decisions.exe to open a running Command Prompt window.
- If the Command Prompt window closes immediately after opening, then there is an issue with your Python code or the config.json file. In that case, navigate to the TargetXToWebAdMIT\dist folder and check the decisions.log file. If this file shows HTTP connection errors, this could mean that your API key, URL, or Cycle is incorrect.
- Edit the config.json file to make sure the file name, directory paths, API keys, base URL, and cycle are correct.
- Once verified, run the executable again.
- If the executable continues to run, this means the JSON file is correct.
- Run the Informatica tasks configured for this process to drop a csv file into the TargetXToWebAdMIT folder. The executable will pick up, process, and archive the file.
- Navigate to the Archive folder under TargetXToWebAdMIT\Archive folder. You will see a timestamped_yourfilename.csv file.
- Open the file, and you will see HTTP status codes printed in each row.
- Successful loads would have a status code of 200, while unsuccessful loads would have a status code of 404 or 422.
- The 404 status code could indicate several issues, including the Decision ID not existing in WebAdMIT, incorrect authentication methods (api_key), or CASID not found in WebAdMIT.
- If error 422 is thrown, the applicant has already had a local status associated with their record.
- Note that Decision Codes in WebAdMIT can only be updated via API for applicants that do not already have a Local Status associated with them.
- If all rows show a 200 for each field, then the next step is to check prelaunch WebAdMIT to ensure the decision data was correctly applied in WebAdMIT.If all looks good, then close the running executable command prompt window and delete the archived file.
Setting the Python Executable as a Windows Service
To keep the script running indefinitely, the following steps are required to set up the Python executable as a windows service. For this purpose, you'll need to install a tool called NSSM (Non-Sucking Service Manager).
- On your web browser on the Windows server meant to host the script, navigate to https://nssm.cc/download
- Download the latest release of NSSM which is nssm 2.24.
- This should download a zip file called nssm-2.24.zip.
- Extract the zip file in the OutcomesToWebAdMITDecisions folder.
- Open Command Prompt as an administrator, and within Command Prompt, navigate to OutcomesToWebAdMITDecisions\nssm-2.24\win64 (or win32, depending on your windows server).
- Run the following command by replacing the paths to your Python executable and python (.py) file:
- nssm install " TargetXToWebAdMIT" "PathTo\ TargetXToWebAdMIT\dist\decisions.exe" "PathTo\ TargetXToWebAdMIT\decisions.py"
- If the service is successfully installed, it displays the following message in command prompt Service " TargetXToWebAdMIT" installed successfully!
- Open services.msc in Windows as an admin and locate the TargetXToWebAdMIT service.
- Start the TargetXToWebAdMIT service.
Testing the TargetXToWebAdMIT Service
- To test the service, navigate to Testing the executable and perform steps 6 to 14.
- If the test is successful, stop the TargetXToWebAdMIT service in services.msc and delete the archived file.
- After all testing is completed and preparations are being made to move to production then perform the following steps to remove the service:
- Open Command Prompt as an administrator, and within Command Prompt navigate to TargetXToWebAdMIT\nssm-2.24\win64 (or win32, depending on your Windows server).
- Run the following in Command Prompt: nssm remove “TargetXToWebAdMIT”
- A dialog will open to ask if you want to remove the service, click Yes, and it should say the service was successfully removed.
- Open services.msc as an admin and refresh the services to ensure the TargetXToWebAdMIT service is not in the list of services.
- Open Command Prompt as an administrator, and within Command Prompt navigate to TargetXToWebAdMIT\nssm-2.24\win64 (or win32, depending on your Windows server).
Moving to Production
- After successful testing in prelaunch:
- Delete the Build, Dist folders and main.spec file.
- Update config.json with production API keys, URL, and cycle.
- Rebuild the executable and set up the service.
- Update Informatica mappings to point to production TargetX.
- Update the expression in the TargetX->WebAdMIT mapping to point to production Decision IDs.
- Run the service and verify.
Cycle Over Cycle Changes
- Cycle over Cycle, review your Decision IDs in WebAdMIT for the new cycle and update the mapping document and the TargetX-WebAdMIT mapping expression to point to the new Decision IDs.
- If new decisions are added, make sure you follow the steps in Retrieving the Decision Ids of Custom Fields in WebAdMIT and configure your Informatica export to match accordingly.
- Edit the filter conditions for the Application mapping as well as the TargetX-WebAdMIT mapping to match filters required for the new cycle. These would be stored in the query options section for each of the sources for the mentioned mappings.
- Stop the TargetXToWebAdMIT service.
- Edit the config.json file in your TargetXToWebAdMIT and \ TargetXToWebAdMIT \dist folders.
- Update the filename if you plan to use a new filename for the new cycle in the config.json file.
- Update the cycle to correspond with the new cycle in the config.json file.
- If you plan to use a completely new WebAdMIT user for the new cycle, change the API Key and cycle in the config.json file.
- Save the config.json file in the TargetXToWebAdMIT and \ TargetXToWebAdMIT\dist folders with the changes.
- Start the TargetXToWebAdMIT service.
Special Considerations
- If you have multiple CASs that require custom fields updated in WebAdMIT, then you will need one version of the script, config.json file and Informatica mapping set per CAS.
- If your CAS cycles overlap, you will need two versions of this process per CAS cycle. Once the previous cycle ends, make sure to stop, delete the service and stop the linear flow containing the old mapping tasks.