Created
March 13, 2024 21:18
-
-
Save vishalnarkhede/66792d85a0aa7f72be60873f18485062 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const discountCampaign = client.campaign({ | |
sender_id: campaignSender.id, | |
segment_ids: [indianUserSegment.id], | |
message_template: { | |
text: templateText, | |
custom: { | |
foo: 'bar', | |
}, | |
}, | |
}); | |
const { campaign } = await discountCampaign.create(); | |
// start campaign in 2 days | |
await discountCampaign.start({ | |
scheduledFor: new Date(Date.now() + 4000).toISOString(), | |
}); | |
const res = await discountCampaign.update({ | |
...campaign, | |
name: 'New Campaign Name', | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment