Skip to main content

Import Operations

The import command deploys artifacts to a target Dynamics 365 environment.

Import Command Syntax

flowon-dynamics import [options]

Options:
-s, --solution <path> Solution file to import
-p, --package <path> Flowon package (.flop) to import
-d, --data <path> Data files directory
-m, --mappings <path> Mappings directory
--apply-mappings Apply mapping transformations
--publish-customizations Publish after import
--overwrite Overwrite existing components
-c, --connection <string> Connection string

Import Examples

Import managed solution:

flowon-dynamics import \
--solution "./artifacts/solutions/CustomerPortal_1.0.0.0_managed.zip" \
--publish-customizations

Import Flowon package with mappings:

flowon-dynamics import \
--package "./artifacts/flowon/CustomerPortal.flop" \
--mappings "./mappings/production" \
--apply-mappings

Full deployment:

flowon-dynamics import \
--solution "./artifacts/solutions/CustomerPortal_managed.zip" \
--package "./artifacts/flowon/CustomerPortal.flop" \
--data "./artifacts/data" \
--mappings "./mappings/production" \
--apply-mappings \
--publish-customizations

Import Order

When performing a full deployment, artifacts are imported in this order:

  1. Solutions - Base platform customizations
  2. Flowon Package - Logic, APIs, Business Orchestrator processes
  3. Data - Reference data and configuration records

Deployment Workflow

┌──────────────────────────────────────────────────────────────────────┐
│ DEPLOYMENT WORKFLOW │
├──────────────────────────────────────────────────────────────────────┤
│ │
│ 1. PREPARE │
│ ┌──────────────────┐ │
│ │ Disable Plugins │ ◄── Prevent triggers during import │
│ └────────┬─────────┘ │
│ │ │
│ 2. IMPORT ▼ │
│ ┌──────────────────┐ │
│ │ Import Solution │ ◄── Platform customizations │
│ └────────┬─────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────┐ │
│ │ Import .flop │ ◄── Flowon artifacts with mappings │
│ └────────┬─────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────┐ │
│ │ Import Data │ ◄── Reference data with mappings │
│ └────────┬─────────┘ │
│ │ │
│ 3. ACTIVATE ▼ │
│ ┌──────────────────┐ │
│ │ Publish Changes │ ◄── Make customizations active │
│ └────────┬─────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────┐ │
│ │ Enable Plugins │ ◄── Re-enable Flowon plugins │
│ └──────────────────┘ │
│ │
└──────────────────────────────────────────────────────────────────────┘

Scripted Full Deployment

#!/bin/bash
# Full deployment script

PROJECT="CustomerPortal"
ENV="production"
CONNECTION_STRING="$PROD_CONNECTION_STRING"

# 1. Disable plugins
flowon-dynamics disable-plugins \
--project "$PROJECT" \
--all \
--connection "$CONNECTION_STRING"

# 2. Import solution
flowon-dynamics import \
--solution "./artifacts/solutions/${PROJECT}_managed.zip" \
--connection "$CONNECTION_STRING"

# 3. Import Flowon package with mappings
flowon-dynamics import \
--package "./artifacts/flowon/${PROJECT}.flop" \
--mappings "./mappings/$ENV" \
--apply-mappings \
--connection "$CONNECTION_STRING"

# 4. Import data with mappings
flowon-dynamics import \
--data "./artifacts/data" \
--mappings "./mappings/$ENV" \
--apply-mappings \
--connection "$CONNECTION_STRING"

# 5. Publish customizations
flowon-dynamics import \
--publish-customizations \
--connection "$CONNECTION_STRING"

# 6. Enable plugins
flowon-dynamics enable-plugins \
--project "$PROJECT" \
--all \
--connection "$CONNECTION_STRING"

echo "Deployment complete!"

Error Handling

If an import fails:

  1. Check the error message for specific component failures
  2. Verify mapping files are correctly configured
  3. Ensure dependencies exist in target environment
  4. Check user permissions in target environment

Use verbose logging for troubleshooting:

flowon-dynamics import --verbose --solution "..." 2>&1 | tee deployment.log