Overview

An application is a wrapper around a group of objects and menus that work together to fulfill a function. You create a Platform application using the Sage Intacct UI and Platform Services to efficiently handle unique processes for your own or other companies.

In this tutorial, we show you how to create a sample application that manages the attendees and presenters for a company conference. You will create custom data objects and then create menus, forms, and workflows for those objects. After completing the tutorial, you will have a good understanding of the capabilities of Platform Services.

Application functionality

The sample application will track attendees and presenters for a company conference. The end user for the application will be able to:

The application will include some automations:

The following shows the relationships between the application objects. Custom objects are prefaced by the KW namespace, and the standard object is shown in green.

Hierarchy of application objects

Building the application

Here’s how we’ll build the application:

Important: Do not modify a sample application to build a production solution. Always build production applications from scratch in a clean development company without other custom applications and customizations. This approach ensures you only include what you intend in your application. Also, elements of an application are tied to the company where they were developed through ID numbers. It is better to create your objects in your own development company so you have consistent ID numbers.


Use Action UI for Platform

This tutorial uses the Action UI for Platform Services. You can enable it as follows:

  1. From the upper right of Sage Intacct, select your user name, then select My preferences.
  2. Go Display layout in the new user interface and select both , choose Custom and customized pages and Platform and Customization Services.
  3. Select Save.

Create the application wrapper

Let’s create the basic wrapper for the application. We will use a namespace to avoid potential name collisions with other third-party applications or with Sage Intacct.

  1. Go to Platform Services > Platform tools > + Applications.

  2. On the Application Properties page that appears, leave This application is deployed checked.

    This selection makes the application visible to end users and allows us to see the application menus and pages and test the functionality as we go.

  3. For Application name, enter KW My Conferencing App.

    End users will use this menu name to access the application. KW is the namespace (short for Keyword).

  4. Select Save.

    Your application is now listed under Custom applications:

    List of applications

  5. Select KW My Conferencing App to open the Application Definition page.

    The Application Definition page is where you do much of your work. It lets you create custom objects, menus, and so forth.

  6. Select Edit properties to look at the application properties.

    There are sections for adding Custom objects and Standard objects to your application as well as other properties.

  7. Select Cancel.


Create the custom objects

Now that we created the wrapper for our application, let’s add the three custom objects:

Attendee object

Let’s create the definition of the attendee object. We’ll use the best practice of providing a namespace for the object and tracking any changes for the audit log.

  1. From the Application Definition page, select Objects in the banner:

    Banner menu with objects highlighted

    If you need to get back to the Application Definition page, go to Platform Services > Platform tools > Applications and select KW My Conferencing App.

  2. Select New object.

  3. On the Object Properties & Attributes page that appears, leave the Status options unchecked.

  4. Enter Attendee as the Singular name for the object.

  5. Select outside the field and note that the other name fields are autofilled.

  6. Change the Integration name to KW_attendee.

    Using the namespace is important for avoiding name collisions with other objects.

    name fields

  7. Under Optional object properties, select Audit trail so there will be a history of when records of this type are created.

  8. Scroll down and notice that Create a new menu for this object and KW My Conferencing App are checked, then select Save.

  9. In the New Menu page that appears, note that KW My Conferencing App is checked and select Save.

    A page that lists all Platform Services objects appears.

  10. Scroll down and locate the new object. The ID number for your object will likely be different.

    lister with Attendee object

Conference level object

Let’s use a slightly different approach to create the next object. We’ll create the object first, then add it to the application afterwards.

  1. Go to Platform Services > + Objects.

  2. Enter Conference Level as the Singular name for the object.

  3. Change the Integration name to KW_conference_level.

  4. Check the Audit trail property.

  5. Under Add to applications, select KW My Conferencing App, then select Save.

  6. In the New menu page that appears, select KW My Conferencing App under Add to applications and select Save.

Presenter object

