fulfillmenttools
API documentationIncident ManagementFeedback
Developer Docs
Developer Docs
  • Developer docs
  • Getting Started
    • Quickstart
    • Integration tutorial
      • Adding facilities
      • Adding listings to facilities
      • Configuring stocks
      • Carrier configuration
      • Placing orders
      • Checkout options
      • Distributed Order Management System (Routing)
      • Local fulfillment configuration
    • Free trial
  • Technical Basics
    • Access to fulfillmenttools
    • Feature status
    • Available regions
    • Backup policies
  • Connecting to fulfillmenttools
    • Client SDKs
    • commercetools connect
    • OpenID connect
      • Configure Microsoft Entra ID / Azure Active Directory
      • Configure Keycloak
  • API
    • Core concepts
      • Authentication & authorization
      • API Versioning & lifecycle
      • Assign user to jobs
      • Localization
      • Resource timestamps
      • Custom attributes
      • Article attributes
      • Recordable attributes
      • Data update guarantees
      • Rate limits & scaling
      • Retries
      • Performance on test vs. production systems
      • Load testing
    • API calls
      • Postman
      • cURL
      • GraphQL Explorer
    • GraphQL API
    • RESTful API
      • Pagination interface
      • RapiDoc
      • OpenAPI 3.0 Spec
    • Eventing
      • Structure of an event
      • Available events
        • Event flows
      • Eventing example
      • Event export
  • Integration Guides
    • Basics
      • Article categories
      • Audits
      • Facilities
      • Facility groups
      • GDPR configuration
      • Listings
      • Remote configuration
      • Receipts
      • Search
      • Subscribe to events
      • Sticker
      • Stocks
      • Storage locations
      • Tags
      • Users
    • Channel inventory
    • Inbound process
    • Outbound stocks
    • Purchase order
    • Receipt
    • Routing strategy (context-based multi-config DOMS)
    • Show sticker to clients
    • Stow jobs
  • More Integration Guides
    • Carrier management
      • Introduction to carrier configuration
      • Required data when operating carriers
      • Adding & connecting carriers to facilities
      • Custom carrier
    • Configurations for order fulfillment
      • Picking configuration
      • Packing configuration
      • Handover configuration
      • Printing and document configuration
      • Packing container types
      • Parcel tag configuration
      • Headless order fulfillment
      • Short-pick reasons
      • External documents in order fulfillment
      • Service jobs
      • Load units
      • Running sequence
    • DOMS - distributed order management system (routing)
    • External actions
    • Interfacility transfer
    • Notifications
    • Orders
      • Place your first order
      • Ship-from-store orders
      • Click-and-collect orders
      • Locked orders
      • Order with custom services
      • Bundled items in an order
      • Order process status
    • Availability & promising
    • Returns
Powered by GitBook
On this page
  • Introduction
  • Define an external action with Type LINK
  • Define a external action with Type FORM
  • Subscribe to an external action event
  • Add information to a process and relate it to another action
Edit on GitHub
  1. More Integration Guides

External actions

Introduction

The "External Actions" feature empowers users to trigger and execute actions and processes in external systems, outside of fulfillmenttools.

  • Multiple external actions can be added to a process.

  • External actions can be grouped and assigned to a theme

Define an external action with Type LINK

This example adds a link to a payment provider.

POST {{host}}/api/externalactions

{
      "processRef": "PROCESS-REF-TO_WHICH_THE_ACTION_SHOULD_REFER",
      "nameLocalized": {
        "en": "Zahlungen anpassen",
        "de": "Adjust Payment"
      },
      "groups": [
        "string"
      ],
      "action": {
        "type": "BLANK_LINK",
        "linkUrl": "yourpaymentprovider.com/xyz..."
      }
    }

Define a external action with Type FORM

POST {{host}}/api/externalactions

