Smart events: HTTP post example

A lighting company runs an e-commerce site separate from Sage Intacct. On the site, they offer their products directly to customers. They also sell wholesale and direct over the phone and enter orders into Intacct. The company wants to notify customers right away if a product is on back order. To notify customers with correct information, the website database must have up-to-date inventory data. Keeping the data accurate can be done by creating a Smart event. The Smart event makes an HTTP post to a web application that updates the inventory when an order is placed.

A simple input for the site can include the event name, item ID, and quantity. To create a log entry, include the original order ID, order date, and the user from the entry in Intacct.

Use a separate line for each argument in the Arguments field.
  1. Go to Platform Services > All, then select Add (circle) next to Smart events.
  2. On Choose object to extend, specify:
    • Owner object: Inventory Control Transaction Detail
    • Document type: Inventory Transfer Out
  3. Select Next.
  4. On Select event properties, specify:
    • Action: HTTP Post
    • Events: Add
    • Condition: [Leave blank to generate for every sales order creation]
  5. Select Next.
  6. On Select HTTP post properties, specify:
    • URL: [http://www.example.com/…/example.php]
    • Method: POST
    • Arguments:
      Copy
      smart_event=add_web_inv &
      item={!INVDOCUMENTENTRY.ITEMID!} &
      qty={!INVDOCUMENTENTRY.QUANTITY!} &
      date={!INVDOCUMENTENTRY.WHENCREATED!} &
      document={!INVDOCUMENTENTRY.DOCHDRNO!} &
      user={!USERINFO.LOGINID!}
  7. Select Next.
  8. On Select deployment options, specify:
    • Smart link ID: WEB_INVENTORY_OUT
    • Description: Sends post to web application that inventory on an item has decreased.
    • Status: Active
  9. Select Save.

You can create similar events to send inventory adjustment information when an item’s inventory increases by extending the Inventory transfer in document.