We need to track the presenters for our conference, so let’s add an object to do so.

  1. Go to Platform Services > + Objects.

  2. Enter Presenter as the Singular name for the object.

  3. Change the Integration name to KW_presenter.

  4. Check the Audit trail attribute.

  5. Under Add to applications, select KW My Conferencing App, then select Save.

  6. In the New menu page that appears, select KW My Conferencing App under Add to applications and select Save.


View the application from the main menu

Let’s confirm that the application is now available in the menus:

  1. Reload your browser page.

  2. Go to the Applications menu and choose KW My Conferencing App to see the new menus:

    Attendee menu under KW My Conferencing App menu

As you continue to work on the application, you will access it in different ways. You can work from the Platform Service menus, like Platform Services > Objects or Platform Services > Platform tools > Applications. You can also access the definitions and properties for your custom objects from the end-user menus we looked at here. More on this later.

Grant permissions

As the application developer, we can see the application and its menus without setting any permissions. However, other users need permissions for to access the application. How you approach this depends on whether your company has user-based or role-based permissions (see Role-based vs. user-based permissions in the Sage Intacct product help). This example assumes role-based permissions.

  1. Locate or create a test user that you can log in as.

  2. Go to Company > Admin > Roles.

  3. Because the role for our new app was system-generated it will look like this:

    Role for KW My Conferencing App

  4. On the line for the conferencing app, select Role assignment.

    Notice that your user is not assigned to the role yet.

  5. Select Close.

  6. Go to Company > Admin > Users.

  7. On the line for your new user, select Edit.

  8. Select Roles information.

  9. Select into a new Role name field and use the dropdown to select KW My Conferencing App.

    It will appear in the dropdown as something like this: ::SYS::Enterprise-ROLE-FOR - Module: KW My Conferencing App

  10. Select Save.

    Enter your password.

Log in again as the new user. KW My Conferencing App is available in the menu. Remember to log out and log in again as yourself.

Tip: When you create production applications for clients, you need to provide information about how end users can set up their permissions for using the application.


Add fields to the objects

Now that we have our three objects, let’s create fields on the objects to provide the functionality we want.

Tip: Because we used namespaces for our custom objects, we are already protected from name collisions on fields—there is no need to use namespaces. However, when you add custom fields to standard objects, you should use namespaces.

Attendee fields

Recall that we need to add the following:

Create the Attendee name field

  1. Go to Platform Services > Platform tools > Applications and select KW My Conferencing App.

  2. In the shortcuts banner at the top of the page, select Objects .

  3. Under Selected Objects, select Attendee. (Select Attendee, not Edit.)

    This opens the Object definition page.

  4. In the Component list shortcuts banner, select Fields.

    Note that our object already has fields that Intacct automatically added, such as Attendee, Comments, Created At, and so forth.

  5. Select New Field.

  6. For type, select Text and Next.

  7. Enter Attendee name as the field label.

  8. Check This field is required in all forms and select Save.

  9. The Add to pages and views screen displays various pages so that end users can perform actions like create, view, edit, and so forth.

  10. Under Views, select All Attendees, then select Save.

Create the Email field

Let’s use a different approach to access the object definition this time.

  1. From the main menus, go to KW My Conferencing App > Attendees > Attendees.

  2. Select Object definition in the upper right of the lister page.

  3. Select Fields in the Component list shortcuts banner.

  4. Select New field at the top of the list.

  5. Select Email for the type and select Next.

  6. Enter Email as the field label.

  7. Check This field is required in all forms and select Save.

  8. In the Add to pages and views screen that appears, select Save to accept the defaults.

Create the relationship to customers

Now let’s add a relationship between our attendee object and the standard customer object so that attendees can be associated with existing customers.

  1. From the Attendee Object Definition, go to the Component list shortcuts banner and select Relationships.

  2. Select New relationship.

  3. For the Related object, select Customer [CUSTOMER], then select Next.

  4. Leave the Singular and Plural names as they are.

    Tip: The integration name for the relationship is not autofilled. Provide an integration name with your relationships or Intacct will auto generate a name that’s not intuitive.

  5. For Integration name, enter R_attendee_customer.

    We use R_ to identify the integration name as a relationship.

  6. For the Relationship type, choose Many attendees to one customer.

    relationship type menu

    A large company might send several attendees to the conference.

  7. Leave the suggested Integration names for the Lookup fields as they are (RCUSTOMER and RKW_attendee).

  8. Select Save.

