OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions Create an order via API

This topic contains 6 replies, has 3 voices, and was last updated by  Paul Clarkin 8 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #25005

    salex
    Participant

    Can someone help with information about creating orders via API? Couldn’t find appropriate documentation.. thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #25006

    Jaimy
    Participant

    Hi @salex,

    You couldn’t find any documentation since there is no functionality yet to create Magento order, assuming the orders you’re talking about are Magento orders, via the OroCRM api. You could go ahead and create an Api (Rest/SOAP) Order controller and add this functionality yourself :)

    The OroCRMSalesBundle has some great examples for creating your own Api controllers https://github.com/orocrm/crm/tree/master/src/OroCRM/Bundle/SalesBundle/Controller/Api/Rest hope this helps to get you started!

    Kind Regards,

    Jaimy Casteleijn

    #25007

    salex
    Participant

    Hi Jaimy,

    thank you for the answer, do I understand correctly that ORO doesn’t have ‘own storage’ for orders and the only one way is installing additionally Magento for this purpose? If so, could you please clarify any other alternative approaches for handling orders in ORO, presently we have own custom e-commerce application written on php framework with custom DB (where stored customers, products, orders etc).

    Thanks,
    Alex

    #25008

    Jaimy
    Participant

    Hi @salex,

    You understand correctly! Oro doesn’t store “basic orders” if you will. It will only store orders for the entities you create. You could use a BaseOrder entity as a start and work from there. This is what I would advise:

    – Create an entity which will store you’re Order (if you want could map it 1on1);
    – The Order could extend the BaseOrder (BaseOrder) which will give you a nice set of fields to start from;
    – Create the related entities, such as OrderItems, Customers, OrderAddress etc..;
    – After you’ve done all that, you could create an ApiController to push Orders to your CRM instance.

    There is no out of the box Order for all platforms so you are stuck with writing some entities on your own, sorry :< . Hope this helps!

    Kind Regards,

    Jaimy Casteleijn

    #25009

    salex
    Participant

    Hi Jaimy,

    thank you for such detailed explanation, now technical side is clear :)
    will think about the best approach.

    Alex

    #25010

    Jaimy
    Participant

    Hi @salex,

    No problem, hopefully this will help and guide you (in some way) to the right approach. Good luck and have fun with Oro(CRM)!

    Kind Regards,

    Jaimy Casteleijn

    #25011

    Paul Clarkin
    Participant

    Hi, @salex is this something you solved? I want to do the same. Is your solution something you could share?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top