Deep Dive

Prev Next

What is App Platform?

Gladly App Platform is a framework that enables seamless integration between Gladly and external systems (like Order Management Systems, CRMs, or subscription platforms). The platform is designed to be configuration-driven, making apps easier to understand, modify, and validate. It allows developers to define integrations primarily through configuration files, templates, and GraphQL schemas, rather than requiring them to build and host separate middleware.  The appcfg command-line tool is an integral part of this platform, empowering developers to efficiently initialize, test, validate, and package their applications.

What is an App?

An App is a specific integration developed using the Gladly App Platform. The core purpose of an App is to define how data from the external system is retrieved and displayed and how it can be interacted with. To utilize an app, it must be installed and configured in your Gladly environment. Gladly offers a set of open-source OOTB apps that can be found here app-platform-examples. Customers can install them directly or adapt them to their needs.

Data Pulls: Extending the Customer

Data Pulls are the mechanism for bringing contextual information from your external systems into Gladly and associating it with the Customer Profile. This lets you access crucial information like recent orders, loyalty tier, or specific product details from your Order Management System (OMS) directly within Gladly. Data Pulls guarantee that the data can be accessed consistently in different parts of Gladly.

Actions: Enabling Tasks within Gladly

Actions empower customers (via Sidekick) to perform specific tasks or operations in your external systems without leaving the Gladly interface. This could include canceling an order, processing a return, or updating shipping details in your OMS. Actions streamline workflows and reduce context switching.

Cards: Defining how data is Displayed within Gladly

Cards define how data from Data Pulls is rendered. Currently Cards are available in Customer Profile and Gladly App.

What is appcfg?

The appcfg command-line interface is a fundamental tool within the Gladly App Platform. It features powerful autocomplete for suggesting commands and dynamically constructing them for your specific App, along with a comprehensive --help flag for detailed explanations of any command. appcfg supports the entire development lifecycle: it initializes the basic App folder structure and manifest.json (appcfg init); scaffolds necessary files for new actions or data pulls (appcfg add action, appcfg add data-pull); validates configuration files and templates for correctness (appcfg validate); facilitates testing of individual components against test data or live APIs (appcfg test, appcfg run); packages the App for deployment (appcfg build); and assists with installation and configuration (appcfg install/config).

appcfg is designed not only for building Apps but also for enhancing developer discovery and learning. You can access help docs by appending -h to any command.

What is GraphQL?

GraphQL is a query language for APIs and a runtime for executing those queries with existing data. At its core, GraphQL defines a schema that describes the capabilities of the API, including types of data and operations that can be performed. Clients can then send queries to the server specifying the exact data they require, and the server responds with JSON data matching the structure of the query. GraphQL supports introspection, allowing clients to dynamically discover the schema and explore available queries and types. With its declarative nature and strong typing, GraphQL promotes efficient communication between clients and servers, enabling more predictable and maintainable API interactions.

Apps use GraphQL schemas to describe the type signatures of requests and responses. Gladly uses these types of signatures to determine how to display Actions and data within the product user interface. Thanks to the use of GraphQL Apps can efficiently retrieve only necessary data, ensuring structured and manageable integrations.

Sample GraphQL type definition for a simple order

type Order {
    orderId: String
    orderDate: DateTime
}

Visit Introduction to GraphQL for GraphQL references.

What is Go Templating?

The Go Templating language is a powerful tool for generating textual output. It allows you to create dynamic content by embedding logic directly within template files. Templates contain text interspersed with "actions" that control the template's logic. These actions range from simple variable substitutions to more complex control structures like conditionals and loops.

Apps use the Go template language to dynamically generate URLs, headers, bodies, and HTTP requests.

A sample Go template for retrieving Customer order data by email address

https://externalsystem.com/orders?customerEmailAddress=
{{.customer.primaryEmailAddress}}

In this template, the relevant Customer Profile data is provided to the template via the .customer attribute, and the primary email address is accessed using the {{.customer.primaryEmailAddress}} go template syntax. This will be explained in greater detail in a subsequent section of this document.

Go template references

Where to learn more about templating language

Run appcfg platform template-language to learn more about the templating language, and appcfg platform template-functions to find out what functions are available.

Semantic versioning

Gladly Apps use semantic versioning. Providing versions for key portions of your configuration lets Gladly know the current state of your application and when it evolves. The goal is to always make backward-compatible changes to your app whenever possible so that everything keeps working in Gladly as your app evolves.

Visit https://semver.org/ for semantic versioning references.