Create a Glue job

Creates a Glue job. A Glue job can generate webhooks, run on a schedule, or run from system events. Set this up with the trigger or schedule fields.

Minimal body: {"name": "My webhook glue", "type": "webhook", "variables": {}, "steps": []}.

  • For a system hook, add "type": "system hook" and a trigger.
  • For a schedule, add "type": "scheduled" and "schedule": {"cron_string": "0 6 * * *", "timezone": "Australia/Sydney"}.

The response is the full Glue job, including its id, and the guid and auth you need for its webhook URL.

Triggers

Set trigger to one of these when type is system hook. Update and status-change events send {"before": {…}, "after": {…}}; create and delete events send the full record.

ResourcetriggerFires when
Salespayment_createA payment is created.
email_receiptA receipt is emailed.
sale_createA sale is created.
sale_updateA sale is updated.
Fulfilment and shippingfulfillment_createA fulfillment is created.
fulfillment_updateA fulfillment is updated.
fulfillment_status_changeA fulfillment's status changes.
fulfillment_shipA fulfillment is shipped.
fulfillment_ship_updateA fulfillment's shipment details are updated.
shipment_createA shipment is created.
shipment_updateA shipment is updated.
shipment_status_changeA shipment's status changes.
shipment_deleteA shipment is deleted.
shippingcost_updateA shipping cost is updated.
shippingcost_createA shipping cost is created.
shippingcost_deleteA shipping cost is deleted.
Customers, loyalty and gift cardscustomer_createA customer is created.
customer_updateA customer is updated.
giftcard_createA gift card is created.
giftcard_updateA gift card is updated.
loyalty_program_updateThe loyalty program settings change.
loyalty_adjustA customer's loyalty points are adjusted.
storecredit_adjustA customer's store credit changes.
Products and pricescost_updateA cost is updated.
price_addA price is added.
price_updateA price is updated.
price_deleteA price is deleted.
product_createA product is created.
product_updateA product is updated.
product_deleteA product is deleted.
item_createAn item (variant) is created.
item_updateAn item (variant) is updated.
item_deleteAn item (variant) is deleted.
promotion_createA promotion is created.
promotion_updateA promotion is updated.
promotion_deleteA promotion is deleted.
Stock and warehousesinventory_adjustStock is adjusted or set (rows are sent in batches of up to 50).
location_createA warehouse location is created.
location_updateA warehouse location is updated.
location_deleteA warehouse location is deleted.
transfer_createA transfer is created.
transfer_updateA transfer is updated.
transfer_status_changeA transfer's status changes.
warehouse_createA warehouse is created.
warehouse_updateA warehouse is updated.
warehouse_deleteA warehouse is deleted.
stocktake_createA stocktake is created.
stocktake_deleteA stocktake is deleted.
stocktake_add_countCounts are added to a stocktake.
stocktake_status_changeA stocktake's status changes.
inventory_moveStock is moved between locations (batches of up to 50).
Purchasingapinvoice_createA supplier bill (AP invoice) is created.
apinvoice_deleteA supplier bill (AP invoice) is deleted.
apinvoice_status_changeA supplier bill (AP invoice)'s status changes.
purchaseorder_createA purchase order is created.
purchaseorder_updateA purchase order is updated.
purchaseorder_status_changeA purchase order's status changes.
purchaseorder_deleteA purchase order is deleted.
supplier_createA supplier is created.
supplier_updateA supplier is updated.
supplier_deleteA supplier is deleted.
Accountsaccount_createA ledger account is created.
account_updateA ledger account is updated.
arinvoice_createA customer invoice (AR invoice) is created.
arinvoice_deleteA customer invoice (AR invoice) is deleted.
arinvoice_status_changeA customer invoice (AR invoice)'s status changes.
banktransaction_createA bank transaction is created.
banktransaction_deleteA bank transaction is deleted.
banktransaction_matchA bank transaction is matched.
costcentre_createA cost centre is created.
costcentre_updateA cost centre is updated.
costcentre_deleteA cost centre is deleted.
journal_createA journal entry is created.
paymentmethod_createA payment method is created.
paymentmethod_updateA payment method is updated.
paymentmethod_deleteA payment method is deleted.
taxrate_createA tax rate is created.
taxrate_updateA tax rate is updated.
taxrate_deleteA tax rate is deleted.
fixedasset_createA fixed asset is created.
fixedassettype_createA fixed asset type is created.
fixedasset_updateA fixed asset is updated.
fixedassettype_updateA fixed asset type is updated.
fixedassetdepreciation_reverseA fixed asset depreciation is reversed.
fixedasset_depreciateFixed assets are depreciated.
Company, stores and staffcompany_createA company is created.
company_updateA company is updated.
store_createA store is created.
store_updateA store is updated.
store_deleteA store is deleted.
posstaff_createA POS staff member is created.
posstaff_updateA POS staff member is updated.
posstaff_forgot_passwordA POS staff member asks to reset their password.
Glue and logslog_createA log entry is created (use subtrigger to pick one category).
glue_createA Glue job is created.
glue_updateA Glue job is updated.
glue_deleteA Glue job is deleted.

subtrigger: leave it empty. Its one use is with log_create: set it to a log category to run only for log entries in that category. For any other trigger, a subtrigger stops the Glue job from running.

