# mechanic task code

Hey Isaac,

Sure, I'll write a review tomorrow 😄

Thanks for helping me out! I have a question though.

An external app creates discount codes in Shopify, and then I need to create a specific discount type which we will use. How would you make it that the discountCodeBxgyCreate only happens after the discountCodeDelete is completed.

```
{% comment %} Delete the triggered Shopify discount {% endcomment %} {% log 'Deleting Discount based on the given discount_id' %} {% action "shopify" %} mutation { [snip]
```

***

Hey ████! :) Excellent question. I can help by showing you where help's available:

* <https://learn.mechanic.dev/techniques/responding-to-action-results> — Platform documentation on the kind of mechanism you'll need here
* <https://slack.mechanic.dev/> — Our community Slack workspace! This is the right spot to work through code development questions, with folks who've seen it all. :)

I can't get into the code-level work with you, but I'm here with you as you're navigating resources. Let me know if you've got questions?

Cheers,

\=Isaac

***

(An internal Lightward note on this one: we always route each need to the place that can serve that need with the most elastic availability. That's why we don't do custom code, or even *consult* on custom code. The probability of a knowledgeable developer being awake and available is much more favorable in our community spaces, so we save a lot of probable grief by just routing needs like this over in those directions immediately.)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.lightward.guide/support/samples/mechanic-task-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
