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 2560 posts 8256 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!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies