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
}
}
}
}