The customer records in NetSuite are categorized as a company or individual. The e-commerce sellers who mainly deal with B2B orders (wholesalers) fall under the company category, and others who deal with B2C orders (customers) fall under the individual category. In Shopify, the records for both B2B and B2C have been identified altogether under the customer category. To differentiate between a company and an individual, sellers add customizable tags to identify a wholesaler and retailer.
The handlebar statements in Shopify customer to NetSuite customer (add or update) import mapping read these tags, identify the category, and sync those records to NetSuite.
Limitation: The handlebar statements do not work on the customer update of the order import flow.
Use cases
- Shopify customer is a company (tag contains "Wholeseller")
- Shopify customer is an individual
Handlebars to achieve the use cases
For Shopify customers with Wholeseller tag: If the individual tag contains the word wholeseller, the system identifies the record type as company (B2B). The system passes the Company Name and doesn’t pass any information such as first name and last name.
For Shopify customers without a Wholeseller tag: If the individual tag doesn’t contain the word wholeseller, the system identifies the record type as individual (B2C). The system passes the first name and last name details to NetSuite and doesn’t pass the company name information.
- {{#contains tags "wholeseller"}}false{{else}}true{{/contains}}
- {{#contains tags "wholeseller"}}{{else}}{{first_name}}{{/contains}}
- {{#contains tags "wholeseller"}}{{else}}{{last_name}}{{/contains}}
- {{#contains tags "wholeseller"}}{{#if addresses.[0].company}}{{addresses.[0].company}}{{else}}{{first_name}}{{/if}}{{/contains}}
Comments
0 comments
Please sign in to leave a comment.