logo_smallAxellero.io

Workflow Integration

Integrating Backbase with Axellero workflows and external systems

Workflow Integration

Backbase integrates with Axellero workflows for automation and business logic implementation. The integration supports entity operations (query, create, update, delete) with consistency and audit trail maintenance.

Workflow Connector

The Backbase workflow connector provides a bridge between your workflows and the GraphQL API.

Connector Configuration

ParameterTypeRequiredDescription
querystringYesGraphQL query or mutation
variablesobjectNoVariables for the GraphQL operation
languagestringNoLanguage code for translatable content
anonymousbooleanNoExecute without user context
metaobjectNoAdditional metadata for the operation
app_idstringNoSpecific application context
use_transactionbooleanNoWrap operation in database transaction

Basic Usage

Simple Query

{
  "query": "query { productList { id name price } }",
  "language": "en"
}

Query with Variables

{
  "query": "query GetProduct($id: ID!) { product(id: $id) { id name price } }",
  "variables": {
    "id": "product_123"
  }
}

Mutation with Transaction

{
  "query": "mutation CreateOrder($input: OrderInput!) { createOrder(input: $input) { id } }",
  "variables": {
    "input": {
      "customerId": "customer_456",
      "items": [
        { "productId": "product_123", "quantity": 2 }
      ]
    }
  },
  "use_transaction": true
}

Integration Patterns

Data Validation Workflows

Use workflows to implement complex validation rules:

{
  "name": "Validate Product",
  "trigger": "before_create_product",
  "steps": [
    {
      "name": "Check SKU Uniqueness",
      "connector": "backbase",
      "config": {
        "query": "query CheckSKU($sku: String!) { productList(filter: { sku: $sku }) { id } }",
        "variables": {
          "sku": "{{input.sku}}"
        }
      }
    },
    {
      "name": "Validate Price Range",
      "connector": "javascript",
      "config": {
        "code": "if (input.price < 0 || input.price > 10000) { throw new Error('Invalid price range'); }"
      }
    }
  ]
}

Automated Relationships

Create related entities automatically:

{
  "name": "Create Customer Profile",
  "trigger": "after_create_user",
  "steps": [
    {
      "name": "Create Customer Record",
      "connector": "backbase",
      "config": {
        "query": "mutation CreateCustomer($input: CustomerInput!) { createCustomer(input: $input) { id } }",
        "variables": {
          "input": {
            "userId": "{{trigger.data.id}}",
            "email": "{{trigger.data.email}}",
            "status": "active"
          }
        }
      }
    }
  ]
}

Data Synchronization

Keep external systems in sync:

{
  "name": "Sync to CRM",
  "trigger": "after_update_customer",
  "steps": [
    {
      "name": "Get Full Customer Data",
      "connector": "backbase",
      "config": {
        "query": "query GetCustomer($id: ID!) { customer(id: $id) { id name email phone address } }",
        "variables": {
          "id": "{{trigger.data.id}}"
        }
      }
    },
    {
      "name": "Update CRM",
      "connector": "http",
      "config": {
        "url": "https://api.crm.com/customers/{{steps.0.result.customer.id}}",
        "method": "PUT",
        "body": "{{steps.0.result.customer}}"
      }
    }
  ]
}

Batch Processing

Process multiple entities efficiently:

{
  "name": "Process Orders",
  "trigger": "schedule",
  "steps": [
    {
      "name": "Get Pending Orders",
      "connector": "backbase",
      "config": {
        "query": "query { orderList(filter: { status: \"pending\" }, limit: 100) { id customerId total } }"
      }
    },
    {
      "name": "Process Each Order",
      "connector": "loop",
      "config": {
        "array": "{{steps.0.result.orderList}}",
        "steps": [
          {
            "name": "Charge Customer",
            "connector": "payment",
            "config": {
              "customerId": "{{item.customerId}}",
              "amount": "{{item.total}}"
            }
          },
          {
            "name": "Update Order Status",
            "connector": "backbase",
            "config": {
              "query": "mutation UpdateOrder($id: ID!, $input: OrderInput!) { updateOrder(id: $id, input: $input) { id } }",
              "variables": {
                "id": "{{item.id}}",
                "input": {
                  "status": "processed"
                }
              }
            }
          }
        ]
      }
    }
  ]
}

