Glyue User Docs
  • What is Glyue?
  • Tutorials
    • Start Here
    • Building a Single-Step Integration
      • 1. Creating the Integration
      • 2. Calling the External System
      • 3. Running the Integration
      • 4. Crafting the Output
    • Building a Multi-System Integration
      • 1. Connecting to the Core
      • 2. Field Mapping
      • 3. Running the Integration
    • Building an Event-Driven Integration
      • 1. Setting up the Mock CRM
      • 2. Receiving Inbound Requests
      • 3. Triggering the Integration from the CRM
    • Building an Email Integration
      • 1. Create and Configure the Integration
      • 2. Input Validation
      • 3. Get Story IDs from Hacker News
      • 4. Get Story Content
      • 5. Sending the Email
      • 6. Wrapping Up
      • 7. Extra credit
        • extra_credit.json
    • Building a RESTful CRUD Web Service
      • 1. Integration Setup
      • 2. Vault Setup
      • 3. Create Web Service Endpoints
      • 4. Execute Web Service Endpoints with Vault Methods
      • 5. Vault Code Examples and Explanation
    • Building a Retrieval API against FIS CodeConnect
      • 1. Integration Setup
      • 2. Service Request Setup
      • 3. Field Mapping Setup
      • 4. Integration and Service Request Hook Setup
      • 5. Testing the Integration
      • 6. Common Errors
    • What is Pre-Mapping?
      • Before you start
      • Bookmarks
      • Source and Targets
      • Field Mapping Status
      • Field Mapping Comments
      • Summary
  • How-To Guides
    • How to Run an Integration from Glyue
    • How to Invite New Users
    • How to Create a Value Mapping Set
    • How to Build and Deploy a Custom Frontend
    • How to Migrate an Integration
    • How to Set Up Single Sign On (SSO)
      • Glyue Setup
      • JumpCloud Setup
      • Azure Setup
      • Okta Setup
      • Glyue SAML Config Reference
    • How to Install the Glyue App for Zoom Contact Center
    • How to use the Vault
  • Reference
    • Integration Builder Page
    • Integration Anatomy
    • Integration Components
      • Integration
      • Service Request
      • Field Mapping
      • Value Mapping Set
      • Value Mapping
      • Validation Rule
      • Mask
      • Integration Config
      • Integration Engine Versions
    • Integration Lifecycle
    • Special Functions
      • add_run_label
      • callint
      • debug
      • end
      • get_namespace
      • humanize
      • import_helper
      • keep
      • list_files
      • map_value
      • open_glyuefile
      • open_vault
      • Data Manipulation Utilities
      • calladapter
    • Special Variables
      • __adapter_config__
      • input
      • parentint
      • retvalue
      • run_history_id
      • Iterables
        • fitem/fidx
        • sritem/sridx
        • vritem/vridx/vrmsg
    • Adapters
      • Generic HTTP Adapter
      • Email SMTP Adapter
    • Web Service Endpoints
    • Vault Reference
  • Glyue Platform Reference
    • Banking Core Connectivity Guide
    • Authentication
    • Permissions
      • Service Accounts
      • Organizations
    • Frontends
    • Idempotency Layer
    • Integration Scheduler
    • Governance Reports
    • Arbitrary Integration Request Content Support
    • Admin Components
    • Logging
  • ETL
    • Glyue ETL Overview
    • Data Connectors
    • Workflows
    • Run History
    • Scheduler
Powered by GitBook
On this page
  • Integration Components
  • Integrations
  • Input: Request body provided to the integration
  • Output: Integration response
  • Service Requests
  • Field Mappings
  • Value Mapping Sets
  • Value Mappings
  • Validation Rules
  • Masks
  • Run History

Was this helpful?

  1. Reference

Integration Anatomy

Breakdown of the internal logic for an integration

PreviousIntegration Builder PageNextIntegration Components

Last updated 8 months ago

Was this helpful?

Integration Components

