Automatic discounts problem

Solved
Anna55
New Member
1 0 0

I have some questions about discounts in GraphQL Admin API. The discounts have two type: automatic discount and code discount. I want to know whether the id of these two type will conflict  in same store? I mean whether the situation below will happen?

"gid:\/\/shopify\/DiscountAutomaticNode\/12345"
"gid:\/\/shopify\/DiscountCodeNode\/12345"

 

Accepted Solution (1)

Accepted Solutions
GrahamS
Shopify Staff
156 25 32

This is an accepted solution.

Hey @Anna55 ,

 

object IDs will be unique across all internal components, so you shouldn't ever encounter a situation where any two things (like a product and a customer, or an automatic discount and a manual discount) share the same ID.

 

Best,

Graham S | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)
GrahamS
Shopify Staff
156 25 32

This is an accepted solution.

Hey @Anna55 ,

 

object IDs will be unique across all internal components, so you shouldn't ever encounter a situation where any two things (like a product and a customer, or an automatic discount and a manual discount) share the same ID.

 

Best,

Graham S | API Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post