Statflo Documentation

Campaign Members

Campaign Members

Campaign Members show up in TextKit as people To Be Contacted by an authenticated User, and are the required method for a User to initiate a new conversation.

createCampaignMember

To create a new Campaign Member, use this query:

# locale: preferred language of the Campaign Member
# method: form of communication to be used
# from: sender's id to show the recipient
# to: where recipient will receive communication
# freeFormColumns: used by Wigets or Templates
#
# When the method is SMS, `from` is the number to send messages from and `to` is the number to receive the message.
# Phone numbers must be in E.164 format.
# firstName, from, to and locale are required
mutation {
createCampaignMember(input: {
firstName: "Hans"
lastName: "Gruber"
from: "+15551112323"
to: "+14443336666"
method: SMS
assignedUserId: "af73ed10-01ff-4b96-8444-079ff8fdda57"
contactExternalId: "0033000000GvHjL"
campaignExternalId: "70190000000Yz7O"
locale: "EN_US"
state: INACTIVE
freeFormColumns: [
{
name: "NICKNAME",
value: "Hansio"
},
{
name: "PRODUCT",
value: "$1K Saver Loan"
},
{
name: "REP",
value: "Sara"
}
]
}) {
userErrors {
field
message
}
}
}

Which responds with, on success:

{
"data": {
"createCampaignMember": "dbee7e46-a486-4d8c-b494-5adf04d5cab3"
}
}

updateCampaignMember

To update a campaign member, use this query:

mutation {
updateCampaignMember(input: {
id: "dbee7e46-a486-4d8c-b494-5adf04d5cab3"
to: "+14443336666"
locale: "ES_US"
state: ACTIVE
assignedUserId: "db7fa5d7-1524-45b2-8f43-0bf555b80207"
}) {
userErrors {
field
message
}
}
}

Which responds with, on success:

{
"data": {
"updateCampaignMember": true
}

deleteCampaignMember

Deleting is not reversable.

mutation {
deleteCampaignMember(input: {
"id": "dbee7e46-a486-4d8c-b494-5adf04d5cab3"
})
}

Which responds with, on success:

{
"data": {
"deleteCampaignMember": true
}
}

locales

enum locales {
AF_ZA
AM_ET
AR_AE
AR_BH
AR_DZ
AR_EG
AR_IQ
AR_JO
AR_KW
AR_LB
AR_LY
AR_MA
ARN_CL
AR_OM
AR_QA
AR_SA
AR_SY
AR_TN
AR_YE
AS_IN
AZ_CYRL_AZ
AZ_LATN_AZ
BA_RU
BE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