Tag Archives: salesforce

Back to blog home page

Integrate Your Backand App with SalesforceIQ

Posted by on May 10, 2017

Building and maintaining customer relationships is crucial for driving sales to your platform. However, it can also be a complex process requiring integrating data from multiple sources and, more importantly, ensuring that data is accessible when it is needed. In our last post we examined Integrating with Salesforce CRM. In this article, we’ll look at integrating a Backand application with the popular SalesforceIQ platform, providing you with all of the tools you need to effectively leverage your customer data in your Backand application.

What is SalesforceIQ?

SalesforceIQ is an out-of-the-box CRM solution that quickly gives you access to dynamic information tied into a full CRM solution. With Automatic Data Capture and enterprise-level intelligence under the hood, SalesforceIQ acts like your own personal assistant so you can focus on what matters most: selling. SalesforceIQ, in addition to providing easy integrations with tools like Google and Microsoft Exchange, also gives you the capability to dynamically access and manage your data through a series of robust APIs.

Use Cases for Custom Integrations

SalesforceIQ is a powerful tool, but that power needs to be available to your developers and sales organization if it is going to be useful. While SalesforceIQ offers some mobile functionality, performing deeper integrations with your organization’s data will require some development work to effectively leverage your leads. Below are a few sample use-cases that can be executed while using Backand to drive an integration with SalesforceIQ:

  • You can use real-time communications to push notifications to your sales people via your mobile app
  • You can integrate SalesforceIQ with other internal systems, like HR, Ops, or internal tracking and monitoring
  • You can use SalesforceIQ with a custom database, to increase productivity by easily consolidating all of your relevant customer data into a single location
  • You can integrate SalesforceIQ with customer-facing applications, collecting and updating data from sales leads in real time

Connecting a Backand application to SalesforceIQ

Integrating Backand and SalesforceIQ is as simple as leveraging the full-featured API provided by Salesforce from within your Backand application. While traditionally you’d need to make these calls to the API from a server, you can achieve the same functionality in Backand by using our custom template action. This action provides an easy-to-use code template for making calls to the SalesforceIQ API, letting you update your user tracking data based upon user activity in your Backand app, or even update your Backand app’s UI based on what you know about your user in SalesforceIQ.

Working with the SalesforceIQ API provides you with full capabilities to create, retrieve, and update data on your users, as well as manage their information in SalesforceIQ. Communicating with their API is as simple as translating the cURL commands provided by Salesforce in their documentation into the appropriate $http calls that you can make from JavaScript. Simply provide the required authentication and identification headers, construct the URL, make the call, and handle the response when it arrives, dispatching it either directly to your application via a synchronous function call return, or emitting the data as an event using our Socket-based real-time communications functionality.

The Salesforce Action Template

We have created an action template that will give you jump start with SalesforceIQ. You can either trigger this action from an object’s database transaction event actions or create a new on-demand action that you can call from your app’s client code. The following JavaScript is provided by the template action, which is available as “SalesforceIQ” in the “CRM & ERP” section of action templates.

This code provides you with all of the basic tools you need to get connected to the SalesforceIQ API. It takes in your SalesforceIQ API Key and API Secret, and performs a call to the “/accounts” endpoint to fetch accounts.

Connecting to your SalesforceIQ account

To connect to SalesforceIQ, you’ll first need to register for an account if you haven’t done so. Once you’ve signed up, follow these steps to obtain your API Key and API Secret:

1. Open Settings under the gear icon
2. Open the ‘Integration’ tab under ‘My Account Settings’
3. Under ‘Create New Custom Integration,’ click ‘Custom’
4. Set the name to ‘Backand API,’ and provide a description
5. Copy the ‘API Key’ and ‘API Secret’ from the integration page into the JavaScript Action code
6. Click ‘Save’

When this is completed, you should now be able to access all of your SalesforceIQ accounts from the custom JavaScript action.

Setup client-side code

Once you’ve configured the action to connect to SalesforceIQ, you’ll need to call the action from your client-side code. To do so, use the following JavaScript to construct a GET request and trigger your SalesforceIQ action:

Simply replace ‘your object name’ with the object that contains your SalesforceIQ custom action, and replace ‘your action name’ with the name of the action that you provided while creating the integration.

With these changes, you’re now able to pull in any and all SalesforceIQ accounts available via their API! You can use a similar pattern to construct additional calls to the SalesforceIQ API – simply replace the URL and parameters in the custom SalesforceIQ action with the URL and parameters for the object you want to retrieve.

Adapting for AWS Lambda

For operations that have significant security concerns, or that represent complex business logic centered around an integration with Salesforce, it may benefit you to implement your Salesforce CRM integration as an AWS Lambda function using Backand’s Node.JS AWS Lambda server-side functions. You can even use most of the code we’ve already supplied, we simply need to modify the method we use to send HTTP requests to Salesforce to use a method compatible with Node.JS. Node implements HTTP communications using the ‘http’ module, which will need to be included. Once the module is ready, converting the code above is very straightforward. Take the HTTP request lines, provided below:

And replace these lines with the Node.JS equivalent:

You’ll need to provide a callback function that handles the response data. As the format of this function will depend heavily on your app’s data, we’ve left this blank in this post.

Conclusion

