Download RightNow February `08

Transcript
86
XML Integration
By using the slai pair and associated nested pairs in the contact_create, contact_update,
org_create, and org_update functions, you can create or delete an SLA instance within the
sla_instances table. The slai pair must contain an array of pair data, including the slai_item<#>
pair and the action, owner_tbl, owner_id, sla_id, and activedate nested pairs.
Important The action pair is required to create or terminate an SLA instance. The value of
the action pair determines whether the SLA instance is created or terminated;
set this value to 1 to create an instance (used in contact_create or org_create
functions) or 3 to delete an instance (used in contact_update or org_update
functions). The owner_id corresponds with the c_id of the contact or org_id of
the organization the SLA is associated with. The owner_tbl corresponds with
the table ID of the table the owner_id is associated with; contact-associated
SLAs will have a table ID of 2 and organization-associated SLAs will have a
table ID of 3.
When updating an SLA instance, the slai_id pair must be included; however, when creating an
SLA instance, the API will automatically generate an slai_id for the SLA instance that is consistent with existing SLA instances in the database, so you should not include the slai_id pair
when creating an SLA instance.
The SLA instance will be populated with data specified in the pair list. A brief description of
all sla_instances table fields and their corresponding pair names can be found in Appendix A,
“Pair Names,” on page 125.
The following example shows an array of pair data that would create an SLA instance when
used in a contact_create or org_create function.
Example:
<pair name="slai" type="pair">
<pair name="slai_item1" type="pair">
<pair name="action" type="integer">1</pair>
<pair name="activedate" type="time">1097683200</pair>
<pair name="expiredate" type="time">1129219200</pair>
<pair name="inc_chat" type="integer">10</pair>
<pair name="inc_csr" type="integer">10</pair>
<pair name="inc_email" type="integer">10</pair>
<pair name="inc_total" type="integer">40</pair>
<pair name="inc_web" type="integer">10</pair>
<pair name="sla_id" type="integer">1</pair>
<pair name="sla_set" type="integer">1</pair>
<pair name="state" type="integer">2</pair>
Chapter 3