Create the relationship to conference levels

Now lets add a relationship between KW_attendee and KW_conference_level

  1. In the Object definition page for Attendees, locate the Relationships section and select New relationship.

  2. For the Related Object, select Conference level [KW_conference_level], then select Next.

  3. Leave the Singular and Plural names as is.

  4. Enter R_attendee_conference_level as the Integration name.

  5. For the Relationship type, choose Many attendees to one conference level.

    Multiple attendees will register at the same conference level.

  6. Leave the suggested Integration names for the Lookup Fields as is (RKW_conference_level and RKW_attendee).

  7. Select Save.

Unique record name

It’s recommended that you use unique record names, so let’s do that here:

  1. From the Object definition page for Attendee, select Edit properties & attributes.

  2. In the Available merge fields section, select Attendee name from the drop down.

  3. Copy the merge token that displays and paste it into the Record name template field.

  4. Use Available merge fields again and select ID.

  5. Copy the merge token and paste it into the Record name template field. Add two dashes between the tokens, as shown:

    Record name template code

  6. Select Save.

View the UI for creating new attendees

Let’s take a look at how users will apply these relationships now that we’ve laid the groundwork.

  1. From the main menu, go to KW My Conferencing App > Attendees > + Attendees.

  2. Notice that the Attendee field, which is the record name, is read only.

    This is because the record name will be automatically generated using the record name template we provided.

  3. Two of the fields are text entry, and the related Customer and Conference level can be chosen with lookups.

  4. Select the magnifying glass next to Customer to show the form for choosing the related customer.

  5. Close the Select Customer form, then select Cancel on the New Attendee page.

Conference level fields

Recall that we need to add the following:

Create the Price Level and Price fields

  1. Open the Object definition page for Conference Level.

  2. Go to the Fields section and add the following two new fields.

    Field Type Field Label Field is required in all forms Add to Pages and Views
    Text Price level True Accept default values
    Currency Price True Accept default values
  3. (Optional) From the Object definition page, select Edit properties & attributes and set up a unique record name template like this:

    {!price_level!}--{!id!}

Presenter fields

Recall that we need to add the following:

Create the fields

  1. Open the Object definition page for Presenter.

  2. Scroll down to Fields and select New field.

  3. Go to the Fields section and add the following new fields. (Note that there are some options for these fields that we haven’t used yet, such as default value and file extension.)

    Field Type Field Label Field is required in all forms Add to Pages and Views
    Text Presenter name True Accept default values
    Field Type Field Label Default Value Add to Pages and Views
    Check Box Active Checked Accept default values

    Note: All custom objects have an isActive field that can be used for the same purpose as the Active field we are adding.

    Field Type Field Label Field is required in all forms Add to Pages and Views
    Email Email True Accept default values
    Field Type Field Label File Extensions Add to Pages and Views
    File Upload Presentation .pdf Accept default values
  4. (Optional) From the Object definition page, select Edit properties & attributes and set up a unique record name template like this:

    {!presenter_name!}--{!id!}

Extra credit - Create a relationship to customers

A presenter could certainly be a customer as well.

Using the steps above as a guide, create a comparable relationship from presenters to customers—use R_presenter_customer as the integration name for the relationship.


Create and test an email Trigger

