Collapse AllExpand All

3. Creating a Customized Incident EDI Profile

The next two steps are optional. However, we've included them because they enable you to establish a link between an Incident Category and a unique EDI Profile specifically designed for that category. If you choose not to set this relationship, then xTuple ERP will use the EDI Profile defined in the CRM Configuration for all Incidents—regardless of which Incident Category they belong to.

If you find that you need to customize the EDI sent for a particular set of Incidents, you'll need to create a special EDI Profile and then link it to a special Incident Category. To create the customized Incident EDI Profile, follow these steps:

  1. Follow this path: System > Setup > Master Information > EDI Profiles

  2. Select the NEW button

  3. In the "Name" field, enter "CRM-Customer"

  4. In the "EDI Type" field, select "Email"

  5. Click on the "Review Before Sending" box

  6. In the "From" field, enter "</fromemail>"

  7. In the "To" field, enter "</owneremail>"

  8. In the "Cc" field, enter "</assignedemail>,</contactemail>"

  9. In the "Subject" field, enter "Prodiem [ or your company's name] incident </docnumber>"

  10. In the "Message Body", enter the following:

    This message contains important information about Prodiem [ or your company's name ] issue # </docnumber>.
    
    </description>
    </notes>
    </comments>
  11. Leave "Send Email as HTML" unchecked

  12. Click the NEW button to create an EDI Form

  13. The application will ask if you want to save the EDI Profile before continuing; click the OK button

  14. Select "Incident" from the Document Type list

  15. Leave the Output Format as "Report"

  16. Set the File Name to "</doctype></docnumber>.pdf"

  17. Set the "Query" to

    SELECT incdt_number AS docnumber,
           incdt_summary AS description,
           incdt_descrip AS notes,
          (SELECT usr_email FROM usr
            WHERE (usr_username=incdt_owner_username)) AS owneremail,
          (SELECT usr_email FROM usr
            WHERE (usr_username=incdt_assigned_username)) AS assignedemail,
           cntct_email AS contactemail,
          (SELECT usr_email FROM usr
            WHERE (usr_username=CURRENT_USER)) AS fromemail,
          (SELECT concatAgg(comment_user || ' - ' || comment_date ||
                            '\n' || comment_text ||
                          '\n...................................\n')
           FROM (SELECT comment_user, comment_date, comment_text
                 FROM comment
                 WHERE ((comment_source='INCDT')
                    AND (comment_source_id=incdt_id))
                 ORDER BY comment_date) dummy) AS comments
    FROM incdt LEFT OUTER JOIN cntct ON (incdt_cntct_id=cntct_id)
    WHERE (incdt_id=<? value("incdt_id") ?>);
  18. Click OK

  19. Your screen should look similar to the following:

Customized Incident EDI Profile