Configure purchase request via own OCI link (Profit definition)

AFAS will exchange OCI links by default with different suppliers. The activation of such a link is a question of entering your username and password and you can start ordering.

If your supplier is not on the list with default links? You can then ask your supplier to create a link with InSite.

Profit has a default OCI definition (the Profit definition) that is meant for links that are maintained by AFAS.

Developing an OCI link based on the default Profit OCI definition consists of three steps:

  1. Register the user from InSite automatically in the supplier's web shop
  2. Sending the user back to InSite with the details of the shopping cart.
  3. Export the definitive purchase order to the supplier via an XML file

We explain per step below how you can develop this.

Consult an example of the cXML file.

Contents

Configure OCI profile

You must at least define one OCI profile per purchasing relation with whose web shop you will make a link through OCI. This may also be several per purchasing relation, for example, one for every site that you have or per group of products.

Add purchasing relation

  • Add the purchasing relation in Profit if this has not yet happened. For example, Manutan.

Contact the purchasing relation

Contact your purchasing relation.

You will receive the User name and Password from them to obtain access to the web shop. It is possible that the supplier still needs to make changes in his/her system to ensure that the OCI link with your organisation works correctly.

If you send the purchase order via the XML order to the purchasing relation, you may also receive from them a Export username and the Password. You can read more here about you compile the data in relation to a self-made OCI link.

Add OCI profile

You link the purchasing relation in the OCI profile. Profit will automatically change the issue method for the purchasing relation.

  1. Go to: Order Management/Management/Configuration/OCI profile.
  2. Click: New.

  3. Select the purchasing relation with whom you want to define the OCI link at Purchase contact,
  4. Change the Description. This description can again be found in InSite when you need to select which definition applies.

    Profit will use by default the purchasing relation's name for the description. You can, however, have several OCI profiles per purchasing relation. It is therefore wise to have a description that can be distinguished.

    You, for example, add one profile per site. As a description, enter Manutan Amsterdam and at the next Manutan Utrecht so that the user can make a simple choice.

  5. Select the definition that belong to the purchasing relation inOCI definition.

    An OCI definition is a link with AFAS certified per purchasing relation that contains a description of the fields.

    Please note:

    If you select a supplied OCI definition of a purchasing relation, the data will be automatically entered. This data cannot be changed..

    When selecting the default OCI definition Profit, you must enter all profile data. This definition is intended for smaller purchasing relations that do not have their own certified link, but that want to comply with the Profit standard.

    An OCI definition includes an import definition and an export definition. The import definition will specify how Profit processes the OCI message of the purchasing relation to create items, units and purchase request lines. The structure of the XML order’ (the digital purchase order) can be found in the export definition as issued by Profit to the purchasing relation.

  6. When you are configuring theProfit OCI definition, enter the Production URL (required) and the Test URL (optional). For this definition, you must receive data from the purchasing relation.

    For the OCI definitions per purchasing relation, you do not need to enter any values. Profit will by default provide this data.

  7. Enter the User name and the Password that you have received.
  8. Select Apply test URL if you are still in the testing phase. You must again deactivate them after testing when going live.
  9. Enter values in the fields at Export settings if you are now configuring an OCI profile with an XML order and you want to deliver the purchase orders via XML order to the purchasing relation.

    1. At Export URL, enter an address if it is not displayed when you select the OCI definition. You will then probably be configuring the Profit OCI definition. You will then receive the address from the purchasing relation. In relation to the OCI definitions per purchasing relation, this field will already contain a value if supplying through an XML order is possible.
    2. Enter the address that you can use for testing in Export-Test URL. If this is not displayed, ask your purchasing relation.
    3. Enter, if required, a value for Export username and the relatedPassword if you have received it from the purchasing relation for the delivery of the XML order. If the purchasing relation determines then, they will be retrieved with the OCI profile.
    4. If you want to test, select Export Test-URL. If you do not select it, Profit will use the data linked to the Export URL as the address.
  10. Click: Next.

    Next, enter the preferred values that Profit enters in the Purchase request in InSite.

  11. Select the item group at Preferred article group where Profit must save the items that you order through the web shop.

    They are existing item groups. You can also add a specific item group in advance or change it in this OCI profile after saving this profile.

  12. Enter the preferred values at the allocation axis fields. In this example, they are the site and department on whose behalf the purchase request is being submitted. This will also often be Cost centre.
  13. Select, if required, a contract at Contract.
  14. If required, select at Entry layout a special entry layout that you have added for this OCI profile (based on Change my InSite purchasing request). Profit will show this to the submitter when the submitter sees this purchase request in InSite after placing an order through the supplier's website.
  15. Select, if required, preferred values for the fields for the delivery of items.
  16. If required, enter at Debtor no. (supplier) the code that you received from the supplier. If the data item is required, it will be used in the link.

    It may be the case with a number of links that you must enter the GLN here. This is only required at OCI with XML orders as for Technische Unie.

  17. Click: Next.
  18. Select an image. By default, Profit supplies a logo of the purchasing relation per OCI definition, It will be displayed in InSite as a button so that the user can immediately recognise where he or she must click to place an order.
  19. Click: Finish.

