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 0 (0)