Skip to main content

People

People are basically individuals that are participants on an event in any form (visitor, attendee, speaker, moderator, organizer staff, exhibitor member, partner member, etc.).

A people profile can be a user or not, on a Swapcard Event. If the people profile is a user, people will have a personal account to login and access the Event on the platform. If the profile is created as a user without account (non-user) could be used for people that don't want to be part of the app, but should be listed in the app (VIP Speaker) or their badge should be scanned for lead retrieval.

Fields Required fields to create a people profile are firstName, lastName, and clientId. Field email is also required to create a people profile with an account(user), and the email should be unique for each profile. Is it also required to specify a group id when creating a People. Recommended fields are jobTitle, organization, and custom fields in order to improve the results of the matchmaking algorithm and networking opportunities. Fields biography and photoUrl are also recommended for Speakers. If the event provides badges, the barcode field should be filled in as well.

Visibility People are visible by default to any other people user. All fields are public except for contact details (email address, phone numbers, postal address). A visibility right could be set up in the Studio in order to hide a group of people to another group. There is also a field isVisible on People to hide someone from everybody. If field is set to false, user will still be able to access the event, however he will be not visible by other participants. A user can change his visibility at any time from the Web or Mobile app.

Object

Unique ClientId at Community level

A user profile is unique to a community. Consequently, clientId field acts as a unique identifier of a person and must be unique inside a community.

Phone numbers format

