Tracking ecommerce transactions - field restrictions

It looks like the .NET tracker doesn’t impose any restrictions on the value of EcommerceTransactionItem
fields such as price and quantity aside from checking they are not null. It looks like it is fine to set the price to zero or even a negative value? I’m assuming there is no difference with other trackers, such as the JavaScript tracker?

Is there any part of the Snowplow pipeline beyond the tracker which expects these values to be positive or non-negative?

I’m trying to verify that setting the price to zero or below is a valid thing to do.

Hi @Michael_Bailey
For stanard Ecommerce tracking there is little validation beyond them being a string or an integer (where you’d expect like on Quantity). This is because the standard ecommerce events are part of the canonical model so we don’t apply schema validation to them.

We also have schemas in iglu central that conform to the Google Enhanced Ecommerce data structure. You could use these instead with a SelfDescriningJson event. These have some validation on the fields as you would expect with any Self Describing event, and these are also commonly use when tracking ecommerce events in the JavaScript Tracker.
You’ll find them on iglu central, so they can be automatically used on your pipeline, and these schemas have a vendor of:

1 Like