marketing Activity Update Externalmutation
Requires write
access scope.
Update an external marketing activity.
Arguments
The input field for updating an external marketing activity.
Anchor to marketingActivityIdmarketingActivityIdThe ID of the marketing activity. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity.
Anchor to remoteIdremoteIdThe ID of an activity that's hosted outside of Shopify. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity.
Specifies the Urchin Traffic Module (UTM) parameters that are associated with a related marketing campaign. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity.
MarketingActivityUpdateExternalPayload returns
The updated marketing activity.
The list of errors that occurred from executing the mutation.
Code examples for MUTATION: marketingActivityUpdateExternal
Query Reference for MUTATION: marketingActivityUpdateExternal
"mutation marketingActivityUpdateExternal($input: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(input: $input) {\n marketingActivity {\n # MarketingActivity fields\n }\n userErrors {\n field\n message\n }\n }\n}"
Input Reference for MUTATION: marketingActivityUpdateExternal
"{\n \"input\": {\n \"adSpend\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n },\n \"budget\": {\n \"budgetType\": \"DAILY\",\n \"total\": {\n \"amount\": \"29.99\",\n \"currencyCode\": \"AED\"\n }\n },\n \"end\": \"2019-09-07T15:50:00Z\",\n \"marketingChannelType\": \"DISPLAY\",\n \"referringDomain\": \"<your-referringDomain>\",\n \"remotePreviewImageUrl\": \"https://example.myshopify.com\",\n \"remoteUrl\": \"https://example.myshopify.com\",\n \"scheduledEnd\": \"2019-09-07T15:50:00Z\",\n \"scheduledStart\": \"2019-09-07T15:50:00Z\",\n \"start\": \"2019-09-07T15:50:00Z\",\n \"status\": \"ACTIVE\",\n \"tactic\": \"ABANDONED_CART\",\n \"title\": \"<your-title>\"\n },\n \"marketingActivityId\": \"gid://shopify/<objectName>/10079785100\",\n \"remoteId\": \"<your-remoteId>\",\n \"utm\": {\n \"campaign\": \"<your-campaign>\",\n \"medium\": \"<your-medium>\",\n \"source\": \"<your-source>\"\n }\n}"
Schema Reference for MUTATION: marketingActivityUpdateExternal
"input MarketingActivityUpdateExternalInput {\n adSpend: MoneyInput\n budget: MarketingActivityBudgetInput\n channel: MarketingChannel\n end: DateTime\n marketingChannelType: MarketingChannel\n referringDomain: String\n remotePreviewImageUrl: URL\n remoteUrl: URL\n scheduledEnd: DateTime\n scheduledStart: DateTime\n start: DateTime\n status: MarketingActivityExternalStatus\n tactic: MarketingTactic\n title: String\n}\n\ninput MoneyInput {\n amount: Decimal!\n currencyCode: CurrencyCode!\n}\n\ninput MarketingActivityBudgetInput {\n budgetType: MarketingBudgetBudgetType\n total: MoneyInput\n}\n\ninput UTMInput {\n campaign: String!\n medium: String!\n source: String!\n}\n"
Display Examples for MUTATION: marketingActivityUpdateExternal
[ { "example": { "type_name": "marketingactivityupdateexternal", "title": "Update an external marketing activity and its status", "description": "Starting from API version 2024-01, the status field for creating an external marketing activity will be an optional, modifiable field.", "query_string": "mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n}", "variables": { "remoteId": "abcdefg", "updateInput": { "title": "New Title", "remoteUrl": "https://example.com", "remotePreviewImageUrl": "https://example.com", "status": "PAUSED" } }, "response": { "data": { "marketingActivityUpdateExternal": { "marketingActivity": { "id": "gid://shopify/MarketingActivity/36187062", "title": "New Title", "marketingEvent": { "manageUrl": "https://example.com", "previewUrl": "https://example.com" } } } } }, "api_name": "admin", "minimum_api_version": "2024-01", "maximum_api_version": "unstable", "location": "/components/merchant_marketing/test/unit/graph_api/admin/mutations/marketing_activity_update_external_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) { marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) { marketingActivity { id title marketingEvent { manageUrl previewUrl } } } }\",\n \"variables\": {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\",\n \"status\": \"PAUSED\"\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n {\n variables: {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\",\n \"status\": \"PAUSED\"\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\",\n \"status\": \"PAUSED\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n \"variables\": {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\",\n \"status\": \"PAUSED\"\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY;\n\n$variables = [\n \"remoteId\" => \"abcdefg\",\n \"updateInput\" => [\n \"title\" => \"New Title\",\n \"remoteUrl\" => \"https://example.com\",\n \"remotePreviewImageUrl\" => \"https://example.com\",\n \"status\" => \"PAUSED\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "remoteId", "description": "The ID of an activity that's hosted outside of Shopify. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity.", "type": { "kind": "SCALAR", "name": "String", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "String", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "remoteId", "argValue": " \"abcdefg\"", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "marketingactivityupdateexternal", "title": "Update an external marketing activity using the marketing activity ID", "query_string": "mutation marketingActivityUpdateExternal($marketingActivityId: ID!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(marketingActivityId: $marketingActivityId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n}", "variables": { "marketingActivityId": "gid://shopify/MarketingActivity/36187062", "updateInput": { "title": "New Title", "remoteUrl": "https://example.com", "remotePreviewImageUrl": "https://example.com" } }, "response": { "data": { "marketingActivityUpdateExternal": { "marketingActivity": { "id": "gid://shopify/MarketingActivity/36187062", "title": "New Title", "marketingEvent": { "manageUrl": "https://example.com", "previewUrl": "https://example.com" } } } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/merchant_marketing/test/unit/graph_api/admin/mutations/marketing_activity_update_external_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation marketingActivityUpdateExternal($marketingActivityId: ID!, $updateInput: MarketingActivityUpdateExternalInput!) { marketingActivityUpdateExternal(marketingActivityId: $marketingActivityId, input: $updateInput) { marketingActivity { id title marketingEvent { manageUrl previewUrl } } } }\",\n \"variables\": {\n \"marketingActivityId\": \"gid://shopify/MarketingActivity/36187062\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation marketingActivityUpdateExternal($marketingActivityId: ID!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(marketingActivityId: $marketingActivityId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n {\n variables: {\n \"marketingActivityId\": \"gid://shopify/MarketingActivity/36187062\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation marketingActivityUpdateExternal($marketingActivityId: ID!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(marketingActivityId: $marketingActivityId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"marketingActivityId\": \"gid://shopify/MarketingActivity/36187062\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation marketingActivityUpdateExternal($marketingActivityId: ID!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(marketingActivityId: $marketingActivityId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n \"variables\": {\n \"marketingActivityId\": \"gid://shopify/MarketingActivity/36187062\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation marketingActivityUpdateExternal($marketingActivityId: ID!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(marketingActivityId: $marketingActivityId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY;\n\n$variables = [\n \"marketingActivityId\" => \"gid://shopify/MarketingActivity/36187062\",\n \"updateInput\" => [\n \"title\" => \"New Title\",\n \"remoteUrl\" => \"https://example.com\",\n \"remotePreviewImageUrl\" => \"https://example.com\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "marketingActivityId", "description": "The ID of the marketing activity. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "ID", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "marketingActivityId", "argValue": " \"gid://shopify/MarketingActivity/36187062\"", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "marketingactivityupdateexternal", "title": "Update an external marketing activity using the remote id", "query_string": "mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n}", "variables": { "remoteId": "abcdefg", "updateInput": { "title": "New Title", "remoteUrl": "https://example.com", "remotePreviewImageUrl": "https://example.com" } }, "response": { "data": { "marketingActivityUpdateExternal": { "marketingActivity": { "id": "gid://shopify/MarketingActivity/36187062", "title": "New Title", "marketingEvent": { "manageUrl": "https://example.com", "previewUrl": "https://example.com" } } } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/merchant_marketing/test/unit/graph_api/admin/mutations/marketing_activity_update_external_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) { marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) { marketingActivity { id title marketingEvent { manageUrl previewUrl } } } }\",\n \"variables\": {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n {\n variables: {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n \"variables\": {\n \"remoteId\": \"abcdefg\",\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation marketingActivityUpdateExternal($remoteId: String!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(remoteId: $remoteId, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY;\n\n$variables = [\n \"remoteId\" => \"abcdefg\",\n \"updateInput\" => [\n \"title\" => \"New Title\",\n \"remoteUrl\" => \"https://example.com\",\n \"remotePreviewImageUrl\" => \"https://example.com\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "remoteId", "description": "The ID of an activity that's hosted outside of Shopify. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity.", "type": { "kind": "SCALAR", "name": "String", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "String", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "remoteId", "argValue": " \"abcdefg\"", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "marketingactivityupdateexternal", "title": "Update an external marketing activity using the utm parameters", "query_string": "mutation marketingActivityUpdateExternal($utm: UTMInput!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(utm: $utm, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n}", "variables": { "utm": { "source": "email", "medium": "newsletter", "campaign": "external-event-campaign" }, "updateInput": { "title": "New Title", "remoteUrl": "https://example.com", "remotePreviewImageUrl": "https://example.com" } }, "response": { "data": { "marketingActivityUpdateExternal": { "marketingActivity": { "id": "gid://shopify/MarketingActivity/36187062", "title": "New Title", "marketingEvent": { "manageUrl": "https://example.com", "previewUrl": "https://example.com" } } } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/merchant_marketing/test/unit/graph_api/admin/mutations/marketing_activity_update_external_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation marketingActivityUpdateExternal($utm: UTMInput!, $updateInput: MarketingActivityUpdateExternalInput!) { marketingActivityUpdateExternal(utm: $utm, input: $updateInput) { marketingActivity { id title marketingEvent { manageUrl previewUrl } } } }\",\n \"variables\": {\n \"utm\": {\n \"source\": \"email\",\n \"medium\": \"newsletter\",\n \"campaign\": \"external-event-campaign\"\n },\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation marketingActivityUpdateExternal($utm: UTMInput!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(utm: $utm, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n {\n variables: {\n \"utm\": {\n \"source\": \"email\",\n \"medium\": \"newsletter\",\n \"campaign\": \"external-event-campaign\"\n },\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation marketingActivityUpdateExternal($utm: UTMInput!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(utm: $utm, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY\n\nvariables = {\n \"utm\": {\n \"source\": \"email\",\n \"medium\": \"newsletter\",\n \"campaign\": \"external-event-campaign\"\n },\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation marketingActivityUpdateExternal($utm: UTMInput!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(utm: $utm, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }`,\n \"variables\": {\n \"utm\": {\n \"source\": \"email\",\n \"medium\": \"newsletter\",\n \"campaign\": \"external-event-campaign\"\n },\n \"updateInput\": {\n \"title\": \"New Title\",\n \"remoteUrl\": \"https://example.com\",\n \"remotePreviewImageUrl\": \"https://example.com\"\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation marketingActivityUpdateExternal($utm: UTMInput!, $updateInput: MarketingActivityUpdateExternalInput!) {\n marketingActivityUpdateExternal(utm: $utm, input: $updateInput) {\n marketingActivity {\n id\n title\n marketingEvent {\n manageUrl\n previewUrl\n }\n }\n }\n }\nQUERY;\n\n$variables = [\n \"utm\" => [\n \"source\" => \"email\",\n \"medium\" => \"newsletter\",\n \"campaign\" => \"external-event-campaign\",\n ],\n \"updateInput\" => [\n \"title\" => \"New Title\",\n \"remoteUrl\" => \"https://example.com\",\n \"remotePreviewImageUrl\" => \"https://example.com\",\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "utm", "description": "Specifies the [Urchin Traffic Module (UTM) parameters](https://en.wikipedia.org/wiki/UTM_parameters) that are associated with a related marketing campaign. Specify either the marketing activity ID, remote ID, or UTM to update the marketing activity.", "type": { "kind": "INPUT_OBJECT", "name": "UTMInput", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "UTMInput", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "utm", "argValue": " {\"source\":\"email\",\"medium\":\"newsletter\",\"campaign\":\"external-event-campaign\"}", "typeKind": "MUTATION" } ] } ]