High5 - Tier 2-3 Support Guide

Documentations

Beta Site (High5 Enhancement)

Deployment to Live Site (https://high5recognition.com)

Requirement: Merge request must be approved and merged by High5 project lead

Referenced from High 5.docx in P:\Teams\Team Technical\High5\High5 Documents

For /api

  1. Create a build folder in /var/www/RRE/release called "build_[replaced with deployment date in YYYYMMDD format]_01"
  2. Update the "develop" branch and copy the following folders into that build folder:
    1. vendor
    2. App
    3. lib
    4. data
  3. Go to /var/www/RRE
  4. Copy the shortcut / link of "current_release" folder. Update the shortcut / link of "last_good_release" with the copied one.
  5. Update the shortcut / link of current_release" with the latest build folder directory path.
  6. Go to http://admin.icomrewards.ca/.
  7. Under Live section, click the red warning button called "Set Symlink to Current Release".
  8. Under Live section, click "Read Symlinks" to double-check if everything looks good.
  9. Check on live site if the changes are deployed. If not, check Step 8). If symlinks look good regardless, click "Apache Graceful Restart"

For /rewardsicomgui

  1. Go to /var/www/vhosts/canadian_tire.
  2. Duplicate the current release "html_[yyyymmdd]" folder and rename to "html_[yyyymmdd as in today date]".
  3. Move / overwrite the files that you have made changes to to the new folder.
  4. In that new folder, add the following new links:
    1. files - pointing to ../files
    2. images - pointing to ../images
    3. pdf - pointing to ../pdf
  5. Return to /var/www/vhosts/canadian_tire. Update the link of html folder so that it's pointing to the new "html_[yyyymmdd]" folder.
  6. Check on live site if the changes are deployed.

Support

Extra notes for support. Maybe considering create a new sub-page if information tend to get bigger.

Maintanance / Reminder

Notes for routine administrative support task, updated documentation / map provided by client to have High5 syncs with the latest info from client side

Administration

Ongoing Task

- Support Ticket: https://icomproductions.freshdesk.com/a/tickets/18440

- Description: High5 is currently having order backlog thus requested to remove all non-gift-card items from Go Shop temporarily.

- List of prizes removed: https://docs.google.com/spreadsheets/d/1B9mA0L49e6ZQu8tphbiSM3-VzYNmUXhTIBppACFwf4o/edit?usp=sharing

- SQL queries to revert the changes can be found here: https://docs.google.com/spreadsheets/d/1B9mA0L49e6ZQu8tphbiSM3-VzYNmUXhTIBppACFwf4o/edit#gid=1402540272

Notes for extensive administrative support task

Task

Upload Animated GIF E-Cards

Request for Prize List for Go Shop

Add new Prizes

Inactivate High5 User Profile

Cancel An Order

Point Transfer between Employees

Create a new HR Account

Remove Prize from Go Shop

Update Prize's Cost from Go Shop

Request for Customized / Annual Report

Update High5 Banner

Process Organization Budget Transfer (create a new budget datafeed and process it)

Step-by-step Procedure

Requirement: animated GIF 350px x 250px image from client, Photoshop

Additional Notes

charge client minimum 1hr of work per card.

This is an earlier step for updating / adding new prizes. Client requires a updated prize list to add the new prize(s) in it. After that (s)he sends the updated list for us to process.

This request normally comes when a manager receives a email notification of terminated user's upcoming milestone, as High5 is not aware of that user inactive status. My guess is that PeopleSoft didn't include specific users to be terminated in the datafeed.

This request can be done because:

From Tiffany (June 20 2017):

  1. Create a new Award using High5 Admin and get its Award ID. Don't worry about the extra details - the client will update the award info later.
  2. Open Photoshop and compress the file size of the image (File->Save for Web & Devices...). Save as GIF 128 No Dither Format. Make sure the GIF animation is still working.
  3. Make a copy of the image. In Photoshop, resize the image to 154px x 110px (Image ->Image Size...). Save as GIF 128 No Dither Format (File->Save for Web & Devices...). Make sure the GIF animation is still working.
  4. Rename both images and their file extensions in the following format:
    1. 350px x 250px GIF: "[INSERT AWARD ID].png"
    2. 154px x 110px GIF: "[INSERT AWARD ID]_sm.png"
  5. In the server, add both of the images to the following directories:
    1. /var/www/vhosts/canadian_tire/images/en/awards
    2. /var/www/vhosts/canadian_tire/images/fr/awards
  6. Check on High5 Admin Award List to see if those images are attached to the award.
  7. Update the High5 config file (AAA_canadian_tire.conf) in /etc/httpd/conf.d to include the Award ID. Don't forget to restart the apache.

Use this mySQL query to grab the list.

To export as a CSV file, make sure that the CSV options are the same as the following:

Requirement: updated prize list from client, prizes' images from client, Photoshop

  1. In the `prizes` table of High5 database, remove "[Recently Added]" tag on the last few rows of prizes.
  2. Add the prizes according to the list. For now make the prizes invisible (set `category_id` to 15) to the site. Note that:
    1. "Send to Fulfillment Immediately" is `send_immediately`
    2. For "Business Units", add prize-organizationlevel associations in `prize_organizationlevel` table. List of business units including Mark's (ID 2), Canadian Tire (ID 3278), FGL (ID 3879) and CTFS (ID 12119)
    3. Add `prize_cost_logs` associations as well
    4. All new prizes must have "Recently Added" tag with it
  3. Open Photoshop and resize the prize image to 180px x 120px (Image ->Image Size...). Make some additional changes to the image so that it:
    1. is in the center;
    2. has white background.
  4. Save the image as "[PRIZE ID]".jpg under JPEG format (File->Save for Web & Devices...). Set the image quality to "Very High" to the scale of 80 of 100.
  5. Repeat 3) to 5) with couple of prizes' images
  6. In the server, add those updated images in the following directories:
    1. /var/www/vhosts/canadian_tire/images/en/prizes
    2. /var/www/vhosts/canadian_tire/images/fr/prizes
  7. In the `prizes` table of High5 database, make the new prizes visible (set `category_id` based on the prize list)
  8. Check on High5 Go Shop to see if those prizes show up

