Menu
storeCreditAccountCredit
Adds funds to a StoreCreditAccount by creating a StoreCreditAccountCreditTransaction. The mutation accepts either a store credit account ID, a Customer ID, or a CompanyLocation ID.
Use it in a workflow
- Add a step and choose the Shopify connector.
- Pick the storeCreditAccountCredit action (under Store).
- Fill in the fields below, then reference the result from later steps as
{{storecreditaccountcredit.response.data}}.
Query
This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.
mutation StoreCreditAccountCredit($id: ID!, $creditInput: StoreCreditAccountCreditInput!) {
storeCreditAccountCredit(id: $id, creditInput: $creditInput) {
storeCreditAccountTransaction {
account {
balance
id
owner
}
amount {
amount
currencyCode
}
balanceAfterTransaction {
amount
currencyCode
}
createdAt
event
expiresAt
id
origin
remainingAmount {
amount
currencyCode
}
}
userErrors {
code
field
message
}
}
}
Variables
Pass these as a JSON object in the step's Variables field.
{
"id": "string",
"creditInput": {
"creditAmount": {
"amount": "string",
"currencyCode": "USD"
},
"expiresAt": "string",
"notify": false
}
}
Response
Read the result with {{storecreditaccountcredit.response.data.data.storeCreditAccountCredit}}. If the API returns errors, the step fails and they are at {{storecreditaccountcredit.response.data.errors}}.
Need more? See the Shopify guide for connection setup and behaviour shared by every action.
Was this page helpful?