Statflo Documentation

Templates

Templates

Templates ensure that only the approved phrases can be used to start a conversation in a given campaign.

createMessageTemplate

To create a template, use:

mutation {
createMessageTemplate(messageTemplate: {
name: "Loan Follow Up A"
locale: "EN_US"
template: "Hi {{NICKNAME}}, this is {{REP}} at ACME Co. where you got your new {{PRODUCT}} last week. I'm your assigned local rep to answer any questions - did you get a chance to register for online banking yet?"
}) {
userErrors {
field
message
}
}
}

Which responds with, on success:

{
"data": {
"createMessageTemplate": "c70df9ec-e4e0-4ec4-aaf6-f78f4271d663"
}
}

updateMessageTemplate

To update a template, use this:

mutation {
updateMessageTemplate(input: {
id: "c70df9ec-e4e0-4ec4-aaf6-f78f4271d663"
name: "Loan Follow Up A"
locale: "ES_US"
template: "Hola {{NICKNAME}}, soy {{REP}} de ACME Co., donde obtuvo su nuevo préstamo la semana pasada. Soy su representante local asignado para responder cualquier pregunta: ¿ya tuvo la oportunidad de registrarse en la banca en línea?"
}) {
userErrors {
field
message
}
}
}

Which responds with, on success:

{
"data": {
"updateMessageTemplate": true
}

deleteMessageTemplate

Deleting is not reversable. Use this:

mutation {
deleteMessageTemplate(input: {
"id": "c70df9ec-e4e0-4ec4-aaf6-f78f4271d663"
})
}

Which responds with, on success:

{
"data": {
"deleteMessageTemplate": 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_BY
BG_BG
BN_BD
BN_IN
BO_CN
BR_FR
BS_CYRL_BA
BS_LATN_BA
CA_ES
CO_FR
CS_CZ
CY_GB
DA_DK
DE_AT
DE_CH
DE_DE
DE_LI
DE_LU
DSB_DE
DV_MV
EL_GR
EN_029
EN_AU
EN_BZ
EN_CA
EN_GB
EN_IE
EN_IN
EN_JM
EN_MY
EN_NZ
EN_PH
EN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