Introduction
The JSON integration with Xendy allows you to seamlessly synchronize customer, order, and product data from your external system to Xendy. By providing three separate JSON files—one for customer data, one for order data, and one for product data—this integration ensures your email marketing campaigns and dynamic segments are fueled by up-to-date and accurate information. The data is synced automatically once per day from the provided URLs, enabling you to use this information for personalized email content, automated workflows, and precise targeting in your marketing strategies. With this setup, you can leverage the flexibility of custom-built applications or webshops to feed Xendy with the right data for efficient and effective email marketing.
Types of data
With the JSON integration, you can sync three key types of data from your system to Xendy, which are essential for creating dynamic and personalized email campaigns:
1. Customer data
- What it includes:
- Email address (mandatory): the primary identifier for customers in Xendy.
- Name, phone number, and other details: optional information that can help personalize campaigns further.
- This data is used for segmentation and targeting in your email lists.
2. Order data
- What it includes:
- Email address (mandatory): the customer associated with the order.
- Order date (mandatory): the date when the order was placed.
- Order line details (mandatory): includes information about each item ordered, such as product ID, quantity, and price.
- Order line amount (mandatory): the total price for each line item, including taxes or discounts.
- This data enables you to track customer purchase behaviors, create personalized offers, and trigger automations like post-purchase emails.
3. Product Data
- What it includes:
- Product ID (mandatory): the unique identifier for each product in your store.
- Price (mandatory): the selling price of the product.
- Image URL (optional): the URL of the product image to be displayed in emails.
- Product link (mandatory): the link to the product page on your website for customers to learn more or make a purchase.
- Product data allows you to display personalized recommendations, upsells, and cross-sells in email campaigns.
By syncing these three types of data via JSON, you can ensure that your campaigns are based on the latest customer and order information, which allows for highly personalized email marketing. In the next section, we’ll walk through how to connect your JSON URLs with Xendy for this integration.
Connect JSON URLs with Xendy
To start using the JSON integration with Xendy, you need to provide three URLs, each containing the necessary data in JSON format: one for customer data, one for order data, and one for product data. Once these URLs are provided, Xendy will automatically sync the data once a day, making it available for use in your campaigns and dynamic segments.
1. Access the integration settings
-
Log in to Xendy:
- Go to your Xendy dashboard and click on the gear icon in the top-right corner.
- Select Integrations from the dropdown menu.
-
Choose JSON integration:
- In the Integrations section, select JSON as the integration method.
2. Provide the JSON URLs
- Enter the URLs for customer, order, and product data:
- In the provided fields, paste the URLs where Xendy can retrieve your customer, order, and product data in JSON format.
- Ensure that each URL is accessible and correctly formatted to include the required fields.
3. Check data mapping
-
Ensure correct data formatting:
- Make sure your JSON data is structured correctly according to the required fields, as specified in the Required fields section below. This ensures that the data is mapped correctly within Xendy for use in campaigns.
-
Testing data mapping:
- Once the URLs are added, Xendy will map the data automatically. You can verify the mappings by checking the Data mapping section within the integration settings.
4. Sync and Verify
- After entering the URLs and ensuring correct mapping, the data will be synced with Xendy. This sync occurs once per day to keep your contact lists and product recommendations up-to-date.
In the next section, we’ll go over the required fields for the customer, order, and product data to ensure that your integration runs smoothly.
Required fields
To ensure that the JSON data is correctly imported and mapped into Xendy, certain fields are required for customer, order, and product data. These mandatory fields must be included in the JSON data for the integration to function properly.
1. Customer data
The following fields are required for customer data to be synced with Xendy:
- Email (mandatory): the customer’s email address is the unique identifier for syncing and segmentation in Xendy.
- Example:
"email": "customer@example.com"
- Example:
Optional customer fields that can be included:
- Name: first and/or last name.
- Phone number: contact number for personalized communication.
- Additional customer attributes like loyalty status or location can also be included for more targeted marketing.
2. Order data
For order data to be synced, the following fields are required:
-
Email (mandatory): the email address associated with the order. This links the order to the correct customer in Xendy.
- Example:
"email": "customer@example.com"
- Example:
-
Order date (mandatory): the date when the order was placed.
- Example:
"order_date": "2024-12-01"
- Example:
-
Product ID (SKU) (mandatory): the unique identifier (or SKU) for each product in the order.
- Example:
"product_id": "sku123"
- Example:
-
Order line amount (mandatory): the total price for each product in the order line, including any discounts or taxes.
- Example:
"line_amount": "29.99"
- Example:
Each order can contain multiple products, so be sure to include the necessary fields for each line item.
3. Product data
To sync product data, include the following fields:
-
Product ID (mandatory): the unique identifier (or SKU) for the product.
- Example:
"product_id": "sku123"
- Example:
-
Price (mandatory): the price of the product.
- Example:
"price": "19.99"
- Example:
-
Image URL (optional): a link to the product image to display in email campaigns.
- Example:
"image_url": "https://yourstore.com/images/product123.jpg"
- Example:
-
Product link (mandatory): the link to the product page on your website. This allows customers to view more details and make a purchase.
- Example:
"product_link": "https://yourstore.com/product123"
- Example:
4. Additional fields
You can include additional custom fields in your JSON data to further enrich your customer, order, and product data. For example, you can track:
- Customer loyalty points.
- Product categories.
- Order status.
However, the mandatory fields mentioned above must always be included for the data to sync correctly.
Field mappings
After your JSON data is successfully synced with Xendy, the next step is to ensure that the fields are correctly mapped so that Xendy can process the data and use it in your email campaigns, dynamic segments, and automations.
1. How to map fields in Xendy
Once the JSON URLs are added and the data is synced, Xendy will automatically try to map the data fields. However, it’s important to review the mappings to ensure everything is correctly aligned.
-
Access field mappings:
- Go to Settings > Integrations > JSON in your Xendy account.
- You will see three sections for customer data, order data, and product data.
-
Map required fields:
- For each section, Xendy will display the fields it expects. You will need to match the fields from your JSON data with Xendy’s predefined fields.
- For example, map the email field from your JSON data to Xendy’s email field.
- Customer data: map fields like email, name, phone number, and loyalty points (if used).
- Order data: map fields like order date, line amount, and product ID to Xendy’s order-related fields.
- Product data: map product information like product ID, price, image URL, and product link.
2. Field mapping example
Here’s an example of what the mapping might look like for a customer:
- Mapped fields in Xendy:
- Email (mapped to:
"email"
) - First name (mapped to:
"first_name"
) - Last name (mapped to:
"last_name"
) - Phone (mapped to:
"phone"
)
- Email (mapped to:
Ensure that the field names in your JSON match Xendy’s system field names. If needed, you can manually add custom fields and map them.
3. Custom fields
If you are using additional custom fields in your JSON data, you can map them to Xendy’s custom fields. Here’s how:
- Create a custom field in Xendy:
- Go to Contacts > Custom fields and create a new custom field (e.g., “Loyalty Points”).
- Map custom fields in Xendy:
- In the Field mappings section, you will see an option to map custom fields. For example, if you’re sending Loyalty points data, map the corresponding field from the JSON to the custom field you created in Xendy.
4. Save and test mappings
After mapping the fields:
- Save your mappings by clicking Save changes.
- Test the mapping:
- Send a test contact via the JSON webhook to ensure the fields are correctly mapped and the data is processed in Xendy.
- Check that the contact appears in your segment, and verify that the data is correctly populated in the customer profile.
By ensuring proper field mappings, your JSON data will be ready to use in your email campaigns, dynamic segments, and automations. Accurate field mappings ensure that all data is properly utilized for segmentation, personalization, and effective email marketing strategies.
Frequently asked questions
To connect the JSON URLs with Xendy, follow these steps:
- Log in to Xendy and go to Settings > Integrations > JSON.
- Paste the three URLs (for customer data, order data, and product data) into the integration settings.
- Ensure the data is in JSON format and that the required fields are included.
- Xendy will automatically sync and map the data once the URLs are added.
The JSON format must adhere to the following structure for each URL:
- Customer data:
- Order data:
- Product data:
These formats ensure that the data is properly mapped in Xendy.
If the data contains errors or missing required fields, no data will be imported. The integration will not process the data. If you encounter issues, please contact support@xendy.me to have your JSON files reviewed and corrected.
Data is synced once per day from the JSON URLs to Xendy. This ensures that your email campaigns, segments, and automations are always based on the latest customer, order, and product data.
Yes, you can add custom fields to your JSON data, such as loyalty points, customer preferences, or custom order attributes. These fields can be mapped to custom fields in Xendy for segmentation and personalization in your campaigns.
This JSON integration is ideal for:
- Custom-built applications that generate customer, order, and product data in JSON format.
- Webshops that use systems other than the standard integrations with platforms like WooCommerce or Shopify.
It allows you to keep your data synced between your website or application and Xendy for targeted email campaigns and automations.
If your JSON URL is inaccessible during a sync, nothing will happen. The sync will be attempted again the following day. Ensure that the URL is publicly accessible and that the server is properly configured to allow data transmission.
Yes, you can customize the fields in your JSON data. For example, you can add custom attributes such as “Loyalty Points” or “Preferred Categories” and map them in Xendy’s field mappings. Just ensure the data is formatted correctly and the fields are mapped accordingly in Xendy.