Falcon Flex Shipment Extension

Extension Installation

Preliminary Works

The following information is requested from the provider for the brand-specific and production (live) environment.

  • API_URL

  • API_KEY

  • DELIVERY_LOCATION_TYPE

  • TRANSPORT_TYPE_ID

A secret_key is generated with a minimum length of 41 characters. The generated key must be kept throughout the installation. An example command line to generate a random key:

openssl rand -base64 41

An address ID must be set for the default destination information in easy-return shipments. It can be created using the extension's address creation method (example curl is given below). Ensure that the address ID is accurately configured to facilitate the smooth handling of return shipments within the Omnitron configuration.

curl --location --request POST '{{extension_url}}/addresses' \
--header 'x-akinon-request-id: {{guid}}' \
--header 'x-akinon-api-version: 1.0' \
--header 'Authorization: Basic {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": <id>,
    "addressName": "Test Address Name",
    "addressDescription": "Test Description",
    "phone": "+928-584-31430",
    "email": "[email protected]",
    "address": {
        "country": {
            "id": <id>,
            "code": "QA",
            "name": "Qatar"
        },
        "city": {
            "id": <id>, 
            "name": "Doha"
        },
        "township": {
            "id": <id>, 
            "name": "Al Jasra"
        },
        "district": {
            "id": <id>, // optional
            "name": "Z01"
        },
        "zipcode": "1725629716",
        "addressLine": "597 Hauck Views"
    }
}'

In order to send the correct data to Falcon Flex, the product attributes with the code names "barcode" and “name” should be defined.

Environment Variables

The extension installed to the relevant project in ACC must have the following environment variables. Environment variables can be entered before or after the deployment phase. As changes are made to the environment variables, the deployment process must be performed again.

Variable
Description

Extension-specific

API_URL

URL received during the preliminary works phase (without a trailing slash at the end)

API_KEY

API KEY received during the preliminary works phase

DELIVERY_LOCATION_TYPE

Specifies whether the location is an existing location, an international location or a location in Qatar. The values corresponding to each type are: Location PickupLocationTypeId / DeliveryLocationTypeId Existing 1 International 2 Qatar 3 Reference Link: https://falconflex.readme.io/reference/create-task

TRANSPORT_TYPE_ID

Different tasks can be assigned to different modes of transport. The current supported transport type and their IDs are shown in the table below: Transport Type transportTypeId No Preference 1 Bicycle 2 Bike 3 Car 4 Truck 5 Reference Link: https://falconflex.readme.io/reference/create-task

Generic

SECRET_KEY

The generated secret key during the preliminary works phase

ADMIN_EMAIL

The e-mail address of the installer can be entered

ADMIN_PASSWORD

A newly created and extension-specific strong password

ADMIN_USERNAME

A username can be entered (example: ‘akinon’)

Omnitron Settings

Fero AI can be selected as the Shipment Provider in Omnitron to integrate with the extension installed. Additionally, an easy return option can be defined to enable easy return methods. Explanations on how these settings can be configured are detailed in the sections below. Please note that these two operations are independent and optional.

Shipping Provider

To add Fero AI, a new shipping provider is added to SHIPPING_PROVIDERS in Dynamic Settings through Omnitron.

Example Omnitron Configuration:

Field
Description

Klass

ExtensionShippingProvider Class

Urls Code

{ "urls": { "base_url": "{SHIPMENT_EXTENSION_URL}" } }

Serializers

Order Serializer: ExtensionShippingOrderSerializer Class Response Serializer: ExtensionShippingResponseSerializer Class

Configurations Code

{ "strategies": { "query_type": "SHIPMENT_ID", "generate_shipment_origin_strategy": "<addressId>", "generate_shipment_product_strategy": true, "generate_shipment_product_attributes": [ "description", “price” ] }, "pay_on_delivery_option": false, "delivery_type": "CUSTOMER", "auth": { "username": "{SHIPMENT_EXTENSION_ADMIN_USERNAME}", "password": "{SHIPMENT_EXTENSION_ADMIN_PASSWORD}" }, "is_active": { "query": true, "send_shipping_info": true, "delete_shipping_info": true, "query_by_order": true }, "label_options": { "file_extension": "pdf" } }

OMS Settings

For OMS, “strategies” field in Shipping Management must be defined accordingly:

{"send_product_info":true,"product_attributes":["barcode","name"]}

Last updated

Was this helpful?