Monday, May 25, 2020
There has been a consistent increase in subscription based organizations being a part of the larger shift from the product based economy to the subscription economy. Organizations are now required to handle pricing, customer loyalty and selling...
We have put forward a list of 28 steps that can help to increase eCommerce sales and traffic. This is the third of the series, in which we will be showcasing 7 tips. You can check out...
Hawke Media is making waves as our first partner offering full Ecommerce CRM Life-cycle Services. Take a look at what they’re up to and the headaches they’re solving for ecommerce brands today.

Technology rules the world. With time and advancement, it makes the business sector to adopt the changes to stay ahead in the throat-cut competitive world. E-commerce technology trends have a significant impact on online shopping. It will continue to have the influence of new technology, new consumer demands, and the constant shift from desktop to […]

The post 5 E-commerce Technology Trends That Will Shape The Future appeared first on MoEngage Journal.

Dallas, TX – Lead Liaison announced this week that they have enhanced their Pipedrive CRM integration capabilities. Pipedrive is the first platform developed from the salesperson’s point of view. Pipedrive’s goal is to make sales success inevitable – for individual sales people and teams. Lead Liaison offers a suite of sales solutions including event lead capture, marketing automation, and sales […]

The post Event Lead Capture and Management That Integrates with Pipedrive appeared first on Lead Liaison.

The fifth annual State of Marketing report provides insights from 4100 leading global marketers on strategic priorities, challenges, trends and technologies. Here are the highlights. In the five years since we released the first State of Marketing repo...

Building a Virtual Machine using the Azure CLI is a skill that can bring your idea beyond the desktop and into the cloud. In this tutorial, we will walk through how to set up an Ubuntu Virtual Machine using the Azure CLI and send a Twilio SIM Command using Node.js. This post assumes that you have a basic understanding of how to set up a Twilio SIM and use the Commands API. If you are new to this concept check out the Commands API documentation and this example on how to send machine-to-machine Commands with the Twilio SIM. More TwilioIoT projects can be found, along with this one, on GitHub.

Overview

  • Sign up for a free tier Azure account
  • Install Azure CLI
  • Create a new Virtual Machine
  • Installing Node.js, npm & Twilio

Workflow

Azure Virtual Machine + Commands API + Node.js

Requirements

Sign up for a Free Tier Azure account

For this project, we will need an Azure account. Navigate to the Microsoft Azure website and set up a Free Tier account. We will be able to use this account to set up our first Virtual Machine. Instead of using the web interface to set up the Virtual Machine we will do it using the Azure CLI.

twilioazurenode-01.gif

Install Azure CLI

Azure CLI is a command-line tool that enables a user to create scripts for managing various Azure resources. From the terminal, we can streamline the creation of different Azure operations such as a new Virtual Machine.

After installing the command-line tool, we need to log into Azure using the command-line.

az login

The login process will open a new browser window and will ask for the Microsoft account credentials from the new account. If you haven’t created a Microsoft Azure account, this is the time to create a new one. Once the credentials are verified, you will be directed to the terminal again. A successful login will redirect you back to the terminal.

twilioazurenode-clilogin.png

Create a new Ubuntu Virtual Machine

twilioazurenode-02.gif

Start by creating a new resource group. A resource group is a collection of assets in logical groups that enables a user to easily provision, access, and monitor services in the Azure ecosystem. A single resource group can contain several Azure services simultaneously. In this case, we will first need to create a resource group in a specific region where our services will exist. We'll use the `az group create` command passing two options as flags:

  • `--location`: The location of the Virtual Machine.
  • `--name`: User-defined virtual machine name.
  • `RESOURCE_NAME`: User-defined resource name.

az group create --location westus --name RESOURCE_NAME

twilioazurenode-createresource.png

If you happen to get a `subscription not found error` log out of the Microsoft Azure account, close the browser, then log into the Azure CLI again using `az login`.

After creating the resource group, we can create a new Virtual Machine with the command `az vm create`. In this example, we want to create a VM based using an Ubuntu LTS image. We will also need to add a custom admin-name for when we want to log into the VM. One of the most important steps is to generate ssh keys. Lastly, add generate-ssh-keys so we can securely SSH into the VM. The flags we'll set for this command are:

  • `--resource-group`: A group of Azure services.
  • `--name`: User-defined virtual machine name.
  • `--image`: The image type for the Virtual Machine. (i.e., UbuntuTLS)
  • `--admin-username`: User-defined admin name.
  • `--generate-ssh-keys`: Automatically generate SSH keys.

twilioazurenode-createvm.png

