6Message content

Message Content Overview

When you are creating content for your messages, you can use placeholders, blocks, and formatting rules that are replaced with actual values when the message is created.

  • Placeholder—The field name, that, when included in a message, is replaced with the actual field value for a particular message instance. You can use placeholders to create a single message pattern for different instances, and to create consistent, personalized messages for your customers. For example, in a message to a customer about a delayed start to a service activity, you may want to include the service ticket number, name of technician, and new estimated time of arrival. Refer to Placeholders.

  • Block statements—The message engine tools used to iterate through a list of similar objects (visit orders, activity inventory) and print the same section of the pattern for every object from the list. Refer to Block Types and Block Examples.

  • Formatting rules—Rules that define date and time formatting patterns for use within a message. Refer to Date and Time Formatting Patterns.

Placeholders

Use placeholders in messages when you want the message to include an actual value for an entity when the message is generated. Placeholders let you create a single message pattern that replaces the placeholders with information specific to each instance, such as the resource time and time of arrival.

You can define the type of encoding to be applied to a placeholder value before printing. The encoding can be specified after a name of the placeholder. The | character is used as the delimiter in this case. The following encoding types are supported:

  • none

  • xml/html

  • slashes/cslashes

  • cescape

  • url

  • cgi

  • csv_item

  • json

  • sql_slashes

Here are examples for encoding placeholder values:

CSV: "{pr_address|csv_item}","{pr_comments|csv_item}","{pr_notes|csv_item}"
URL: address={pr_address|cgi}&comments={pr_comments|cgi}&notes={pr_notes|cgi}

Encoding Placeholder Values

You can define the type of encoding to be applied to a placeholder value before printing.

The encoding can be specified after a name of the placeholder. The '|' character is used as the delimiter in this case.

The following encoding types are supported:
  • none
  • xml/html
  • slashes/cslashes
  • cescape
  • url
  • cgi
  • csv_item
  • json
  • sql_slashes
CSV: "{pr_address|csv_item}","{pr_comments|csv_item}","{pr_notes|csv_item}"
URL: address={pr_address|cgi}&comments={pr_comments|cgi}&notes={pr_notes|cgi}

Suppressing Unassigned Variables

You can suppress the printing of empty variables. This functionality is mainly intended to decrease the size of the message body for internal messages.

The supported syntaxes are {var:+text} and {var:-text}. In the first case, the text will not be inserted into the result if var is empty. In the second case, text will be inserted into the result if var is empty.

{pr_ch_note:+<f n="pr_ch_note">{pr_ch_note}</f>
}{ch_drop_bury:+<f n="ch_drop_bury">{ch_drop_bury}</f>
}
The result for pr_ch_note="" and ch_drop_bury="0" is:
<f n="ch_drop_bury">0</f>
{pr_ch_w_o_notes:+<f n="notes">{pr_ch_w_o_notes}</f>
}{pr_ch_w_o_notes:-<f n="notes">{pr_ch_notes}</f>
}

The result for pr_ch_w_o_notes="wo notes" and pr_ch_notes="" is:

<f n="notes">wo notes</f>
The result for pr_ch_w_o_notes="" and pr_ch_notes="notes" is:
<f n="notes">notes</f>

Activity Message Placeholders

These are message placeholders related to activities.

Table Activity Number placeholder

Placeholder Description
activity_number ID of the corresponding work order in an external system

Table Activity Type placeholder

Placeholder Description
activity_type activity primary type (regular, reopened, prework)

Table Activity Status placeholder

Placeholder Description
activity_status activity status

Table Activity Worktype placeholder

Placeholder Description
activity_worktype activity work type (name)

Table Activity Worktype ID placeholder

Placeholder Description
activity_worktype_id activity work type (id)

Table Activity Worktype Label placeholder

Placeholder Description
activity_worktype_label activity work type (label)

Table Activity Workzone placeholder

Placeholder Description
activity_workzone activity work zone (name)

Table Activity Worktype ID placeholder

Placeholder Description
activity_workzone_id activity work zone (id)

Table Activity Travel Area placeholder

Placeholder Description
activity_travel_area activity travel area (name)

Table Activity Travel Area ID placeholder