Error Handling

Transaction Rollback

Use transactions for atomic operations:

{
  "name": "Create Order with Items",
  "steps": [
    {
      "name": "Create Order",
      "connector": "backbase",
      "config": {
        "query": "mutation CreateOrder($input: OrderInput!) { createOrder(input: $input) { id } }",
        "variables": {
          "input": {
            "customerId": "customer_123",
            "status": "pending"
          }
        },
        "use_transaction": true
      }
    },
    {
      "name": "Create Order Items",
      "connector": "backbase",
      "config": {
        "query": "mutation CreateOrderItem($input: OrderItemInput!) { createOrderItem(input: $input) { id } }",
        "variables": {
          "input": {
            "orderId": "{{steps.0.result.createOrder.id}}",
            "productId": "product_456",
            "quantity": 2
          }
        },
        "use_transaction": true
      }
    }
  ],
  "error_handling": {
    "rollback_on_error": true
  }
}

Retry Logic

Handle temporary failures gracefully:

{
  "name": "Sync External Data",
  "steps": [
    {
      "name": "Update Entity",
      "connector": "backbase",
      "config": {
        "query": "mutation UpdateProduct($id: ID!, $input: ProductInput!) { updateProduct(id: $id, input: $input) { id } }",
        "variables": {
          "id": "{{input.productId}}",
          "input": {
            "stock": "{{input.newStock}}"
          }
        }
      },
      "retry": {
        "max_attempts": 3,
        "delay": 1000
      }
    }
  ]
}

Multi-Language Workflows

Handle translatable content in workflows:

{
  "name": "Create Multilingual Product",
  "steps": [
    {
      "name": "Create Base Product",
      "connector": "backbase",
      "config": {
        "query": "mutation CreateProduct($input: ProductInput!) { createProduct(input: $input) { id } }",
        "variables": {
          "input": {
            "name": "{{input.name_en}}",
            "description": "{{input.description_en}}"
          }
        },
        "language": "en"
      }
    },
    {
      "name": "Add Spanish Translation",
      "connector": "backbase",
      "config": {
        "query": "mutation UpdateProduct($id: ID!, $input: ProductInput!) { updateProduct(id: $id, input: $input) { id } }",
        "variables": {
          "id": "{{steps.0.result.createProduct.id}}",
          "input": {
            "name": "{{input.name_es}}",
            "description": "{{input.description_es}}"
          }
        },
        "language": "es"
      }
    }
  ]
}

Performance Optimization

Selective Field Queries

Request only needed fields:

{
  "query": "query { productList { id name price } }"
}

Pagination in Workflows

Handle large datasets efficiently:

{
  "name": "Process All Products",
  "steps": [
    {
      "name": "Initialize",
      "connector": "javascript",
      "config": {
        "code": "let offset = 0; let hasMore = true;"
      }
    },
    {
      "name": "Process Batch",
      "connector": "loop",
      "config": {
        "condition": "{{hasMore}}",
        "steps": [
          {
            "name": "Get Products",
            "connector": "backbase",
            "config": {
              "query": "query GetProducts($offset: Int!) { productList(limit: 50, offset: $offset) { id name } }",
              "variables": {
                "offset": "{{offset}}"
              }
            }
          },
          {
            "name": "Update Offset",
            "connector": "javascript",
            "config": {
              "code": "offset += 50; hasMore = steps[0].result.productList.length === 50;"
            }
          }
        ]
      }
    }
  ]
}

Security Considerations

User Context

Respect user permissions in workflows:

{
  "anonymous": false,  // Use authenticated user context
  "meta": {
    "userId": "{{auth.userId}}",
    "permissions": "{{auth.permissions}}"
  }
}

Anonymous Operations

Use anonymous mode for system operations:

{
  "anonymous": true,  // Bypass user authentication
  "app_id": "system"  // Use system context
}

Audit Trail Integration

Automatic audit logging when isAuditable: true:

{
  "meta": {
    "operation": "workflow_update",
    "workflowId": "{{workflow.id}}",
    "reason": "Automated sync from external system"
  }
}