November Happy Hour will be moved to Thursday December 5th.

Event for inventoryUpdate - Commerce 9

Vote:
 

Hi

I trying to trigger the InventoryUpdated, Its not possible to update the inventory in the new Gui, i mean the quantity in stock.

I am using service API to update the "/episerverapi/commerce/entries/{CODE}/inventories/" 

Its is possible to trigger some event when using service API to update the warehouse stock?

I have try to use:

var broadcaster = context.Locate.Advanced.GetInstance();
			var listener = context.Locate.Advanced.GetInstance();
			listener.AddEvent();


and

private void CatalogKeyEventUpdated(object sender, EventNotificationEventArgs e)
		{
			var eventArgs = DeSerialize((byte[])e.Param);
			var inventoryUpdatedEventArgs = eventArgs as InventoryUpdateEventArgs;
			
			if (inventoryUpdatedEventArgs != null)
				RemoteInventoryUpdated(sender, inventoryUpdatedEventArgs);
		}

/Juan

#145132
Feb 25, 2016 15:50
Vote:
 

Hi,

Not sure I understand your question, but when you update inventories via ServiceAPI, it will still raise the InventoryUpdated event.

Do you run ServiceAPI in same instance with your website?

/Q

#145170
Feb 26, 2016 11:16
Vote:
 

"Warehouse stock" Is it in some external system?
/K

#145268
Mar 01, 2016 12:09
Vote:
 


Hi

@Quan: I have service API in another instance, and its not trigger.

@Khan: I am importing inventory status of a product using Service APi.

/Juan

#145274
Mar 01, 2016 13:33
Vote:
 

Does it trigger other events, such as catalog events when you import catalog?

It's probably the setting for Framework Events is not correct,

/Q

#145299
Mar 01, 2016 16:23
Vote:
 

@Quan: No events trigger when I import using Service API.

Where is the setting for Framework Events?

Juan

#145340
Mar 02, 2016 10:54
Vote:
 

By default in web.config you'll have something like this, make sure to uncomment those:

<services>
      <service name="EPiServer.Events.Remote.EventReplication" behaviorConfiguration="DebugServiceBehaviour">
        <!-- Uncomment this endpoint and the "RemoteEventServiceClientEndPoint" to enable remote events
            <endpoint name="RemoteEventServiceEndPoint"
                    contract="EPiServer.Events.ServiceModel.IEventReplication"
                    binding="customBinding"
                    bindingConfiguration="RemoteEventsBinding"
                    address="soap.udp://239.255.255.19:5000/RemoteEventService"/>-->
        <endpoint name="RemoteEventServiceEndPoint" contract="EPiServer.Events.ServiceModel.IEventReplication" binding="customBinding" bindingConfiguration="RemoteEventsBinding" address="soap.udp://239.255.255.19:5000/RemoteEventService" />
      </service>
      <!-- Enable remote service -->
    </services>
    <client>
      <!-- Uncomment this endpoint and the "RemoteEventServiceEndPoint" to enable remote events
        <endpoint name="RemoteEventServiceClientEndPoint"
           address="soap.udp://239.255.255.19:5000/RemoteEventService"
           binding="customBinding"
           bindingConfiguration="RemoteEventsBinding"
           contract="EPiServer.Events.ServiceModel.IEventReplication"/>-->
      <endpoint name="RemoteEventServiceClientEndPoint" address="soap.udp://239.255.255.19:5000/RemoteEventService" binding="customBinding" bindingConfiguration="RemoteEventsBinding" contract="EPiServer.Events.ServiceModel.IEventReplication" />
    </client>

/Q

#145341
Mar 02, 2016 10:57
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.