Placeholder Description
activity_travel_area_id activity travel area (id)

Table Activity Travel Area Label placeholder

Placeholder Description
activity_travel_area_label activity travel area (label)

Table Activity Workskill placeholder

Placeholder Description
activity_workskill activity work skill (name). can only be used in the 'activity_workskills' block.

Table Activity Workskill ID placeholder

Placeholder Description
activity_workskill_id activity work skill (id). can only be used in the 'activity_workskills' block.

Table Activity Workskill Label placeholder

Placeholder Description
activity_workskill_label activity work skill (label. can only be used in the 'activity_workskills' block.

Table Activity Workskill Required Level placeholder

Placeholder Description
activity_workskill_required_level required work skill level for an activity. can only be used in the 'activity_workskills' block.

Table Activity Workskill Preferable Level placeholder

Placeholder Description
activity_workskill_preferable_level preferable work skill level for an activity. can only be used in the 'activity_workskills' block.

Table Activity Start Time placeholder

Placeholder Description
activity_start_time estimated start time of the activity ("hh24:mi" format)

Table Activity End Time placeholder

Placeholder Description
activity_end_time estimated end time of the activity ("hh24:mi" format)

Table Activity duration placeholder

Placeholder Description
activity_duration estimated activity duration

Table Activity Service Window Start placeholder

Placeholder Description
activity_service_window_start service window start ("hh24:mi" format)

Table Activity Service Window End placeholder

Placeholder Description
activity_service_window_end service window end ("hh24:mi" format)

Table Activity SLA Window Start placeholder

Placeholder Description
activity_sla_window_start sla window start ("yyyy-dd-mm hh24:mi" format)

Table Activity SLA Window End placeholder

Placeholder Description
activity_sla_window_end sla window end ("yyyy-dd-mm hh24:mi" format)

Table Activity Delivery Window Start placeholder

Placeholder Description
activity_delivery_window_start delivery window start ("hh24:mi" format)

Table Activity Delivery Window End placeholder

Placeholder Description
activity_delivery_window_end delivery window end ("hh24:mi" format)

Table Activity Time Delivered Start placeholder

Placeholder Description
activity_time_delivered_start start of the time window delivered to customer ("hh24:mm" format)

Table Activity Time Delivered End placeholder

Placeholder Description
activity_time_delivered_end end of the time window delivered to customer ("hh24:mm" format)

Table Activity Traveling Time placeholder

Placeholder Description
activity_traveling_time estimated travel time from the previous activity (minutes)

Table Activity Time Slot placeholder

Placeholder Description
activity_time_slot activity time slot (name)

Table Activity Time Slot ID placeholder

Placeholder Description
activity_time_slot_id activity time slot (id)

Table Activity Time Slot Label placeholder

Placeholder Description
activity_time_slot_label activity time slot (label)

Table Activity Time Zone placeholder

Placeholder Description
activity_time_zone name of the time zone defined for the activity

Table Activity Time Zone ID placeholder

Placeholder Description
activity_time_zone_id id of the time zone defined for the activity

Table Activity Timezone Label placeholder

Placeholder Description
activity_time_zone_label label of the time zone defined for the activity

Table Activity Timezone Diff placeholder

Placeholder Description
activity_time_zone_diff time difference of the time zone defined for the activity

Table Activity Customer Name placeholder

Placeholder Description
activity_customer_name customer's name

Table Activity Customer Number placeholder

Placeholder Description
activity_customer_number id of the corresponding customer's account in an external system

Table Activity Phone placeholder

Placeholder Description
activity_phone activity/customer contact information

Table Activity Email placeholder

Placeholder Description
activity_email activity/customer contact information

Table Activity Cell placeholder

Placeholder Description
activity_cell activity/customer contact information

Table Activity Address placeholder

Placeholder Description
activity_address location of the activity

Table Activity City placeholder

Placeholder Description
activity_city location of the activity

Table Activity State placeholder

Placeholder Description
activity_state location of the activity

Table Activity Zip placeholder

Placeholder Description
activity_zip location of the activity

Table Activity Coord Status placeholder

Placeholder Description
activity_coord_status whether or not the activity coordinates were found

Table Activity Coordx placeholder

Placeholder Description
activity_coordx longitude of the activity (of customer's location)

Table Activity Coordy placeholder

Placeholder Description
activity_coordy latitude of the activity (of customer's location)

Table Activity Language placeholder

Placeholder Description
activity_language customer's messaging language (name)

Table Activity Language ID placeholder

Placeholder Description
activity_language_id customer's messaging language (id)

Table Activity Language Label placeholder

Placeholder Description
activity_language_label customer's messaging language (label)

Table Activity Reminder Time placeholder

Placeholder Description
activity_reminder_time customer's reminder notification time

Table Activity Position in Route placeholder

Placeholder Description
activity_position_in_route sequential position (starts from "1") of the corresponding activity in a route

Table Activity Time of Booking placeholder

Placeholder Description
activity_time_of_booking time when the activity was booked (customer activities) or created (internal activities). ("yyyy-dd-mm hh24:mi" format)

Table Activity Time of Assignment placeholder

Placeholder Description
activity_time_of_assignment For the activity currently assigned to a resource, the placeholder returns the time when the corresponding move/reschedule/create operation was performed. For the activity in a bucket, the placeholder's value is empty ("yyyy-dd-mm hh24:mi" format).

Table Activity Link Min Interval placeholder

Placeholder Description
activity_link_min_interval minimum duration of the time interval between linked activities. This placeholder can only be used in the 'linked_activities' block.

Table Activity Link Max Interval placeholder

Placeholder Description
activity_link_max_interval maximum duration of the time interval between linked activities. this placeholder can only be used in the 'linked_activities' block.

Route Message Placeholders

These are message placeholders related to routes.

Table Placeholders for route

Placeholder Description
route_date Route date ("YYYY-MM-DD" format)
route_start_time Route activation time ("YYYY-MM-DD HH24:MI:SS" format)
route_end_time Route deactivation time ("YYYY-MM-DD HH24:MI:SS" format)
route_reactivation_time Route reactivation time ("YYYY-MM-DD HH24:MI:SS" format)

Visit Message Placeholders

These are message placeholders related to visits.

Table Placeholders for visit

Placeholder Description
visit_id ID of the visit
visit_status Allows to retrieve the current status of the visit
visit_confirmed Allows to retrieve ID of the visit
visit_time_delivered_start Allow to retrieve the time delivered to a customer for companies that use visits
visit_time_delivered_end Allow to retrieve the time delivered to a customer for companies that use visits

Resource Message Placeholders

These are message placeholders related to resources.

Table Placeholders for resource

Placeholder Description
resource_external_id Resource id
resource_language Resource messaging language (name)
resource_language_id Resource messaging language (id)
resource_name Resource name
resource_phone Resource phone number
resource_email Resource email address
resource_type Resource type (name)
resource_type_id Resource type (id)
resource_type_label Resource type (label)
resource_time_zone Name of the resource's time zone
resource_time_zone_id ID of resource's time zone
resource_time_zone_label Label of resource's time zone
resource_time_zone_diff Time difference of the resource's time zone
parent_resource_external_id Parent resource external id
parent_resource_name Parent resource name
destination_resource_id ID of the current resource for an activity (or inventory). Destination resource for the move activity/inventory operations.
destination_resource_external_id External ID of the current resource for an activity (or inventory). Destination resource for the move activity/inventory operations.
destination_resource_name Name of the current resource for an activity (or inventory). Destination resource for the move activity/inventory operations.
destination_date Current date the activity is assigned to. Destination date for the reschedule activity operation.

Inventory Message Placeholders

These are message placeholders related to inventory.

Table Placeholders for inventory

Placeholder Description
inventory_serial_number Serial number of the inventory
inventory_type Inventory type (name)
inventory_type_id Inventory type (id)
inventory_type_label Inventory type (label)
inventory_ex_serial_number Serial number of the exchanged inventory. This placeholder is only available inside of the 'exchanged_inventory' block.
inventory_quantity Quantity of the non-serialized inventory.
Note: This placeholder can also have "zero" or negative value. To obtain the non-serialized inventory quantity that was transferred using Collaboration, the Core API Collaboration Event = ‘transactionUpdated’ should be used.
inventory_model_property_value In case with serialized inventory, it always equals "1". Value of the 'Model' property.

Required Inventory Message Placeholders

These are message placeholders related to required inventory.

Table Placeholders for required inventory

Placeholder Description
required_inventory_type_id Required inventory type ID
required_inventory_type_name Required inventory type name translated into message language
required_inventory_type_label Required inventory type label
required_inventory_model Required inventory model
required_inventory_quantity Quantity of the required inventory

Service Request Message Placeholders

These are message placeholders related to service requests.

Table Placeholders for service request

Placeholder Description
request_date Service request date
request_type Service request type (name)
request_type_id Service request type (id
request_type_label Service request type (label)
request_time_of_creation Time when the service request was created. It is printed using the time zone of the message (based on the selected Recipient).

Message Type Message Placeholders

These are message placeholders related to messages.

Table Placeholders for message

Placeholder Description
prev_status Status of the previous message step
prev_desc Description of the previous message step
prev_data Data of the previous step
prev_subject Subject of the previous step
prev_body Body of the previous step
message_time_zone Name of the time zone from the corresponding scenario step
message_time_zone_id ID of the time zone from the corresponding scenario step
message_time_zone_label Label of time zone from the corresponding scenario step
message_time_zone_diff Time difference stored in the message
message_time_of_creation Time when the message was created. In case of 'inner' steps, value might differ from the time of the event that resulted in the creation of this message. It is printed using the time zone of the message (based on the selected Recipient).
message_time_of_content_generation Time when content was generated for this message. It is printed using the time zone of the message (based on the selected Recipient).

User Message Placeholders

These are message placeholders related to users.

Table Placeholders for user

Placeholder Description
user_name Name of the user who created the message
user_login Login of the user who created the message

Properties Message Placeholders

These are message placeholders related to properties.

Table Placeholders for properties

Placeholder Description
exprnum_label Value of the property identified by the label.

It works with string, int, enum and file properties. It does not support properties of the field type.

In case of a file property the printed value contains a name of the file.

By default the text representation of an enum property is printed. The prnum_ prefix allows to retrieve ID of a lookup for an enum property.

The ex_ prefix is only applicable to the inventory_exchange launch condition or in the exchanged_inventory block. It provides access to properties of the deinstalled inventory in case of an exchange operation.

Calendar Message Placeholders

These are message placeholders related to calendars.

This placeholder group can be used in subject/body templates of messages that have reference to a route. Also, they work for the manual (service request) launch condition. The message engine retrieves the data from the regular calendar by default. But, it also allows to switch to the on-call calendar type using a special BLOCK statement. The calendar is retrieved for the date of the corresponding route (if applicable) or the service request.

Table Placeholders for calendars

Placeholder Description
calendar_time_from Start of resource's working day (HH24:MI format)
calendar_time_to End of resource's working day (HH24:MI format
calendar_points Points from the resource's calendar
calendar_comments Comments from the resource's calendar
calendar_record_type Type of the resource's calendar record, such as shift, working, non-working
calendar_shift Resource's shift (name)
calendar_shift_id Resource's shift (ID)
calendar_shift_label Resource's shift (label)
calendar_work_schedule Resource's work schedule (name)
calendar_work_schedule_id Resource's work schedule (ID)
calendar_work_schedule_label Resource's work schedule (label)
calendar_non_working_reason Resource's non-working reason (name)
calendar_non_working_reason_id Resource's non-working reason (ID)
calendar_non_working_reason_label Resource's non-working reason (label)

Date and Time Formatting Patterns

The message content generator can use the date and time formatting patterns listed here. Content for all the below listed patterns are generated using the locale en_us utf-8.

To use the pattern, write it after the placeholder, using the '|' sign as the delimiter. For example:

{date} = 2006-07-19
{ETA} = 16:00

{ETA|%R} = 16:00
{ETA|%H:%M} = 16:00

{ETA|%r} = 04:00:00 PM
{ETA|%I:%M %p} = 04:00 PM
{ETA|%I:%M:%S %p} = 04:00:00 PM

{date|%A, %d %b %G} = Wed, 19 Jul 2006
{ETA|%A, %d %b %G %I:%M} = Wednesday, 19 Jul 2006 04:00 PM

Format Description
%A Replaced with the full weekday name.
%a Replaced with the abbreviated weekday name.
%B Replaced with the full month name.
%b Replaced with the abbreviated month name.
%C Replaced with (year / 100) as decimal number; single digits are preceded by a zero.
%c Replaced with the time and date.
%D equivalent to %m/%d/%y.
%d Replaced with the day of the month as a decimal number (01-31).
%E, %O* POSIX locale extensions. The sequences %Ec %EC %Ex %EX% Ey %EY %Od %Oe %OH %OI %Om %OM %OS %Ou %OU %OV %Ow %OW %Oy are supposed to provide alternate representations. Additionally, %OB is implemented to represent alternative months names (used Standalone, without day mentioned).
%e Replaced with the day of month as a decimal number (1-31); single digits are preceded by a blank.
%F Equivalent to %Y-%m-%d.
%G Replaced with a year as a decimal number with century. This year is the one that contains the greater part of the week (Monday as the first day of the week).
%g Replaced with the same year as in %G, but as a decimal number without century (00-99).
%H Replaced with the hour (24-hour clock) as a decimal number (00-23).
%h Same as %b.
%I Replaced with the hour (12-hour clock) as a decimal number (01-12).
%j Replaced with the day of the year as a decimal number (001-366).
%k Replaced with the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank.
%l Replaced with the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank.
%M Replaced with the minute as a decimal number (00-59).
%m Replaced with the month as a decimal number (01-12).
%n Replaced with a new line.
%O* Same as %E*.
%p Replaced with either "ante meridiem" or "post meridiem" as appropriate.
%R Equivalent to %H:%M.
%r Equivalent to %I:%M:%S %p.
%S Replaced with the second as a decimal number (00-60).
%s Replaced with the number of seconds since the Epoch, UTC (see mktime(3)).
%T Equivalent to %H:%M:%S
%t Replaced with a tab.
%U Replaced with the week number of the year as a decimal number (00-53) with Sunday being the first day of the week.
%u Replaced with the weekday as a decimal number (1-7) with Monday being the first day of the week.
%V Replaced with the week number of the year as a decimal number (01-53) with Monday being the first day of the week. If the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is the last week of the previous year, and the next week is week 1.
%v Equivalent to %e-%b-%Y
%W Replaced with the week number of the year as a decimal number (00-53) with Monday being the first day of the week.
%w Replaced with the weekday as a decimal number (0-6) with Sunday being the first day of the week.
%X Replaced with the time.
%x Replaced with the date.
%Y Replaced with the year with century as a decimal number.
%y Replaced with the year without century as a decimal number (00-99).
%+ Replaced with the date and time (the format is similar to that produced by date(1)).
%-* Suppress padding when performing numerical outputs.
%_* Explicitly specify space for padding.
%0* Explicitly specify zero for padding.
%% Replaced with %.

Block Types

These are the available block types.

Block Description
installed_inventory This block retrieves the list of inventory from the install pool.
deinstalled_inventory This block retrieves the list of inventory from the deinstall pool.
customer_inventory This block retrieves the list of inventory from the customer pool.
resource_inventory This block retrieves the list of inventory from the resource pool.
exchanged_inventory This block retrieves the list of exchanged inventory.
required_inventory This block retrieves the list of required inventory.
visit This block can include information related to work orders that belong to a visit into a single message. This block can only be used in scenarios attached to the visit-related launch conditions.
team-members This block retrieves the list of team-members for a given teamholder and a given day. It can be used in messages that are related to a route. It also it works for the Manual (service request) launch condition.
regular_calendar/oncall_calendar These two blocks are intended for switching between the regular and on-call calendar types. The regular calendar is selected by default and it is not required to use the block in this case.
activity_workskills Only the following placeholders can be used in this block:
  • Activity Workskill

  • Activity Workskill ID

  • Activity Workskill label

  • Activity Workskill Required level

  • Activity Workskill Preferable label

See Activity Message Placeholders

destination_resource This block retrieves activities linked to the current one. The block has the following syntax: <BLOCK type="linked_activities: label of activity link type">. This block cannot be used without the label of activity link type. All related activity links are also handled as ordered even if the corresponding activity link type has two identical labels.
forbidden_resources/required_resources These blocks retrieves preferred resources.
multiday_activity

This block temporarily switches the context to the related multi-day activity. It can be used in scenarios related to both multi-day activities and their segments. If this block is invoked for a single-day activity, it will not process any records and the result will contain no data.

multiday_activity_segments

This block prints information about all existing segments of a multi-day activity regardless of their statuses (except deleted segments). It can be used in scenarios related to both multi-day activities and their segments. If this block is invoked for a single-day activity, it will not process any records and the result will contain no data.

Block Examples

These are examples of blocks.

Visit

  <visit>
   <BLOCK type="visit">
    <work_order number="{activity_number}" status="{activity_status}" comments="{pr_comments}"/>
   </BLOCK>
  </visit>

Team

 <team>
   <BLOCK type="team-members">
    <team-member
     resource_external_id ="{resource_external_id}"
     resource_name = "{resource_name}"
     teamwork_start = "{activity_start_time:+{activity_start_time}}{activity_start_time:-{activity_service_window_start}}"
     teamwork_end  = "{activity_end_time:+{activity_end_time}}{activity_end_time:-{activity_service_window_end}}"
     teamwork_activity_number = "{activity_number}"
     teamwork_activity_worktype = "{activity_worktype}"
     teamwork_activity_duration = "{activity_duration}"
     teamwork_activity_time_slot = "{activity_time_slot}"
    />
   </BLOCK>
  </team>

Oncall_calendar

  regular_shift = "{calendar_shift}"
  
  <BLOCK type="oncall_calendar">
   oncall_shift = "{calendar_shift}"
  </BLOCK>

Activity_workskills

  Pattern:
  
  <desc><BLOCK type="activity_workskills">{activity_workskill},</BLOCK></desc>
  <details>
   <BLOCK type="activity_workskills">
    <skill label="{activity_workskill_label}" required="{activity_workskill_required_level}" preferable="{activity_workskill_preferable_level}"/>
   </BLOCK>
  </details>
  

Linked activities and preferred resources

  Pattern:
  
  <linked_activities>
   <BLOCK type="linked_activities: start-before">
    <activity link = "predecessor" min_delay = "{activity_link_min_interval}" max_delay = "{activity_link_max_interval}" date = "{date}" resource = "{resource_name}" number = "{activity_number}" worktype = "{activity_worktype}"/>
    
    <forbidden_resources>
     <BLOCK type="forbidden_resources">
      <resource resource = "{resource_name}"/>
     </BLOCK>
    </forbidden_resources>
    
    <required_resources>
     <BLOCK type="required_resources">
      <resource resource = "{resource_name}"/>
     </BLOCK>
    </required_resources>
    
    <preferred_resources>
     <BLOCK type="preferred_resources">
      <resource resource = "{resource_name}"/>
     </BLOCK>
    </preferred_resources>
    
    <resource_inventory>
     <BLOCK type="resource_inventory">
      <inventory serial = "{inventory_serial_number}" type="{inventory_type}"/>
     </BLOCK>
    </resource_inventory>
    
    </activity>
   </BLOCK>
   <BLOCK type="linked_activities: start-after">
    <activity link = "successor" min_delay = "{activity_link_min_interval}" max_delay = "{activity_link_max_interval}" date = "{date}" resource = "{resource_name}" number = "{activity_number}" worktype = "{activity_worktype}"/>
   </BLOCK>
   <BLOCK type="linked_activities: start-together">
    <activity link = "simultaneous" date = "{date}" resource = "{resource_name}" number = "{activity_number}" worktype = "{activity_worktype}"/>
   </BLOCK>
  </linked_activities>

Required inventory

 Pattern:
  <required_inventory>
   <BLOCK type="required_inventory">
    <item
     type="{required_inventory_type_label}"
     model="{required_inventory_model}"
     quantity="{required_inventory_quantity}"
    />
   </BLOCK>
  </required_inventory>
  
 </conbody>
</concept>

Message and Inventory Block Examples

These are examples of messages and inventory blocks.

Inventory block examples

Deinstall inventory

<external_id>{resource_external_id}</external_id>
<cust_number>{activity_customer_number}</cust_number>
<appt_number>{activity_number}</appt_number>
<aid>{aid}</aid>
<astatus>{activity_status}</astatus>	
<ETA>{activity_start_time}</ETA>
<aworktype>{activity_worktype_label}</aworktype>
<deinstalled_inventory>
<inventory>
<invsn>{inventory_serial_number}</invsn>
<invtype>{inventory_type}</invtype>
<eta_inventory_id>{invid}</eta_inventory_id>
<status>{invpool}</status>
</inventory>
</deinstalled_inventory>

Install inventory

<external_id>{resource_external_id}</external_id>
<cust_number>{activity_customer_number}</cust_number>
<appt_number>{activity_number}</appt_number>
<aid>{aid}</aid>
<astatus>{activity_status}</astatus>	
<ETA>{activity_start_time}</ETA>
<aworktype>{activity_worktype_label}</aworktype>
<installed_inventory>
<inventory>
<invsn>{inventory_serial_number}</invsn>
<invtype>{inventory_type}</invtype>
<status>{invpool}</status>
<resource_id>{inv_pid}</resource_id>
<eta_inventory_id>{invid}</eta_inventory_id>
</inventory>
</installed_inventory>

Message examples

Start Activity
<acoord_x>{activity_coordx}</acoord_x>
<acoord_y>{activity_coordy}</acoord_y>
<appt_number>{activity_number}</appt_number>
<aid>{aid}</aid>
<astatus>{activity_status}</astatus>
<aworktype>{activity_worktype_label}</aworktype>
<caddress>{activity_address}</caddress>
<cphone>{activity_phone}</cphone>
<ccity>{activity_city}</ccity>
<cemail>{activity_email}</cemail>
<date>{destination_date}</date>
<eta>{activity_start_time|%F %H:%M}</eta>
<external_id>{resource_external_id}</external_id>
<activity_time_slot_label>{activity_time_slot_label}</activity_time_slot_label>
<user_name>{user_name}</user_name>

Delay Activity

 <appt_number>{activity_number}</appt_number>
 <aid>{aid}</aid>
 <astatus>{activity_status}</astatus>
 <aworktype>{activity_worktype_label}</aworktype>
 <caddress>{activity_address}</caddress>
 <ccity>{activity_city}</ccity>
 <date>{destination_date}</date>
 <eta>{activity_start_time|%F %H:%M}</eta>
 <external_id>{resource_external_id}</external_id>
 <delay_comments>{pr_delay_comments}</delay_comments>
 <delay_reason>{pr_delay_reason}</delay_reason>
 <user_name>{user_name}</user_name> 
 

Cancel Activity

<appt_number>{activity_number}</appt_number>
 <aid>{aid}</aid>
 <astatus>{activity_status}</astatus>
 <aworktype>{activity_worktype_label}</aworktype>
 <caddress>{activity_address}</caddress>
 <ccity>{activity_city}</ccity>
 <cphone>{activity_phone}</cphone>
 <cemail>{activity_email}</cemail>
 <date>{destination_date}</date>
 <external_id>{resource_external_id}</external_id>
 <cancel_reason>{pr_cancel_reason}</cancel_reason>
 <cancel_notes>{pr_cancel_notes}</cancel_notes>
 <user_name>{user_name}</user_name>

Notdone Activity

<appt_number>{activity_number}</appt_number>
 <aid>{aid}</aid>
 <astatus>{activity_status}</astatus>
 <aworktype>{activity_worktype_label}</aworktype>
 <cname>{activity_customer_name}</cname>
 <caddress>{activity_address}</caddress>
 <ccity>{activity_city}</ccity>
 <czip>{activity_zip}</czip>
 <cstate>{activity_state}</cstate>
 <cphone>{activity_phone}</cphone>
 <date>{destination_date}</date>
 <eta>{activity_start_time|%F %H:%M}</eta>
 <end_time>{activity_end_time|%F %H:%M}</end_time>
 <external_id>{resource_external_id}</external_id>
 <work_skills><BLOCK type="activity_workskills">{activity_workskill_label},</BLOCK></work_skills>
 <not_done_notes>{pr_not_done_notes}</not_done_notes>
 <not_done_reason>{pr_not_done_reason}</not_done_reason>
 <activity_time_slot_label>{activity_time_slot_label}</activity_time_slot_label>
 <user_name>{user_name}</user_name>

Suspend Activity

<appt_number>{activity_number}</appt_number>
 <aid>{aid}</aid>
 <astatus>{activity_status}</astatus>
 <aworktype>{activity_worktype_label}</aworktype>
 <caddress>{activity_address}</caddress>
 <ccity>{activity_city}</ccity>
 <date>{destination_date}</date>
 <eta>{activity_start_time|%F %H:%M}</eta>
 <end_time>{activity_end_time|%F %H:%M}</end_time>
 <external_id>{resource_external_id}</external_id>
 <suspend_notes>{pr_suspend_notes}</suspend_notes>
 <suspend_reason>{prnum_suspend_reason}</suspend_reason>
 <activity_time_slot_label>{activity_time_slot_label}</activity_time_slot_label>
 <user_name>{user_name}</user_name>

Complete Activity

<MessageItem>
 <ActivityId>{aid}</ActivityId>
 <LegacyServiceId>{activity_number}</LegacyServiceId>
 <CustomerId>{activity_customer_number}</CustomerId>
 <CustomerZip>{activity_zip}</CustomerZip>
 <ActivityStatus>{activity_status}</ActivityStatus>
 <ActivityType>{activity_worktype_label}</ActivityType>
 <ScheduleDate>{route_date}</ScheduleDate>
 <BeginTime>{activity_start_time|%F %H:%M}</BeginTime>
 <EndTime>{activity_end_time}</EndTime>
 <DurationInMinutes>{activity_duration}</DurationInMinutes>
 <PositionInRoute>{activity_position_in_route}</PositionInRoute>
 <TechnicianId>{user_login}</TechnicianId>
 <ResourceId>{resource_external_id}</ResourceId>
 <ResourceType>{resource_type}</ResourceType>
 <EventDateTime>{message_time_of_creation}</EventDateTime>
 </MessageItem>

Complete Activity: different format

<values>
 <appt_number>{activity_number}</appt_number>
 <external_ID>{resource_external_id}</external_ID>
 <date>{route_date}</date>
 <site_id>{pr_SITEID}</site_id>
 <p>   
 <l>astatus</l>
 <v>{activity_status}</v>
 </p>
 <p>
 <l>TECH_DEPARTURE_TIMESTAMP</l>
 <v>{pr_TECH_DEPARTURE_TIMESTAMP}</v>
 </p>
 <p>
 <l>JOURNAL_ENTRY_DATE</l>
 <v>{message_time_of_creation}</v>
 </p>
 <p>
 <l>JOURNAL_ENTRY_TYPE</l>
 <v>Work Log</v>
 </p>
 <p>
 <l>JOURNAL_ENTRY_DESCRIPTION</l>
 <v>{pr_JOURNAL_ENTRY_DESCRIPTION}</v>
 </p>
 <p>
 <l>JOURNAL_NOTE_ENTRY</l>
 <v>{pr_JOURNAL_NOTE_ENTRY}</v>
 </p>
 <p>
 <l>INCIDENT_CASE_ID</l>
 <v>{pr_INCIDENT_CASE_ID}</v>
 </p>
 <p>
 <l>SITEID</l>
 <v>{pr_SITEID}</v>
 </p>
 <p>
 <l>INVOICE</l>
 <v>{pr_INVOICE}</v>
 </p>
 <p>
 <l>CABLE_FOOTAGE</l>
 <v>{pr_CABLE_FOOTAGE}</v>
 </p>
 <p>
 <l>DROP_DIRECT_BURY</l>
 <v>{pr_DROP_DIRECT_BURY}</v>
 </p>
 <p>
 <l>CLOSURE_CODE</l>
 <v>{prnum_CLOSURE_CODE}{prnum_CLOSURE_CODE1}</v>
 </p>
 </values>