Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Failing to update Marketing Activity

Failing to update Marketing Activity

SMSto
Shopify Partner
2 0 2

Trying to update a Pending Marketing Activity but keep failing.

 

Below piece of code works: 

 

$query = <<<QUERY
            mutation marketingActivityUpdate(\$id: ID!, \$status: MarketingActivityStatus!){
                marketingActivityUpdate(input: {id: \$id, status: \$status}) {
                marketingActivity {
                    id
                    title
                    status
                }
                }
            }
            QUERY;

        $variables = [
            "id" => $this->request["marketing_activity_id"],
            "status" => "FAILED"
        ];

        $response = $client->query(['query' => $query, 'variables' => $variables]);

 

but when trying to change the status to something else e.g. ACTIVE it fails.

I tried everything in documentation but keep failing. https://shopify.dev/apps/app-extensions/marketing-activities/reference/endpoints#create-a-marketing-...

 

I would appreciate any assistance.

Replies 2 (2)

LuffyOnePiece
Shopify Partner
645 93 119

Hi @SMSto ,

 

I am facing the same issue.

Have you found the solution?

 

If yes, please let me know how you fix it?

 

Thank you

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184
LuffyOnePiece
Shopify Partner
645 93 119

Fixed. Need to pass the utm params too.

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184