shopify.tagCustomer

Shortcut for tagging a customer.

Important:

  • Counts as 2 actions, as the order must be fetched before being tagged.
  • Cloudhooks uses the lowest-supported Admin API version to make the API calls.

Parameters

customerId: string Identifier of the customer
tags: string Tags to add to the customer, separated by comma

Returns

Promise that is resolved with the updated customer.

Examples

Adds tags to the customer
module.exports = async function(payload, actions, context) {
	const customerId = '12345';

	const result = await actions.shopify.tagCustomer(
		customerId,
		'paying-customer,tagged'
	);

	console.log('Customer: ', result);
}