{
    "processRef": "6aca1c80-c418-4064-b173-63fb120aef2d",
    "groups": ["Trainingsgruppe B"],
    "nameLocalized": {
        "de_DE": "Zahlungen anpassen",
        "en_US": "Adjust payments"
    },
    "action": {
        "type": "FORM",
        "elements": [
            {
                "elementType": "HEADLINE",
                "title": "Adjust payments for this order", // Returns value from "titleLocalized"
                "titleLocalized": {
                    "de_DE": "Zahlungen zu dieser Bestellung anpassen",
                    "en_US": "Adjust payments for this order"
                }
            },
            {
                "elementType": "SUBHEADLINE",
                "title": "In this modal you can make payment adjustments. This can either be a percentual or a freely selected discount.", // Returns value from "titleLocalized"
                "titleLocalized": {
                    "de_DE": "In diesem Modal können Sie Zahlungsanpassugen vornehmen. Dies kann entweder ein prozentualer oder ein frei gewählter Rabatt sein.",
                    "en_US": "In this modal you can make payment adjustments. This can either be a percentual or a freely selected discount."
                }
            },
            {
                "elementType": "TEXT",
                "style": "BODY",
                "title": "string", // Returns value from "titleLocalized"
                "titleLocalized": {
                    "de_DE": "-",
                    "en_US": "-"
                }
            },
            {
                "elementType": "TEXT",
                "style": "BODY",
                "title": "string", // Returns value from "titleLocalized"
                "titleLocalized": {
                    "de_DE": "Rabatt in %",
                    "en_US": "Discount in &"
                }
            },
            {
                "elementType": "TEXT_INPUT",
                "elementId": "4712",
                "label": "string", // Returns value from "labelLocalized"
                "titleLocalized": {
                    "de_DE": "%",
                    "en_US": "%"
                },
                "isMandatory": false,
                "validation": {
                    "validationType": "FLOAT",
                    "minValue": 1, // OPTIONAL
                    "maxValue": 100 // OPTIONAL
                }
            },
            {
                "elementType": "TEXT",
                "style": "BODY",
                "title": "string", // Returns value from "titleLocalized"
                "titleLocalized": {
                    "de_DE": "-",
                    "en_US": "-"
                }
            },
            {
                "elementType": "TEXT",
                "style": "BODY",
                "title": "string", // Returns value from "titleLocalized"
                "titleLocalized": {
                    "de_DE": "Rabatt in €",
                    "en_US": "Discount in €"
                }
            },
            {
                "elementType": "TEXT_INPUT",
                "elementId": "4713",
                "label": "string", // Returns value from "labelLocalized"
                "titleLocalized": {
                    "de_DE": "€",
                    "en_US": "€"
                },
                "isMandatory": false,
                "validation": {
                    "validationType": "INTEGER",
                    "minValue": 1, // OPTIONAL
                    "maxValue": 1000 // OPTIONAL
                }
            },

            {
                "elementType": "TEXT",
                "style": "INFO",
                "title": "string", // Returns value from "titleLocalized"
                "titleLocalized": {
                    "de_DE": "Die Anpassung der Abrechnung wird durch ein Fremdsystem durchgeführt.",
                    "en_US": "The billing adjustment is carried out by a third-party system."
                }
            }
        ],
        "success": {
            "label": "string", // Returns value from "labelLocalized"
            "labelLocalized": {
                "de_DE": "Bestätigen",
                "en_US": "CONFIRM"
            }
        },
        "cancel": { // OPTIONAL
            "label": "string", // Returns value from "labelLocalized"
            "labelLocalized": {
                "de_DE": "Abbrechen",
                "en_US": "CANCEL"
            }
        }
    }
}

Subscribe to an external action event

It is possible to create a subscription to receive events when executing an external action. You will be informed when the action has been executed, e.g., by clicking on a link.

In this example, a subscription is created to receive events when an external action is executed.\

curl -sSL -X POST 'https://your.api.fulfillmenttools.com/api/subscriptions' \
--header 'Authorization: Bearer <TOKEN>' 
--header 'Content-Type: application/json' 
--data-raw '{
"callbackUrl": "https://webhook.site/1c90a559-dd18-4e45-95ec-04821d705466",
"event": "EXTERNAL_ACTION_EXECUTED",
"headers": [
{
"key": "X-My-Auth",
"value": "Basic ZnVsZmlsbG1lbnR0b29sczppc2Jlc3Q="
}
],
"name": "EXTERNAL_ACTION_EXECUTED"

Add information to a process and relate it to another action

First an external action with type "COMMENT" is added to an existing order. This enables you to add generally information to an order

Such a POST call might look like this:

POST {{host}}/api/externalactions

{
    "processRef": "PUT-IN-A-PROCESS-ID",
    "nameLocalized": {
        "de_DE": "Zusatzinformation Kunde",
        "en_US": "Additional customer information",
    },
    "groups": [
        "Additional information"
    ],
    "action": {
        "type": "COMMENT"
    }
}

After that you add the actual information with

POST {{host}}/api/externalactions/externalActionRef/logs

{
  "requiresAnonymization": false,
    "actionPayload": {
    "comment": "Consumer seqment A - high priority",
    "externalActionRef":"optional-ref"
  }
}

Note: The externalActionRef is option

Last updated 6 months ago

This example adds a form which will look like this and is able to inform a payment provider system: