Digital Wallet Cards icon

Digital Wallet Cards

Interact with Digital Wallet Cards loyalty program API

Overview

This node interacts with a Digital Wallet Cards loyalty program API, specifically focusing on managing customer data when the "Customer" resource and "Update" operation are selected. It allows updating existing customer records by specifying the unique customer ID and the fields to update.

Typical use cases include:

  • Modifying customer contact details such as email or phone number.
  • Updating demographic information like gender or date of birth.
  • Adding or changing metadata for integration with external systems.
  • Keeping customer profiles current in loyalty programs or CRM systems.

For example, you might update a customer's email address and phone number after they provide new contact information, ensuring your loyalty program communications reach them correctly.

Properties

Name Meaning
Customer ID The unique identifier of the customer to update.
Update Fields A collection of fields to update for the customer. Possible fields include:
- First Name: Customer's first name
- Last Name: Customer's last name
- Email: Customer's email address
- Phone: Customer's phone number
- Gender: Customer's gender (options: Male, Female, Other)
- Date of Birth: Customer's date of birth
- External User ID: Identifier from an external system for integration
- Metadata: Additional JSON-formatted metadata related to the customer

Output

The output is a JSON object representing the updated customer record returned from the API after a successful update operation. This typically includes all customer fields reflecting the new state post-update.

Example structure (simplified):

{
  "id": "customer_12345",
  "firstName": "UpdatedFirstName",
  "lastName": "UpdatedLastName",
  "email": "updated.email@example.com",
  "phone": "+1234567890",
  "gender": "male",
  "dateOfBirth": "1990-01-01T00:00:00Z",
  "externalUserId": "external_98765",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  }
}

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests to the Digital Wallet Cards API.
  • The node uses HTTP methods (PATCH) to send updates to the /api/v2/customers/{customerId} endpoint.
  • The node depends on utility functions for making API requests, validating required fields, cleaning objects, and transforming API responses.

Troubleshooting

  • Error: "At least one field must be specified for update"
    Occurs if no update fields are provided. Ensure that at least one field inside "Update Fields" is set before executing the node.

  • Error: Missing Customer ID
    The "Customer ID" property is required. Make sure it is provided and valid.

  • Invalid JSON in Metadata
    If the "Metadata" field contains invalid JSON, parsing will fail. Verify that the JSON syntax is correct.

  • API Authentication Errors
    Ensure the API key credential is properly configured and has sufficient permissions.

  • Network or API Endpoint Issues
    Check network connectivity and that the API base URL (https://api.digitalwallet.cards) is reachable.

Links and References

Discussion