> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# importB2BTradingPartner

> Import a B2B Trading Partner into OIC. Either FDOIC\ CLOUD\ ACCOUNT\ CODE Target property value or FDOIC\ INP\ CLOUD\ ACCOUNT\ CODE plugin input value

Import a B2B Trading Partner into OIC.

> [!NOTE]
>
> Either **FDOIC\_CLOUD\_ACCOUNT\_CODE** Target property value or **FDOIC\_INP\_CLOUD\_ACCOUNT\_CODE** plugin input value should exist. When both exists, plugin input value will take precedence. See [Creating/Editing a Cloud Account and Provider](https://docs.flexagon.com/flexdeploy-11-2-documentation/flexdeploy-users-guide/integrations/cloud-account-and-provider.md) for details on how to setup Cloud Account for OIC.

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>OIC Account</td><td>`FDOIC_CLOUD_ACCOUNT_CODE`</td><td>No</td><td>The OIC account with all the required properties like Base URI, Username and Password for running OIC Instance.</td></tr></tbody></table>

# Inputs

Deploy Transports

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>OIC Account</td><td>`FDOIC_INP_CLOUD_ACCOUNT_CODE`</td><td>No</td><td>The OIC account with all the required properties like Base URI, Username and Password for running OIC Instance.</td></tr><tr><td>Overwrite B2B Trading Partner</td><td>`FDOIC_INP_B2B_REPLACE_TRADING_PARTNER`</td><td>No</td><td>Overwrite B2B Trading Partner with the same name when importing.</td></tr><tr><td>Deploy Transports</td><td>`FDOIC_INP_B2B_TP_DEPLOY_TRANSPORTS`</td><td>No</td><td>Deploy transport definitions for this Trading Partner.</td></tr><tr><td>Deploy Inbound Agreements</td><td>`FDOIC_INP_B2B_TP_DEPLOY_INBOUND_AGREEMENTS`</td><td>No</td><td>Deploy inbound agreements and associated backend integrations.</td></tr><tr><td>Deploy Outbound Agreements</td><td>`FDOIC_INP_B2B_TP_DEPLOY_OUTBOUND_AGREEMENTS`</td><td>No</td><td>Deploy outbound agreements for this Trading Partner.</td></tr><tr><td>Overwrite Integrations</td><td>`FDOIC_INP_REPLACE_INTEGRATION`</td><td>No</td><td>Overwrite integrations with the same name and version when importing.\
The default value of this property allows using a project property to control this on a per-project basis.</td></tr><tr><td>Start Schedules</td><td>`FDOIC_INP_START_SCHEDULES`</td><td>No</td><td>Should any schedules for the imported integration be started after deployment? Activate Integration should be true or this will not take effect.</td></tr><tr><td>Include Run As User</td><td>`FDOIC_INP_INCLUDE_RUN_AS_USER_FOR_START_SCHEDULES`</td><td>No</td><td>Enable this to include the username in the schedule start request. This is applicable only when schedule start is enabled. `since 9.0.0.9`</td></tr><tr><td>Activate Integration</td><td>`FDOIC_INP_ACTIVATE_INTEGRATION`</td><td>No</td><td>Should the integration be activated after deployment.</td></tr><tr><td>Enable Tracing</td><td>`FDOIC_INP_ENABLE_TRACING`</td><td>No</td><td>When tracing is enabled, integration activity can be viewed in the Activity Stream.Will only apply if instance is also being activated</td></tr><tr><td>Enable Payload Tracing</td><td>`FDOIC_INP_ENABLE_PAYLOAD_TRACING`</td><td>No</td><td>Should the payload be traced.Will only apply if instance is also being activated</td></tr><tr><td>Send to Oracle Recommends</td><td>`FDOIC_INP_SEND_TO_ORACLE_RECOMMENDS`</td><td>No</td><td>Contribute integration mappings to Oracle Recommends.Will only apply if instance is also being activated</td></tr><tr><td>Update Schedules</td><td>`FDOIC_INP_UPDATE_SCHEDULES`</td><td>No</td><td>Update schedule parameter for Simple or iCal recurrence.</td></tr><tr><td>Allow to Run Again</td><td>`FDOIC_INP_CAN_REPLAY`</td><td>No</td><td>When replay is enabled, an instance of the integration can be replayed during runtime. (Available only for REST Adapter-triggered and AS2 Adapter-triggered integrations.)\
(Note for only OIC Gen3)</td></tr><tr><td>Enable Payload Validation</td><td>`FDOIC_INP_ENABLE_PAYLOAD_VALIDATION`</td><td>No</td><td>When enabled, inbound JSON payload syntax is validated during the activation of REST Adapter trigger-based integrations.\
(Note for only OIC Gen3)</td></tr><tr><td>OIC Trading Partner Identifier Plan File</td><td>`FDOIC_INP_B2B_TP_IDENTIFIER_PLAN`</td><td>No</td><td>optional input to specify a different Trading Partner Identifier Plan file name. Default 'TradingPartnerIdentifiersPlan.properties'.</td></tr><tr><td>Activation Retry Count`(Since 11.1.0.4)`</td><td>`FDOIC_INP_ACTIVATION_RETRY_COUNT`</td><td>No</td><td>The number of times to poll for integration activation status before failing. Each attempt waits 10 seconds. Default is 10 (100 seconds). Increase this value for integrations that take longer to activate</td></tr><tr><td>OIC Trading Partner Config Plan File`(Since 11.1.0.4)`</td><td>`FDOIC_INP_B2B_TP_CONFIG_PLAN`</td><td>No</td><td>Optional input to specify a different Trading Partner Config Plan file name. Default 'TradingPartnerConfigPlan.properties'</td></tr></tbody></table>

# Artifacts

This operation consumes artifacts from the artifacts repository.

# Endpoint Selection

This operation will select all available endpoints associated to the Target.

# Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.

# B2B Transport Deployment Behaviour

During an overwrite import of a B2B trading partner, FlexDeploy:

1. **Undeploys** existing **transports**, then **inbound/outbound agreements**

2. **Imports** the trading partner

3. **Deploys** transports and agreements again (when those deploy options are enabled)

Before import, FlexDeploy undeploys a transport only when its status is `DEPLOYED` or `FAILED`. Oracle allows undeploy in both of those states. Other transport statuses are skipped.

When a transport is deployed, OIC activates the auto-created integration versions permanently linked to that transport.

If a user manually creates and activates a newer version of an auto-created integration, deploying the transport will reactivate the original linked version and deactivate the newer version.

* **If the newer version has no running schedule:** The transport deployment can deactivate the newer version and activate the original version successfully.

* **If the newer version has a running schedule:** OIC cannot deactivate the newer version while its schedule is running. The transport deployment fails with `B2B-05108`. Stop the schedule on the newer version (or remove that version), then retry the deployment.

### Key points

* [OIC B2B transports are permanently linked to their originally created integrations.](https://docs.oracle.com/en/cloud/paas/application-integration/integration-b2b/define-transports.html)

* Only one version of an integration can be active at a time.

* Avoid creating new versions of transport-linked integrations; the transport continues to use the originally linked version.

The same guidance applies to B2B trading partner deploy via [packageDeploy (OIC)](https://docs.flexagon.com/flexdeploy-11-2-documentation/flexdeploy-plugin-guides/flexdeploy-oracle-integration-cloud-plugin-guide/packagedeploy-oic.md).
