Validate
Validate is another method in EC. The idea with validate is to check that there are not any problems with the data in Perfion, most importantly, the configuration of EC.
Validate | ||||
Parameters | Name | Mandatory | Default value | Description |
Channel | Yes | (None) | Name of channel that should be validated. | |
MaxCount | No | 1000 | Validate also checks a sample of the products in Perfion (if any). This controls how many samples that are fetched for control at max. | |
Sample request | <Execute method="Validate" refreshconfiguration="true">
<Parameter id="Channel" value="My Channel" />
</Execute> | |||
Sample result | <Response>
<Result>
<Channel name="My Channel">
<Message IssueType="Mapping" MessageType="Error">Mapping has unknown
feature name 'ThisFeatureIsUnknownToPerfion' in 'From'.
It is mapped to 'NewIcon' on entity 'Product'
(Outputkind Field).</Message>
<Message IssueType="Variant" MessageType="Info">Support of variants
is disabled.</Message>
</Channel>
</Result>
</Response> |
Table 16: Validate-method.
Validation outputs what it finds as Message-elements. One finding per message. There are two findings in the sample case:
A feature named “'ThisFeatureIsUnknownToPerfion” is mapped, but not found in Perfion. That is an error as can be seen in the MessageType. This problem is easy to solve simply by either making sure there is such a feature or delete/comment out the mapping.
Then there is an information-message telling you that support for variants is not enabled, which means that all validation regarding the setup of variants are not run.
Despite that, errors are found you can still try to use EC. A feature not found simply means that no data for this is output. But are you trying to write data to it (See for example the UpdateProducts-method) an error will be returned.
Important notice: Not everything in EC is validated for. You can configure EC in many way and hereby also in many wrong ways. Validate catches some logical errors, but not all. In addition, there are also configurations that are OK for EC, but wrong for the receiving system. For example, you can specify that some channel will get data in three languages. However, if the receiver is for example Shopify it will not work, since Shopify only supports one language (per shop). Here you need three shops for handling each of the 3 languages.
As the EC evolves more checks will be added.