Copied to clipboard

Flag this post as spam?

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


  • Richard Leonard 3 posts 84 karma points
    Feb 15, 2018 @ 18:22
    Richard Leonard
    0

    Programatically inserting content

    I have need on my website to update the products I have in my CMS via a 3rd party JSON feed. I can't show the data in realtime so need to save the category/product structure within the CMS as content nodes.

    I am going to create a method that gets the JSON, then checks to see if the content already exists, if it does then check to see if it needs updating, if not then insert it. I will then go through the tree to set a logical delete on anything that's in content but not the latest JSON feed.

    I am running 7.8.1 so to do this am I best using the Content Service (https://our.umbraco.org/documentation/reference/management/services/contentservice) or is there a more efficient way to do it?

    Thanks, Richard

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Feb 15, 2018 @ 19:03
    Alex Skrypnyk
    100

    Hi Richard

    The content service is the only way to insert content into Umbraco website.

    /Alex

  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Feb 15, 2018 @ 19:03
    Alex Skrypnyk
    0

    A more efficient way can be using sql directly - but it's not the right way.

  • Richard Leonard 3 posts 84 karma points
    Feb 15, 2018 @ 19:56
    Richard Leonard
    0

    Thanks Alex, i'll get learning Umbraco Content Service then

Please Sign in or register to post replies

Write your reply to:

Draft