CreatedBy of discount created by app is null

I’m inspecting discounts that are generated by other apps using codeDiscountNodeByCode .
For some apps (Klaviyo) the createdBy object contains the details of the app that created it.
For others (Omnisend) the createdBy object returns null.
When I view the discount in the Admin UI I can see it is properly linked to Omnisend.
Any ideas on what could cause this?

Example:
This is an example of a code created by Omnisend that contains a single redeem code.
When querying the createdBy of that redeem code Shopify returns null.

{
    "data": {
        "codeDiscountNodeByCode": {
            "codeDiscount": {
                "__typename": "DiscountCodeBasic",
                "codes": {
                    "pageInfo": {
                        "hasNextPage": false,
                        "endCursor": "eyJsYXN0X2lkIjoxODYyNzE1MTk1NDEzNCwibGFzdF92YWx1ZSI6IjE4NjI3MTUxOTU0MTM0In0="
                    },
                    "nodes": [
                        {
                            "id": "gid://shopify/DiscountRedeemCode/18627151954134",
                            "asyncUsageCount": 0,
                            "code": "EBKI-6DAW-34ST",
                            "createdBy": null
                        }
                    ]
                }
            },
            "id": "gid://shopify/DiscountCodeNode/1484931727574"
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost": 18,
            "actualQueryCost": 6,
            "throttleStatus": {
                "maximumAvailable": 2000.0,
                "currentlyAvailable": 1994,
                "restoreRate": 100.0
            }
        }
    }
}
1 Like

I suppose this is why it shows redemption codes ‘created by App’ (generic), instead of by the app that made the redemption codes:

Hello @BartCoppens !

Thanks for sharing this information. I was able to trace back the creation of that discount thanks to your example :folded_hands:

Will report shortly.

2 Likes

There is indeed an inconsistency here. Thanks for sharing with us.

I’ve created a bug in our backlog. What are you trying to achieve and is this blocking you?

Hi @FabriceDugas-Shopify, please refer to this thread on Slack where this was discussed with Jonathan Harlap: Slack

@BartCoppens most Shopify product teams don’t have access to the Partner Slack, so in future I’d recommend keeping conversation in this community.

1 Like