Take note of the publicIpAddress, this will be needed to SSH into the newly created VM.

In the terminal type in the following line of code and add in the necessary details. Replace “AZURE_USERNAME” with the admin-username and replace “PUBLIC_IP_ADDRESS” with the publicIpAddress acquired in the previous step.

```bash

ssh AZURE_USERNAME@PUBLIC_IP_ADDRESS

```

Press enter. If prompted with “Are you sure you want to continue connecting (yes/no)?” type in yes.

twilioazurenode-ssh.png

Success!

Installing Node.js, npm & Twilio

It’s time to create an installation Bash script using the command-line interface. The purpose of the program is to automate the creation of a new directory, install dependencies into the new directory and generate a .js file called sendcommand.js. When run, the .js file will send a new Command to a Twilio SIM using the Commands API.

twilioazurenode-03.gif

Start by creating a new bash file.

nano setup.sh

Copy and paste the following code into the setup.sh file.

#!/bin/bash
mkdir commands
cd commands
sudo apt-get install nodejs
sudo apt-get install npmnpm i twilio
touch sendcommand.js
echo "
const accountSid = 'TWILIO_SID';
const authToken = 'TWILIO_AUTH';
const client = require('twilio')(accountSid, authToken);
client.wireless.commands
          .create({sim: 'TWILIO_SIM', command: 'wakeup'})

          .then(command => console.log(command.sid))
" >> sendcommand.js

The program first creates a new directory and then changes the current directory of the command-line interface to the new directory.

mkdir commands
cd commands

Then it installs the libraries nodejs and npm using apt-get. Then we install the twilio library for Node.js.

sudo apt-get install nodejs
sudo apt-get install npm
npm i twilio

Generate a new .js file using touch.

touch sendcommand.js

Using echo, we will write the following code to the sendcommand.js file. Add the Node.js example for sending a Command to a Twilio SIM and replace the `TWILIO_SID` and `TWILIO_AUTH` with your credentials. Also, add the name of the sim used in the project where it says `TWILIO_SIM`. Then use the >> to write the following script to the sendcommand.js file after adding these details save the file and exit.  

echo "
const accountSid = 'TWILIO_SID';
const authToken = 'TWILIO_AUTH';
const client = require('twilio')(accountSid, authToken);
client.wireless.commands
         .create({sim: 'TWILIO_SIM', command: 'Hello from Azure!'})
         .then(command => console.log(command.sid))

" >> sendcommand.js

Make it an executable using chmod.

chmod +x setup.sh

Run the executable to start the installation process.

./setup.sh

Run the Node.js script.

node sendcommand.js

Navigate to the Programmable Wireless section of the Twilio Console and click the SIMs tab.

twilioazurenode-pw.png

Find the registered SIM and click on the link.

twilioazurenode-SIM.png

Find the Commands tab.

twilioazurenode-receivedcommand.png

We just sent a Command to a Twilio SIM from an Azure Virtual Machine and is currently queued. The data is waiting to be received by a piece of hardware that is connected to a cellular network using the Twilio SIM. In the next post, we will walk through how to collect the data from Azure and control an operation remotely.

twilioazurenode-04.gif

Summary

Using the Azure CLI is a great way to streamline Virtual Machine development and learn how to expand the potential of your project Twilio IoT. The workflow from this project is an example of how to integrate the Twilio SIM with Azure. Having the ability to connect various Azure services with cellular IoT makes new interconnective global experiences possible. Run with it and experiment.

We can’t wait to see what you build with #TwilioIoT.

If you ever want to chat about IoT, hardware or modular synthesizers ping me anytime on Twitter or via Email. Let’s connect.

As 2019 moves forward, retailers are finally starting to see some of the practices and technologies they lined up last year roll out. And with these updates, they’re also learning

The post Why 2019 Will be the Year of Recapturing the ‘Joy of Shopping’ appeared first on RichRelevance.

CRM Software Trends from 2018 and Whats in Store for 2019 By Jake Michaels Customer Relationship Management (CRM) software has been on the rise for years, moving from 17 billion dollars in reven

Abandoned cartWith e-commerce sales expected to increase to $4.479 trillion by the end of 2021, it’s no secret that consumers are making more and more purchases online. Is your business driving the online sales you’d like? To turn your online store into a business-boosting channel, you need to do more than…

The post Introducing Constant Contact’s Official Shopify App Now with Abandoned Cart Emails appeared first on Constant Contact Blogs.

FOLLOW US

586FansLike
6FollowersFollow
- Advertisement -

RECENT POSTS