[Bug] Admin Intents ProductVariant edit is not working

I am trying to utilize the Admin intents feature to enable users to edit variants without needing to leave our app.

This is the code to trigger the modal.

console.log('variant_id', variant_id);
const activity = await shopify.intents.invoke('edit:shopify/ProductVariant', {
   value: 'gid://shopify/ProductVariant/' + variant_id,
});

This is the variant I am trying to edit.

This is my console log.

Am I missing something here?

@Liam-Shopify @Daniel_Ablestar Hey guys, am I missing something here? Any ideas why this wouldn’t work?

After playing around with it some I was able to get it to work with the following code:

const activity = await shopify.intents.invoke(
  "edit:shopify/ProductVariant",
  {
    value: "gid://shopify/ProductVariant/58178392162385",
    data: {
      productId: "15534429962321",
    },
  }
);
const response = await activity.complete;
console.log(response);

The productId isn’t mentioned in the documentation but looking at the console.log(response); output it looked like it was required.

Also, for this intent and for the create variant intent, the productId needs to be the numeric ID of the product, cast as a string. The documentation currently says you need the full gid for the productId.

Thanks @Daniel_Ablestar this works!

@Liam-Shopify Danel’s solution solves the problem, but the documentation is not correct and still needs to be fixed.