Let’s create the email trigger now.

  1. From the Presenter Object definition page, go to the Component list shortcuts banner and select Triggers then select New Trigger.

  2. For Trigger type, select Send email and select Next.

  3. Select This trigger is deployed.

  4. Under Trigger activation, choose After create.

    After creating a new presenter, the trigger will execute.

  5. For Trigger name, enter Presenter_Welcome.

  6. Under Trigger type properties in Use field select Email.

    Note that Send to is filled in with: {!email!}

  7. For Reply to, enter something like this: noreply@nomail.com

  8. To the right of Email Template, select the plus sign to add a new template.

  9. For Template name use Presenter welcome email.

  10. For Subject, enter Thank you for being a presenter!.

  11. Use a merge field to to include the name of the presenter in the email:

    • Under Available merge fields, choose Presenter, then under the Select field choose Presenter name.

      Note that the merge field shows this token: {!KW_presenter.presenter_name!}

    • Copy the the token, paste it into the text editor area, and preface it with a greeting:

      Hello {!KW_presenter.presenter_name!} --

    • In the actual email, the greeting will look something like the following:

      Hello Jen Jones --

    • Add the following text:

      We're glad that you're scheduled to present at the upcoming conference. As you know, we receive many submissions, and yours stood out as exceptional. Watch out for an email from us with instructions about your room assignment, practice session time, and AV contact information.

  12. At the bottom of the email template page, select Save and on the Trigger page select Save again.

Let’s test our new trigger by creating a fictitious presenter.

  1. Go to KW My Conferencing App > Presenters > + Presenters.

  2. Create a presenter, making sure to supply your own email address, for example:

      Presenter name: Jen Jones
      Active: checked      
      Email: your email address
      Presentation: Choose a test file
      Customer: Leave blank
    
  3. Save the presenter, then check your email and open the message from noreply@nomail.com.

    Presenter welcome email


Create seed records

Let’s create some seed records. These records will represent the three primary conference price levels, but users will be able to add additional levels if necessary. For example, if the company decides later that it wants to add special pricing levels for non-profits and educational organizations, users can easily do so.

  1. Go to the main menu and select KW My Conferencing App > Conference Level > + Conference Level.

  2. On the page that appears, enter the following:

     Price Level: Introductory
     Price: 1000
    
  3. Select Save.

  4. Repeat the steps for two more levels:

     Price Level: Standard
     Price: 1500
    
     Price Level: Premier
     Price: 2500
    

Now that we have our three levels, let’s add them to the application:

  1. Go to Platform Services > Platform tools > Applications and select KW My Conferencing App.

  2. From the Component list shortcuts banner, select Seed records and select Attach record.

  3. In the dialog that appears, choose Conference level from the dropdown.

  4. Select Premier, and notice the banner message at the top of the page indicating that the seed record was added. Seed record confirmation
  5. Select the other two conference levels to add them, then select Close window in the Attach Record dialog.

Let’s verify that the seed records are now available in the application. Go to KW My Conferencing App > Conference levels > Conference levels to open the list view:

Seed records list view


Automatically create a statistical journal entry

API triggers provide a powerful mechanism for automating tasks.

Let’s assume we want to use an API trigger to keep a running tally of the number of conference registrations. Statistical journals are great for this purpose. A statistical journal entry simply increases or decreases a value—we can automatically create a statistical journal entry each time a new attendee is created.

Before we can create a statistical journal entry, we need to create a simple statistical account and a statistical journal we can use.

Create the statistical account

  1. Go to General Ledger > All > + Statistical account.

  2. Provide the following values, then slick Save.

    Label Value
    Account number ATTD
    Title Conference attendance
    Report type Cumulative balance
    Status Active

Create the statistical journal

  1. Go to General Ledger > Setup > + Statistical.

  2. Provide the following values, then slick Save.

    Label Value
    Symbol KW-01
    Title Conference attendance
    Status Active

Now we are ready to work on the function.

Create the API Trigger

Here’s an example of a function that creates a statistical journal entry:

<create>
   <GLBATCH>
      <JOURNAL>KW-01</JOURNAL>
      <BATCH_DATE>03/15/2024</BATCH_DATE>
      <BATCH_TITLE>Conference registration</BATCH_TITLE>
      <ENTRIES>
         <GLENTRY>
            <ACCOUNTNO>ATTD</ACCOUNTNO>
            <CURRENCY>USD</CURRENCY>
            <TR_TYPE >1</TR_TYPE>
            <AMOUNT>1900</AMOUNT>
            <EXCH_RATE_TYPE_ID></EXCH_RATE_TYPE_ID>
            <EXCHANGE_RATE>1.5</EXCHANGE_RATE>
            <DESCRIPTION>Registration for Jen Jones for $1000</DESCRIPTION>
         </GLENTRY> 
      </ENTRIES>
   </GLBATCH>
