Setup

To deploy Vuetrx, please complete the following steps:

  1. Setup Salesforce
  2. Deploy To Heroku
  3. Conifgure Heroku Connect and ActionHero Server
  4. Install The Mobile App

1. Setup Salesforce

To connect Veutrx to Salesforce you need the following:

  • Salesforce Developer Edition Account. Click here for more information

  • A double value field created within the Account record. More information on creating the field

  • Map desired field from Salesforce
    • Name your field 'loyalty_points__c'. We will later add this to the Actionhero server
    • Take note of the Mapped Object Name (ours is Account). We will later add this to the Actionhero server

2. Deploying to Heroku using the Heroku Button

You can deploy your own version of Vuetrx in seconds using the Heroku button below:

Deploy

Deploying to Heroku using the Command Line

You can also deploy Vuetrx to Heroku using the command line:

  1. Clone the repository

    git clone https://github.com/ClearbridgeMobile/vuetrx
    
  2. Create a Heroku application

    cd vuetrx
    heroku create
    
  3. Install Heroku Connect

    heroku addons:create herokuconnect
    
  4. Install the Postgres plugin

    heroku addons:add heroku-postgresql:dev
    
  5. Deploy to Heroku

    git push heroku master
    
  6. Run the the application:

    heroku open
    

3. Configuring Heroku Connect & Actionhero Server

You will need setup Heroku Connect and update the actionhero server to match

  1. Configure Heroku connect

    • Navigate to your Heroku app dashboard

    • Click on Heroku Connect addon

    • Perform setup

    • Link Salesforce account

    • Map desired field from Salesforce (Demo setup for any double field)

    • Take note of the field name (ours looks like loyalty_points__c). We will later add this to the Actionhero server

    • Take note of the Mapped Object Name (ours is Account). We will later add this to the Actionhero server

    • Take note of the DATABASE_URL (ours is salesforce). We will later add this to the Actionhero server

  2. Obtain Postgres URL

    • Navigate to your Heroku app dashboard

    • Click on Postgres addon

    • Under Connection Settings, click "Show" in the URL field

    • Take note of the URL. We will later add this to the Actionhero server

  3. Configure Action Hero Server

    • Within your git navigate to server/pg.js

    • Replace conString with the Postgres URL
      
    • Within your git navigate to actions/beacon.js

    • Replace loyalty_points__c with your field name
      
      Replace salesforce with your DATABASE_URL
      
      Replace Account with mapped Object Name
      
    • Within your git navigate to actions/reset.js

    • Replace loyalty_points__c with your field name
      
      Replace salesforce with your DATABASE_URL
      
      Replace Account with mapped Object Name
      
    • Within your git navigate to actions/users.js

    • Replace loyalty_points__c with your field name
      
      Replace salesforce with your DATABASE_URL
      
      Replace Account with mapped Object Name
      

4. Installing The Mobile App

Download, compile and install the mobile app to your iOS devices

  1. Clone the repository

    git clone https://github.com/ClearbridgeMobile/vuetrx
    
  2. Under Branch, switch from Master to Mobile-App

  3. Switch & check out mobile-app branch

    git checkout -b mobile-app
    
  4. Open Mobile app in XCODE

    • Open the project (/iBeacon Demo/iBeacon Demo.xcworkspace)

  5. Add Heroku Server Endpoint

    • navigate to Models/Constants.m

    • Replace ENDPOINT in HEROKU_ENDPOINT_BEACON with your Heroku URL
      
      Replace ENDPOINT in HEROKU_ENDPOINT_USER with your Heroku URL
      
      Replace ENDPOINT in HEROKU_ENDPOINT_RESET with your Heroku URL
      
      Replace loyalty_points__c in LOYALTY_POINTS with the field mapped in Heroku connect
      
  6. Deploy to Devices

    • Deploy to iOS Phone (Consumer)

    • Deploy to Tablet (Kiosk)