Skip to main content

Recurrency and P21: Configuring Transaction API for Exports

Updated over 2 months ago

Background

By adopting Recurrency, your organization can significantly reduce manual work associated with optimizing purchasing decisions, enhance data visibility, and uncover valuable trends that are often difficult to identify. Organizations that use Recurrency are frequently able to decrease their operating costs through more informed purchasing decisions, and increase their revenue by helping their sellers identify timely opportunities to sell additional products.

Recurrency’s feature set includes both read and write actions against your ERP system. This guide will go through how to authorize Recurrency to execute exports back to P21 via the Transaction API.

Using the Transaction API: Recurrency’s default is to use SISM for exporting objects. This requires having write access to your production database. If you are using Epicor’s cloud hosted P21 offering or you want to configure Recurrency to read from a read-replica, then we fallback to using the TXN API.

If neither of those apply to you, we have a different version of this guide for how to configure SISM.

Reach out to [email protected] to receive the correct guide or if you have any questions.

System Architecture

Before diving into the tactical steps, it’s important to have an understanding of the different components that make up Recurrency.

  • Epicor Prophet 21 MSSQL Database: behind every Prophet 21 deployment, there is a Microsoft SQL database that holds all of the data. Recurrency works by establishing a direct connection with this database.

  • Recurrency web application: hosted at https://app.recurrency.com, this is the website that users will interact with to use Recurrency’s features and capabilities

  • Recurrency production environment: this is our cloud based environment which hosts all of your data and the systems necessary to push/pull data to/from the Prophet 21 database. It also includes all of the systems which support the web application.

  • P21 Transaction (TXN) API: one of several different APIs that Epicor provides under their API Middleware product suite. Use of the Transaction API is required if you are on Epicor’s web-UI (which all cloud hosted customers are).

Recurrency only writes a few data points back to P21. For our demand planning and purchasing automation features, we write:

  1. Min/max values

  2. Purchase Orders

  3. Transfer Orders and Transfer Backorders

You need to be a P21 admin who can access P21 settings to modify Transaction (TXN) API configurations.

This guide will provide screenshots from the Epicor Web UI. If you are using the Desktop UI, things may look different, but the same configuration values apply.

Integration Steps -- Creating a Consumer Key

The fastest way to configure this is to create a Consumer Key in the Middleware Admin Panel which will grant us access to export data via the applicable APIs.

To create a Consumer Key:

  1. Login to your Middleware Admin Page (i.e.https://youraccountname.epicordistribution.com/docs/home.aspx)

  2. Go to API Console

  3. At the bottom of the page, there will be a horizontal form where you can create a new Consumer Key

  4. In this form enter the following details:

    1. Consumer: Recurrency

    2. API Scope: /api;/data

    3. SDK Access: check

    4. Consumer Type: Desktop

    5. Token Expire: Never expire

  5. Coordinate with your Recurrency point of contact for a secure method to transfer the Consumer Key so we can configure Recurrency to integrate with the API.

The following image shows what this should look like when configured. After you create the key, P21 will append /p21sdk to the end of the API scope to grant SDK Access.

Frequently Asked Questions

1. Do I only need to create the consumer key or do you need a user account as well?

Only the consumer key is required. However, a dedicated P21 user account can be helpful for additional debugging and investigation.

To create a dedicated user for Recurrency:

  1. Login to P21

  2. Open the User Maintenance page to create a new user

    1. User ID: {YOURCOMPANYNAME}.RECURRENCY.{ENVIRONMENT}

      1. For example, if we were configuring this in a play environment DISTRIBUTOR.RECURRENCY.PLAY

      2. In a production one DISTRIBUTOR.RECURRENCY is sufficient

    2. User’s First Name: Recurrency

    3. Last Name: User

    4. E-mail Address: [email protected]

    5. Default Company ID: 1

      1. This may be different depending on your P21 set up. You should pick a valid company Id.

    6. Role: ADMIN

      1. You can use any role you like as long as it has read/write access to data. We’ve seen ADMIN as a default role that P21 provides that has all of this configured already

    7. Designer Rights: pick any role

      1. We don’t use these rights with our application, but P21 requires you to make a selection

  3. Then click on Application Security towards the top of the screen

  4. This will bring you to a page where you can grant specific permissions to this user. The permissions to enable are:

    1. Access to SOA Admin Page: Yes

    2. Allow access to API system pool: Yes

    3. Allow OData API service: Yes

  5. Click Save

  6. Next, we need to manually set a password for the user

    1. This should be the same process that you would do for any new employee that you want to give access to P21

  7. Finally, send an email to Recurrency point of contact

    1. URL: include the URL for your API endpoints (also referred to as the “Middleware URL”)

    2. User ID: User ID for the user you just created

    3. Password: the password for the user

      1. Depending on your P21 version, you may not know what the user password is. If you do not see or have the opportunity to set a password, that’s okay and you can leave this out of the email..

      2. We will update the password after successfully logging in.

  8. The Recurrency team will then login using those credentials and generate required API keys for us to submit data via the Transaction API

Did this answer your question?