</create>

Note: If you use a multi-entity company, <LOCATION>myLocationID</LOCATION> is required for the GLENTRY in the XML (see Create Journal Entry for details).

Because we are working inside Platform Services, we don’t need to include any of the header or footer information that is required for an XML request coming in from Web Services.

Let’s create a trigger that executes the function, which is stored as a document template.

  1. On the Attendee Object definition page banner, select Triggers, then select New trigger.

  2. For the Trigger type, choose Intacct API and select Next.

  3. Select This trigger is deployed.

  4. Trigger activation, select After create.

  5. For Trigger name, enter Create_Stat_Journal.

  6. Under Trigger type properties, select the plus sign to add a new document template.

  7. Enter Create registration stat journal as the Template name.

  8. Copy the create example above and paste it into the code editor area.

  9. Use a merge field to include the name of the attendee in the description:

    • From the Available merge fields, choose Attendee as the field type and Attendee name for the field. The token displays: {!KW_attendee.attendee_name!}

    • Copy and paste the token over the name in the Description element of the API function.

      Copy merge field in UI

  10. Use a merge field to include the conference price in the description:

    • From the Available merge fields, choose Related conference level as the field type and Price for the field. The token displays: {!R_attendee_conference_level.price!}

    • Copy and paste the token over the price in the Description element of the API function.

      Copy merge field in UI

  11. (Optional) Preview the document template with the merge fields filled in for a given attendee:

    • Select Preview template.

    • In the Attendees Selector table, select an attendee name to open the Preview.

    (If you don’t yet have an attendee record, there won’t be a name to choose.)

    • Close the Preview template window.
  12. Select Save in the Create Template window.

  13. Scroll to the bottom of the New Trigger page and select Save.

Test the trigger

  1. Choose KW My Conferencing App > Attendees > + Attendee to create a new attendee.

  2. Go to General Ledger > Setup > Statistical and select View transactions for the Conference attendance journal.

  3. Select view for the transaction. You should see something like this:

    Journal entry in UI

Troubleshooting

If you don’t see an entry, it probably means there is an issue with the API call. Here are some troubleshooting suggestions.


More extra credit

If you want a challenge, consider completing the section on creating a sales order with an API trigger. Otherwise, you can skip the challenge and go onto exporting your application’s XML below.


Export the application XML

The application is now complete. Let’s export the application’s XML, which is then available for installation into a target company.

  1. Go to Platform Services > Platform tools > Applications > KW My Conferencing App.

  2. In the upper right, Select Publish.

    UI publish button

  3. In the page that appears, note that the application name and version are filled in for you. Also notice that Is managed is not checked – this is only a sample application, so that’s fine.

    Important: For a production application, you almost always want to publish a managed application. A managed application cannot be modified after installation. If you leave an application unmanaged, users can make changes on the installed version. Once changes are made to an installed version, the application cannot be updated without potential data loss.

  4. Select Generate XML to download the application’s XML definition.

    Important: You should never edit an application’s XML file.

The application can now be installed in a different company. Congratulations on creating your first Platform application!

To install the application on a different development company, see Custom applications in the Sage Intacct product help.


Delete or undeploy an application

If you want to remove the sample application, you have two options:

Undeploy the application

  1. Go to Platform Services > Platform tools > Applications.

    A list of all applications appears.

  2. Next to KW My Conferencing App, select Edit.

  3. On the Application Definition page, select Edit properties.

  4. On the Application Properties page, clear the This application is deployed checkbox, and select Save.

Delete the application

Before an application can be deleted, it must be undeployed for a period of time so that the system can update the status in the cache.

  1. Undeploy the application as described above and wait a few minutes.

  2. Go to Platform Services > Platform tools > Applications.

    A list of all applications appears.

  3. Next to KW My Conferencing App, select Del, then confirm the action by selecting the checkbox and Delete.


Challenge: Add an API trigger to create a sales order