Limits: a Glue job can run for 270 seconds in total, and a Script step or If Condition for 60 seconds. A response from another system can be up to 10 MB, and an inbound webhook body up to 1 MB (larger bodies get 413). Job variables are capped at 20 MB in total, checked after every step. Loops can run 10,000 iterations per job in total, and steps can be nested 10 levels deep. A Delay duration over 60 waits 60. Each company can run 10 Glue jobs at once; extra runs get 503 and are retried later without counting as errors. If a run fails, it's logged in Glue errors and retried. On a retry, top-level REST, API, Shopify GraphQL and Email steps that already succeeded are skipped and their response variables restored, but steps inside an If Condition or Loop run again. To try a job before it goes live, open it in the app and select Run.

Body Params
integer

Unique ID. Set by Smooth POS.

string
required
schedule
object
steps
array of objects
steps
string

subtrigger: leave it empty. Its one use is with log_create: set it to a log category to run only for log entries in that category. For any other trigger, a subtrigger stops the Glue job from running.

string
enum

For system hook Glue jobs, the event to run on. Leave it empty ("") for webhook and scheduled Glue jobs.

ResourcetriggerFires when
Salespayment_createA payment is created.
email_receiptA receipt is emailed.
sale_createA sale is created.
sale_updateA sale is updated.
Fulfilment and shippingfulfillment_createA fulfillment is created.
fulfillment_updateA fulfillment is updated.
fulfillment_status_changeA fulfillment's status changes.
fulfillment_shipA fulfillment is shipped.
fulfillment_ship_updateA fulfillment's shipment details are updated.
shipment_createA shipment is created.
shipment_updateA shipment is updated.
shipment_status_changeA shipment's status changes.
shipment_deleteA shipment is deleted.
shippingcost_updateA shipping cost is updated.
shippingcost_createA shipping cost is created.
shippingcost_deleteA shipping cost is deleted.
Customers, loyalty and gift cardscustomer_createA customer is created.
customer_updateA customer is updated.
giftcard_createA gift card is created.
giftcard_updateA gift card is updated.
loyalty_program_updateThe loyalty program settings change.
loyalty_adjustA customer's loyalty points are adjusted.
storecredit_adjustA customer's store credit changes.
Products and pricescost_updateA cost is updated.
price_addA price is added.
price_updateA price is updated.
price_deleteA price is deleted.
product_createA product is created.
product_updateA product is updated.
product_deleteA product is deleted.
item_createAn item (variant) is created.
item_updateAn item (variant) is updated.
item_deleteAn item (variant) is deleted.
promotion_createA promotion is created.
promotion_updateA promotion is updated.
promotion_deleteA promotion is deleted.
Stock and warehousesinventory_adjustStock is adjusted or set (rows are sent in batches of up to 50).
location_createA warehouse location is created.
location_updateA warehouse location is updated.
location_deleteA warehouse location is deleted.
transfer_createA transfer is created.
transfer_updateA transfer is updated.
transfer_status_changeA transfer's status changes.
warehouse_createA warehouse is created.
warehouse_updateA warehouse is updated.
warehouse_deleteA warehouse is deleted.
stocktake_createA stocktake is created.
stocktake_deleteA stocktake is deleted.
stocktake_add_countCounts are added to a stocktake.
stocktake_status_changeA stocktake's status changes.
inventory_moveStock is moved between locations (batches of up to 50).
Purchasingapinvoice_createA supplier bill (AP invoice) is created.
apinvoice_deleteA supplier bill (AP invoice) is deleted.
apinvoice_status_changeA supplier bill (AP invoice)'s status changes.
purchaseorder_createA purchase order is created.
purchaseorder_updateA purchase order is updated.
purchaseorder_status_changeA purchase order's status changes.
purchaseorder_deleteA purchase order is deleted.
supplier_createA supplier is created.
supplier_updateA supplier is updated.
supplier_deleteA supplier is deleted.
Accountsaccount_createA ledger account is created.
account_updateA ledger account is updated.
arinvoice_createA customer invoice (AR invoice) is created.
arinvoice_deleteA customer invoice (AR invoice) is deleted.
arinvoice_status_changeA customer invoice (AR invoice)'s status changes.
banktransaction_createA bank transaction is created.
banktransaction_deleteA bank transaction is deleted.
banktransaction_matchA bank transaction is matched.
costcentre_createA cost centre is created.
costcentre_updateA cost centre is updated.
costcentre_deleteA cost centre is deleted.
journal_createA journal entry is created.
paymentmethod_createA payment method is created.
paymentmethod_updateA payment method is updated.
paymentmethod_deleteA payment method is deleted.
taxrate_createA tax rate is created.
taxrate_updateA tax rate is updated.
taxrate_deleteA tax rate is deleted.
fixedasset_createA fixed asset is created.
fixedassettype_createA fixed asset type is created.
fixedasset_updateA fixed asset is updated.
fixedassettype_updateA fixed asset type is updated.
fixedassetdepreciation_reverseA fixed asset depreciation is reversed.
fixedasset_depreciateFixed assets are depreciated.
Company, stores and staffcompany_createA company is created.
company_updateA company is updated.
store_createA store is created.
store_updateA store is updated.
store_deleteA store is deleted.
posstaff_createA POS staff member is created.
posstaff_updateA POS staff member is updated.
posstaff_forgot_passwordA POS staff member asks to reset their password.
Glue and logslog_createA log entry is created (use subtrigger to pick one category).
glue_createA Glue job is created.
glue_updateA Glue job is updated.
glue_deleteA Glue job is deleted.
string
enum
required

How the Glue job runs. Not case-sensitive.

Allowed:
variables
object
required

Starting variables for each run. Always send an object, even if it's {}.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json