Skip to content

In Place Order Event : Order ID Type: String or Integer? #202

@kanhaiya5590

Description

@kanhaiya5590

I noticed that in the storefront-events-sdk schema for place-order, the orderId is defined as an integer:

https://github.com/adobe/commerce-events/blob/main/packages/storefront-events-sdk/src/types/schemas/order.ts#L5

export type Order = {
    ...
    orderId: string;
    ...

https://github.com/adobe/commerce-events/blob/v1.15.0/examples/events/example-contexts/mock-order-context.md

const mockOrder = {
    ...
    orderId: 111111,
   ...

And in the Snowplow example event payload (v1.15.0), it is also defined as:
https://github.com/adobe/commerce-events/blob/v1.15.0/examples/events/snowplow-debugger/order.json

"orderId": {
      "type": "integer"
    },

Questions

  1. Should orderId strictly remain an integer, or should it support string as well?
  2. If the type changes (e.g., from integer to string or to a union type), could this impact the Live Search Dashboard, specifically the Conversion Rate metric?

To avoid potential integration or validation issues, it would be helpful to align the schema with the example (or vice versa) to ensure consistency and prevent issues if any.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions