Overview
This node integrates with Comercia.io to perform various operations related to customer management, sales, and addresses. Specifically, the "Crear direccion" (Create Address) operation allows users to create a new address associated with a client in Comercia.io.
Typical use cases include:
- Adding shipping or billing addresses for clients automatically during order processing.
- Managing multiple client addresses within an automated workflow.
- Synchronizing address data from other systems into Comercia.io.
For example, when a new customer signs up on an e-commerce platform, this node can be used to add their delivery address directly into Comercia.io's system.
Properties
| Name | Meaning |
|---|---|
| Información de la Dirección | A notice field providing information about the address input section. |
| Cliente | The client to whom the address will be assigned. Options are loaded dynamically from existing accounts. |
| Alias | An alias to identify the address (e.g., "Home", "Office"). |
| Calle y Número | The street name and number of the address. |
| Número exterior | The external number of the domicile (required). |
| Número interior | The internal number of the domicile (optional). |
| Colonia | The neighborhood or district (required). |
| Código Postal | The postal code (required). |
| Ciudad | The city (required). |
| Estado | The state or province (required). |
| País | The country (required, default is "Mexico"). |
| Teléfono | Contact phone number for the address (optional). |
| Referencias | Additional references or notes to help locate the address (multi-line text). |
Output
The node outputs JSON data representing the response from Comercia.io after creating the address. The output includes all fields returned by the API plus metadata:
json: Contains the created address details as returned by the Comercia.io API._metadata: Includes the operation name (createAddress) and a timestamp of when the operation was performed.
No binary data is output by this node.
Example output structure (simplified):
{
"json": {
"id": "address_id",
"relatedtoid": "client_id",
"direccion": "Street and number",
"neighborhood": "Neighborhood",
"country": "Country",
"state": "State",
"city": "City",
"postcode": "Postal code",
"num_ext": "External number",
"alias": "Alias",
"phone": "Phone",
"num_int": "Internal number",
"dir_references": "Additional references",
"_metadata": {
"operation": "createAddress",
"timestamp": "2024-06-xxTxx:xx:xx.xxxZ"
}
}
}
Dependencies
- Requires an active connection to Comercia.io via an API key credential.
- The node uses the base URL and API key configured in the credentials to authenticate requests.
- The
relatedtoidproperty depends on loading existing client accounts dynamically from Comercia.io.
Troubleshooting
- Missing required fields: Ensure all required properties such as
relatedtoid,direccion,num_ext,neighborhood,postcode,city,state, andcountryare provided; otherwise, the API may reject the request. - Invalid client ID: If the
relatedtoiddoes not correspond to an existing client, the API call will fail. - API authentication errors: Verify that the API key credential is valid and has sufficient permissions.
- Network issues: Check connectivity to the Comercia.io API endpoint.
- Unexpected API responses: Review the raw output for error messages returned by Comercia.io for further diagnosis.
If the node is set to continue on failure, errors will be included in the output JSON under an error field with a timestamp.
Links and References
- Comercia.io official API documentation (not provided here, but recommended to consult for detailed API behavior)
- n8n documentation on creating custom nodes and using credentials
- General REST API usage best practices