We can create a trigger that uses an API function to create a sales order for each new attendee. Your company must have subscriptions to Order Entry and Inventory Control to create a sales order. You must also have a mechanism for sending XML API calls via Web Services.

Note: If you don’t have these subscriptions, you can read through the steps to get an idea of how to create a transaction using an API trigger.

We will use the create_sotransaction function, which will look something like this:

<create_sotransaction>
	<transactiontype>Sales Order</transactiontype>
	<datecreated>
		<year>2024</year>
		<month>3</month>
		<day>15</day>
	</datecreated>
	<customerid>CUST-198</customerid>
	<referenceno>Test</referenceno>
	<datedue>
		<year>2024</year>
		<month>4</month>
		<day>15</day>
	</datedue>
	<message>Jen Jones -- Thank you for registering for the conference!</message>
	<state>Pending</state>
	<sotransitems>
		<sotransitem>
			<itemid>Conference registration</itemid>
			<quantity>1</quantity>
			<unit>Each</unit>
			<price>100</price>
		</sotransitem>
	</sotransitems>
</create_sotransaction>

We are going to use merge fields to grab the needed parameter values. Our attendee object provides these values, but not in the format required.

For example, an attendee record has Created at field with a Date/Time format. However, we need the date broken into year, month, and day for the function call. To address this, we need to add more fields to the object definition.

Create an Inventory Control item for the sales order

We need an item in Inventory Control for the conference level in order to be able to create a sales order. This is just a placeholder item for the purposes of the tutorial.

Note: Creating the conference price levels as Inventory Control items from the start would have worked as an alternative to creating a custom Conference level object. Using a custom object worked well for demonstration purposes for this tutorial.

  1. Go to Inventory Control > All > + Items.

  2. Enter Conference registration for the Item ID and Name.

  3. Choose any available Warehouse ID, then select Save.

Create a test sales order to confirm required fields

Different companies have different requirements for the parameters for create_sotransaction. For example, you will have different customers in your test company, and a multi-entity company requires currency parameters. Before continuing, confirm that you can create a sales order with the API.

Note: The date due for the sales order has to be later than the date created.

  1. Use Postman (or your preferred mechanism) for sending Web Services API functions to your company to verify a working create_sotransaction function. Use the example above as a model.

    If you need help, see Your First XML API Calls.

  2. Save your working function, either in Postman or in a text editor.

  3. Use another XML function call to list attendees:

      <readByQuery>
          <object>KW_Attendee</object>
          <fields>*</fields>
          <query/>
          <pagesize>100</pagesize>
      </readByQuery>
    
  4. Note the format for the createdAt value:

    <createdAt>2024-12-13T17:28:49Z</createdAt>
    

Add Year created field

Let’s use the createdAt field to get the pieces that we need for the create_sotransaction function. Will will add formula fields to the Attendee object to accomplish this.

  1. Open the Attendee object definition and locate the Fields section.

  2. Create a field for accessing only the creation year.

    1. Select New field at the top of the list.

    2. Select Formula for the type and select Next.

    3. Enter Year created for the field label, and Integer for the Formula return type.

    4. Enter the following JavaScript in the formula field. We are using a JavaScript UTC function (getUTCFullYear) so that time zones are handled.

       return new Date("{!KW_attendee.createdAt!}").getUTCFullYear();
      
    5. Select Check it for errors to validate the formula.

    6. Select the magnifying glass, and choose an existing attendee to see exactly what will be returned. The result at the bottom should show just the year.

    7. Close the dialog, then select Save on the New Field page.

    8. Accept the defaults for the Add to Pages and Views dialog.

Add Month created and Day created fields

Add Due date fields

Now we need to create three comparable fields for the pieces the comprise the date due for the sales order. Let’s use one month past the creation date as the due date.

