Sync BC items to Perfion (OData)

This Action Map synchronizes items from BC to Perfion with OData.

This example is provided as inspiration only. It must be adapted to your Perfion environment to work. Perfion Support does not assist with such adaptations. Please contact your Perfion Partner or your Perfion consultant if you need assistance.

Action Map

  • The BC connectionstring in this example is included directly in the Action Map - FROM. As an alternative, it can be stored in another action and referenced via the EXECUTE.ACTION command

  • More information about the connectionstring can be found in the Perfion Remotes Manual, page 74 - The Basic OData Service Connection Parameters

  • OData is limited to return 20.000 results in one URI. If you need sync from more than 20.000 products, please contact your Perfion Partner or your Perfion consultant.

Sample data for building Action Map

NOTE: Line breaks are omitted if you paste scripts from the table below directly to an action. In stead, paste script to Notepad++ and then copy from there. That will preserve line breaks when you paste into an action.

Action Map - From

To

Command

Action

Script

Note

Provider="OData";Format="JSON";URI="https://
perfion.com:7048/BC150/ODataV4/Company('Test')";
AuthType="BasicAuth";UID="perfion";PWD="xxxxx";

ItemData

SELECT.ODATA

 

/ItemCard?$select=No,Description,Unit_Price&$filter=Blocked eq false

Selects all items from BC with Blocked = false

300

@CommandTimeOut

 

 

 

 

TRUE

@IncludeMetadata

 

 

 

 

ItemData

Import

SELECT.JSON

 

 

 

value

@CONTEXT

 

 

 

 

No

_value

 

 

 

 

Description

ItemName_EN

 

 

 

 

Unit_Price

UnitPrice

 

 

 

 

Import

ItemNumber

IMPORT

 

 

Without validation → new items from BC is added to Perfion