Update a Customer
Name
put_customer
Description
Updates an existing customer. [API reference]
Related Tables
Parameters
Parameter | Label | Required | Options | Description |
---|---|---|---|---|
Id | Customer Id | YES | The ID of the customer to be updated. |
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_I8
|
bigint
|
False |
||
DT_WSTR
|
nvarchar(255)
|
255 | False |
||
AcceptsMarketing |
DT_BOOL
|
bit
|
False |
||
CreatedAt |
DT_DBTIMESTAMP
|
datetime
|
False |
||
UpdatedAt |
DT_DBTIMESTAMP
|
datetime
|
False |
||
FirstName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
LastName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
OrdersCount |
DT_I4
|
int
|
False |
||
State |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
TotalSpent |
DT_WSTR
|
nvarchar(50)
|
50 | False |
|
LastOrderId |
DT_I8
|
bigint
|
False |
||
Note |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
|
VerifiedEmail |
DT_BOOL
|
bit
|
False |
||
MultipassIdentifier |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
TaxExempt |
DT_BOOL
|
bit
|
False |
||
TaxExemptions |
DT_WSTR
|
nvarchar(4000)
|
4000 | True |
|
Tags |
DT_WSTR
|
nvarchar(4000)
|
4000 | False |
|
LastOrderName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
Currency |
DT_WSTR
|
nvarchar(20)
|
20 | False |
|
Phone |
DT_WSTR
|
nvarchar(30)
|
30 | False |
|
AcceptsMarketingUpdatedAt |
DT_DBTIMESTAMP
|
datetime
|
False |
||
MarketingOptInLevel |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
SMSMarketingConsent |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
AdminGraphQLApiId |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressId |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCustomerId |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressFirstName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressLastName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCompany |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressAddress1 |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressAddress2 |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCity |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressProvince |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCountry |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressZip |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressPhone |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressProvinceCode |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCountryCode |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCountryName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
EmailMarketingConsentState |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
EmailMarketingConsentOptInLevel |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
EmailMarketingConsentUpdatedAt |
DT_DBTIMESTAMP
|
datetime
|
False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Id |
DT_I8
|
bigint
|
False |
||
FirstName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
LastName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DT_WSTR
|
nvarchar(255)
|
255 | False |
||
Phone |
DT_WSTR
|
nvarchar(30)
|
30 | False |
|
Password |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
PasswordConfirmation |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
SendWelcomeEmail |
DT_BOOL
|
bit
|
False |
||
MultipassIdentifier |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
Note |
DT_NTEXT
|
nvarchar(MAX)
|
False |
||
Tags |
DT_NTEXT
|
nvarchar(MAX)
|
False |
||
TaxExempt |
DT_BOOL
|
bit
|
False |
||
TaxExemptions |
DT_WSTR
|
nvarchar(4000)
|
4000 | True |
|
DefaultAddressFirstName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressLastName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCompany |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressLine1 |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressLine2 |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCity |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressProvince |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCountry |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressZip |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressPhone |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressProvinceCode |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCountryCode |
DT_WSTR
|
nvarchar(255)
|
255 | False |
|
DefaultAddressCountryName |
DT_WSTR
|
nvarchar(255)
|
255 | False |
Examples
SSIS
Use Shopify Connector in API Source component to read data or in API Destination component to read/write data:
Update rows in Customers table using API Destination
This Endpoint belongs to Customers table, therefore you cannot work with it directly. Use this table and table-operation pair instead:

ODBC application
Use these SQL queries in your ODBC application data source:
Update an existing customer record
UPDATE Customers SET
Email = 'john.doe2@gmail.com',
Phone = '7705553445',
Note= 'This is a new note that needed to be added later.'
WHERE Id=1111111111111
Update an existing customer record using RAW JSON Body (special column _rawdoc_)
Sometimes you have need to INSERT or UPDATE certain arrtibutes for which input columns not defined. In this case you can supply entire BODY JSON as input using special column name _rawdoc_
UPDATE Customers
SET _rawdoc_='{"customer":{"first_name":"John_new","last_name":"Doe_new","email":"a_new.doe@gmail.com","phone":"7705553111"}}'
WHERE Id=1111111111111
Update customers in BULK (read from external MS SQL database)
In this example we are reading customer Ids, Email, Notes from external source system (Microsoft SQL Server) and sending it to Shopify. Your column name must match with Input columns of the table you trying to update. See other BULK examples to learn more about reading from other systems using ODBC or OLEDB connection.
UPDATE Customers
SOURCE('MSSQL'
,'Data Source=localhost;Initial Catalog=tempdb;Integrated Security=true'
,'select 111 as Id, ''a@a.com''Email , ''SOLD'' as Note,0 as [$$ContineOn404Error]
UNION
select 222 as Id, ''b@b.com''Email , ''SOLD'' as Note,0 as [$$ContineOn404Error]
'
)
put_customer
endpoint belongs to
Customers
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Update an existing customer record
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Customers SET
Email = ''john.doe2@gmail.com'',
Phone = ''7705553445'',
Note= ''This is a new note that needed to be added later.''
WHERE Id=1111111111111';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
Update an existing customer record using RAW JSON Body (special column _rawdoc_)
Sometimes you have need to INSERT or UPDATE certain arrtibutes for which input columns not defined. In this case you can supply entire BODY JSON as input using special column name _rawdoc_
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Customers
SET _rawdoc_=''{"customer":{"first_name":"John_new","last_name":"Doe_new","email":"a_new.doe@gmail.com","phone":"7705553111"}}''
WHERE Id=1111111111111';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
Update customers in BULK (read from external MS SQL database)
In this example we are reading customer Ids, Email, Notes from external source system (Microsoft SQL Server) and sending it to Shopify. Your column name must match with Input columns of the table you trying to update. See other BULK examples to learn more about reading from other systems using ODBC or OLEDB connection.
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Customers
SOURCE(''MSSQL''
,''Data Source=localhost;Initial Catalog=tempdb;Integrated Security=true''
,''select 111 as Id, ''''a@a.com''''Email , ''''SOLD'''' as Note,0 as [$$ContineOn404Error]
UNION
select 222 as Id, ''''b@b.com''''Email , ''''SOLD'''' as Note,0 as [$$ContineOn404Error]
''
)';
EXEC (@MyQuery) AT [LS_TO_SHOPIFY_IN_GATEWAY];
put_customer
endpoint belongs to
Customers
table(s), and can therefore be used via those table(s).