Note that you could use a net term of 30 to accomplish the same task, but we are working through this exercise as a learning experience.

  1. Create a new Year due formula field on the attendee object that returns an integer type and uses the following formula:

      var d = new Date("{!KW_attendee.createdAt!}");
      d.setMonth(d.getUTCMonth() + 1); // Add one month
      return d.getUTCFullYear();
    
  2. Create Month due and Day due fields:

    Field Type Field Label Return Type Formula Pages and Views
    formula Month due Integer return new Date("{!KW_attendee.createdAt!}").getUTCMonth() + 1; Accept defaults
    formula Day due Integer return new Date("{!KW_attendee.createdAt!}").getUTCDate(); Accept defaults

Create the API trigger

Now that the Attendee has the fields we need, let’s create a trigger for the API call.

  1. On the Attendee Object definition page banner, select Triggers, then select New trigger.

  2. Set up the trigger:

    • For the Trigger type, choose Intacct API and select Next.

    • Select This trigger is deployed.

    • For Trigger activation, select After create.

    • For Trigger name, enter Create_Sales_Order.

  3. Under Trigger type properties, select the plus sign to add a new document template.

  4. Enter Conference registration sales order as the Template name.

  5. Paste your working create_sotransaction function (created above) into the code editor area.

  6. Use a merge field to include the year created for the date due:

    • Under Available merge fields, choose Attendee as the field type and Year created for the field. The token displays: {!KW_attendee.year_created!}

    • Copy and paste the token into the year child element of datecreated into the code editor area.

  7. Use the same approach for the month and day elements:

    <month>{!KW_attendee.month_created!}</month>
    <day>{!KW_attendee.day_created!}</day>
    
  8. Set up the datedue elements as follows:

     <datedue>
         <year>{!KW_attendee.year_due!}</year>
         <month>{!KW_attendee.month_due!}</month>
         <day>{!KW_attendee.day_due!}</day>
     </datedue> 
    
  9. From the Available merge fields, choose Related conference level, then set up the price element as follows:

      <price>{!R_attendee_conference_level.price!}</price>
    
  10. From the Available merge fields, choose Attendee, then set up the customerid element as follows:

      <customerid>{!KW_attendee.RCUSTOMER!}</customerid>
    
  11. Provide the transaction type (must be a valid transaction type in the company):

      <transactiontype>Sales Order</transactiontype>
    
  12. Just to make it easy for us to find a sales order during our testing, use an easy-to-find field name for referenceno:

      <referenceno>ABC test</referenceno>
    
  13. Fill in any other missing parameters and select Save.

    Your completed call will look something like this:

       <create_sotransaction>
         <transactiontype>Sales Order</transactiontype>
             <datecreated>
                 <year>{!KW_attendee.year_created!}</year>
                 <month>{!KW_attendee.month_created!}</month>
                 <day>{!KW_attendee.day_created!}</day>
             </datecreated>
             <customerid>A11</customerid>
             <referenceno>ABC test</referenceno>
             <datedue>
                 <year>{!KW_attendee.year_due!}</year>
                 <month>{!KW_attendee.month_due!}</month>
                 <day>{!KW_attendee.day_due!}</day>
             </datedue> 
             <state>Pending</state>
             <sotransitems>
                 <sotransitem>
                     <itemid>Conference registration</itemid>
                     <warehouseid>East</warehouseid>
                     <quantity>1</quantity>
                     <unit>Each</unit>
                     <price>{!R_attendee_conference_level.price!}</price>
                 </sotransitem>
             </sotransitems>
       </create_sotransaction>
    
  14. Scroll to the bottom of the New Trigger page and select Save.

Test the trigger

  1. Create a new attendee in the application.

  2. Go to Order Entry > All > OE Sales Order and search for the new transaction by Reference number, ABC test.

Troubleshooting

If the Sales Order is not found, it means there was an issue with the API call. You can’t debug the call inside Platform Services, but you can use Postman to help figure out the problem:

  1. Go back to your original working create_sotransaction call with the hard coded parameter values in Postman.

  2. Compare this version to the template version of the call and look for discrepancies.

  3. If you don’t see any issues, begin replacing the merge-field values in the template with the appropriate hard-coded values from your working call. Each time you do this, upload the updated template and create another attendee. Repeat this until the sales order is created. This means the last replaced merge field was problematic.


What’s Next?

Provide feedback