Before you Begin

Please read this before starting out with Priority’s REST API and Web SDK

Introduction

Over the past couple of releases, we’ve been incredibly busy adding new tools that empower developers to create cool applications and integrations with Priority. It’s exciting to see how our innovative customers and partners use these tools in ways that we never could have imagined.

While working with these developers, we’ve gained insights into the most common pitfalls that developers encounter when getting started with these tools. Therefore, we’ve put together a checklist of items to review before you begin a development project that involves these tools.

Understand the capabilities of the two tools and the differences between them

There are two tools you can use in order to interact programmatically with Priority entities. The REST API is designed for creating integrations between Priority and other systems while the Web SDK is great for creating mobile apps and websites that talk to Priority. Here’s a list of capabilities that are common to both tools:

The differences between the tools are outlined in the following table:

  REST API Web SDK
Primary use Integration - App 2 App Specialized UI/UX for Business Logic
Access to the values returned by Choose/Search triggers Not supported Supported
Activation of procedures and reports Not supported Supported
Triggers Full row inputted at once, so both field and row triggers fire at the same time Apply at field level, and then row level
Uploading attachments Not supported Supported
Programming language Any programming language that provides a HTTP client JavaScript only
Standards compliance OData specification -
Released in Priority version Read only v. 17.1, read and write v. 17.2 v 18.0

Make sure you have the relevant skills

Both tools require basic programming skills in order to use them correctly. In addition:

For REST API:

For SDK:

Help! I’m trying to use the SDK/REST API but my browser is giving me an error about CORS. What should I do?

Browsers block cross origin requests, that is how the Internet is designed. See here for more information. If this is a problem for you, you can do one of the following:

  1. Host your code in the same domain as the Priority server.
  2. Configure CORS on the server.
  3. Host your application logic in your own server running with node.js.

Options 1 or 2 are relevant only if you control all of the Priority servers that your application will access - now and in the future. If this is not the case, #3 is your best bet.

Configure your Priority environment correctly

Understand the underlying Priority entities

If you have made it to here, you are nearly ready to begin your project and programmatically interact with some cool Priority entities! However, before you get started, you need to understand how these entities work. Specifically, you need to know:

Keep your business logic on the server

As your application grows in complexity, you might be tempted to implement business logic on the application side. Resist this temptation if you can. The correct place for your application’s business logic is on the server, within the Priority form triggers and procedures. Doing so will also create additional opportunities for code reuse both inside the Priority UI and in future additional applications. On the other hand, implementing business logic on the app side will add needless complexity to the application.

Don’t forget security

If you are exposing your Priority installation to the outside world, please make sure that you take all of the necessary precautions to keep your precious business data safe.

Consult with security experts!

Ask questions

We love answering questions related to these tools on StackOverflow. Go ahead and post your questions there, and tag them with the dedicated tag priority-web-sdk.

Priority on Github

You’re more than welcome to check out our Github repositories. We have code samples with examples of how to use the Web SDK, and even an entire package based on the SDK that can be used for building mobile applications.

Develop great stuff!

With all of that out of the way, we wish you much success with your project. Keep in mind that for a great user experience, you should probably involve a UX expert in the design of your interface. Finally, we love hearing about the cool projects that use these tools, so please – let us know!