Integrations provide the wrapper for a set of composable logic with which to connect external systems.

Integrations

Input: Request body provided to the integration

Inputs begin with the request, but can be mutated throughout the life of the integration. For example, the before_hook can set additional variables on the input.payload. Inputs are also deeply integrated with Validation Rules, Masks, and can even be used with Value Mappings.

Output: Integration response

Integration outputs can be mutated throughout the life of the integration.

Integration outputs are often overwritten within calls to the service request. The on_success_hook, on_failure_hook, and the finally_hook are the most appropriate places to update the output.

Integration outputs are useful for error handling as well as returning specific payloads or status to calling systems.

Asynchronous integrations are a unique case and return an output immediately marking the start of the integration process. Required outputs to corresponding systems must be handled explicitly within the appropriate hooks during the integration.

State

Integrations have a success / failure state. The control of this state is flexible and can be triggered at will throughout the life of the integration using the special function . Both service requests and validation rules contain the ability to set the integration into a failure state.

Service Requests

The building blocks of an integration. Service requests are fired off in order to perform operations with connected systems. Each service is associated with an adapter creating a call to the service using the provided adapter configs. Services include external API calls and internal file transformations.

  • Adapter Request the prepared request. It is available within the integration from the Service Request's {formula_variable}.request.

  • Adapter Response the adapter system response. It is available within the integration from the Service Request's {formula_variable}.response.

  • Adapter Success the state of the adapter service call.

  • Adapter Messages Optional message component of the adapter. This field is generally used for return adapter specific error messages.

Service Requests have the ability to be fired off as a list of service requests to the same system using the call_for_each field. Given an iterable, the call_for_each will generate

  • sridx: index of the service request iterable

  • sritem: value of the service request iterable

call_for_each
formula_variable

[ {"name": "sr1"}, { "name": "sr2"} ]

people_service

# creates
people_service = [{
 "request": { "service_name": "", "payload": { "name": "sr1"} }
 "response": { "success": True, "payload": "", "messages": [] }
},
{
 "request": { "service_name": "", "payload": { "name": "sr2"} }
 "response": { "success": True, "payload": "", "messages": [] }
}]

Which means during an integration run, the current service request is equivalent to:

people_service[sridx] == sritem

Field Mappings

Field mappings define the structure of the service request. Adapters generally have a few required field mappings such as service_path and method.

Field mappings contain the ability to be applied multiple times via an iterable provided to include_for_each. This exposes the following variables to be used within the field mapping code blocks.

  • fidx: index of the field mapping iterable

  • fitem: value of the field mapping iterable

Example:

include_for_each
Value
Field

["test", "test2"]

fitem

fm_body[fidx].test_key

Generates the following request payload

payload: {
    fm_body: [
        {test_key: "test"},
        {test_key: "test2"}
    ]
}

Value Mapping Sets

Value Mappings

Value mappings mutate outgoing request values from one type to another. Common use cases are for assigning statuses from a numeric value to a string representation.

0: "Closed"
1: "Open"
2: "Active"
3: "Pending"

Validation Rules

Validation Rules runs validation for input and response data. If a response or requested input payload fails to pass the validation rule, the integration can be put into a failure state or have other logic run based on the abort_on_failure field. Similarly to Field Mappings and Service Requests, Validation rules can also be run multiple times with the apply_to_each field. These fields use the context of vridx and vritem for the given iterable.

apply_to_each

vridx

vridx
vritem

Masks

To hide sensitive information throughout the life of the integration. These are applied to either integration inputs or service request responses. Masked information will be replaced with the following "XXXXXXXXXXXX".

Run History

Each integration run creates a unique Run History set for an integration which encapsulates a set of Run History Items detailing the exact steps taken within an integration. Each service request, historize statement, or other additional logging calls will generate a Run History Item.

Value Mapping Sets define a collection of Value Mappings. These are tied to an integration and can be accessed anywhere within the integration via the special function.

#end
#map_value