1. Home
  2. Docs
  3. Other integrations
  4. Salesforce app
  5. Salesforce app deployment guide

Salesforce app deployment guide

The Nuvias UC development team have created a Salesforce plugin which can be used by any of our customers with Hub access to provide integration between Salesforce and Nuvias’ systems. The plugin provides:

  • Product feed from Nuvias including product names, descriptions, SKU and your purchase price, all updated daily
  • Mechanism to allow you to create a trigger to send us an Order directly
  • Order status retrieval

Through this integration, your teams don’t need to leave Salesforce to place the orders with us.

What do you need?

To use this integration you will need:

  • A Salesforce account – we can integrate into almost any Salesforce configuration whether you’ve built your own custom functionality or use a standard module like Salesforce CPQ.
  • A Hub account – if you don’t have one already, ask your account manager. Nuvias Hub access is available to all customers and is completely free!
  • An understanding of how to customise Salesforce including some knowledge of creating triggers using Apex

We’ve tried to make the integration as simple as possible and to minimise the technical knowledge you need to integrate with us, but there are a few things you’ll need to do. We’re happy to work with any Salesforce consultant or developer to explain how our integration works if you already work with one.

Installation

Our plugin is available on the Salesforce app store (just search for Nuvias) or you can use the URLs below. We have two versions available – a sandbox version which you can install in your Salesforce Sandbox for testing the integration and a production version to use in your live Salesforce Production account. We always roll out changes to sandbox first to allow you to run your own testing. Note that the sandbox version doesn’t connect to our live systems so if you want to use it, you’ll need to ask for a Hub Sandbox account. Although the data may be slightly different, the code we run on both systems is the same.

For sandbox installs, the installation URL is
https://test.salesforce.com/packaging/installPackage.apexp?p0=04t0N0000013ivu

For production installs, the installation URL is:
https://login.salesforce.com/packaging/installPackage.apexp?p0=04t0N0000013ivz

Our app uses Picklists to set Countries in addresses which helps to reduce errors in shipping. Picklists aren’t enabled by default on new Salesforce accounts, but are already enabled by most customers. See https://help.salesforce.com/articleView?id=admin_state_country_picklists_overview.htm&type=5 for more information.

Setting permissions

Once the Nuvias UC Hub package is installed in Salesforce, the next step is set permissions for access to the data imported by the app. As part of our Secure by Default principles, following installation, no-one has access to the data. Any permissions must be explicitly granted.

Firstly, you need to set the application settings. This is available on the main Setup Page, Platform Tools → Apps → App Manager, and then click Edit next to the Nuvias Hub app.

In this case we have only assigned it to the System Administrator profile.

Next you will need to assign which profiles can edit the Hub Settings page. On the main Setup page this is located under Administration → Users → Profiles. Select the relevant profile and then edit both Object Settings and Visualforce Page Access as below.

The profile should be given access to the Hub Shipping Types custom object, and the NuviasUC.HubSettings Visualforce page.

Hub Settings

Once this is done, the Nuvias Hub application should be visible in the app launcher. Entering this the user should then see the Hub Settings tab.
First up is the Authentication Settings:

We have two API addresses available for your use. For testing, you should use https://hub-api.staging.siphonnetworks.com which uses a database that isn’t connected to our live services. Access to our staging environment isn’t available by default, so you’ll need to contact us so that we can set up an account for you.

For access to the live Hub API, use https://hub-api.siphonnetworks.com.

The API token is generated from within Hub under your organisation settings – you will need to assign read/write access. Note that Hub has two places you can generate API keys – for the Salesforce plugin, you create the API key on your Organisation. If you’re in Hub looking at your user profile and you see “client id”, this is the wrong API key. The per-user keys are used for our REST API for Hub which uses OAuth authentication.

Once you’ve entered these details in Salesforce, click to save the authentication settings and then move on to mapping.

As you can see, this is a long list of fields that need to be mapped back to Hub. The Hub integration is designed to be as flexible as possible, but in order to do so a wide range of fields will need to be created on your order object. The type of the required field is in brackets next to the field name. Countries must be provided from a list of ISO country codes, Salesforce makes this available for address fields or as a separate field picklist. Further details are available here: https://help.salesforce.com/articleView?id=admin_state_country_picklists_overview.htm&type=5.

The integration will also allow a field on a linked record to be used, as demonstrated by the Product field on the Order Items relationship. Where this is the case the name of the linked record will be provided followed by the field. E.g. Account ID – Account Name.

Once the mapping is set up as you require, save and then synchronise the product catalogue. This will immediately pull the product catalogue in from Hub into the linked item. This sync is one way, and any changes made to the linked fields will be overwritten by the sync from Hub. This occurs daily.

Defining a trigger

The last step is to define a trigger for Salesforce to send orders into Hub. These is defined on your Order object and requires working knowledge of Apex and Triggers. A very basic example trigger is below:

trigger CreateOrderInHub on Order (after update) {  
  if(System.isFuture()) { 
    return; 
  } 
  for(Id i: Trigger.newMap.keySet()) { 
    OrderCreator.createOrder(i); 
  } 
}

The key part of this trigger is OrderCreator.createOrder(i) where i is the Id of the Order (not the Order itself) as createOrder() is a @future method so is fired asynchronously. This is also the purpose of the System.isFuture() check in this trigger to ensure that it does not cause an infinite loop on save, as the OrderCreator also modifies the order to sync the Hub ID of the order onto the record. The OrderCreator will not attempt to submit the order into Hub if the Hub ID field is already populated, as this indicates a linked order already exists in Hub.

This is a very basic trigger that will attempt to submit the order on every save – you will want to modify this trigger to only send the order to Hub when it meets your workflow requirements and business process. Note that once the order is sent to Hub, we’ll begin processing the order straight away so that we can ship the order as quickly as possible for you.

Other things you need to know

When you place an order with us, we’ll process the order as you’ve submitted it. For example, if you want your devices configured, you need to include the right product lines on the order such as basic provisioning (UD-SIP-SER-PRV-PH) or Dovetail (e.g. CS-SIP-DVT-DEV-NEW or CS-SIP-DVT-DEV-NEW-SFB). You may also need to provide instructions in the Provisioning Instructions field for our team when fulfilling the order. If you want to check specifically you need to add, give us a shout and we can explain it to you.

It doesn’t matter if you use Salesforce Lightning or Salesforce Classic – our app will work with both, although the configuration page was written to work in Salesforce Classic so will look like the Classic user interface, not the Lightning user interface.

Getting Help

Integration of Hub in your Salesforce instance requires a knowledge of app deployment and a working knowledge of Apex and customising Salesforce. For help on customising Salesforce, Apex or other aspects of integrating the Hub app into your Salesforce instance, please contact Salesforce Support or your Salesforce developer or consultant. Nuvias doesn’t provide Salesforce consultancy but we’re happy to work with your consultants or developers to help with any questions they might have.

If you experience an issue with the API itself you should see errors in the status field of the order. Please contact us in these instances and we will assist you in resolving the issue.

Was this article helpful to you? Yes No

How can we help?