Create Data Source Table Step – create-datasource

Type

Description

Type

Description

create-datasource

Creates a Data Source based on user's data.

Data Requirements

In the package directory in the data folder, this step requires:

  • DataSource folder (keeping the structure and naming conventions as provided by Packaging Tool).
    This folder contains a full definition of the Data Source; the package only maps those fields selected by the user.

Specific Attributes

Attribute Name

Description

example

required

Attribute Name

Description

example

required

dsName

Name of a Data Source defined in the "data" folder in the package. The data source will be used as a template for creation process.

TXStandardData

true

mandatoryFields

Specifies a list of fields which must be linked with users's data. Information about fields has to be stored in the data folder in a format defined by Packaging Tool. Each field must contain:

  • name – Unique name of the field in Pricefx.

  • label – Label which will be displayed in PlatformManager.

  • description – Description of the field which will be displayed in PlatformManager.

  • mappingAliases – An array of possible mapping aliases ("Product Id" and "Unique Identification" for SKU).

  • dynamicPath

    • dsUniqueName – Name of a Data Source.

    • fieldName – Name of an attribute of a field of the specified Data Source.

    • fieldValue – Value of the attribute.

Dynamic path allows you to define a Data Source and its field whose name should be fetched and used. The process will fetch the Data source, iterate through fields and find the field which has an inner property with a name defined by "fieldName" set to a value defined by "fieldValue".

"mandatoryFields": [ { "name": "UniqueId", "label": "UniqueId", "description": "Transaction unique identification" }, { "name": "ProductId", "label": "Product Id", "description": "Id of a product", "type": "STRING", "dynamicPath": { "dsUniqueName": "Product", "fieldName": "sourceField", "fieldValue": "sku" } } ]

true

optionalFields

List of fields which must be linked with users's data. Information about fields has to be stored in the data folder in a format defined by Packaging Tool. Each field must contain:

  • name – Unique name of the field in Pricefx.

  • label – Label which will be displayed in PlatformManager.

  • description – Description of the field which will be displayed in PlatformManager.

  • mappingAliases - An array of possible mapping aliases ("Product Id" and "Unique Identification" for sku)

  • type – One of the following values: STRING, NUMBER, DATE, DATE_TIME, BOOLEAN. It is used to help users match columns from a file to a field. The process will allow users to map a column only if its type is allowed by the field.

Groups

  • name – Unique name of the group which is displayed in the UI collapse group.

  • type – Identifier of field type group (UI group by this field).

  • fields – List of optional fields in the group.

Optional fields can be grouped so that users can set logical groups for them and UI respects this.

  • dynamicPath

    • dsUniqueName – Name of a Data Source. 

    • fieldName – Name of an attribute of a field of the specified Data Source.

    • fieldValue – Value of the attribute.

Dynamic path allows you to define a Data Source and its field whose name should be fetched and used. The process will fetch the Data Source, iterate through fields and find the field which has an inner property with a name defined by "fieldName" set to a value defined by "fieldValue".

"optionalFields": [   {     "type": "group",     "name": "group 1",     "fields": [       {         "name": "OtherOnInvoicePromotions",         "label": "OtherOnInvoicePromotions",         "description": "", "type": "STRING"       }     ]   },   {     "name": "Currency",     "label": "Currency",     "description": ""   } ]

false

conditionalFields

Allows to specify fields based on previous skipped/non-skipped steps. It contains an array where each object has:

  • steps – List of step names. If the condition attribute is set to "true", none of the step names can be skipped. If set to "false", all of them must be skipped.

  • condition – Defines if the steps must be skipped or not to fulfill the condition. Possible values are true or false.

  • mandatoryFields – List of mandatory fields which will be added if the condition is fulfilled.

  • optionalFields – List of optional fields which will be added if the condition is fulfilled.

"conditionalFields": [ { "condition": true, "steps": [ "customer-master" ], "mandatoryFields": [ { "name": "CustomerId", "label": "CustomerId", "description": "" } ] } ]

false

significantFields

Similar to optional fields. The only difference is that users are advised to fill in these fields for better Accelerator result. Each field must contain:

  • name – Unique name of the field in Pricefx.

  • label – Label which will be displayed in PlatformManager.

  • description – Description of the field which will be displayed in PlatformManager.

  • mappingAliases - An array of possible mapping aliases ("Product Id" and "Unique Identification" for sku)

  • dynamicPath

    • dsUniqueName – Name of a Data Source.

    • fieldName – Name of an attribute of a field of the specified Data Source.

    • fieldValue – Value of the attribute.

Dynamic path allows you to define a Data Source and its field whose name should be fetched and used. The process will fetch the Data Source, iterate through fields and find the field which has an inner property with a name defined by "fieldName" set to a value defined by "fieldValue".

 

false

demoData

Definition of demo data:

  • filePath – Path to a CSV file in a data folder.

false

exampleFilePath

Definition of example file:

  • exampleFIlePath – Path to a CSV file in a data folder. 

"exampleFilePath": "ExampleFiles/Transaction.csv",

false

showMappingOptions

If set to true, a modal dialog with mapping options appears after the mapping step, with these options:

  • Continue 

  • Create data upload for just created/filled table – Users are redirected to a new step where they are forced to fill in the data upload name.

  • Run IM SFTP Template

"showMappingOptions": true

false

defaultCurrency

Allows to set a default Data Source currency.

"defaultCurrency": "USD"

false

userDefinedCustomFieldsAllowed

Allows the user to specify a custom field in UI. The default is false.

"userDefinedCustomFieldsAllowed": true

false

Example



PlatformManager version 1.75.0