When the OCI profile has been added, Profit will add the XML order issue as the issue method at the purchasing. This is used to issue the purchase order.

If the Export URL is missing in the OCI profile, Profit will automatically set the issue method to E-mail PDF.

If you delete the OCI profile, the issue method will also be automatically deleted. You cannot delete it anymore if there are already changes to the profile.

OCI profiles can also be copied.

2. Sending the user back to InSite with the details of the shopping cart.

Once the user has filled the shopping cart, the details of the shopping cart must be returned to InSite. You can create the purchase request there to be approved by a budget holder or manager. This happens by sending the user back to the hook_url from step 1 via an HTTPS POST.

This HTTPS POST is accompanied by a collection of data of product specifications. Upon the return to InSite, a validation takes place based on the token in the hook_url for security and integrity reasons.

The following fields are supported per product in relation to the collection of data of product specifications:

- NEW_ITEM-VENDORMAT: item code of the supplier

- NEW_ITEM-DESCRIPTION: description

- NEW_ITEM-MATGROUP: product group of the supplier

- NEW_ITEM-QUANTITY: number of units

- NEW_ITEM-UNIT: unit code

- NEW_ITEM-PRICE: price per unit

- NEW_ITEM-CUST_FIELD1: VAT percentage

- NEW_ITEM-CUST_FIELD2: Expected delivery date

- NEW_ITEM-CUST_FIELD3: Purchasing relation reference (we cut this field automatically at 50 characters)

An easy way to initiate the HTTPS POST request via HTML is through the code below:

<form method="post" action="https://insite.afas.online/postdatacallback/demo2c0b7045b14412e43b2a70f1c1a69Fst">

<input type="hidden" name="NEW_ITEM-VENDORMAT[1]" value="oci603524" />

<input type="hidden" name="NEW_ITEM-DESCRIPTION[1]" value="OCI punch out import item oci603524" />

<input type="hidden" name="NEW_ITEM-MATGROUP[1]" value="MATGROUP187" />

<input type="hidden" name="NEW_ITEM-QUANTITY[1]" value="614" />

<input type="hidden" name="NEW_ITEM-UNIT[1]" value="PCS" />

<input type="hidden" name="NEW_ITEM-PRICE[1]" value="178.59" />

<input type="hidden" name="NEW_ITEM-CUST_FIELD1[1]" value="21.0" />

<input type="submit" value="Bestellen in ERP-systeem" />

</form>

  • Comment

    The Remark field in the purchase request line is built up as follows:

    • If NEW_ITEM-LEADTIME (this field is translated based on the web shop message into the Profit field “AFASFbLeadtime" in the table ‘OCI record’) is greater than 0, the text will be the following: "Delivery time days: [value from the field]" displayed.
    • If NEW_ITEM-LONGTEXT_n:132 (this field is translated based on the web shop message into the Profit field “AfasFblongtext_132" in the table ‘OCI record’) contains a value, the text will be the following: "EXPLANATION: [value from the field].

    If both fields have a value, both values will be added to the field. They will then be one under the other with the number of delivery time days as the first.

3. Export the definitive purchase order to the supplier via an XML file

After the purchasing request has been approved via the workflow in InSite, we can export the generated purchase order via an XML file in an HTTPS POST to the supplier. This will ensure that the confirmed order can be imported automatically in the supplier's back office.

The export-URL can be defined in the Export-URL field on the properties of the OCI profile.

Please note:

All communication with unknown URLs will be blocked by default. Therefore, submit a support incident to have your export URL put on our whitelist. We would like to know the Port number. Often simply 443, but check this just to be certain.

The XML file that is sent has been formatted in accordance with the cXML standard.

Directly to

  1. Purchase process
  2. Configuration
  3. Purchase contact
  4. Prices (purchase)
  5. Discounts (purchase)
  6. Order proposal
  7. Purchase order
  8. Goods receipt
  9. Purchase invoice
  10. View purchase reports