> ## 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.

# createB2BTradingPartnerIdentifiersPlan

> This operation creates a template B2B Trading Partner Identifier Plan file using the current B2B Trading Partner identifiers and control number settin

This operation creates a template B2B Trading Partner Identifier Plan file using the current B2B Trading Partner identifiers and control number settings found on the target OIC instance.

The generated plan file can be used during the `importTradingPartner` or `packageDeploy` operations to override environment-specific Trading Partner identifier values and control number settings after deployment.

Its purpose is to allow environment-specific B2B Trading Partner configuration to be managed outside of the exported Trading Partner artifacts. This eliminates the need to manually update Trading Partner identifiers or control numbers when deploying to different environments.

# 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 connecting to an OIC Instance</td></tr></tbody></table>

# Inputs

<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 connecting to an OIC Instance.Typically, this will not be used because the value will come from the property FDOIC\_CLOUD\_ACCOUNT\_CODE instead.</td></tr><tr><td>Trading Partner List</td><td>`FDOIC_INP_B2B_TRADING_PARTNER_LIST`</td><td>No</td><td>CSV list of Trading Partner ids to include in the plan file. Leave blank to include all non-project Trading Partners. `(ex: TRADING_PARTNERID1,PROJECTID:TRADING_PARTNERID2)`</td></tr><tr><td>Project List</td><td>`FDOIC_INP_B2B_PROJECT_LIST`</td><td>No</td><td>CSV list of project ids to include Trading Partners from. Leave blank to include Trading Partners from all projects `(ex: PROJECT1,PROJECT2)`</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></tbody></table>

If neither the Trading Partner Identifier List nor the Project List is provided, Trading Partner Identifier Plans are created for all Trading Partners, including both global and project Trading Partners.

If only one of the lists is provided, Trading Partner Identifier Plans are created only for the Trading Partners specified by that list.

If both lists are provided, Trading Partner Identifier Plans are created for the Trading Partners specified in both lists.

# Artifacts

This operation doesn’t consume or produce any artifacts.

# 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.

# Special Considerations

### B2B Trading Partner Identifiers Plan Format

The B2B Trading Partner Identifier Plan closely follows Java Properties syntax with the notable exception that spaces do not delimit the key/value pairs.

Two types of entries are supported

> [!NOTE]
>
> Identifier Format
>
> %TradingPartnerId%.%IdentifierId%.%IdentifierType%=%value%
>
> Control Number Format
>
> %TradingPartnerId%.(interchangeControlNumberStart|groupControlNumberStart|transactionControlNumberStart)=%value%
>
> If the Trading Partner belongs to a Project, prefix the Trading Partner with the Project Id.
>
> %ProjectId%:%TradingPartnerId%.%IdentifierId%.%IdentifierType%=%value%
>
> or
>
> %ProjectId%:%TradingPartnerId%.interchangeControlNumberStart=%value%

<table><colgroup><col /><col /></colgroup><tbody><tr><th>Line Field</th><th>Description</th></tr><tr><td>TradingPartnerId</td><td>The Trading Partner identifier on the OIC.</td></tr><tr><td>ProjectId</td><td>Optional Project identifier for project-specific Trading.</td></tr><tr><td>IdentifierId</td><td>The unique identifier ID assigned by OIC.</td></tr><tr><td>IdentifierType</td><td>The identifier type as displayed in the OIC UI (for example, AS2 Identifier or EDI Interchange ID)</td></tr><tr><td>value</td><td>The replacement value. This may be plain text or a FlexDeploy property.|</td></tr></tbody></table>

##### **Sample Properties**

```
#Add values for any properties you wish to change when updating B2B Trading Partner Identifiers.
#Delete any lines that you don't want to update values.
#FlexDeploy properties or plain text are allowed.
#See the documentation at https://wiki.flexagon.com for more information.
######################## NEWTEST ########################
NEWTEST.490722137650053.AS2 Identifier=678
#Control Numbers
NEWTEST.interchangeControlNumberStart=
NEWTEST.groupControlNumberStart=
NEWTEST.transactionControlNumberStart=
##############################################################
######################## AVINSH_CORP ########################
AVINSH_CORP.317465592045120.EDI Interchange ID=006
AVINSH_CORP.36990536471679.AS2 Identifier=test01
AVINSH_CORP.531584087610037.AS2 Identifier=${{B2B_ID_VALUE}}
#Control Numbers
AVINSH_CORP.interchangeControlNumberStart=2
AVINSH_CORP.groupControlNumberStart=2
AVINSH_CORP.transactionControlNumberStart=2
##############################################################
######################## RAJ_B2B_TEST:RAJ_TRADING_PARTNER ########################
RAJ_B2B_TEST:RAJ_TRADING_PARTNER.604500079445274.Name=test1
#Control Numbers
RAJ_B2B_TEST:RAJ_TRADING_PARTNER.interchangeControlNumberStart=1
RAJ_B2B_TEST:RAJ_TRADING_PARTNER.groupControlNumberStart=1
RAJ_B2B_TEST:RAJ_TRADING_PARTNER.transactionControlNumberStart=1
##############################################################
```

### B2B Trading Partner Identifier Plan Processing

In the sample above, we are replacing the AS2 Identifier for the `AVINSH_CORP` Trading Partner with the FlexDeploy property \$\{\{B2B\_ID\_VALUE}}. This means that B2B\_ID\_VALUE is configured as a FlexDeploy property (most likely a Target property) and can have a different value for each OIC environment. This allows Trading Partner identifiers and control number settings to be updated dynamically for each environment without modifying the exported Trading Partner artifacts. The properties should be added to a deploy workflow that is used for the `importTradingPartner` or packageDeploy operations. The workflow must then be associated with the appropriate OIC Target Group using the FlexDeploy topology screens.

## Empty Properties

> [!NOTE]
>
> Only identifier and control number entries that need to be overridden should be included in the Trading Partner Identifier Plan file. If a line is present with no value (as shown above), the corresponding Trading Partner identifier or control number setting will be updated to an empty value.
