No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Try It Out: Clone the Shipify Web Application
We’ll start the process of creating a canvas custom
action by cloning the Shipify Web application.
In addition to the prerequisites for this book listed in Development Prerequisites, you’ll also need:
- “Customize Application” and “Modify All Data” user permissions. If you’re an administrator, you most likely already have these permissions. Otherwise, you need to add them so that you can see the Canvas App Previewer and create canvas apps.
- Git installed. Go here to install and configure Git: https://help.github.com/articles/set-up-git.
- A GitHub account to clone the code example. Go here to set up a GitHub account: https://github.com/plans.
- A Heroku account because our Web application will run on Heroku. Go here to create a Heroku account: https://api.heroku.com/signup.
- Heroku Toolbelt to manage the Heroku app from the command line. Go here to download and install Heroku Toolbelt: https://toolbelt.heroku.com.
Shipify is a Web application that Acme Wireless uses to track the status of customer orders, customer shipments,
and deliveries. The warehouse workers use this application to check
for outstanding orders, fulfill those orders, and then update the
shipping status. The Shipify Web application contains some order processing
logic, but it’s not a full order processing application. Its
purpose is to demonstrate how you can integrate your Web applications
with the Salesforce1 app.
Shipify is a Node.js application that runs on Heroku. Each running instance of the application must reference the consumer secret for the connected app that you create in your organization. Therefore, you’ll need to have your own instance of Shipify on Heroku that you can then add as a canvas app. In this step, we’ll clone the application, which is the first step in the process.
- Open a command window and navigate to the directory where
you want to download Shipify. When you clone the application, it will
create a directory called Shipify-Node-App from
wherever you run the clone command.
- From a computer running Windows, open a command window by clicking and entering in cmd.
- From a computer running Mac OS, open a command window by pressing Command + Space and entering terminal.
- Enter this command: git clone https://github.com/forcedotcom/Shipify-Node-App
- Navigate to the Shipify-Node-App directory and enter this command to initialize the repository: git init
- Enter this command to get the files ready to commit: git add —A
- Enter this command to commit the changes along with a comment: git commit —m 'MyChangeComments' If you’re working from a Windows computer, you may need to replace the single quotes with double quotes (").
- Enter this command to log in to Heroku: heroku login When prompted, enter your email and password.
- Enter this command to create a new Heroku app: heroku apps:create Confirmation
that the app was created looks like this:
1Creating deep-samurai-7923... done, stack is cedar 2http://deep-samurai-7923.herokuapp.com/ | git@heroku.com:deep-samurai-7923.git 3Git remote heroku added - Copy the URL of the Heroku app because we’ll use it in the next task. In this example, the URL is http://deep-samurai-7923.herokuapp.com, but you’ll want to copy the URL of your own Heroku app. We’ve created the Shipify Web application in Heroku, but it won’t work yet because we still need to deploy it, which we’ll do in a later step.
The next step is to add it as a canvas app in Salesforce.