Documentation ¶
Index ¶
- func FireCampaignEvents(ctx context.Context, db *sqlx.DB, rp *redis.Pool, orgID models.OrgID, ...) ([]*models.Session, error)
- func StartFlow(ctx context.Context, db *sqlx.DB, rp *redis.Pool, org *models.OrgAssets, ...) ([]*models.Session, error)
- func StartFlowBatch(ctx context.Context, db *sqlx.DB, rp *redis.Pool, batch *models.FlowStartBatch) ([]*models.Session, error)
- type StartOptions
- type TriggerBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FireCampaignEvents ¶ added in v0.0.20
func FireCampaignEvents( ctx context.Context, db *sqlx.DB, rp *redis.Pool, orgID models.OrgID, fires []*models.EventFire, flowUUID assets.FlowUUID, event *triggers.CampaignEvent) ([]*models.Session, error)
FireCampaignEvents starts the flow for the passed in org, contact and flow
func StartFlow ¶
func StartFlow( ctx context.Context, db *sqlx.DB, rp *redis.Pool, org *models.OrgAssets, flow *models.Flow, contactIDs []flows.ContactID, options *StartOptions, buildTrigger TriggerBuilder, hook models.SessionCommitHook) ([]*models.Session, error)
StartFlow runs the passed in flow for the passed in contact
Types ¶
type StartOptions ¶ added in v0.0.27
type StartOptions struct { // RestartParticipants should be true if the flow start should restart participants already in this flow RestartParticipants bool // IncludeActive should be true if we want to interrupt people active in other flows (including this one) IncludeActive bool // Interrupt should be true if we want to interrupt the flows runs for any contact started in this flow // (simple campaign events do not currently interrupt) Interrupt bool }
Click to show internal directories.
Click to hide internal directories.