Skip to main content
Solved

Example of API for allocation in IMO

  • September 29, 2023
  • 3 replies
  • 87 views

athobie
Sidekick (Partner)
Forum|alt.badge.img+11

Hi,

We need to do an API to allocate materials in a IMO  (Internal Material Order).

 @Community : Do you have an example of an API message that we could use  in Process Flow to allocate materials ?

 

Thanks 🙏  and regards

anthony

Best answer by Joshua Liem

Hi Anthony,

 

Below is an API sample to allocate IMO line.

Please replace everything with the {} with the appropriate value.
For non consignment stock, please remove the company_id

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="log_int_order">
      <action name="execmacro">
        <attribute bo_name="main" macro_name="SOURCING" />
        <attribute dtype="string" value="{order_id}" />
        <attribute dtype="string" value="{demand_id}" />
        <attribute dtype="string" value="- -req_qty,cancel_due_date_check,part_id,whse,bin,fr_bin_code_id,inv_type,company_id,${qty},1,{bpart_id},{warehouse_id},{bin_id},{bin_code_id},{inv_type_id},{company_id}," />
        <attribute dtype="string" value="{qty}" />
      </action>
    </state>
  </session>
</root>

 

Good luck.

3 replies

Phil Seifert
Ultimate Hero (Employee)
Forum|alt.badge.img+24
  • Ultimate Hero (Employee)
  • September 29, 2023

Hi Anthony,

I don’t know if you really need to control specifically like this from an external source but why can’t you use the Allocation Batch and schedule jobs to allocate?

 

 

The challenge with an API is that you would need to address all the aspects yourself of what document requested the part.  I don’t have such an API myself but perhaps someone who is more familiar with external logistics integrations might have an idea?


Forum|alt.badge.img+12
  • Superhero (Employee)
  • Answer
  • September 30, 2023

Hi Anthony,

 

Below is an API sample to allocate IMO line.

Please replace everything with the {} with the appropriate value.
For non consignment stock, please remove the company_id

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
  <session email="" alias="">
    <state bc_name="log_int_order">
      <action name="execmacro">
        <attribute bo_name="main" macro_name="SOURCING" />
        <attribute dtype="string" value="{order_id}" />
        <attribute dtype="string" value="{demand_id}" />
        <attribute dtype="string" value="- -req_qty,cancel_due_date_check,part_id,whse,bin,fr_bin_code_id,inv_type,company_id,${qty},1,{bpart_id},{warehouse_id},{bin_id},{bin_code_id},{inv_type_id},{company_id}," />
        <attribute dtype="string" value="{qty}" />
      </action>
    </state>
  </session>
</root>

 

Good luck.


athobie
Sidekick (Partner)
Forum|alt.badge.img+11
  • Author
  • Sidekick (Partner)
  • October 9, 2023

Hi @Joshua Liem 

Thanks you very much.



regards

anthony