> For the complete documentation index, see [llms.txt](https://www.lightward.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.lightward.guide/support/samples/custom-code.md). Agents can also search and read this documentation through its [MCP server](https://www.lightward.guide/~gitbook/mcp).

# custom code

Subject: Line - Level Order Cancellation

Hi Team,

We want to implement a functionality on our Shopify store which would allow customers to 'Cancel' a particular line-item from a placed order. 'Cancel' button is visible to the customer on the frontend until the order gets fulfilled.

Right now, Shopify does not have a native functionality for line-item level order cancellation.

So, if a customer wants to cancel a specific product from an order which contains other sets, the entire order gets cancelled. We don't want that to happen.

We found your app on Shopify Appstore and we think that the functionality that you offer may help us add this 'Line-item level cancellation' feature on our store.

Let us know if you have any custom template available, or can you get this done for us? Also let us know if you offer any local support for clients in ████.

Our Shopify store URL: https\://████.myshopify.com/

Thanks and Regards, ████

***

Hi ████! :) Thanks for getting in touch about this.

> Let us know if you have any custom template available, or can you get this done for us?

Sounds like a job for custom Mechanic code! :) We've got documentation about this process here:

<https://learn.mechanic.dev/custom>

For background: I can help with platform issues and account questions, but we've found that adding custom code services to that list isn't sustainable for us. Instead, we've prepared a list of Mechanic implementers, all ready to work with you:

<https://partners.mechanic.dev/>

Have a look, and let me know if you've got questions about the process!

> Also let us know if you offer any local support for clients in ████.

We only offer email support; we don't offer local support anywhere. I do absolutely suggest joining our community Slack workspace, where you can compare notes in realtime with other Mechanic users! We-the-staff hang out there too. :)

<https://slack.mechanic.dev/>

Hope to see you there! :)

Cheers,

\=Isaac


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.lightward.guide/support/samples/custom-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