The phone numbers should be specified according to the E.164 number formatting (http://en.wikipedia.org/wiki/E.164) recommendation and should be prefixed with a +. For example, to verify the US phone number 415 555 0101, the phone number should be specified as +14155550101. The + is the required prefix and the US country code 1 prepended to the local subscriber number.

Fetch single or multiple People profile on an Event

This query allows you to search single or multiple people profiles on an Event.

Arguments

  • emails - This is an array and can hold more than one value separated by commas. This option can be used for multiple profiles search

There are also other useful filters like eventPeopleIds, clientIds, or lastUpdatedSince.

Query

query eventPerson($eventId: ID!, $filters: [EventPersonFilter!]) {
eventPerson(eventId: $eventId, filters: $filters) {
nodes {
createdAt
firstName
id
lastName
jobTitle
organization
userId
}
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"filters": {
"emails": [
"test@test.fr",
"test1@test1.com"
]
}
}

Arguments

  • search - This is a string and can be used to search for a single profile on an Event.

Query

query eventPerson($eventId: ID!, $search: String!) {
eventPerson(eventId: $eventId, search: $search) {
nodes {
createdAt
firstName
id
lastName
jobTitle
organization
userId
}
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"search":"test@test.fr"
}

Fetch the first hundred People on an Event

This query allows you to paginate across all the people of an event and fetch the first 100 people in the Event.

Heads up!

For all queries that allow pagination, we recommend to not exceed 100.

Query

query eventPerson($eventId: ID!, $cursor: CursorPaginationInput) {
eventPerson(eventId: $eventId, cursor: $cursor) {
pageInfo {
hasNextPage
endCursor
totalItems
startCursor
lastPage
hasPreviousPage
currentPage
}
totalCount
nodes {
id
clientIds
email
firstName
lastName
jobTitle
organization
photoUrl
websiteUrl
biography
address {
street
city
zipCode
state
country
}
phoneNumbers {
formattedNumber
type
number
}
socialNetworks {
profile
type
}
groups {
id
name
}
source
updatedAt
createdAt
withEvent(eventId: $eventId) {
fields {
... on SelectField {
translations {
value
language
}
definition {
id
translations {
name
language
}
}
}
}
badges {
... on BadgeBarcode {
__typename
barcode
createdAt
}
}
}
}
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"cursor": {
"first": 100
}
}

Fetch the next hundred People (endCursor)on an Event

This query can be used to fetch 100 people after the cursor value from the Event. The cursorId will be received in the response of the above query as endCursor.

Query

query eventPerson($eventId: ID!, $cursor: CursorPaginationInput) {
eventPerson(eventId: $eventId, cursor: $cursor) {
pageInfo {
hasNextPage
endCursor
totalItems
startCursor
lastPage
hasPreviousPage
currentPage
}
totalCount
nodes {
id
clientIds
email
firstName
lastName
jobTitle
photoUrl
organization
websiteUrl
biography
address {
state
street
city
country
zipCode
place
}
phoneNumbers {
formattedNumber
type
number
}
socialNetworks {
profile
type
}
groups {
id
name
}
source
updatedAt
createdAt
}
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"cursor": {
"first": 100,
"after": "cursorId"
}
}

Create a Basic People Profile

This mutation can be used to create a Basic Profile in Swapcard. This mutation creates a profile for a user as well as a non user.

Arguments

  • clientId - This is the unique identifier for the profile on the customer side, it can be any alpha numeric value which is unique for each profile and can't be changed once the profile is created.
  • firstName - This is the first name of the user.
  • lastName - This is the last name of the user.
  • email - This is the email address associated with the user profile, it has to be unique for each profile and can't be updated via the API once the profile is created. Email is required only in case of the profile of a user, if we create a profile of a Non-user (without account) we do not require the email.
  • isUser - This is a boolean field to control the creation of a user account. If set to true a user account will be created for this profile, if set to false, only the profile.

Query

mutation importEventPeople($eventId: ID!, $data: [ImportEventPersonInput!]!) {
importEventPeople(eventId: $eventId, validateOnly: false, data: $data) {
errors {
inputId
errorCode
message
}
results {
inputId
eventPerson {
id
email
}
}
eventPeopleCreated
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"data": [
{
"clientId": "9876543210",
"create": {
"isUser": true,
"isVisible": true,
"email": "test@test.com",
"firstName": "John",
"lastName": "Doe"
},
"actions": {
"updateGroups": {
"action": "ADD",
"groupIds": [
"RXZlbnR8xNjcyMjI="
]
}
}
},
{
"clientId": "1234567890",
"create": {
"isUser": false,
"isVisible": false,
"firstName": "Dummy",
"lastName": "User"
},
"actions": {
"updateGroups": {
"action": "ADD",
"groupIds": [
"RXZlbnR8xNjcyMjI="
]
}
}
}
]
}

Update a Basic People profile

This mutation can be used to update a Basic Profile in Swapcard. This mutation updates a profile for a user as well as non user.

Arguments

  • clientId - This is the same alphanumeric value that has been used for profile creation
  • email - This is the same email id associated with the user profile during profile creation. This is only required for a user profile.

Query

mutation importEventPeople($eventId: ID!, $data: [ImportEventPersonInput!]!) {
importEventPeople(eventId: $eventId, validateOnly: false, data: $data) {
errors {
inputId
errorCode
message
}
results {
inputId
eventPerson {
id
email
}
}
eventPeopleUpdated
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"data": [
{
"clientId": "987654321",
"update": {
"isUser": true,
"isVisible": true,
"email": "test@test.com",
"firstName": "UpdateJohn",
"lastName": "UpdateDoe"
}
},
{
"clientId": "1234567890",
"update": {
"isUser": false,
"isVisible":false,
"firstName": "UpdateDummyr",
"lastName": "UpdateUser"
}
}
]
}

Create or Update a People

This mutation can be used to create or update a detailed profile.

Arguments

  • clientId - This is the unique identifier for the profile on the customer side, it can be any alpha numeric value which is unique for each profile and can't be changed once the profile is created.
  • firstName - This is the first name of the user.
  • lastName - This is the last name of the user.
  • email - This is the email address associated with the user profile.

Query

mutation importEventPeople($eventId: ID!, $data: [ImportEventPersonInput!]!) {
importEventPeople(eventId: $eventId, validateOnly: false, data: $data) {
errors {
inputId
errorCode
message
}
results {
inputId
eventPerson {
id
email
}
}
eventPeopleCreated
eventPeopleUpdated
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"data": [
{
"clientId": "987654321",
"create": {
"isUser": true,
"email": "test@test.com",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "CEO",
"organization": "Tesla",
"biography": "Lorem ipsum dolor sit amet, odio prima pri te, id sanctus recteque deterruisset vel. Dico tractatos eam eu, dolor inciderint in est.",
"websiteUrl": "https://www.tesla.com",
"photoUrl": "https://fakeimg.pl/300/picture.jpg",
"mobilePhone": "+1-541-754-3010",
"address": {
"city": "Paris",
"country": "France",
"zipCode": "75010",
"street": "6 rue de Paradis"
},
"socialNetworks": [
{
"type": "LINKEDIN",
"profile": "johndoe"
}
],
"customFields": [
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMA==",
"action": "SET_VALUE",
"value": "Research & Development"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMQ==",
"action": "SET_VALUE",
"value": "France"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMg==",
"action": "SET_VALUE",
"value": "Robotics"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMg==",
"action": "SET_VALUE",
"value": "Blockchain"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMg==",
"action": "SET_VALUE",
"value": "AI"
}
]
},
"update": {
"isUser": true,
"email": "test@test.com",
"firstName": "UpdateJohn",
"lastName": "UpdateDoe",
"jobTitle": "CTO",
"organization": "Tesla New",
"biography": "Lorem ipsum dolor sit amet, odio prima pri te, id sanctus recteque deterruisset vel. Dico tractatos eam eu, dolor inciderint in est.",
"websiteUrl": "https://www.teslanew.com",
"photoUrl": "https://fakeimg.pl/300/picture.jpg",
"mobilePhone": "+1-541-754-3010",
"address": {
"city": "Paris",
"country": "France",
"zipCode": "75010",
"street": "6 rue de Paradis"
},
"socialNetworks": [
{
"type": "LINKEDIN",
"profile": "updatejohndoe"
}
],
"customFields": [
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMA==",
"action": "SET_VALUE",
"value": "Research & Development 1"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMQ==",
"action": "SET_VALUE",
"value": "France 1"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMg==",
"action": "SET_VALUE",
"value": "Robotics 1"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMg==",
"action": "SET_VALUE",
"value": "Blockchain 1"
},
{
"groupId": "RXZlbnRQZW9wZEdyb3VwXzExMg==",
"action": "SET_VALUE",
"value": "AI 1"
}
]
},
"actions": {
"updateGroups": {
"action": "ADD",
"groupIds": [
"RXZlbnR8xNjcyMjI="
]
}
}
}
]
}

Perform different actions on a People

This mutation can be used to create and update a profile in Swapcard.

Arguments

  • clientId - This is the unique identifier for the profile on the customer side, it can be any alpha numeric value which is unique for each profile and can't be changed once the profile is created.
  • firstName - This is the first name of the user.
  • lastName - This is the last name of the user.
  • email - This is the email address associated with the user profile.

This example can be used for the following actions in this order

  1. Create and Update Profile details of People
  2. Add/Update the group assignment for People
  3. Add/Update the code (QR or barcode) associated to People
  4. Add/Update people as speaker of a planning (Session)
  5. Add/Update people as attendee of a planning (Session)
  6. Add/Update people as member of an exhibitor

All the groups must be already created manually on Studio or by Content API using the Mutation to create new Group before adding them to the profile.

Email address cannot be updated via the API on People with account (User).

Several codes could be added to the profile, they will all work for scanning, but only the latest one will be displayed in the app in the "ticket button".

The "action" in the below variables can have values ADD, REMOVE and REPLACE.

Additional optional Arguments

  • force - When the import is forced, it will allow:

    • Switching User from Community Profile; an Email is associated to a User, a User to a Community Profile and Client ID to a Community Profile. By default, we ensure that the pair (EmailClient ID) matches. We check that the User associated to the Email matches the User of the Community Profile retrieved by the Client ID. When the import is “forced”, we bypass this validation check which allows to switch any User from the Community Profile retrieved by the Client ID.
    • Using more than one Client ID per Community Profile; by default, we ensure that the same Client ID is used when referring to one User ’s Community Profile. When the import is “forced”, we allow the usage of several Client IDs per Community Profile. When the Client ID does not exist we add it. Note all Client ID should be unique inside the community.

    When forcing import ?

    • Your Swapcard’s community is new, and no event already took place.
    • [OR] The people you are importing are new to Swapcard (ie. they do not already have an account).
    • [OR] You do not want to ensure people keeping their data (contacts, bookmarks, meetings, profile data, …) from previous events.
    • [AND] You do not have multiple events happening on the same time within your community. When NOT forcing import ?
    • You have several events running at the same time within your community.
    • [OR] Some users already have an account within your community and you want to ensure that they keep their data (contacts, bookmarks, meetings, profile data, …) from previous events.

Query

mutation importEventPeople($eventId: ID!, $data: [ImportEventPersonInput!]!) {
importEventPeople(eventId: $eventId, validateOnly: false, data: $data) {
errors {
inputId
errorCode
message
}
results {
inputId
eventPerson {
id
email
updatedAt
speakerOnPlannings {
id
title
}
userId
memberOnExhibitors {
id
name
}
}
}
eventPeopleUpdated
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"data": [
{
"clientId": "987654321",
"create": {
"email": "test@test.com",
"firstName": "John",
"lastName": "Doe"
},
"actions": {
"updateGroups": {
"action": "ADD",
"groupIds": [
"RXZlbnR8xNjcyMjI="
]
},
"updateBarcodes": {
"action": "ADD",
"barcodes": [
{
"type": "QR_CODE",
"value": "1234567890"
},
{
"type": "QR_CODE",
"value": "9876543210"
},
{
"type": "FILE",
"value": "https://www.test.com/badge.pdf"
}
]
},
"isSpeakerOnPlannings": {
"action": "ADD",
"planningIds": [
"UGxhbmODAwMzk1"
]
},
"isAttendeeOnPlannings": {
"action": "ADD",
"planningIds": [
"UGxhbmwMzk1"
]
},
"isMemberOnExhibitors": {
"action": "ADD",
"exhibitorIds": [
"RXhoaWJzk2Nw=="
]
}
},
"force": true
}
]
}

Delete People

This mutation can be used to delete Profiles in an Event.

Arguments

  • eventId - The Id of the Event on which the profile needs to be deleted.
  • eventPeopleIds - The Ids of profiles that need to be deleted. This is an array and can hold more than one value separated by commas.

Query

mutation deleteEventPeople($eventId: ID!, $eventPeopleIds: [ID!]!) {
deleteEventPeople(eventId: $eventId, eventPeopleIds: $eventPeopleIds) {
eventPeopleDeleted
}
}

Variables

{
"eventId": "RXZlbnDY1Nc4",
"eventPeopleIds": [
"RXZlbnRQZW9wI5NjI3Nzg=",
"RXZlbnRQZW9wM5NjI3ODA="
]
}