CRM software is only useful if it can be aware of activity on all of your organization’s customer touchpoints. By integrating your Backand app with Salesforce IQ, you can now incorporate your in-house and public web and mobile applications with the Salesforce IQ API, providing you valuable data on customer actions and behavior, while giving you more tools to gauge the success of your outreach efforts. You’re now free to truly customize your sales funnel and marketing efforts to take advantage of actual user behavior within your Backand-powered applications.

Back to blog home page

Integrate Your Backand App with Salesforce to Leverage Customer Data

Posted by on Apr 13, 2017

Building and maintaining customer relationships is crucial for driving sales to your platform. However, it can also be a complex process requiring integrating data from multiple sources and, more importantly, ensuring that data is accessible when it is needed. In this article, we’ll look at integrating a Backand application with the popular Salesforce CRM platform, providing you with all of the tools you need to effectively leverage your customer data in your Backand application.

In our next post, we’ll be discussing similar integration with the SalesforceIQ product.

Use Cases for Custom Integrations with Salesforce CRM

Salesforce CRM is a powerful tool, and it needs data streams to thrive and bring value to an organization. With Backand, you can integrate Salesforce CRM into your organization’s tech stack, allowing your sales organization to more effectively leverage your leads. Below are a few examples of use-cases that can leverage Backand to drive an integration with Salesforce CRM:

  • You can use real-time communications to push notifications to your sales people via your mobile app
  • You can integrate Salesforce.com with other internal systems, like HR, Ops, or internal tracking and monitoring
  • You can use Salesforce.com with a custom database, to increase productivity by easily consolidating all of your relevant customer data into a single location
  • You can integrate Salesforce.com with customer-facing applications, collecting and updating data from sales leads in real time

Connecting to Salesforce CRM

Integrating Backand and Salesforce CRM is as simple as leveraging the full-featured REST API provided by Salesforce from within your Backand application. While traditionally you’d need to make these calls to the API from a server, you can achieve the same functionality in Backand by using our custom template action. This action provides an easy-to-use code template for making calls to the Salesforce REST API, letting you update your user tracking data based upon user activity in your Backand app, or even update your Backand app’s UI based upon what you know about your user in Salesforce.

The Salesforce CRM Action Template

We have created an action template that will give you jump start with Salesforce CRM. You can either trigger this action with an object’s CRUD event handler, or call it on-demand from your client code. The following is the content of the ready action template call
Salesforce CRM under the CRM & ERP section:

The above code fetches the access token every time you call the action. You can improve the performance of this call by caching the token into a Backand Server-Side Cookie, and only performing the retrieval when the token has expired.

Setup access and get client and secret keys

Follow these steps to obtain your Salesforce CRM authentication information:

  1. Sign in to Salesforce CRM as a user with Admin rights
  2. Open Setup, found under the gear icon
  3. Open App Manager
  4. Click on New Connected App
  5. Provide Connected App Name, API Name, and Contact Email
  6. Check Enable OAuth Settings
    1. Check Enable for Device Flow
    2. Under Selected OAuth Scopes, select Full Access (or any other permissions you need)
  7. Click Save
  8. Copy Consumer Key into the client variable in the code
  9. Copy Consumer Secret into the secret variable in the code

Once you’ve obtained the consumer key and the consumer secret, you’ll need to enable server-side security in Salesforce. To do so, follow these steps:

  1. From App Manager, select your new App and Click Manage
  2. Click Edit Policies
  3. Change IP Relaxation to Relax IP Restriction, or add Backand’s IP to your organization’s IP restrictions
  4. Change Timeout Value to 24 hours
  5. Click Save

With that completed, you should now have full access to your CRM objects using the Salesforce REST API.

Setup client-side code

Once you’ve configured the action to connect to Salesforce, you’ll need to call the action from your client-side code. To do so, use the following JavaScript to construct a GET request and trigger your Salesforce action:

Simply replace ‘your object name’ with the object that contains your Salesforce custom action, and replace ‘your action name’ with the name of the action that you provided while creating the integration.

With these changes, you’re now able to pull in any and all Salesforce accounts available via their API! You can use a similar pattern to construct additional calls to the Salesforce API – simply replace the URL and parameters in the custom SalesforceCRM action with the URL and parameters for the object you want to retrieve.

Adapting for AWS Lambda

For operations that have significant security concerns, or that represent complex business logic centered around an integration with Salesforce, it may benefit you to implement your Salesforce CRM integration as an AWS Lambda function using Backand’s Node.JS AWS Lambda server-side functions. You can even use most of the code we’ve already supplied, we simply need to modify the method we use to send HTTP requests to Salesforce to use a method compatible with Node.JS. Node implements HTTP communications using the ‘http’ module, which will need to be included. Once the module is ready, converting the code above is very straightforward. Take the HTTP request lines, provided below:

And replace these lines with the Node.JS equivalent:

You’ll need to provide a callback function that handles the response data. As the format of this function will depend heavily on your app’s data, we’ve left this blank in this post. You’ll also need to use the same pattern of sending a Node HTTP request when obtaining the accessToken from Salesforce – simply make the appropriate changes to the $http call that obtains the access token, and you are ready to go.

Conclusion

Salesforce, as the world leader in CRM solutions, is used by thousands of companies around the world. This integration guide covered integrating Backand with your Salesforce installation, allowing you access to all of your customer and user insights. By leveraging the instructions above, you can modify your Backand application to interface directly with your organization’s CRM information, giving you true flexibility to provide unique internal and external application experiences without losing any data fidelity.