Custom order fullfillment status
With new custom-shopify-order-fulfillment-status
appmaker trigger, you can add custom fulfillment status to order. You can have custom api call to get the fulfillment status and display it on the order page.
Parameters avilable in the function
input
- Input objectdependencies
- Dependencies object
Input object
Parameter | Type | Description |
---|---|---|
status | String | Current status |
label | String | Label for current Status |
Dependencies object
Parameter | Type | Description |
---|---|---|
order | Object | Order Object |
Return object
Parameter | Type | Description |
---|---|---|
status | String | Status |
label | String | Label for Status |
Example
import { appmakerFunctions } from "@appmaker-xyz/core";
// Add appmaker function in your active function in theme or extension
appmakerFunctions.registerAppmakerFn({
trigger: "custom-shopify-order-fulfillment-status",
fn: async (input, dependencies) => {
// call your api to get the fulfillment status
// const newStatus = await fetch('https://example.com/api/fulfillment-status');
// return { status: newStatus, label: newStatus.label };
return {
status: "fulfilled",
label: "Shipped" + JSON.stringify(input.s),
};
},
});