Skip to content

fix: return all contact properties#49

Closed
danrowden wants to merge 3 commits intomainfrom
dan/contact-custom-properties
Closed

fix: return all contact properties#49
danrowden wants to merge 3 commits intomainfrom
dan/contact-custom-properties

Conversation

@danrowden
Copy link
Copy Markdown
Contributor

@danrowden danrowden commented Apr 15, 2026

The cli is currently only returning a defined subset of contact properties in contacts find.

This PR returns everything the API returns. I had to change the text output layout to a vertical table, because the horizontal table view could run onto new lines.

Example contact below has a thisKey custom property, which isn't currently being returned by the cli.

Before

loops contacts find --email dan@loops.so
USER ID  EMAIL         FIRST NAME  LAST NAME  SUBSCRIBED  SOURCE  USER GROUP  OPT-IN STATUS
1432423  dan@loops.so  Dan         R          true        API     Clay users 
loops contacts find --email dan@loops.so --output json
[
  {
    "id": "clygv49wy001ctdf0pwwgq5wl",
    "email": "dan@loops.so",
    "firstName": "Dan",
    "lastName": "R",
    "source": "API",
    "subscribed": true,
    "userGroup": "Clay users",
    "userId": "1432423",
    "mailingLists": {
      "clxf3aab3000w0ljl19h9h7ah": true
    },
    "optInStatus": null
  }
]

After

loops contacts find --email dan@loops.so
Id:            clygv49wy001ctdf0pwwgq5wl
Email:         dan@loops.so
First Name:    Dan
Last Name:     R
Source:        API
Subscribed:    true
User Group:    Clay users
User Id:       1432423
This Key:      thisValue
Mailing Lists: {"clxf3aab3000w0ljl19h9h7ah":true}
Opt In Status: null
loops contacts find --email dan@loops.so --output json
[
  {
    "id": "clygv49wy001ctdf0pwwgq5wl",
    "email": "dan@loops.so",
    "firstName": "Dan",
    "lastName": "R",
    "source": "API",
    "subscribed": true,
    "userGroup": "Clay users",
    "userId": "1432423",
    "thisKey": "thisValue",
    "mailingLists": {
      "clxf3aab3000w0ljl19h9h7ah": true
    },
    "optInStatus": null
  }
]

(this now matches the API response)

@danrowden danrowden requested a review from notnmeyer April 15, 2026 11:05
@danrowden danrowden changed the title Return all contact properties fix: return all contact properties Apr 15, 2026
@notnmeyer
Copy link
Copy Markdown
Member

went with a little bit of a different approach in #53 but ultimately fixes the same thing. 👍

@notnmeyer notnmeyer closed this Apr 15, 2026
@notnmeyer notnmeyer deleted the dan/contact-custom-properties branch April 16, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants