How to extend our Circle integration by mapping additional custom profile fields? Answered

Post author
Tim Martin

Hello, 

Would it be possible to get the shape of the payload that is currently being used to set profile information in Circle?

I've noticed that after adding first-name and last-name fields to our custom fields those fields are passed to Circle. I'm curious what other fields are passed to circle or what I would have to name fields to have them included in the Circle profile.

Thanks

Comments

2 comments

  • Comment author
    Duncan from Memberstack

    Let me check with our engineering team on this 👍

    0
  • Comment author
    Duncan from Memberstack

    Alright, I got a reply from Tyler.

    TLDR: Looks like all of the fields are variations on name. Was there any particular info you wanted to pass into Circle?

    const getName = () => {
              const fields = member?.customFields as any;
              if (!fields) return "";
              if (fields.name) return fields.name;
              else if (fields.firstName && fields.lastName) return `${fields.firstName} ${fields.lastName}`;
              else if (fields["first-name"] && fields["last-name"]) return `${fields["first-name"]} ${fields["last-name"]}`;
              else if (fields.fullName) return fields.fullName;
              else if (fields["full-name"]) return fields["full-name"];
              return "";
            }
    This is our internal function that tries to return a member’s name. If name is a custom field it will return that. After that, it goes down the list to check other custom field combinations.
    0

Please sign in to leave a comment.