Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Johan Möller 83 posts 137 karma points
    Sep 29, 2017 @ 08:29
    Johan Möller
    0

    Creating campaign codes from code

    I have a request from a customer to generate a new one use campaign code to anyone who signs up to their newsletter. Is there a way to do this? I couldn't find anything in the docs.

  • Anders Burla Johansen 2534 posts 8126 karma points
    Sep 29, 2017 @ 08:38
    Anders Burla Johansen
    100

    Hi Johan

    Use the TeaCommerce.Api.Marketing.Services namespace

    DiscountCodeService.Instance.Generate(...)

    or you can create your own

    new DiscountCode( ruleId, code).Save()

    Kind regards

    Anders

  • Johan Möller 83 posts 137 karma points
    Sep 29, 2017 @ 11:56
    Johan Möller
    0

    Nice, thanks!

Please Sign in or register to post replies

Write your reply to:

Draft