Statflo Documentation
Campaigns
Campaigns
A
Campaign
is a unique "reason to contact" someone, such as a step in a sales cadence, or the name of a touchpoint. Campaigns have a name, start date, end date, and a description to help you differentiate campaigns. Descriptions are not shown to users.
createCampaign
In order to add campaign members to a TextKit instance, you'll need a campaign first:
# Campaigns are only active when the time is after `startDate`# and where 'state' is set to ACTIVE# Dates like startDate and endDate are in UTC format, in GMTmutation { createCampaign(input: { name: "Loan Follow-Up" description: "Customers who recently got new loan." startDate: "2021-01-03T010:00:00Z" endDate: "2021-02-03T010:00:00Z" state: DRAFT }) { userErrors { field message } }}
Which responds with, on success:
{ "data": { "createCampaign": "455393a5-1b43-40ac-8562-68c0ce94a79d" }}
updateCampaign
To change a campaign, use this request:
mutation { updateCampaign(input: { name: "Loan Follow-Up" description: "Customers who recently got a new loan." startDate: "2021-01-14T010:00:00Z" endDate: "2021-02-14T010:00:00Z" state: ACTIVE }) { userErrors { field message } }}
Which responds with, on success:
{ "data": { "updateCampaign": true }}
deleteCampaign
Deleting is not reversable, and is to be used only if an entire campaign was created in error and can't be reused. To delete a campaign, use this query:
mutation { deleteCampaign(input: { "id": "455393a5-1b43-40ac-8562-68c0ce94a79d" })}
Which responds with, on success:
{ "data": { "deleteCampaign": true }}
state
enum method { DRAFT ACTIVE CANCELLED RENEWED DONE}