{"action":"opened","issue":{"url":"https://api.github.com/repos/calblueprint/PHC/issues/266","labels_url":"https://api.github.com/repos/calblueprint/PHC/issues/266/labels{/name}","comments_url":"https://api.github.com/repos/calblueprint/PHC/issues/266/comments","events_url":"https://api.github.com/repos/calblueprint/PHC/issues/266/events","html_url":"https://github.com/calblueprint/PHC/issues/266","id":60235605,"number":266,"title":"Create custom data syncing between Heroku server and Salesforce","user":{"login":"Byronium","id":4009333,"avatar_url":"https://avatars.githubusercontent.com/u/4009333?v=3","gravatar_id":"","url":"https://api.github.com/users/Byronium","html_url":"https://github.com/Byronium","followers_url":"https://api.github.com/users/Byronium/followers","following_url":"https://api.github.com/users/Byronium/following{/other_user}","gists_url":"https://api.github.com/users/Byronium/gists{/gist_id}","starred_url":"https://api.github.com/users/Byronium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Byronium/subscriptions","organizations_url":"https://api.github.com/users/Byronium/orgs","repos_url":"https://api.github.com/users/Byronium/repos","events_url":"https://api.github.com/users/Byronium/events{/privacy}","received_events_url":"https://api.github.com/users/Byronium/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/calblueprint/PHC/labels/feature","name":"feature","color":"cccccc"},{"url":"https://api.github.com/repos/calblueprint/PHC/labels/high%20priority","name":"high priority","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"altonzheng","id":1298214,"avatar_url":"https://avatars.githubusercontent.com/u/1298214?v=3","gravatar_id":"","url":"https://api.github.com/users/altonzheng","html_url":"https://github.com/altonzheng","followers_url":"https://api.github.com/users/altonzheng/followers","following_url":"https://api.github.com/users/altonzheng/following{/other_user}","gists_url":"https://api.github.com/users/altonzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/altonzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altonzheng/subscriptions","organizations_url":"https://api.github.com/users/altonzheng/orgs","repos_url":"https://api.github.com/users/altonzheng/repos","events_url":"https://api.github.com/users/altonzheng/events{/privacy}","received_events_url":"https://api.github.com/users/altonzheng/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/calblueprint/PHC/milestones/3","html_url":"https://github.com/calblueprint/PHC/milestones/PHC%2058","labels_url":"https://api.github.com/repos/calblueprint/PHC/milestones/3/labels","id":1008906,"number":3,"title":"PHC 58","description":"","creator":{"login":"Byronium","id":4009333,"avatar_url":"https://avatars.githubusercontent.com/u/4009333?v=3","gravatar_id":"","url":"https://api.github.com/users/Byronium","html_url":"https://github.com/Byronium","followers_url":"https://api.github.com/users/Byronium/followers","following_url":"https://api.github.com/users/Byronium/following{/other_user}","gists_url":"https://api.github.com/users/Byronium/gists{/gist_id}","starred_url":"https://api.github.com/users/Byronium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Byronium/subscriptions","organizations_url":"https://api.github.com/users/Byronium/orgs","repos_url":"https://api.github.com/users/Byronium/repos","events_url":"https://api.github.com/users/Byronium/events{/privacy}","received_events_url":"https://api.github.com/users/Byronium/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":1,"state":"open","created_at":"2015-03-06T08:47:31Z","updated_at":"2015-03-08T01:30:50Z","due_on":"2015-03-10T07:00:00Z","closed_at":null},"comments":0,"created_at":"2015-03-08T01:30:50Z","updated_at":"2015-03-08T01:30:50Z","closed_at":null,"body":"HerokuConnect may be too expensive ($8K) because it provides high speed syncing and advanced features that we don't need. We're still negotiating prices, but in the meantime, we will be building our own rails server. Here's what the flow should look like:\r\n \r\n1. Before event: Salesforce --> Heroku syncing\r\nshould grab:\r\n- ALL Account objects (~36,000), along with their SFId.\r\n- The latest PHC Event object (1)\r\n* In Heroku, we also need to create an Event Registration table (see what an Event Registration object looks like here: https://na2.salesforce.com/01I400000002hAO?setupid=CustomObjects). \r\n\r\n2. During event: the app will do the following \r\nMainActivity: \r\n- grab all the services from the PHC Event object\r\n\r\nCheckinActivity:\r\n- New User: Creates new Account (will not have a SFId) and a new Event Registration object. Link the Event Registration object to the Account using the Account's local heroku id. \r\n- Existing User: Finds the existing Account and creates a new Event Registration object. Link the Event Registration object to the Account using the Account's local heroku id. \r\n\r\nServicesActivity:\r\n- Search for the right Event Registration object by QR number.\r\n- Update the right service and service time fields in the Event Registration object. \r\n\r\nCheckoutActivity:\r\n- Search for the right Event Registration object by QR number. \r\n- Update the feedback fields in the Event Registration object. \r\n\r\n3. After event: Heroku --> Salesforce syncing\r\nFor each Event Registraiton:\r\n- If the Event Registration's linked Account has an SFId, then update that account in Salesforce, and add a new Event Registration in Salesforce that is also linked to that Account.\r\n- If the Event Registration's linked Account does not have an SFId, then this means the Account was just created. In this case, create a new Account in Salesforce, grab the SFId that is created, and then add a new Event Registration and link it to the returned SFId."}}