Requirement: termination date of the user whose account to be deactivated (Reason: termination date are included in some of the custom reports)

  1. Get the latest parsed user importer csv file / datafeed uploaded by the client
  2. Check if that user' info is included in the file acquired in 1). If yes, do not proceed. Everyday High5 system will overwrite user info (including status) for every single user listed in the datafeed. Otherwise, proceed to 3).
  3. In the `users` table of High5 database, set user's `is_terminated` to 1 and `termination_date` to termination date. Don't forget to save the changes.

Requirement: user name, order # or prize name

  1. In the `orders` table of High5 database, look for the order and set `order_status` to "cancelled"
  2. Create a new log in `point_logs`table and make sure that:
    1. `order_id` is referenced
    2. `old` is the current points
    3. `new` is the (current points + prize cost (check for prize_cost logs for prize change when the order was made))
    4. `reason` is 'Cancelled Order'
  3. Update `points` with new value in `accounts` table
  4. Check the High5 site to see if that user's points are refunded by impersonation an user profile

Requirement: 2 user names (employee id/username is preferable), Amount of points to be transferred

  1. Create 2 point logs - one for user who gives the points and another who receives the points.
    1. make sure the `reason` is either of the following:
      1. Point Transfer to user id [replace with receiver user id]
      2. Point Transfer from user id [replace with giver user id]
  2. Update `points` with new values in `accounts` table
  3. Check the High5 site to see if that users' points are transferred by impersonating an user profile
When the employee redeems the points, taxes only affect that specific person’s account. So even if we transfer the 30 points to another employee’s account, the employee where we transferred the points from doesn’t get taxed, only the employee who spends the points."

Requirement: employee id, first name, last name of user who will be using the HR account

Grab the queries to create a new HR account from there .

Requirement: prize's name

In the `prizes` table of High5 database, set prize's `category_id` to 15 in order to hide it from Go Shop.

Requirement: prize's name

HR account is used for reporting purposes (e.g. view Customer for Life nomination report)

  1. In the `prizes` table of High5 database, update prize's `cost`.
  2. Add a new log in `prize_cost_logs` table to reflect the prize change

You can find a list of existing queries I wrote from there .

Requirement: banner image from client

  1. Grab a random dashbg[...].jpg image from /var/www/vhosts/canadian_tire/images/business_unit_3278 in the server.
  2. Open that dashbg[...].jpg Photoshop and have the updated banner image overlaps it. Save it as JPEG in Very High quality (File->Save for Web & Devices...).
  3. In the server, add that new modified dashbg[...].jpg in the same directory path mentioned in Step 1.
  4. Rename the file dashbg.jpg to something relevant (e.g. dashbg2017SUMMER.jpg if the banner is updated in summer 2017).
  5. Rename that new dashbg[...].jpg to dashbg.jpg.
  6. Check the High5 site to see if the changes are made. Don't forget to clear the browser cache.

Requirement: User name (employee id/username is preferable), amount of points transferred / deducted / set in his / her organization, High5 dev environment (for testing purposes)

Reference: p. 30 on CTC Detailed Functional Requirement (ver 1.1.3)

  1. In the High5 database, grab the organization level id from the user
  2. In the `organization_level_hierachy_lookups` table, search for that organization by `organization_level_id`. Grab the values from the following columns:
    1. organization_level_code_hierarchy
    2. organization_level_name_hierarchy
    3. organization_level_type_hierarchy
  3. Create a new spreadsheet (I used googlesheet)
  4. On the 1st row, add the following headers (in order):
    1. Organization Level
    2. Organization Level Types
    3. Organization Level Codes
    4. Budget
    5. Additive
  5. On the next row, add the following values you get from Step 2 and the client:
    1. organization_level_name_hierarchy
    2. organization_level_type_hierarchy
    3. organization_level_code_hierarchy
    4. Amount of points
    5. Either:
      1. Yes - add points to the budget. E.g. if the budget = 100, 100 pts will be added to my budget
      2. No - set points to the budget. E.g. if the budget = 100, my budget will be exactly 100 pts
      3. Subtract - deduct points to the budget. E.g. if the budget = 100, 100 pts will be deducted from my budget
  6. If there is more than 1 transfer to be processed, repeat Step 1, 2, 3 and 5.
  7. If the datafeed is ready, it should be something like this:
  1. Export the datafeed as csv format
  2. Process the datafeed in the High5 dev environment (for testing purposes)
    1. Place the datafeed in api/import/budget
    2. Send an API POST request to localhost:7777/api/protected/budget_importer via API Testing app (I used postman). If it doesn't return {succeess: true}, check the datafeed and error logs and try again.
    3. If the request is successful, check the `budget_logs` table in the database to verify if everything looks good
  3. Process the datafeed in the High5 site
    1. In the server, add the datafeed to the following directory path: /home/jail1/home/budget_importer
    2. Send an API POST request to https://high5recognition.com/api/protected/budget_importer
    3. Check the `budget_logs` table again

Troubleshooting

Notes for (recurring) troubleshooting.

Archive / Logs

Notes for epic admin changes worth noting