Synchronize Customers to Pennylane
Learn how to automatically sync customers registered on your platform to your Pennylane accounting software using a scheduled batch job.
In this guide, we will:
- Fetch customers registered in the last 24 hours from your platform
- Transform customer data to Pennylane format using a mapping
- Push customers to Pennylane using the upsert endpoint
Use Case:
You want to keep your Pennylane customer database in sync with your platform by running a daily job that fetches all newly registered customers and syncs them to Pennylane.
Prerequisites
Install the Pennylane Application
Before using the Pennylane connector, you must authorize Zparse to access your Pennylane account.
- Navigate to
Profile > {Your Organization} > Applications - Find Pennylane in the available applications list
- Click Install and follow the OAuth authorization flow
- Grant the required permissions for API access
Step 1: Fetch Customers Registered in the Last 24h
In Zparse, create a new Workflow named Pennylane Customer Sync.
1.1 Set Up the Scheduler
Add a Scheduler > Periodic Scheduler node to run the sync job daily.
Configure the schedule to run once per day (e.g., every day at 2:00 AM).
1.2 Fetch Customers from Your Platform
Add an HTTP Client > Request GET node to retrieve customers registered in the last 24 hours.
Configuration:
- URL:
https://api.yourplatform.com/v1/customers - Headers: Add your API authentication headers
- Query Parameters:
registered_since:24h(or use a dynamic date value)
Example API response:
{
"customers": [
{
"id": "cust_001",
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"phone": "+33612345678",
"address": "123 Main Street",
"city": "Paris",
"postal_code": "75001",
"country": "FR"
},
{
"id": "cust_002",
"email": "marie.dupont@example.com",
"first_name": "Marie",
"last_name": "Dupont",
"phone": "+33698765432",
"address": "45 Avenue des Champs",
"city": "Lyon",
"postal_code": "69001",
"country": "FR"
}
]
}
Step 2: Map to Pennylane Format
Add a Mapping node to transform your platform's customer data to Pennylane's expected format.
Source: JSON Elements with path $.customers[*]
Mapping configuration:
| Source Field | Destination Field |
|---|---|
first_name | first_name |
last_name | last_name |
email | emails[] |
phone | phone |
address | address |
city | city |
postal_code | postal_code |
country | country_alpha2 |
Destination: JSONL Writer outputting Pennylane-compatible customer objects:
{
"first_name": "John",
"last_name": "Doe",
"emails": ["john.doe@example.com"],
"phone": "+33612345678",
"address": "123 Main Street",
"city": "Paris",
"postal_code": "75001",
"country_alpha2": "FR"
}
Note that email is a single string in your platform but Pennylane expects emails as an array. Use the mapping to wrap the value in an array.
Step 3: Upsert Customers to Pennylane
Add an Accounting > Pennylane node to push the mapped customers.
Configuration:
- Pennylane Account: Select your connected account
- Endpoint:
Upsert Individual Customers
Connect the mapping output to the Pennylane node input.
The Upsert endpoint will create new customers or update existing ones based on email matching. This ensures no duplicates are created when the job runs multiple times.
Complete Workflow
Your completed workflow should have four nodes connected in sequence:
- Periodic Scheduler → triggers the job daily
- HTTP GET Request → fetches customers from last 24h
- Mapping → transforms data to Pennylane format
- Pennylane Upsert → pushes customers to Pennylane
Testing the Workflow
Click Run to manually trigger the sync and verify the results.
Check your Pennylane dashboard to confirm customers have been created or updated.
Next Steps
- Add a
Slack > Messagenode to notify your team when the sync completes - Add error handling with
Logic > Try/Catchfor failed API calls - Extend the workflow to also sync company customers using
Upsert Company Customers