Claude-skill-registry ecommerce-customer-onboarding-automator
Automates customer onboarding workflows for e-commerce platforms. Fetches recent WooCommerce orders, identifies first-time customers within a specified timeframe, syncs their information to a BigQuery CRM database, and sends personalized welcome emails using a template.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/ecommerce-customer-onboarding-automator" ~/.claude/skills/majiayu000-claude-skill-registry-ecommerce-customer-onboarding-automator && rm -rf "$T"
manifest:
skills/data/ecommerce-customer-onboarding-automator/SKILL.mdsource content
Instructions
Objective
Automate the onboarding process for new e-commerce customers by:
- Identifying customers who completed their first order within the past 7 days.
- Syncing their core information (name, email, order details) from WooCommerce to a BigQuery CRM table.
- Sending a personalized welcome email to each identified customer.
Prerequisites & Setup
- WooCommerce Connection: Ensure access to the WooCommerce store's API (
).woocommerce-woo_orders_list - BigQuery Dataset: Confirm the target BigQuery dataset (e.g.,
) and table (e.g.,woocommerce_crm
) exist. The table should have at least these columns:new_customers
(STRING),customer_name
(STRING),email
(INT64),order_id
(TIMESTAMP),order_date
(FLOAT64).order_total - Email Template: Locate or create the
file. The skill expects to find it atwelcome_email_template.md
by default./workspace/dumps/workspace/
Execution Steps
1. Fetch and Analyze Recent Orders
- Use
to retrieve completed orders. Start with parameters:woocommerce-woo_orders_list
.{"status": ["completed"], "perPage": 100, "order": "desc", "orderby": "date"} - Critical Logic: Analyze the order metadata. In the provided trajectory, orders from first-time customers within the past 7 days were tagged with
in their"period": "recent_7_days"
. You must implement a similar filtering logic based on your store's data structure.meta_data- First-Time Customer Check: Ensure a customer's email appears only once in the filtered set (or check against a historical customer list in BigQuery if available).
- Date Filtering: Use the
field and calculate if it falls within the last 7 days from the current date.date_completed
2. Locate and Read the Email Template
- Use
to findfilesystem-search_files
.welcome_email_template.md - Use
to load its content. The template should contain placeholders likefilesystem-read_file
,{{customer_name}}
,{{order_id}}
, and{{order_total}}
.{{order_date}}
3. Prepare BigQuery Environment
- Use
andgoogle-cloud-bigquery_list_datasets
to verify the target dataset exists.google-cloud-bigquery_get_dataset_info - Use
to inspect thegoogle-cloud-bigquery_run_query
and confirm the schema of the target table (e.g.,INFORMATION_SCHEMA
) matches the data you will insert.new_customers
4. Transform and Sync Customer Data
- For each identified first-time customer, extract:
: Combinecustomer_name
andbilling.first_name
.billing.last_name
: Fromemail
.billing.email
: The order'sorder_id
.id
: Convertorder_date
to a TIMESTAMP.date_completed
: The order'sorder_total
(as a float).total
- Construct a single
query for BigQuery with all customer values. Use parameterized values or explicit casting (e.g.,INSERT
) to ensure data type compatibility.TIMESTAMP('...') - Execute the insert query using
.google-cloud-bigquery_run_query - Verification: Run a
query to confirm all records were inserted correctly.SELECT
5. Generate and Send Welcome Emails
- For each customer, personalize the email template by replacing the placeholders with their specific data.
- Use
to send the email.emails-send_email- Subject: Follow the template's subject line.
- Body: Use the fully personalized email body.
- To: The customer's email address.
- Send emails sequentially or in small batches to avoid rate limits.
Key Decisions & Error Handling
- Pagination: If you have more than 100 recent orders, implement pagination using the
parameter inpage
.woocommerce-woo_orders_list - Duplicate Prevention: Before inserting into BigQuery, consider checking if the
oremail
already exists in the target table to prevent duplicates if the skill runs multiple times.order_id - Template Flexibility: The skill is designed to use an external template file. If the file is not found, you may need to create a default template or ask the user for its location.
- Email Send Errors: Log or note if any email fails to send, but proceed with the remaining customers.
Completion
After all emails are sent, provide a summary report including:
- The number of first-time customers identified.
- Confirmation of data sync to BigQuery.
- Confirmation of emails sent.
- Use
to mark the task as complete.local-claim_done