Import Setups

Previous  Next |  Direct link to this topic

The Perfion Extension Import Setup can be found on the following path: Administration > Add-Ons > B1 Usability Package > Module configuration > Perfion Extension > Import Setups

 

Import Setups allows you to define which data is imported from Perfion and the mapping of said data.

You can have multiple setups for importing things differently.

 

While most of the definition of what data is imported and how is contained in the two tabs "Query" and "Mapping", each setup also has a name you can define to easily recognize what the import is for and an automatically generated number.

Each setup also has a page size, which determines how many products are retrieved with each call to the Perfion API, which in turn can affect performance if set too high or too low. Default page size is 100.

 
You can also import and export your setups using the "Import" and "Export" located on the bottom right of the form.

 

The Query tab

The Query tab contains the query used for defining what data to retrieve from the Perfion API:

PerfionImportSetupQueryTab

If you want to make sure not to import data that hasn't been changed in Perfion since the last import you can use [%LastImport] in a where clause of the query to filter out unchanged data.

Using the "Test query" button you can test that the query is valid and save the response if you want to.

 

The Mapping tab

The mapping tab contains both the record root node and the mapping between SAP B1 item fields and the XPaths to the values those fields should be filled with and any default value for those fields.

PerfionImportSetupMappingTab

 

 

Field

Description

Object Type

The object type of the imported data.

Together with Interface it determines what business object is created in SAP B1 from the imported data.

Also determines which UDFs are available in the Field Name field.

Interface

The interface type for the imported data.

Together with Object Type it determinate what business object is created in SAP B1 from the imported data.

Also determines SAP B1 fields are available in the Field Name field.

Field Name

Name of the field in SAP B1. Available choices depend on which object type and interface is chosen.

Is Primary Key

Whether or not the chosen field is key for the business object.

At least one field must be set as primary key for each object type.

In order for updating objects on import to work one field must be set as primary key for each interface, with the primary key for subobjects (like lines) functioning as the key for the subobject.

XPath to value

The XPath to the value which the field will be filled with.

You can use [%enumerator] as a placeholder in the XPath for subcollections.

F.ex. if making a bill of materials then "Items/Item[%enumerator]/Value" would be a way to get the item code for each row in the Items collection.

Default value

Default value for the field if no value was found using the XPath (or a constant value that is always used if XPath is left empty).

Skip on error

If value could not be found using XPath, there is no default value and this is not checked, then the import for the product will fail with an error message on the import result form.

If this is checked it will not fail the import of the product, but instead leave the field for which this was check empty.

Skip on empty

If checked and empty value is received from Perfion, then the field skipped.

If not checked, then the field will be set to the empty value, meaning number fields will be set to zero, text fields will be set to empty and BoYesNoEnum field will be set to no.